netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "tom@herbertland.com" <tom@herbertland.com>
Cc: Boris Pismenny <borisp@mellanox.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	Tariq Toukan <tariqt@mellanox.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [net-next 04/15] net/mlx5e: Receive flow steering framework for accelerated TCP flows
Date: Mon, 29 Jun 2020 06:57:11 +0000	[thread overview]
Message-ID: <90af87c36100323d8a28c70c0223c865a2bab266.camel@mellanox.com> (raw)
In-Reply-To: <CALx6S37gn4mQx97xXUPpjW4Fm9NxOwfagunhygHrvaGS5Uxs4w@mail.gmail.com>

On Sat, 2020-06-27 at 15:34 -0700, Tom Herbert wrote:
> On Sat, Jun 27, 2020 at 2:19 PM Saeed Mahameed <saeedm@mellanox.com>
> wrote:
> > From: Boris Pismenny <borisp@mellanox.com>
> > 
> > The framework allows creating flow tables to steer incoming traffic
> > of
> > TCP sockets to the acceleration TIRs.
> > This is used in downstream patches for TLS, and will be used in the
> > future for other offloads.
> > 
> > Signed-off-by: Boris Pismenny <borisp@mellanox.com>
> > Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
> > Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> > ---
> >  .../net/ethernet/mellanox/mlx5/core/Makefile  |   2 +-
> >  .../net/ethernet/mellanox/mlx5/core/en/fs.h   |  10 +
> >  .../mellanox/mlx5/core/en_accel/fs_tcp.c      | 280
> > ++++++++++++++++++
> >  .../mellanox/mlx5/core/en_accel/fs_tcp.h      |  18 ++
> >  .../net/ethernet/mellanox/mlx5/core/fs_core.c |   4 +-
> 
> Saeed,
> 
> What is the relationship between this and RFS, accelerated RFS, and
> now PTQ? Is this something that we can generalize in the stack and

Hi Tom,

This is very similar to our internal aRFS HW tables implementation but
is only meant for TCP state-full acceleration filtering and processing,
mainly for TLS ecrypt/decrypt in downstream patches and nvme accel in a
future submission.

what this mlx5 framework does for now is add a TCP steering filter in
the HW and attach an action to it  (for now RX TLS decrypt) and then
forward to regular RSS rx queue. similar to aRFS where we add 5 tuple
filter in the HW and the action will be forward to specific CPU RX
queue instead of the default RSS table.

For PTQ i am not really sure, since i felt a bit confused when I read
the doc and i couldn't really see how PTQ creates/asks for dedicated
hwardware queues/filters, i will try to go through the patches
tomorrow. 

> support in the driver/device with a simple interface like we do with
> aRFS and ndo_rx_flow_steer?
> 

Currently just like the aRFS HW tables which are programmed via
ndo_rx_flow_steer this TCP Flow table is programmed via 
netdev->tlsdev_ops->tls_dev_add/del(), for TLS sockets to be offloaded
to HW.

as implemented in:
[net-next 08/15] net/mlx5e: kTLS, Add kTLS RX HW offload support

But yes the HW filter is is always similar, only the actions are
different (encrypt or Forward to specific CPU), 

So maybe a unified generic ndo can work for TLS, aRFS, PTQ, XSK,
intel's ADQ, and maybe more. Also make it easier to introduce more flow
based offloads (flows that do not belong to the TC layer) such as nvme
zero copy.

There were lots of talks and discussions by Magnus, Jesper, Bjorn,
Maxim and many others to improve netdev queue management and make
networking queues a "first class kernel citizen" I believe flow based
filters should be part of that effort, and i think you already address
some of this in your PTQ series.

- Saeed.


  reply	other threads:[~2020-06-29 20:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-27 21:17 [pull request][net-next 00/15] mlx5 tls rx offload 2020-06-26 Saeed Mahameed
2020-06-27 21:17 ` [net-next 01/15] net/mlx5e: Turn XSK ICOSQ into a general asynchronous one Saeed Mahameed
2020-06-27 21:17 ` [net-next 02/15] net/mlx5e: Refactor build channel params Saeed Mahameed
2020-06-27 21:17 ` [net-next 03/15] net/mlx5e: API to manipulate TTC rules destinations Saeed Mahameed
2020-06-27 21:17 ` [net-next 04/15] net/mlx5e: Receive flow steering framework for accelerated TCP flows Saeed Mahameed
2020-06-27 22:34   ` Tom Herbert
2020-06-29  6:57     ` Saeed Mahameed [this message]
2020-06-29 14:25       ` Tom Herbert
2020-06-27 21:17 ` [net-next 05/15] net/mlx5e: Accel, Expose flow steering API for rules add/del Saeed Mahameed
2020-06-27 21:17 ` [net-next 06/15] net/mlx5e: kTLS, Improve TLS feature modularity Saeed Mahameed
2020-06-27 21:17 ` [net-next 07/15] net/mlx5e: kTLS, Use kernel API to extract private offload context Saeed Mahameed
2020-06-27 21:17 ` [net-next 08/15] net/mlx5e: kTLS, Add kTLS RX HW offload support Saeed Mahameed
2020-06-27 21:17 ` [net-next 09/15] Revert "net/tls: Add force_resync for driver resync" Saeed Mahameed
2020-07-08  6:44   ` Tariq Toukan
2020-06-27 21:17 ` [net-next 10/15] net/tls: Add asynchronous resync Saeed Mahameed
2020-06-27 21:17 ` [net-next 11/15] net/mlx5e: kTLS, Add kTLS RX resync support Saeed Mahameed
2020-06-27 21:17 ` [net-next 12/15] net/mlx5e: kTLS, Add kTLS RX stats Saeed Mahameed
2020-06-27 21:17 ` [net-next 13/15] net/mlx5e: Increase Async ICO SQ size Saeed Mahameed
2020-06-27 21:17 ` [net-next 14/15] net/mlx5e: kTLS, Cleanup redundant capability check Saeed Mahameed
2020-06-27 21:17 ` [net-next 15/15] net/mlx5e: kTLS, Improve rx handler function call Saeed Mahameed
2020-06-30  0:24 ` [pull request][net-next 00/15] mlx5 tls rx offload 2020-06-26 David Miller

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=90af87c36100323d8a28c70c0223c865a2bab266.camel@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@mellanox.com \
    --cc=tom@herbertland.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 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).