net: flow_offload: provision conntrack info in ct_metadata
authorVlad Buslov <vladbu@nvidia.com>
Wed, 1 Feb 2023 16:30:54 +0000 (17:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Feb 2023 09:31:24 +0000 (09:31 +0000)
commit29744a10c59ede4f996c0c893127ac11bcc85c0c
treed0865ca1cab917a14ecb1a733fbf48d31cb6cc56
parent942814840127a7d6307d0aaf087dbd3cfdeb2a2d
net: flow_offload: provision conntrack info in ct_metadata

In order to offload connections in other states besides "established" the
driver offload callbacks need to have access to connection conntrack info.
Flow offload intermediate representation data structure already contains
that data encoded in 'cookie' field, so just reuse it in the drivers.

Reject offloading IP_CT_NEW connections for now by returning an error in
relevant driver callbacks based on value of ctinfo. Support for offloading
such connections will need to be added to the drivers afterwards.

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
drivers/net/ethernet/netronome/nfp/flower/conntrack.c