diff options
author | John Hurley <john.hurley@netronome.com> | 2019-07-23 15:34:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-23 13:52:51 -0700 |
commit | 35b7c70cc3b82c159c181f297a54d4bea6f4fd47 (patch) | |
tree | d15a5b5987d799d5b08d3a4b94d4041deeec777c /drivers/net/ethernet/netronome/nfp/flower/cmsg.h | |
parent | nfp: flower: offload MPLS push action (diff) | |
download | linux-dev-35b7c70cc3b82c159c181f297a54d4bea6f4fd47.tar.xz linux-dev-35b7c70cc3b82c159c181f297a54d4bea6f4fd47.zip |
nfp: flower: offload MPLS pop action
Recent additions to the kernel include a TC action module to manipulate
MPLS headers on packets. Such actions are available to offload via the
flow_offload intermediate representation API.
Modify the NFP driver to allow the offload of MPLS pop actions to
firmware. The act_mpls TC module enforces that the next protocol is
supplied along with the pop action. Passing this to firmware allows it
to properly rebuild the underlying packet after the pop.
Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/cmsg.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.h b/drivers/net/ethernet/netronome/nfp/flower/cmsg.h index 91af0fa99536..3198ad4af63b 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/cmsg.h +++ b/drivers/net/ethernet/netronome/nfp/flower/cmsg.h @@ -69,6 +69,7 @@ #define NFP_FL_ACTION_OPCODE_PUSH_VLAN 1 #define NFP_FL_ACTION_OPCODE_POP_VLAN 2 #define NFP_FL_ACTION_OPCODE_PUSH_MPLS 3 +#define NFP_FL_ACTION_OPCODE_POP_MPLS 4 #define NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL 6 #define NFP_FL_ACTION_OPCODE_SET_ETHERNET 7 #define NFP_FL_ACTION_OPCODE_SET_IPV4_ADDRS 9 @@ -239,6 +240,11 @@ struct nfp_fl_push_mpls { __be32 lse; }; +struct nfp_fl_pop_mpls { + struct nfp_fl_act_head head; + __be16 ethtype; +}; + /* Metadata with L2 (1W/4B) * ---------------------------------------------------------------- * 3 2 1 |