]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nfp: offload flower vxlan endpoint MAC addresses
authorJohn Hurley <john.hurley@netronome.com>
Mon, 25 Sep 2017 10:23:38 +0000 (12:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Sep 2017 04:27:36 +0000 (21:27 -0700)
commitfd0dd1ab1e107369c950796bb9b0e8eab6134bf1
tree768d0bf72f828e64ce9233960ac5b5bf99041210
parentb27d6a95a70de551df828de2b658efd949a9864e
nfp: offload flower vxlan endpoint MAC addresses

Generate a list of MAC addresses of netdevs that could be used as VXLAN
tunnel end points. Give offloaded MACs an index for storage on the NFP in
the ranges:
0x100-0x1ff physical port representors
0x200-0x2ff VF port representors
0x300-0x3ff other offloads (e.g. vxlan netdevs, ovs bridges)

Assign phys and vf indexes based on unique 8 bit values in the port num.
Maintain list of other netdevs to ensure same netdev is not offloaded
twice and each gets a unique ID without exhausting the entries. Because
the IDs are unique but constant for a netdev, any changes are implemented
by overwriting the index on NFP.

Signed-off-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/Makefile
drivers/net/ethernet/netronome/nfp/flower/cmsg.c
drivers/net/ethernet/netronome/nfp/flower/cmsg.h
drivers/net/ethernet/netronome/nfp/flower/main.c
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/netronome/nfp/flower/match.c
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c [new file with mode: 0644]