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/tunnel_conf.c | |
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/tunnel_conf.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c b/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c index a7a80f4b722a..ef5948112581 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c +++ b/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c @@ -832,6 +832,18 @@ int nfp_tunnel_mac_event_handler(struct nfp_app *app, return NOTIFY_OK; } +int nfp_flower_xmit_pre_tun_flow(struct nfp_app *app, + struct nfp_fl_payload *flow) +{ + return -EOPNOTSUPP; +} + +int nfp_flower_xmit_pre_tun_del_flow(struct nfp_app *app, + struct nfp_fl_payload *flow) +{ + return -EOPNOTSUPP; +} + int nfp_tunnel_config_start(struct nfp_app *app) { struct nfp_flower_priv *priv = app->priv; |