1. 20 4月, 2012 8 次提交
  2. 18 4月, 2012 8 次提交
  3. 17 4月, 2012 14 次提交
  4. 16 4月, 2012 10 次提交
    • P
      drivers/net: fix unresolved 64bit math in mellanox/mlx4/en_dcb_nl.c · 43c880df
      Paul Gortmaker 提交于
      Commit 109d2446
      
          "net/mlx4_en: Set max rate-limit for a TC"
      
      introduced 64 bit math operations into mlx4_en_dcbnl_ieee_setmaxrate()
      
      causing the following final link failure on an x86_32 allmodconfig
      
        ERROR: "__udivdi3" [drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko] undefined!
      
      Convert it to use div_u64() instead.
      
      Cc: Amir Vadai <amirv@mellanox.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43c880df
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 56845d78
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      56845d78
    • J
      macvlan: add FDB bridge ops and macvlan flags · df8ef8f3
      John Fastabend 提交于
      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: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df8ef8f3
    • G
      ixgbe: UTA table incorrectly programmed · 2b202712
      Greg Rose 提交于
      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: NGreg Rose <gregory.v.rose@intel.com>
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b202712
    • J
      ixgbe: allow RAR table to be updated in promisc mode · 9dcb373c
      John Fastabend 提交于
      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: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9dcb373c
    • J
      ixgbe: enable FDB netdevice ops · 0f4b0add
      John Fastabend 提交于
      Enable FDB ops on ixgbe when in SR-IOV mode.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0f4b0add
    • J
      net: rtnetlink notify events for FDB NTF_SELF adds and deletes · 3ff661c3
      John Fastabend 提交于
      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: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ff661c3
    • J
      net: add fdb generic dump routine · d83b0603
      John Fastabend 提交于
      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: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d83b0603
    • J
      net: addr_list: add exclusive dev_uc_add and dev_mc_add · 12a94634
      John Fastabend 提交于
      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: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12a94634
    • J
      net: add generic PF_BRIDGE:RTM_ FDB hooks · 77162022
      John Fastabend 提交于
      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: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77162022