1. 02 Jun, 2015 5 commits
    • 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 17 commits