1. 26 2月, 2015 4 次提交
    • D
      Merge branch 'sf2_hwbridge' · bb66be1c
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      bb66be1c
    • F
      net: dsa: bcm_sf2: add HW bridging support · 12f460f2
      Florian Fainelli 提交于
      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: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12f460f2
    • F
      net: dsa: integrate with SWITCHDEV for HW bridging · b73adef6
      Florian Fainelli 提交于
      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: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b73adef6
    • G
      net: dsa: Ensure that port array elements are initialized before being used · d87d6f44
      Guenter Roeck 提交于
      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: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d87d6f44
  2. 25 2月, 2015 11 次提交
    • T
      net: via-rhine: add BQL support · 92bf2008
      Tino Reichardt 提交于
      Add Byte Queue Limits (BQL) support to via-rhine driver.
      
      [edumazet] tweaked patch and changed TX_RING_SIZE from 16 to 64
      Signed-off-by: NTino Reichardt <milky-kernel@mcmilk.de>
      Tested-by: NJamie Gloudon <jamie.gloudon@gmail.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92bf2008
    • I
      ipv6: remove dead debug code from ip6_tunnel.c · 49e64dcd
      Ian Morris 提交于
      The IP6_TNL_TRACE macro is no longer used anywhere in the code so remove definition.
      Signed-off-by: NIan Morris <ipm@chirality.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49e64dcd
    • D
      Merge branch 'bonding-next' · 8ff3ac06
      David S. Miller 提交于
      Mahesh Bandewar says:
      
      ====================
      (Shortened) Bonding patch series
      
      I'm shortening the earlier patch series to just two patches at this moment.
      Andy is going to integrate remaining 3 patches with his netlink changes
      and post the completed patches.
      
      These two patches are the same one from the previous patch series with
      some styling changes (Dave Miller's suggestions) for the churn-machine patch.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ff3ac06
    • M
      bonding: Implement port churn-machine (AD standard 43.4.17). · 14c9551a
      Mahesh Bandewar 提交于
      The Churn Detection machines detect the situation where a port is operable,
      but the Actor and Partner have not attached the link to an Aggregator and
      brought the link into operation within a bound time period. Under normal
      operation of the LACP, agreement between Actor and Partner should be reached
      very rapidly. Continued failure to reach agreement can be symptomatic of
      device failure.
      
      Actor-churn-detection state-machine
      Reviewed-by: NNikolay Aleksandrov <nikolay@redhat.com>
      
      ===================================
      
      BEGIN=True + PortEnable=False
                 |
                 v
       +------------------------+   ActorPort.Sync=True  +------------------+
       |   ACTOR_CHURN_MONITOR  | ---------------------> |  NO_ACTOR_CHURN  |
       |========================|                        |==================|
       |    ActorChurn=False    |  ActorPort.Sync=False  | ActorChurn=False |
       | ActorChurn.Timer=Start | <--------------------- |                  |
       +------------------------+                        +------------------+
                 |                                                ^
                 |                                                |
        ActorChurn.Timer=Expired                                  |
                 |                                       ActorPort.Sync=True
                 |                                                |
                 |                +-----------------+             |
                 |                |   ACTOR_CHURN   |             |
                 |                |=================|             |
                 +--------------> | ActorChurn=True | ------------+
                                  |                 |
                                  +-----------------+
      
      Similar for the Partner-churn-detection.
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14c9551a
    • M
      bonding: Verify RX LACPDU has proper dest mac-addr · bb54e589
      Mahesh Bandewar 提交于
      The 802.1AX standard states:
      "The DA in LACPDUs is the Slow_Protocols_Multicast address."
      
      This patch enforces that and drops LACPDUs with destination MAC
      addresses other than Slow_Protocols_Multicast address
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Reviewed-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb54e589
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 2a12d6cf
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-02-23
      
      This series contains updates to e1000e, igbvf, i40e and i40evf.
      
      David adds support for i219 devices to the e1000e driver.
      
      Jeff (me) provides two patches to cleanup igbvf, first cleans up the
      whitespace issues found and the second cleans up the usage of msleep(),
      min() and max() with usleep_range(), min_t() and max_t() respectively.
      
      Kamil updates the shadow RAM read/write functions by refactoring them
      to prepare for future work.
      
      Shannon renames the debugfs command "clear_stats pf" to clear_stats port"
      to clarify what the function really does.
      
      Mitch refactors the receive routine, by splitting the receive hot path
      code into two, one for packet split and one for single buffer, which
      improves receive performance.  Disables NAPI polling sooner when closing
      the interface to fix an occasional panic during close which was
      caused by the driver trying to delete and clean rings at the same time.
      Also refactors reset for i40evf, since a recent change to the shutdown
      flow messed up the reset flow.  Since i40evf_down() now holds the
      critical section lock, we cannot call it from the reset handler, which
      also holds the lock.
      
      Nicholas restricts the virtual channel opcodes should remain consistent
      between updates to the opcode enum.
      
      Neerav converts the VSI connection type to use a #define instead of
      using a magic number.
      
      Anjali updates the registers file to remove registers no longer available.
      Also fixes the EMPR interrupt handling, so that we won't trigger another
      EMPR when we receive an EMPR event.
      
      Catherine cleans up the variable an_enable since it was set and never
      used.
      
      Greg fixes the netdev op that allows the operator to turn MAC/VLAN
      spoof checking on and off so that it includes the flag for VLAN spoof
      checking.
      
      v2: Updated patch #10 in the series to use test_and_clear_bit() as
          suggested by Sergei Shtylyov
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a12d6cf
    • D
      Merge branch 'bcmgenet-next' · 1e0629d3
      David S. Miller 提交于
      Petri Gynther says:
      
      ====================
      net: bcmgenet: Tx init improvements
      
      Four small patches to improve bcmgenet Tx init:
      1. bcmgenet_init_tx_ring() cleanup
      2. rework Tx queue init
      3. precalculate TxCB->bd_addr
      4. rename bcmgenet_hw_params->bds_cnt and GENET_DEFAULT_BD_CNT
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e0629d3
    • P
      net: bcmgenet: rename bcmgenet_hw_params->bds_cnt and GENET_DEFAULT_BD_CNT · 51a966a7
      Petri Gynther 提交于
      bcmgenet_hw_params->bds_cnt and GENET_DEFAULT_BD_CNT are used only in Tx init.
      Rename them accordingly:
      - bcmgenet_hw_params->bds_cnt => bcmgenet_hw_params->tx_bds_per_q
      - GENET_DEFAULT_BD_CNT => GENET_Q16_TX_BD_CNT
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51a966a7
    • P
      net: bcmgenet: precalculate TxCB->bd_addr · 014012a4
      Petri Gynther 提交于
      There is 1-to-1 mapping between TxCBs and TxBDs. Precalculate TxCB->bd_addr
      once in bcmgenet_init_dma() instead of doing it over and over needlessly in
      bcmgenet_get_txcb().
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      014012a4
    • P
      net: bcmgenet: rework Tx queue init · 16c6d667
      Petri Gynther 提交于
      1. Rename bcmgenet_init_multiq() to bcmgenet_init_tx_queues()
      2. Fix bcmgenet_init_tx_queues() function description
      3. Move Tx default queue init inside bcmgenet_init_tx_queues()
      4. Modify bcmgenet_init_dma() to call bcmgenet_init_tx_queues()
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16c6d667
    • P
      net: bcmgenet: bcmgenet_init_tx_ring() cleanup · 4f8b2d7d
      Petri Gynther 提交于
      1. Simplify function description
      2. Rename function parameter write_ptr to start_ptr to better indicate use
      3. Remove unnecessary local variable first_bd
      4. Remove out-of-place comment "Unclassified traffic goes to ring 16"
      5. Fix TDMA_WRITE_PTR register init
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f8b2d7d
  3. 24 2月, 2015 25 次提交