diff options
author | John Hurley <john.hurley@netronome.com> | 2019-08-04 16:09:09 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-06 14:24:22 -0700 |
commit | 120ffd84a9ec2430faba83db274a6946374f4631 (patch) | |
tree | 21139364f5b96d5330d476c11c211c9d11d150df /drivers/net/ethernet/netronome/nfp/flower/main.h | |
parent | nfp: flower: detect potential pre-tunnel rules (diff) | |
download | linux-dev-120ffd84a9ec2430faba83db274a6946374f4631.tar.xz linux-dev-120ffd84a9ec2430faba83db274a6946374f4631.zip |
nfp: flower: verify pre-tunnel rules
Pre-tunnel rules must direct packets to an internal port based on L2
information. Rules that egress to an internal port are already indicated
by a non-NULL device in its nfp_fl_payload struct. Verfiy the rest of the
match fields indicate that the rule is a pre-tunnel rule. This requires a
full match on the destination MAC address, an option VLAN field, and no
specific matches on other lower layer fields (with the exception of L4
proto and flags).
If a rule is identified as a pre-tunnel rule then mark it for offload to
the pre-tunnel table. Similarly, remove it from the pre-tunnel table on
rule deletion. The actual offloading of these commands is left to a
following patch.
Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Acked-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/main.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/main.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.h b/drivers/net/ethernet/netronome/nfp/flower/main.h index 6e9de4e52423..c3aa4154fe8d 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/main.h +++ b/drivers/net/ethernet/netronome/nfp/flower/main.h @@ -283,6 +283,7 @@ struct nfp_fl_payload { bool in_hw; struct { struct net_device *dev; + __be16 vlan_tci; } pre_tun_rule; }; @@ -419,4 +420,8 @@ void nfp_flower_non_repr_priv_put(struct nfp_app *app, struct net_device *netdev); u32 nfp_flower_get_port_id_from_netdev(struct nfp_app *app, struct net_device *netdev); +int nfp_flower_xmit_pre_tun_flow(struct nfp_app *app, + struct nfp_fl_payload *flow); +int nfp_flower_xmit_pre_tun_del_flow(struct nfp_app *app, + struct nfp_fl_payload *flow); #endif |