Skip to content
  1. Oct 03, 2017
  2. Oct 02, 2017
  3. Oct 01, 2017
    • David S. Miller's avatar
      Merge branch 'dsa_ptr-port' · 506d0a3e
      David S. Miller authored
      
      
      Vivien Didelot says:
      
      ====================
      net: dsa: change dsa_ptr for a dsa_port
      
      With DSA, a master net_device is physically wired to a dedicated CPU
      switch port. For interaction with the DSA layer, the struct net_device
      contains a dsa_ptr, which currently points to a dsa_switch_tree object.
      
      This is only valid for a switch fabric with a single CPU port. In order
      to support switch fabrics with multiple CPU ports, we first need to
      change the type of dsa_ptr to what it really is: a dsa_port object.
      
      This is what this patchset does. The first patches adds a
      dsa_master_get_slave helper and cleans up portions of DSA core to make
      the next patches more readable. These next patches prepare the xmit and
      receive hot paths and finally change dsa_ptr.
      
      Changes in v2:
        - introduce dsa_master_get_slave helper to simplify patch 6
        - keep hot path data at beginning of dsa_port for cacheline 1
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      506d0a3e
    • Vivien Didelot's avatar
      net: dsa: remove tag ops from the switch tree · aa193d9b
      Vivien Didelot authored
      
      
      Now that the dsa_ptr is a dsa_port instance, there is no need to keep
      the tag operations in the dsa_switch_tree structure. Remove it.
      
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa193d9b
    • Vivien Didelot's avatar
      net: dsa: change dsa_ptr for a dsa_port · 2f657a60
      Vivien Didelot authored
      
      
      With DSA, a master net device (CPU facing interface) has a dsa_ptr
      pointer to which hangs a dsa_switch_tree. This is not correct because a
      master interface is wired to a dedicated switch port, and because we can
      theoretically have several master interfaces pointing to several CPU
      ports of the same switch fabric.
      
      Change the master interface's dsa_ptr for the CPU dsa_port pointer.
      This is a step towards supporting multiple CPU ports.
      
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f657a60
    • Vivien Didelot's avatar
      net: dsa: prepare master receive hot path · 3e41f93b
      Vivien Didelot authored
      
      
      In preparation to make DSA master devices point to their corresponding
      CPU port instead of the whole tree, add copies of dst and rcv in the
      dsa_port structure so that we keep fast access in the receive hot path.
      
      Also keep the copies at the beginning of the dsa_port structure in order
      to ensure they are available in cacheline 1.
      
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e41f93b