netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/8] Introduce conntrack offloading to the nfp driver
@ 2021-05-28 14:42 Simon Horman
  2021-05-28 14:42 ` [PATCH net-next 1/8] nfp: flower: move non-zero chain check Simon Horman
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Simon Horman @ 2021-05-28 14:42 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: netdev, oss-drivers, Louis Peens, Yinjun Zhang, Simon Horman

Louis Peens says:

This is the first in a series of patches to offload conntrack
to the nfp. The approach followed is to flatten out three
different flow rules into a single offloaded flow. The three
different flows are:

1. The rule sending the packet to conntrack (pre_ct)
2. The rule matching on +trk+est after a packet has been through
   conntrack. (post_ct)
3. The rule received via callback from the netfilter (nft)

In order to offload a flow we need a combination of all three flows, but
they could be added/deleted at different times and in different order.

To solve this we save potential offloadable CT flows in the driver,
and every time we receive a callback we check against these saved flows
for valid merges. Once we have a valid combination of all three flows
this will be offloaded to the NFP. This is demonstrated in the diagram
below.

+-------------+                      +----------+
| pre_ct flow +--------+             | nft flow |
+-------------+        v             +------+---+
                  +----------+              |
                  | tc_merge +--------+     |
                  +----------+        v     v
+--------------+       ^           +-------------+
| post_ct flow +-------+       +---+nft_tc merge |
+--------------+               |   +-------------+
                               |
                               |
                               |
                               v
                        Offload to nfp

This series is only up to the point of the pre_ct and post_ct
merges into the tc_merge. Follow up series will continue
to add the nft flows and merging of these flows with the result
of the pre_ct and post_ct merged flows.

Louis Peens (8):
  nfp: flower: move non-zero chain check
  nfp: flower-ct: add pre and post ct checks
  nfp: flower-ct: add ct zone table
  nfp: flower-ct: add zone table entry when handling pre/post_ct flows
  nfp: flower-ct: add nfp_fl_ct_flow_entries
  nfp: flower-ct: add a table to map flow cookies to ct flows
  nfp: flower-ct: add tc_merge_tb
  nfp: flower-ct: add tc merge functionality

 drivers/net/ethernet/netronome/nfp/Makefile   |   3 +-
 .../ethernet/netronome/nfp/flower/conntrack.c | 486 ++++++++++++++++++
 .../ethernet/netronome/nfp/flower/conntrack.h | 154 ++++++
 .../net/ethernet/netronome/nfp/flower/main.h  |   6 +
 .../ethernet/netronome/nfp/flower/metadata.c  | 101 +++-
 .../ethernet/netronome/nfp/flower/offload.c   |  31 +-
 6 files changed, 774 insertions(+), 7 deletions(-)
 create mode 100644 drivers/net/ethernet/netronome/nfp/flower/conntrack.c
 create mode 100644 drivers/net/ethernet/netronome/nfp/flower/conntrack.h

-- 
2.20.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-05-31 12:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-28 14:42 [PATCH net-next 0/8] Introduce conntrack offloading to the nfp driver Simon Horman
2021-05-28 14:42 ` [PATCH net-next 1/8] nfp: flower: move non-zero chain check Simon Horman
2021-05-28 14:42 ` [PATCH net-next 2/8] nfp: flower-ct: add pre and post ct checks Simon Horman
2021-05-28 14:42 ` [PATCH net-next 3/8] nfp: flower-ct: add ct zone table Simon Horman
2021-05-28 21:56   ` Jakub Kicinski
2021-05-28 14:42 ` [PATCH net-next 4/8] nfp: flower-ct: add zone table entry when handling pre/post_ct flows Simon Horman
2021-05-28 14:42 ` [PATCH net-next 5/8] nfp: flower-ct: add nfp_fl_ct_flow_entries Simon Horman
2021-05-28 14:42 ` [PATCH net-next 6/8] nfp: flower-ct: add a table to map flow cookies to ct flows Simon Horman
2021-05-28 14:42 ` [PATCH net-next 7/8] nfp: flower-ct: add tc_merge_tb Simon Horman
2021-05-28 14:42 ` [PATCH net-next 8/8] nfp: flower-ct: add tc merge functionality Simon Horman
2021-05-31 12:44   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).