1. 27 Feb, 2015 6 commits
  2. 26 Feb, 2015 18 commits
  3. 25 Feb, 2015 16 commits
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 009f33ed
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-02-24
      
      This series contains updates to i40e and i40evf only, which bumps their
      versions to i40e 1.2.9 and i40evf 1.2.3.
      
      Paul fixes i40e_debug_aq() for big endian machines by adding the
      appropriate LExx_TO_CPU wrappers.
      
      Catherine adds a requested speed variable to the link_status to store the
      last speeds we requested from the firmware and use the advertised speed
      settings in get_settings in ethtool now that we have it.  Due to the
      new code addition, she also refactors get_settings to improve readability
      and to accommodate some of the longer lines of code by adding two
      functions i40e_get_settings_link_up() and i40e_get_settings_link_down().
      
      Carolyn adds a struct to the VSI struct to keep track of RXNFC settings
      done via ethtool.  Adds more information to the interrupt vector
      names, specifically to the VF misc vector name so that we can distinguish
      between all the interrupts.
      
      Ashish enables the i40evf driver to enable debug prints via ethtool.
      
      Mitch updates i40e to enable packet split only when IOMMU is in use,
      since it shows a distinct advantage over the single-buffer path
      because it minimizes DMA mapping and unmapping.  Also adds the receive
      routine in use to the features log message to be able to print the
      receive packet split status.
      
      Greg adds the ability to get, set and commit permanently the NPAR
      partition BW configuration through configfs.  Enables an application
      to query the i40e driver's private flags to get the status of NPAR
      enablement via ethtool.
      
      Neerav adds support for bridge offload ndo_ops getlink and setlink
      to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE.
      The support is only enabled in the case of a PF VSI and not available for
      any other VSI type.
      
      Kevin fixes i40e by ensuring the BUF and FLAG_RD flags are set for
      indirect admin queue command.
      
      Vasu updates the driver to setup FCoE netdev device type as "fcoe", so that
      it shows up in sysfs as FCoE device.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      009f33ed
    • Guenter Roeck's avatar
      net: dsa: Introduce dsa_is_port_initialized · d79d2107
      Guenter Roeck authored
      To avoid race conditions when using the ds->ports[] array,
      we need to check if the accessed port has been initialized.
      Introduce and use helper function dsa_is_port_initialized
      for that purpose and use it where needed.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d79d2107
    • David S. Miller's avatar
      Merge branch 'sf2_hwbridge' · bb66be1c
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: dsa: integration with SWITCHDEV for HW bridging
      
      This patch set provides the DSA and SWITCHDEV integration bits together and
      modifies the bcm_sf2 driver accordingly such that it works properly with HW
      bridging.
      
      Changes in v3:
      
      - add back the null pointer check in dsa_slave_br_port_mask from Guenter
      - slightly rework patch 1 commit message not to mention the function name
        we add in patch 2
      
      Changes in v2:
      
      - avoid a race condition in how DSA network devices are created, patch from
        Guenter Roeck
      - provide a consistent and work STP state once a port leaves the bridge
      - retain a bridge device pointer to properly flag port/bridge membership
      - properly flush the ARL (Address Resolution Logic) in bcm_sf2.c
      - properly retain port membership when individually bringing devices up/down
        while they are members of a bridge
      
      We discussed on the mailing-list the possibility of standardizing a "fdb_flush"
      operation for DSA switch drivers, looking at the Marvell and Broadcom switches,
      I am not convinced this is practical or diserable as the terminologies vary
      here, but there is nothing preventing us from doing it later.
      
      Many thanks to Guenter and Andrew for both testing and providing feedback.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb66be1c
    • Florian Fainelli's avatar
      net: dsa: bcm_sf2: add HW bridging support · 12f460f2
      Florian Fainelli authored
      Implement the bridge join, leave and set_stp callbacks by making that
      we do the following:
      
      - when a port joins the bridge, all existing ports in the bridge get
        their VLAN control register updated with that joining port
      - the joining port is including all existing bridge ports in its own
        VLAN control register
      
      The leave operation is fairly similar, special care must be taken to
      make sure that port leaving the bridging is not removing itself from its
      own VLAN control register.
      
      Since the various BR_* states apply directly to our HW semantics, we
      just need to translate these constants into their corresponding HW
      settings, and voila!
      
      We make sure to trigger a fast-ageing process for ports that are
      joining/leaving the bridge and transition from incompatible states, this
      is equivalent to triggering an ARL flush for that port.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12f460f2
    • Florian Fainelli's avatar
      net: dsa: integrate with SWITCHDEV for HW bridging · b73adef6
      Florian Fainelli authored
      In order to support bridging offloads in DSA switch drivers, select
      NET_SWITCHDEV to get access to the port_stp_update and parent_get_id
      NDOs that we are required to implement.
      
      To facilitate the integratation at the DSA driver level, we implement 3
      types of operations:
      
      - port_join_bridge
      - port_leave_bridge
      - port_stp_update
      
      DSA will resolve which switch ports that are currently bridge port
      members as some Switch hardware/drivers need to know about that to limit
      the register programming to just the relevant registers (especially for
      slow MDIO buses).
      
      We also take care of setting the correct STP state when slave network
      devices are brought up/down while being bridge members.
      
      Finally, when a port is leaving the bridge, we make sure we set in
      BR_STATE_FORWARDING state, otherwise the bridge layer would leave it
      disabled as a result of having left the bridge.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b73adef6
    • Guenter Roeck's avatar
      net: dsa: Ensure that port array elements are initialized before being used · d87d6f44
      Guenter Roeck authored
      A network device notifier can be called for one or more of the created
      slave devices before all slave devices have been registered. This can
      result in a mismatch between ds->phys_port_mask and the registered devices
      by the time the call is made, and it can result in a slave device being
      added to a bridge before its entry in ds->ports[] has been initialized.
      
      Rework the initialization code to initialize entries in ds->ports[] in
      dsa_slave_create. With this change, dsa_slave_create no longer needs
      to return slave_dev but can return an error code instead.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d87d6f44
    • Sravanthi Tangeda's avatar
      i40e/i40evf: Update driver versions · 5b8eb176
      Sravanthi Tangeda authored
      Bump i40e to 1.2.9 and i40evf 1.2.3
      
      Also update the copyright year.
      
      Change-ID: I345d777e94abd0acffe6a28793f675d251a86299
      Signed-off-by: default avatarSravanthi Tangeda <sravanthi.tangeda@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5b8eb176
    • Carolyn Wyborny's avatar
      i40evf: Add more info to interrupt vector names · 9a21a007
      Carolyn Wyborny authored
      This patch adds the netdev name to the VF misc vector name.  Without
      this patch, all the interrupts show the same info, so it difficult to
      distinguish them.
      
      Change-ID: I247828697e1373ecfb5f8dc1bc9618e98a7f4942
      Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9a21a007
    • Greg Rose's avatar
      i40e: Use ethtool private flags to display NPAR status · 7e45ab44
      Greg Rose authored
      Allow an application to query the i40e driver's private flags to get the
      status of NPAR enablement.  This will be used by applications to determine
      if there are NPAR specific features available.
      
      Change-ID: Ia6d9477a48f9c4cb41ca022bd433f77da3f2146c
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7e45ab44
    • Kevin Scott's avatar
      i40e: Set FLAG_RD when sending buffer FW must read · 3b38cd17
      Kevin Scott authored
      Set FLAG_RD for send_driver_version AQ command.
      
      Change-ID: I8253051eff85a1d4b5a4e12ce0395b65ceb91e62
      Signed-off-by: default avatarKevin Scott <kevin.c.scott@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3b38cd17
    • Mitch Williams's avatar
      i40e: print Rx packet split status · aba237d1
      Mitch Williams authored
      Add the RX routine in use to the features log message.
      
      Change-ID: Ifbbf28fb7f42b9a3d2828586488e9e6331107dd5
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      aba237d1
    • Vasu Dev's avatar
      i40e: setup FCoE device type · ccafbce4
      Vasu Dev authored
      Setup FCoE netdev device type as "fcoe", so that it shows up in
      sysfs as FCoE device.
      
      Change-ID: Ie13a1a332dba4d5802586926104ee01ef20da44f
      Signed-off-by: default avatarVasu Dev <vasu.dev@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ccafbce4
    • Kevin Scott's avatar
      i40e: Set BUF flag for Set Version AQ command · a6db5a4d
      Kevin Scott authored
      BUF flag must be set for indirect AQ command.
      
      Change-ID: I6819718a47baf69d1a91ebaed89f735ed6e86025
      Signed-off-by: default avatarKevin Scott <kevin.c.scott@intel.com>
      Acked-by: default avatarShannon Nelson <shannon.nelson@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a6db5a4d
    • Neerav Parikh's avatar
      i40e: Add support for getlink, setlink ndo ops · 51616018
      Neerav Parikh authored
      Add support for bridge offload ndo_ops getlink and setlink to
      enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE.
      The support is only enabled in case of a PF VSI and not available for
      any other VSI type.
      
      By default the i40e driver inserts a bridge as part of the bring-up
      when a FDIR type VSI and/or a FCoE VSI is created. This bridge is
      created in VEB mode by default i.e. after creating the bridge using
      "Add VEB" AQ command the loopback for the PF's default VSI is enabled.
      
      The patch adds capability where all the VSIs created as downlink to
      the bridge inherits the loopback property and enables loopback only
      if the uplink bridge is operating in VEB mode.
      Hence, there is no need to explicitly enable loopback as part of
      allocating resources for SR-IOV VFs and call to do that has been
      removed.
      
      In case a user-request is made either via "bridge" utility or using
      the bridge netlink interface that requires to change the hardware
      bridge mode then that would require a PF reset and rebuild of the
      switch hierarchy.
      
      Also update the copyright year.
      
      Change-ID: I4d78fc1c83158efda29ba7be92239b74f75d6d25
      Signed-off-by: default avatarNeerav Parikh <neerav.parikh@intel.com>
      Tested-By: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      51616018
    • Greg Rose's avatar
      i40e: Implement configfs for NPAR BW configuration · 96664483
      Greg Rose authored
      Add configfs controls to get, set and commit NPAR BW configurations.
      
      We export three controls:
      	min_bw - Can take a value from 0 to 100 inclusive
      	max_bw - Can take a value from 1 to 100 inclusive
      	commit - A write-only control that accepts only a value of 1 and will
      		cause the BW settings to be permanently committed to NVM so
      		that they are persistent across power cycles and system
      		resets
      
      The BW values are relative and are expressed as percentages.  For more
      information on the interpretation of the BW settings see the Dell
      specifications for NPAR.
      
      Also update the copyright year.
      
      Change-ID: Id7496ca65630b5037e32ba6a5a748fbc1632881b
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Tested-By: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      96664483
    • Greg Rose's avatar
      i40e: Add NPAR BW get and set functions · f4492db1
      Greg Rose authored
      We need to be able to get, set and commit permanently the NPAR
      partition BW configuration through configfs.  These are necessary
      precursor functions for that feature.
      
      Also update the copyright year.
      
      Change-ID: I9d5ca160a9288145f1dd2042994028679fff55f3
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f4492db1