1. 02 6月, 2015 12 次提交
    • D
      Merge branch 'rocker-next' · ff43c28a
      David S. Miller 提交于
      Scott Feldman says:
      
      ====================
      rocker: enable by default untagged VLAN support
      
      This patch set is a followup to Simon Horman's RFC patch:
      
         [PATCH/RFC net-next] rocker: by default accept untagged packets
      
      Now, on port probe, we install untagged VLAN (vid=0) support for each port
      as the default.  This is equivalent to the command:
      
         bridge vlan add vid 0 dev DEV self
      
      Accepting untagged VLAN pkts is a reasonable default, but the user could
      override this with:
      
         bridge vlan del vid 0 dev DEV self
      
      With this, we no longer need 8021q module to install vid=0 when port interface
      opens.  In fact, we don't need support for legacy VLAN ndo ops at all since
      they're superseded by bridge_setlink/dellink.  So remove legacy VLAN ndo ops
      support in driver.  (The legacy VLAN ndo ops are supported by bonding/team
      drivers, but don't fit into the transaction model offered by switchdev, so
      switching all VLAN functions to bridge_setlink/dellink switchdev support gets
      us stacked driver + transaction model support).
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff43c28a
    • S
      rocker: remove support for legacy VLAN ndo ops · 2aa2ed08
      Scott Feldman 提交于
      Remove support for legacy ndo ops
      .ndo_vlan_rx_add_vid/.ndo_vlan_rx_kill_vid.  Rocker will use
      bridge_setlink/dellink exclusively for VLAN add/del operations.
      
      The legacy ops are needed if using 8021q driver module to setup VLANs on
      the port.  But an alternative exists in using bridge_setlink/delink to
      setup VLANs, which doesn't depend on 8021q module.  So rocker will switch
      to the newer setlink/dellink ops.  VLANs can added/delete from the port,
      regardless if port is bridged or not, using the bridge commands:
      
      	bridge vlan [add|del] vid VID dev DEV self
      
      (Yes, I agree it's confusing to use the "bridge" command to set a VLAN on a
      non-bridged port).
      
      Using setlink/dellink over legacy ops let's us handle the stacked driver
      case automatically.  It's built-in.  setlink also pass additional flags
      (PVID, egress untagged) that aren't available with the legacy ops.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2aa2ed08
    • S
      rocker: install/remove router MAC for untagged VLAN when joining/leaving bridge · 027e00dc
      Scott Feldman 提交于
      When the port joins a bridge, the port's internal VLAN ID needs to change
      to the bridge's internal VLAN ID.  Likewise, when leaving the bridge, the
      internal VLAN ID reverts back the port's original internal VLAN ID.  (The
      internal VLAN ID is used by device to internally mark untagged pkts with
      some VLAN, which will eventually be removed on egress...think PVID).  When
      the internal VLAN ID changes, we need to update the VLAN table entries and
      the router MAC entries for IP/IPv6 to reflect the new internal VLAN ID.
      
      This patch makes use of the common rocker_port_vlan_add/del functions to
      make sure the tables are updated for the current internal VLAN ID.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      027e00dc
    • S
      rocker: install untagged VLAN (vid=0) support for each port · bcfd7801
      Scott Feldman 提交于
      On port probe, install by default untagged VLAN support.  This is
      equivalent to running the command:
      
      	bridge vlan add vid 0 dev DEV self
      
      A user could, if they wanted, manaully removing untagged support from the
      port by running the command:
      
      	bridge vlan del vid 0 dev DEV self
      
      But installing it by default on port initialization gives the normal
      expected behavior.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bcfd7801
    • S
      rocker: cleanup vlan table on error adding vlan · cec04a60
      Scott Feldman 提交于
      Basic house keeping: If there is an error adding the router MAC for this
      vlan, removing the just installed VLAN table entry to leave device in same
      state as before failure.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cec04a60
    • S
      rocker: zero allocate ports array · 27b808cb
      Scott Feldman 提交于
      When allocating the array of rocker port pointers, zero the array values so
      we can test for !NULL to see if port is allocated/registered.  We'll need
      this later when installing untagged VLAN support for each port, during port
      probe.  It's a long story, but to install a VLAN (vid=0 for untagged, in
      this case) on a port, we'll need to scan other ports to see if the VLAN
      group for that VLAN has been setup.  To scan the other ports, we need to
      walk the port array.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27b808cb
    • T
      vlan: Add GRO support for non hardware accelerated vlan · 66e5133f
      Toshiaki Makita 提交于
      Currently packets with non-hardware-accelerated vlan cannot be handled
      by GRO. This causes low performance for 802.1ad and stacked vlan, as their
      vlan tags are currently not stripped by hardware.
      
      This patch adds GRO support for non-hardware-accelerated vlan and
      improves receive performance of them.
      
      Test Environment:
       vlan device (.1Q) on vlan device (.1ad) on ixgbe (82599)
      
      Result:
      
      - Before
      
      $ netperf -t TCP_STREAM -H 192.168.20.2 -l 60
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    60.00    5233.17
      
      Rx side CPU usage:
        %usr      %sys      %irq     %soft     %idle
        0.27     58.03      0.00     41.70      0.00
      
      - After
      
      $ netperf -t TCP_STREAM -H 192.168.20.2 -l 60
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    60.00    7586.85
      
      Rx side CPU usage:
        %usr      %sys      %irq     %soft     %idle
        0.50     25.83      0.00     59.53     14.14
      
      [ Register VLAN offloads with priority 10 -DaveM ]
      Signed-off-by: NToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      66e5133f
    • H
      cxgb4: remove unused fn to enable/disable db coalescing · 661b689b
      Hariprasad Shenai 提交于
      Remove unused function cxgb4_enable_db_coalescing() and
      cxgb4_disable_db_coalescing()
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      661b689b
    • S
      rocker: remove rocker parameter from functions that have rocker_port parameter · 534ba6a8
      Simon Horman 提交于
      The rocker (switch) of a rocker_port may be trivially obtained from
      the latter it seems cleaner not to pass the former to a function when
      the latter is being passed anyway.
      
      rocker_port_rx_proc() is omitted from this change as it is a hot path case.
      Signed-off-by: NSimon Horman <simon.horman@netronome.com>
      Acked-by: NScott Feldman <sfeldma@gmail.com>
      Acked-by: NAndy Gospodarek <gospo@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      534ba6a8
    • G
      bnx2x: Alloc 4k fragment for each rx ring buffer element · 4cace675
      Gabriel Krisman Bertazi 提交于
      The driver allocates one page for each buffer on the rx ring, which is
      too much on architectures like ppc64 and can cause unexpected allocation
      failures when the system is under stress.  Now, we keep a memory pool
      per queue, and if the architecture's PAGE_SIZE is greater than 4k, we
      fragment pages and assign each 4k segment to a ring element, which
      reduces the overall memory consumption on such architectures.  This
      helps avoiding errors like the example below:
      
      [bnx2x_alloc_rx_sge:435(eth1)]Can't alloc sge
      [c00000037ffeb900] [d000000075eddeb4] .bnx2x_alloc_rx_sge+0x44/0x200 [bnx2x]
      [c00000037ffeb9b0] [d000000075ee0b34] .bnx2x_fill_frag_skb+0x1ac/0x460 [bnx2x]
      [c00000037ffebac0] [d000000075ee11f0] .bnx2x_tpa_stop+0x160/0x2e8 [bnx2x]
      [c00000037ffebb90] [d000000075ee1560] .bnx2x_rx_int+0x1e8/0xc30 [bnx2x]
      [c00000037ffebcd0] [d000000075ee2084] .bnx2x_poll+0xdc/0x3d8 [bnx2x] (unreliable)
      Signed-off-by: NGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
      Acked-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Reviewed-by: NLino Sanfilippo <LinoSanfilippo@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cace675
    • N
      openvswitch: include datapath actions with sampled-packet upcall to userspace · ccea7445
      Neil McKee 提交于
      If new optional attribute OVS_USERSPACE_ATTR_ACTIONS is added to an
      OVS_ACTION_ATTR_USERSPACE action, then include the datapath actions
      in the upcall.
      
      This Directly associates the sampled packet with the path it takes
      through the virtual switch. Path information currently includes mangling,
      encapsulation and decapsulation actions for tunneling protocols GRE,
      VXLAN, Geneve, MPLS and QinQ, but this extension requires no further
      changes to accommodate datapath actions that may be added in the
      future.
      
      Adding path information enhances visibility into complex virtual
      networks.
      Signed-off-by: NNeil McKee <neil.mckee@inmon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccea7445
    • D
      net: Add priority to packet_offload objects. · bdef7de4
      David S. Miller 提交于
      When we scan a packet for GRO processing, we want to see the most
      common packet types in the front of the offload_base list.
      
      So add a priority field so we can handle this properly.
      
      IPv4/IPv6 get the highest priority with the implicit zero priority
      field.
      
      Next comes ethernet with a priority of 10, and then we have the MPLS
      types with a priority of 15.
      Suggested-by: NEric Dumazet <eric.dumazet@gmail.com>
      Suggested-by: NToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdef7de4
  2. 01 6月, 2015 12 次提交
  3. 31 5月, 2015 16 次提交