1. 02 Jun, 2015 8 commits
    • John W. Linville's avatar
    • John W. Linville's avatar
    • David S. Miller's avatar
      Merge branch 'rocker-next' · ff43c28a
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      ff43c28a
    • Scott Feldman's avatar
      rocker: remove support for legacy VLAN ndo ops · 2aa2ed08
      Scott Feldman authored
      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: default avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2aa2ed08
    • Scott Feldman's avatar
      rocker: install/remove router MAC for untagged VLAN when joining/leaving bridge · 027e00dc
      Scott Feldman authored
      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: default avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      027e00dc
    • Scott Feldman's avatar
      rocker: install untagged VLAN (vid=0) support for each port · bcfd7801
      Scott Feldman authored
      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: default avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcfd7801
    • Scott Feldman's avatar
      rocker: cleanup vlan table on error adding vlan · cec04a60
      Scott Feldman authored
      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: default avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cec04a60
    • Scott Feldman's avatar
      rocker: zero allocate ports array · 27b808cb
      Scott Feldman authored
      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: default avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27b808cb
  2. 01 Jun, 2015 18 commits
  3. 31 May, 2015 14 commits