All of lore.kernel.org
 help / color / mirror / Atom feed
From: Louis Peens <louis.peens@corigine.com>
To: Marcelo Ricardo Leitner <mleitner@redhat.com>,
	Simon Horman <simon.horman@corigine.com>
Cc: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, oss-drivers@corigine.com,
	Yinjun Zhang <yinjun.zhang@corigine.com>
Subject: Re: [PATCH net-next v2 0/8] Introduce conntrack offloading to the nfp driver
Date: Tue, 1 Jun 2021 15:33:58 +0200	[thread overview]
Message-ID: <5fb76dbd-ade8-4bd4-ba13-c0fffa1aee5e@corigine.com> (raw)
In-Reply-To: <CALnP8ZZyckUuefLMf+oS4m5OE_PJc6+RvLh_9w81MmKFNpoQrw@mail.gmail.com>



On 2021/05/31 20:20, Marcelo Ricardo Leitner wrote:
> On Mon, May 31, 2021 at 02:45:59PM +0200, Simon Horman wrote:
>> 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)
> 
> I think this part (matching on +trk+est) was left to another series,
> but anyway, supporting only +trk+est is not very effective, btw.
> +rpl/-rpl is also welcomed.
The plan is to expand to other flags in the future as well, thanks
for highlighting these specific ones, they will likely be investigated
next after all the patches of the current version has been released.
> 
>> 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
> 
> Sounds like the offloading of new conntrack entries is quite heavy
> this way. Hopefully not.
This is can indeed tend towards the heavy side, there is likely room for some
performance enhancements in the future, but it does seem to work well enough
in the scenarios we've encountered so far.

Thanks for the input
> 
>>
>> 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.
>>
>> Changes since v1:
>> - nfp: flower-ct: add ct zone table
>>     Fixed unused variable compile warning
>>     Fixed missing colon in struct description
>>
>> 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 | 155 ++++++
>>  .../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, 775 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
>>
> 

      reply	other threads:[~2021-06-01 13:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 12:45 [PATCH net-next v2 0/8] Introduce conntrack offloading to the nfp driver Simon Horman
2021-05-31 12:46 ` [PATCH net-next v2 1/8] nfp: flower: move non-zero chain check Simon Horman
2021-05-31 12:46 ` [PATCH net-next v2 2/8] nfp: flower-ct: add pre and post ct checks Simon Horman
2021-05-31 12:46 ` [PATCH net-next v2 3/8] nfp: flower-ct: add ct zone table Simon Horman
2021-05-31 12:46 ` [PATCH net-next v2 4/8] nfp: flower-ct: add zone table entry when handling pre/post_ct flows Simon Horman
2021-06-01  5:31   ` Jakub Kicinski
2021-05-31 12:46 ` [PATCH net-next v2 5/8] nfp: flower-ct: add nfp_fl_ct_flow_entries Simon Horman
2021-05-31 12:46 ` [PATCH net-next v2 6/8] nfp: flower-ct: add a table to map flow cookies to ct flows Simon Horman
2021-05-31 12:46 ` [PATCH net-next v2 7/8] nfp: flower-ct: add tc_merge_tb Simon Horman
2021-05-31 12:46 ` [PATCH net-next v2 8/8] nfp: flower-ct: add tc merge functionality Simon Horman
2021-05-31 18:24   ` Marcelo Ricardo Leitner
2021-06-01 13:43     ` Louis Peens
2021-06-01 14:22       ` Marcelo Ricardo Leitner
2021-05-31 18:20 ` [PATCH net-next v2 0/8] Introduce conntrack offloading to the nfp driver Marcelo Ricardo Leitner
2021-06-01 13:33   ` Louis Peens [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fb76dbd-ade8-4bd4-ba13-c0fffa1aee5e@corigine.com \
    --to=louis.peens@corigine.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mleitner@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@corigine.com \
    --cc=simon.horman@corigine.com \
    --cc=yinjun.zhang@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.