1. 08 8月, 2017 27 次提交
  2. 07 8月, 2017 13 次提交
    • R
      net/mlx5: Increase the maximum flow counters supported · a8ffcc74
      Rabie Loulou 提交于
      Read new NIC capability field which represnts 16 MSBs of the max flow
      counters number supported (max_flow_counter_31_16).
      
      Backward compatibility with older firmware is preserved, the modified
      driver reads max_flow_counter_31_16 as 0 from the older firmware and
      uses up to 64K counters.
      
      Changed flow counter id from 16 bits to 32 bits. Backward compatibility
      with older firmware is preserved as we kept the 16 LSBs of the counter
      id in place and added 16 MSBs from reserved field.
      
      Changed the background bulk reading of flow counters to work in chunks
      of at most 32K counters, to make sure we don't attempt to allocate very
      large buffers.
      Signed-off-by: NRabie Loulou <rabiel@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      a8ffcc74
    • E
      net/mlx5: Delay events till ib registration ends · 97834eba
      Erez Shitrit 提交于
      When mlx5_ib registers itself to mlx5_core as an interface, it will
      call mlx5_add_device which will call mlx5_ib interface add callback,
      in case the latter successfully returns, only then mlx5_core will add
      it to the interface list and async events will be forwarded to mlx5_ib.
      Between mlx5_ib interface add callback and mlx5_core adding the mlx5_ib
      interface to its devices list, arriving mlx5_core events can be missed
      by the new mlx5_ib registering interface.
      
      In other words:
      thread 1: mlx5_ib: mlx5_register_interface(dev)
      thread 1: mlx5_core: mlx5_add_device(dev)
      thread 1: mlx5_core: ctx = dev->add => (mlx5_ib)->mlx5_ib_add
      thread 2: mlx5_core_event: **new event arrives, forward to dev_list
      thread 1: mlx5_core: add_ctx_to_dev_list(ctx)
      /* previous event was missed by the new interface.*/
      It is ok to miss events before dev->add (mlx5_ib)->mlx5_ib_add_device
      but not after.
      
      We fix this race by accumulating the events that come between the
      ib_register_device (inside mlx5_add_device->(dev->add)) till the adding
      to the list completes and fire them to the new registering interface
      after that.
      
      Fixes: f1ee87fe ("net/mlx5: Organize device list API in one place")
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      97834eba
    • S
      net/mlx5: Add CONFIG_MLX5_ESWITCH Kconfig · e80541ec
      Saeed Mahameed 提交于
      Allow to selectively build the driver with or without sriov eswitch, VF
      representors and TC offloads.
      
      Also remove the need of two ndo ops structures (sriov & basic)
      and keep only one unified ndo ops, compile out VF SRIOV ndos when not
      needed (MLX5_ESWITCH=n), and for VF netdev calling those ndos will result
      in returning -EPERM.
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Cc: Jes Sorensen <jsorensen@fb.com>
      Cc: kernel-team@fb.com
      e80541ec
    • S
      net/mlx5: Separate between E-Switch and MPFS · eeb66cdb
      Saeed Mahameed 提交于
      Multi-Physical Function Switch (MPFs) is required for when multi-PF
      configuration is enabled to allow passing user configured unicast MAC
      addresses to the requesting PF.
      
      Before this patch eswitch.c used to manage the HW MPFS l2 table,
      E-Switch always (regardless of sriov) enabled vport(0) (NIC PF) vport's
      contexts update on unicast mac address list changes, to populate the PF's
      MPFS L2 table accordingly.
      
      In downstream patch we would like to allow compiling the driver without
      E-Switch functionalities, for that we move MPFS l2 table logic out
      of eswitch.c into its own file, and provide Kconfig flag (MLX5_MPFS) to
      allow compiling out MPFS for those who don't want Multi-PF support.
      
      NIC PF netdevice will now directly update MPFS l2 table via the new MPFS
      API. VF netdevice has no access to MPFS L2 table, so E-Switch will remain
      responsible of updating its MPFS l2 table on behalf of its VFs.
      
      Due to this change we also don't require enabling vport(0) (PF vport)
      unicast mac changes events anymore, for when SRIOV is not enabled.
      Which means E-Switch is now activated only on SRIOV activation, and not
      required otherwise.
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Cc: Jes Sorensen <jsorensen@fb.com>
      Cc: kernel-team@fb.com
      eeb66cdb
    • S
      net/mlx5: Unify vport manager capability check · a9f7705f
      Saeed Mahameed 提交于
      Expose MLX5_VPORT_MANAGER macro to check for strict vport manager
      E-switch and MPFS (Multi Physical Function Switch) abilities.
      
      VPORT manager must be a PF with an ethernet link and with FW advertised
      vport group manager capability
      
      Replace older checks with the new macro and use it where needed in
      eswitch.c and mlx5e netdev eswitch related flows.
      
      The same macro will be reused in MPFS separation downstream patch.
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      a9f7705f
    • S
      net/mlx5e: NIC netdev init flow cleanup · 07c9f1e5
      Saeed Mahameed 提交于
      Remove redundant call to unregister vport representor in mlx5e_add error
      flow.
      
      Hide the representor priv and eswitch internal structures from en_main.c
      as preparation step for downstream patches which would allow building
      the driver without support for  representors and eswitch.
      
      Fixes: 6f08a22c ("net/mlx5e: Register/unregister vport representors on interface attach/detach")
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      07c9f1e5
    • S
      net/mlx5e: Rearrange netdevice ops structures · 706b3583
      Saeed Mahameed 提交于
      Since we are going to allow building the driver without eswitch support,
      it would be possible to compile out the sriov netdevice ops struct such
      that the basic ops instance will be used for non VF devices too.
      
      Add missing udp tunnel ndos into mlx5e_netdev_ops_basic.
      
      While here, rearrange some ndos in the sriov ops struct and put
      vf/eswitch related ndos towards the end of it.
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      706b3583
    • A
      net: stmmac: Add Adaptrum Anarion GMAC glue layer · 2d1611af
      Alexandru Gagniuc 提交于
      Before the GMAC on the Anarion chip can be used, the PHY interface
      selection must be configured with the DWMAC block in reset.
      
      This layer covers a block containing only two registers. Although it
      is possible to model this as a reset controller and use the "resets"
      property of stmmac, it's much more intuitive to include this in the
      glue layer instead.
      
      At this time only RGMII is supported, because it is the only mode
      which has been validated hardware-wise.
      Signed-off-by: NAlexandru Gagniuc <alex.g@adaptrum.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d1611af
    • S
      netvsc: fix rtnl deadlock on unregister of vf · fb84af8a
      stephen hemminger 提交于
      With new transparent VF support, it is possible to get a deadlock
      when some of the deferred work is running and the unregister_vf
      is trying to cancel the work element. The solution is to use
      trylock and reschedule (similar to bonding and team device).
      Reported-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Fixes: 0c195567 ("netvsc: transparent VF management")
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb84af8a
    • K
      net: systemport: Support 64bit statistics · 10377ba7
      kiki good 提交于
      When using Broadcom Systemport device in 32bit Platform, ifconfig can
      only report up to 4G tx,rx status, which will be wrapped to 0 when the
      number of incoming or outgoing packets exceeds 4G, only taking
      around 2 hours in busy network environment (such as streaming).
      Therefore, it makes hard for network diagnostic tool to get reliable
      statistical result, so the patch is used to add 64bit support for
      Broadcom Systemport device in 32bit Platform.
      
      This patch provides 64bit statistics capability on both ethtool and ifconfig.
      Signed-off-by: NJianming.qiao <kiki-good@hotmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10377ba7
    • I
      liquidio: moved console_bitmask module param to lio_main.c · 2470f3a2
      Intiyaz Basha 提交于
      Moving PF module param console_bitmask to lio_main.c for consistency.
      Signed-off-by: NIntiyaz Basha <intiyaz.basha@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2470f3a2
    • I
      liquidio: add missing strings in oct_dev_state_str array · 9060e6ba
      Intiyaz Basha 提交于
      There's supposed to be a one-to-one correspondence between the 18 macros
      that #define the OCT_DEV states (in octeon_device.h) and the strings in the
      oct_dev_state_str array, but there are only 14 strings in the array.
      
      Add the missing strings (so they become 18 in total), and also revise some
      incorrect/outdated text of existing strings.
      Signed-off-by: NIntiyaz Basha <intiyaz.basha@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9060e6ba
    • R
      sfp: add SFP module support · 73970055
      Russell King 提交于
      Add support for SFP hotpluggable modules via sfp-bus and phylink.
      This supports both copper and optical SFP modules, which require
      different Serdes modes in order to properly negotiate the link.
      
      Optical SFP modules typically require the Serdes link to be talking
      1000BaseX mode - this is the gigabit ethernet mode defined by the
      802.3 standard.
      
      Copper SFP modules typically integrate a PHY in the module to convert
      from Serdes to copper, and the PHY will be configured by the vendor
      to either present a 1000BaseX Serdes link (for fixed 1000BaseT) or a
      SGMII Serdes link.  However, this is vendor defined, so we instead
      detect the PHY, switch the link to SGMII mode, and use traditional
      PHY based negotiation.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73970055