nfp: flower: compute link aggregation action
authorJohn Hurley <john.hurley@netronome.com>
Thu, 24 May 2018 02:22:55 +0000 (19:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2018 03:10:57 +0000 (23:10 -0400)
commit7e24a59311ea4a92c38f76756496b06293c50afb
tree50e704d8844f8b1766f28fe085f7d588927dc29f
parent2e1cc5226b44100696dcab2d59d6fbc789db6153
nfp: flower: compute link aggregation action

If the egress device of an offloaded rule is a LAG port, then encode the
output port to the NFP with a LAG identifier and the offloaded group ID.

A prelag action is also offloaded which must be the first action of the
series (although may appear after other pre-actions - e.g. tunnels). This
causes the FW to check that it has the necessary information to output to
the requested LAG port. If it does not, the packet is sent to the kernel
before any other actions are applied to it.

Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/action.c
drivers/net/ethernet/netronome/nfp/flower/cmsg.h
drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/netronome/nfp/flower/offload.c