diff options
author | Louis Peens <louis.peens@corigine.com> | 2021-06-02 14:59:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-03 00:04:41 +0300 |
commit | c8b034fbeba55847be999595d63ad7d04f06c141 (patch) | |
tree | 82c9ce2c01b2d8bc5e767b4420728f68fdc71799 /drivers/net/ethernet/netronome/nfp/flower/offload.c | |
parent | 2bda0a5e3bf8924cc6dc5955df610defa10d70e7 (diff) | |
download | linux-c8b034fbeba55847be999595d63ad7d04f06c141.tar.xz |
nfp: flower-ct: add pre and post ct checks
Add checks to see if a flow is a conntrack flow we can potentially
handle. Just stub out the handling the different conntrack flows.
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/offload.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/offload.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/offload.c b/drivers/net/ethernet/netronome/nfp/flower/offload.c index 16ef960a150d..7e4ad5d58859 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/offload.c +++ b/drivers/net/ethernet/netronome/nfp/flower/offload.c @@ -7,6 +7,7 @@ #include "cmsg.h" #include "main.h" +#include "conntrack.h" #include "../nfpcore/nfp_cpp.h" #include "../nfpcore/nfp_nsp.h" #include "../nfp_app.h" @@ -1316,6 +1317,12 @@ nfp_flower_add_offload(struct nfp_app *app, struct net_device *netdev, if (nfp_netdev_is_nfp_repr(netdev)) port = nfp_port_from_netdev(netdev); + if (is_pre_ct_flow(flow)) + return nfp_fl_ct_handle_pre_ct(priv, netdev, flow, extack); + + if (is_post_ct_flow(flow)) + return nfp_fl_ct_handle_post_ct(priv, netdev, flow, extack); + if (!offload_pre_check(flow)) return -EOPNOTSUPP; |