1. 19 Apr, 2012 3 commits
  2. 18 Apr, 2012 6 commits
  3. 17 Apr, 2012 12 commits
  4. 16 Apr, 2012 5 commits
  5. 15 Apr, 2012 14 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 56845d78
      David S. Miller authored
      Conflicts:
      	drivers/net/ethernet/atheros/atlx/atl1.c
      	drivers/net/ethernet/atheros/atlx/atl1.h
      
      Resolved a conflict between a DMA error bug fix and NAPI
      support changes in the atl1 driver.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56845d78
    • John Fastabend's avatar
      macvlan: add FDB bridge ops and macvlan flags · df8ef8f3
      John Fastabend authored
      This adds FDB bridge ops to the macvlan device passthru mode.
      Additionally a flags field was added and a NOPROMISC bit to
      allow users to use passthru mode without the driver calling
      dev_set_promiscuity(). The flags field is a u16 placed in a
      4 byte hole (consuming 2 bytes) of the macvlan_dev struct.
      
      We want to do this so that the macvlan driver or stack
      above the macvlan driver does not have to process every
      packet. For the use case where we know all the MAC addresses
      of the endstations above us this works well.
      
      This patch is a result of Roopa Prabhu's work. Follow up
      patches are needed for VEPA and VEB macvlan modes.
      
      v2: Change from distinct nopromisc mode to a flags field to
          configure this. This avoids the tendency to add a new
          mode every time we need some slightly different behavior.
      v3: fix error in dev_set_promiscuity and add change and get
          link attributes for flags.
      
      CC: Roopa Prabhu <roprabhu@cisco.com>
      CC: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df8ef8f3
    • Greg Rose's avatar
      ixgbe: UTA table incorrectly programmed · 2b202712
      Greg Rose authored
      The UTA table was being set to the functional equivalent of promiscuous
      mode.  This was resulting in traffic from the virtual function being
      flooded onto the wire and the PF device. This resulted in additional
      overhead for VF traffic sent to the network and in the case of traffic
      sent to the PF or another VF resulted in unwanted packets on the wire.
      
      This was actually not the intended behavior. Now that we can program
      the embedded switch correctly we can remove this snippit of code. Users
      who want to support this should configure the FDB correctly using the
      FDB ops.
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b202712
    • John Fastabend's avatar
      ixgbe: allow RAR table to be updated in promisc mode · 9dcb373c
      John Fastabend authored
      This allows RAR table updates while in promiscuous. With
      SR-IOV enabled it is valuable to allow the RAR table to
      be updated even when in promisc mode to configure forwarding
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9dcb373c
    • John Fastabend's avatar
      ixgbe: enable FDB netdevice ops · 0f4b0add
      John Fastabend authored
      Enable FDB ops on ixgbe when in SR-IOV mode.
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0f4b0add
    • John Fastabend's avatar
      net: rtnetlink notify events for FDB NTF_SELF adds and deletes · 3ff661c3
      John Fastabend authored
      It is useful to be able to monitor for FDB events in user space.
      This patch adds support to generate netlink events when a change
      is made to a device supporting the FDB ops.
      
      This brings embedded switches inline with the SW net/bridge which
      triggers events on FDB updates as well.
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ff661c3
    • John Fastabend's avatar
      net: add fdb generic dump routine · d83b0603
      John Fastabend authored
      This adds a generic dump routine drivers can call. It
      should be sufficient to handle any bridging model that
      uses the unicast address list. This should be most SR-IOV
      enabled NICs.
      
      v2: return error on nlmsg_put and use -EMSGSIZE instead
          of -ENOMEM this is inline other usages
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d83b0603
    • John Fastabend's avatar
      net: addr_list: add exclusive dev_uc_add and dev_mc_add · 12a94634
      John Fastabend authored
      This adds a dev_uc_add_excl() and dev_mc_add_excl() calls
      similar to the original dev_{uc|mc}_add() except it sets
      the global bit and returns -EEXIST for duplicat entires.
      
      This is useful for drivers that support SR-IOV, macvlan
      devices and any other devices that need to manage the
      unicast and multicast lists.
      
      v2: fix typo UNICAST should be MULTICAST in dev_mc_add_excl()
      
      CC: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12a94634
    • John Fastabend's avatar
      net: add generic PF_BRIDGE:RTM_ FDB hooks · 77162022
      John Fastabend authored
      This adds two new flags NTF_MASTER and NTF_SELF that can
      now be used to specify where PF_BRIDGE netlink commands should
      be sent. NTF_MASTER sends the commands to the 'dev->master'
      device for parsing. Typically this will be the linux net/bridge,
      or open-vswitch devices. Also without any flags set the command
      will be handled by the master device as well so that current user
      space tools continue to work as expected.
      
      The NTF_SELF flag will push the PF_BRIDGE commands to the
      device. In the basic example below the commands are then parsed
      and programmed in the embedded bridge.
      
      Note if both NTF_SELF and NTF_MASTER bits are set then the
      command will be sent to both 'dev->master' and 'dev' this allows
      user space to easily keep the embedded bridge and software bridge
      in sync.
      
      There is a slight complication in the case with both flags set
      when an error occurs. To resolve this the rtnl handler clears
      the NTF_ flag in the netlink ack to indicate which sets completed
      successfully. The add/del handlers will abort as soon as any
      error occurs.
      
      To support this new net device ops were added to call into
      the device and the existing bridging code was refactored
      to use these. There should be no required changes in user space
      to support the current bridge behavior.
      
      A basic setup with a SR-IOV enabled NIC looks like this,
      
                veth0  veth2
                  |      |
                ------------
                |  bridge0 |   <---- software bridging
                ------------
                     /
                     /
        ethx.y      ethx
          VF         PF
           \         \          <---- propagate FDB entries to HW
           \         \
        --------------------
        |  Embedded Bridge |    <---- hardware offloaded switching
        --------------------
      
      In this case the embedded bridge must be managed to allow 'veth0'
      to communicate with 'ethx.y' correctly. At present drivers managing
      the embedded bridge either send frames onto the network which
      then get dropped by the switch OR the embedded bridge will flood
      these frames. With this patch we have a mechanism to manage the
      embedded bridge correctly from user space. This example is specific
      to SR-IOV but replacing the VF with another PF or dropping this
      into the DSA framework generates similar management issues.
      
      Examples session using the 'br'[1] tool to add, dump and then
      delete a mac address with a new "embedded" option and enabled
      ixgbe driver:
      
      # br fdb add 22:35:19:ac:60:59 dev eth3
      # br fdb
      port    mac addr                flags
      veth0   22:35:19:ac:60:58       static
      veth0   9a:5f:81:f7:f6:ec       local
      eth3    00:1b:21:55:23:59       local
      eth3    22:35:19:ac:60:59       static
      veth0   22:35:19:ac:60:57       static
      #br fdb add 22:35:19:ac:60:59 embedded dev eth3
      #br fdb
      port    mac addr                flags
      veth0   22:35:19:ac:60:58       static
      veth0   9a:5f:81:f7:f6:ec       local
      eth3    00:1b:21:55:23:59       local
      eth3    22:35:19:ac:60:59       static
      veth0   22:35:19:ac:60:57       static
      eth3    22:35:19:ac:60:59       local embedded
      #br fdb del 22:35:19:ac:60:59 embedded dev eth3
      
      I added a couple lines to 'br' to set the flags correctly is all. It
      is my opinion that the merit of this patch is now embedded and SW
      bridges can both be modeled correctly in user space using very nearly
      the same message passing.
      
      [1] 'br' tool was published as an RFC here and will be renamed 'bridge'
          http://patchwork.ozlabs.org/patch/117664/
      
      Thanks to Jamal Hadi Salim, Stephen Hemminger and Ben Hutchings for
      valuable feedback, suggestions, and review.
      
      v2: fixed api descriptions and error case with both NTF_SELF and
          NTF_MASTER set plus updated patch description.
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77162022
    • Tony Zelenoff's avatar
      atl1: do not drop rx/tx interrupts before they are scheduled · 136cd14e
      Tony Zelenoff authored
      To prevent interrupts lost they should be dropped only if
      they are scheduled via napi interfaces. In other case, there is
      exists situation when napi handler process TX interrupt, stay in
      RX processing and in that moment any other interrupt received.
      Then before this patch TX bit in ISR will be cleaned, napi
      schedule will not occur in case of currently processing event and
      TX interrupt definitely will be lost.
      Signed-off-by: default avatarTony Zelenoff <antonz@parallels.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      136cd14e
    • Tony Zelenoff's avatar
      atl1: do not process interrupts in cycle in handler · 2a9bc71e
      Tony Zelenoff authored
      As the rx/tx handled inside napi handler, the cycle is
      not needed now, because only the rx/tx need such kind of
      processing.
      Signed-off-by: default avatarTony Zelenoff <antonz@parallels.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a9bc71e
    • Tony Zelenoff's avatar
    • Tony Zelenoff's avatar
      atl1: add value to check ability of reenabling IRQs · aa45ba90
      Tony Zelenoff authored
      Unfortunately it is not clear from code is usage of
      IMR register possible or not. So, to prevent possible
      side-effects of reading this register i prefer store
      interrupts enable flag separately.
      Signed-off-by: default avatarTony Zelenoff <antonz@parallels.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa45ba90
    • Tony Zelenoff's avatar
      atl1: make function to set imr of card · 02d5d11b
      Tony Zelenoff authored
      This function should be used later to set/remove proper
      bits in imr to disable only rx ints.
      Signed-off-by: default avatarTony Zelenoff <antonz@parallels.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02d5d11b