1. 05 Jul, 2019 31 commits
  2. 04 Jul, 2019 9 commits
    • Shay Agroskin's avatar
      net/mlx5: Added devlink info callback · 8338d937
      Shay Agroskin authored
      The callback is invoked using 'devlink dev info <pci>' command and returns
      the running and pending firmware version of the HCA and the name of the
      kernel driver.
      
      If there is a pending firmware version (a new version is burned but the
      HCA still runs with the previous) it is returned as the stored
      firmware version. Otherwise, the running version is returned for this
      field.
      
      Output example:
      $ devlink dev info pci/0000:00:06.0
      pci/0000:00:06.0:
        driver mlx5_core
        versions:
            fixed:
              fw.psid MT_0000000009
            running:
              fw.version 16.26.0100
            stored:
              fw.version 16.26.0100
      Signed-off-by: default avatarShay Agroskin <shayag@mellanox.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      8338d937
    • Shay Agroskin's avatar
      net/mlx5: Added fw version query command · 9c86b07e
      Shay Agroskin authored
      Using the MCQI and MCQS registers, we query the running and pending
      fw version of the HCA.
      The MCQS is queried with sequentially increasing component index, until
      a component of type BOOT_IMG is found. Querying this component's version
      using the MCQI register yields the running and pending fw version of the
      HCA.
      
      Querying MCQI for the pending fw version should be done only after
      validating that such fw version exists. This is done my checking
      'component update state' field in MCQS output.
      Signed-off-by: default avatarShay Agroskin <shayag@mellanox.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      9c86b07e
    • Saeed Mahameed's avatar
      Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux · e08a976a
      Saeed Mahameed authored
      Misc updates from mlx5-next branch:
      
      1) Add the required HW definitions and structures for upcoming TLS
         support.
      2) Add support for MCQI and MCQS hardware registers for fw version query.
      3) Added hardware bits and structures definitions for sub-functions
      4) Small code cleanup and improvement for PF pci driver.
      5) Bluefield (ECPF) updates and refactoring for better E-Switch
         management on ECPF embedded CPU NIC:
         5.1) Consolidate querying eswitch number of VFs
         5.2) Register event handler at the correct E-Switch init stage
         5.3) Setup PF's inline mode and vlan pop when the ECPF is the
              E-Swtich manager ( the host PF is basically a VF ).
         5.4) Handle Vport UC address changes in switchdev mode.
      
      6) Cleanup the rep and netdev reference when unloading IB rep.
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      
      i# All conflicts fixed but you are still merging.
      e08a976a
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · c4cde580
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2019-07-03
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      There is a minor merge conflict in mlx5 due to 8960b389 ("linux/dim:
      Rename externally used net_dim members") which has been pulled into your
      tree in the meantime, but resolution seems not that bad ... getting current
      bpf-next out now before there's coming more on mlx5. ;) I'm Cc'ing Saeed
      just so he's aware of the resolution below:
      
      ** First conflict in drivers/net/ethernet/mellanox/mlx5/core/en_main.c:
      
        <<<<<<< HEAD
        static int mlx5e_open_cq(struct mlx5e_channel *c,
                                 struct dim_cq_moder moder,
                                 struct mlx5e_cq_param *param,
                                 struct mlx5e_cq *cq)
        =======
        int mlx5e_open_cq(struct mlx5e_channel *c, struct net_dim_cq_moder moder,
                          struct mlx5e_cq_param *param, struct mlx5e_cq *cq)
        >>>>>>> e5a3e259
      
      Resolution is to take the second chunk and rename net_dim_cq_moder into
      dim_cq_moder. Also the signature for mlx5e_open_cq() in ...
      
        drivers/net/ethernet/mellanox/mlx5/core/en.h +977
      
      ... and in mlx5e_open_xsk() ...
      
        drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c +64
      
      ... needs the same rename from net_dim_cq_moder into dim_cq_moder.
      
      ** Second conflict in drivers/net/ethernet/mellanox/mlx5/core/en_main.c:
      
        <<<<<<< HEAD
                int cpu = cpumask_first(mlx5_comp_irq_get_affinity_mask(priv->mdev, ix));
                struct dim_cq_moder icocq_moder = {0, 0};
                struct net_device *netdev = priv->netdev;
                struct mlx5e_channel *c;
                unsigned int irq;
        =======
                struct net_dim_cq_moder icocq_moder = {0, 0};
        >>>>>>> e5a3e259
      
      Take the second chunk and rename net_dim_cq_moder into dim_cq_moder
      as well.
      
      Let me know if you run into any issues. Anyway, the main changes are:
      
      1) Long-awaited AF_XDP support for mlx5e driver, from Maxim.
      
      2) Addition of two new per-cgroup BPF hooks for getsockopt and
         setsockopt along with a new sockopt program type which allows more
         fine-grained pass/reject settings for containers. Also add a sock_ops
         callback that can be selectively enabled on a per-socket basis and is
         executed for every RTT to help tracking TCP statistics, both features
         from Stanislav.
      
      3) Follow-up fix from loops in precision tracking which was not propagating
         precision marks and as a result verifier assumed that some branches were
         not taken and therefore wrongly removed as dead code, from Alexei.
      
      4) Fix BPF cgroup release synchronization race which could lead to a
         double-free if a leaf's cgroup_bpf object is released and a new BPF
         program is attached to the one of ancestor cgroups in parallel, from Roman.
      
      5) Support for bulking XDP_TX on veth devices which improves performance
         in some cases by around 9%, from Toshiaki.
      
      6) Allow for lookups into BPF devmap and improve feedback when calling into
         bpf_redirect_map() as lookup is now performed right away in the helper
         itself, from Toke.
      
      7) Add support for fq's Earliest Departure Time to the Host Bandwidth
         Manager (HBM) sample BPF program, from Lawrence.
      
      8) Various cleanups and minor fixes all over the place from many others.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c4cde580
    • René van Dorst's avatar
      net: ethernet: mediatek: Fix overlapping capability bits. · e2c74694
      René van Dorst authored
      Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10.
      
      This can causes issues on non-MT7621 devices which has the
      MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) and MTK_TRGMII capability set.
      The wrong TRGMII setup code can be executed. The current wrongly executed
      code doesn’t do any harm on MT7623 and the TRGMII setup for the MT7623
      SOC side is done in MT7530 driver So it wasn’t noticed in the test.
      
      Move all capability bits in one enum so that they are all unique and easy
      to expand in the future.
      
      Because mtk_eth_path enum is merged in to mkt_eth_capabilities, the
      variable path value is no longer between 0 to number of paths,
      mtk_eth_path_name can’t be used anymore in this form. Convert the
      mtk_eth_path_name array to a function to lookup the pathname.
      
      The old code walked thru the mtk_eth_path enum, which is also merged
      with mkt_eth_capabilities. Expand array mtk_eth_muxc so it can store the
      name and capability bit of the mux. Convert the code so it can walk thru
      the mtk_eth_muxc array.
      
      Fixes: 8efaa653 ("net: ethernet: mediatek: Add MT7621 TRGMII mode support")
      Signed-off-by: default avatarRené van Dorst <opensource@vdorst.com>
      
      v1->v2:
      - Move all capability bits in one enum, suggested by Willem de Bruijn
      - Convert the mtk_eth_path_name array to a function to lookup the pathname
      - Expand array mtk_eth_muxc so it can also store the name and capability
        bit of the mux
      - Updated commit message
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2c74694
    • Weifeng Voon's avatar
      net: stmmac: Enable dwmac4 jumbo frame more than 8KiB · c3efed5a
      Weifeng Voon authored
      Enable GMAC v4.xx and beyond to support 16KiB buffer.
      Signed-off-by: default avatarWeifeng Voon <weifeng.voon@intel.com>
      Signed-off-by: default avatarOng Boon Leong <boon.leong.ong@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3efed5a
    • Vincent Bernat's avatar
      bonding: add an option to specify a delay between peer notifications · 07a4ddec
      Vincent Bernat authored
      Currently, gratuitous ARP/ND packets are sent every `miimon'
      milliseconds. This commit allows a user to specify a custom delay
      through a new option, `peer_notif_delay'.
      
      Like for `updelay' and `downdelay', this delay should be a multiple of
      `miimon' to avoid managing an additional work queue. The configuration
      logic is copied from `updelay' and `downdelay'. However, the default
      value cannot be set using a module parameter: Netlink or sysfs should
      be used to configure this feature.
      
      When setting `miimon' to 100 and `peer_notif_delay' to 500, we can
      observe the 500 ms delay is respected:
      
          20:30:19.354693 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28
          20:30:19.874892 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28
          20:30:20.394919 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28
          20:30:20.914963 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28
      
      In bond_mii_monitor(), I have tried to keep the lock logic readable.
      The change is due to the fact we cannot rely on a notification to
      lower the value of `bond->send_peer_notif' as `NETDEV_NOTIFY_PEERS' is
      only triggered once every N times, while we need to decrement the
      counter each time.
      
      iproute2 also needs to be updated to be able to specify this new
      attribute through `ip link'.
      Signed-off-by: default avatarVincent Bernat <vincent@bernat.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07a4ddec
    • Colin Ian King's avatar
      net: ethernet: sun: remove redundant assignment to variable err · 2368a870
      Colin Ian King authored
      The variable err is being assigned with a value that is never
      read and it is being updated in the next statement with a new value.
      The assignment is redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2368a870
    • Mark Zhang's avatar
      net/mlx5: Add rts2rts_qp_counters_set_id field in hca cap · f8efee08
      Mark Zhang authored
      Add rts2rts_qp_counters_set_id field in hca cap so that RTS2RTS
      qp modification can be used to change the counter of a QP.
      Signed-off-by: default avatarMark Zhang <markz@mellanox.com>
      Reviewed-by: default avatarMajd Dibbiny <majd@mellanox.com>
      Acked-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      f8efee08