netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: netdev@vger.kernel.org, Antoine Tenart <atenart@kernel.org>,
	Mark Starovoytov <mstarovoitov@marvell.com>,
	Igor Russkikh <irusskikh@marvell.com>
Subject: Re: [PATCH net v2 1/5] Revert "net: macsec: report real_dev features when HW offloading is enabled"
Date: Sun, 30 Oct 2022 10:13:03 +0200	[thread overview]
Message-ID: <Y14yD7i53usq1ge8@unreal> (raw)
In-Reply-To: <38fa0a328351ba9283ecda2ba126d1147379416c.1666793468.git.sd@queasysnail.net>

On Wed, Oct 26, 2022 at 11:56:23PM +0200, Sabrina Dubroca wrote:
> This reverts commit c850240b6c4132574a00f2da439277ab94265b66.
> 
> That commit tried to improve the performance of macsec offload by
> taking advantage of some of the NIC's features, but in doing so, broke
> macsec offload when the lower device supports both macsec and ipsec
> offload, as the ipsec offload feature flags (mainly NETIF_F_HW_ESP)
> were copied from the real device. Since the macsec device doesn't
> provide xdo_* ops, the XFRM core rejects the registration of the new
> macsec device in xfrm_api_check.
> 
> Example perf trace when running
>   ip link add link eni1np1 type macsec port 4 offload mac
> 
>     ip   737 [003]   795.477676: probe:xfrm_dev_event__REGISTER      name="macsec0" features=0x1c000080014869
>               xfrm_dev_event+0x3a
>               notifier_call_chain+0x47
>               register_netdevice+0x846
>               macsec_newlink+0x25a
> 
>     ip   737 [003]   795.477687:   probe:xfrm_dev_event__return      ret=0x8002 (NOTIFY_BAD)
>              notifier_call_chain+0x47
>              register_netdevice+0x846
>              macsec_newlink+0x25a
> 
> dev->features includes NETIF_F_HW_ESP (0x04000000000000), so
> xfrm_api_check returns NOTIFY_BAD because we don't have
> dev->xfrmdev_ops on the macsec device.
> 
> We could probably propagate GSO and a few other features from the
> lower device, similar to macvlan. This will be done in a future patch.
> 
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
> ---
>  drivers/net/macsec.c | 27 ++++-----------------------
>  1 file changed, 4 insertions(+), 23 deletions(-)
> 

It is still mystery for me why mlx5 works.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

  reply	other threads:[~2022-10-30  8:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 21:56 [PATCH net v2 0/5] macsec: offload-related fixes Sabrina Dubroca
2022-10-26 21:56 ` [PATCH net v2 1/5] Revert "net: macsec: report real_dev features when HW offloading is enabled" Sabrina Dubroca
2022-10-30  8:13   ` Leon Romanovsky [this message]
2022-10-30 11:54     ` Raed Salem
2022-10-30 15:02       ` Raed Salem
2022-10-26 21:56 ` [PATCH net v2 2/5] macsec: delete new rxsc when offload fails Sabrina Dubroca
2022-10-30  8:13   ` Leon Romanovsky
2022-10-26 21:56 ` [PATCH net v2 3/5] macsec: fix secy->n_rx_sc accounting Sabrina Dubroca
2022-10-27 18:29   ` Jakub Kicinski
2022-10-30  8:14   ` Leon Romanovsky
2022-10-26 21:56 ` [PATCH net v2 4/5] macsec: fix detection of RXSCs when toggling offloading Sabrina Dubroca
2022-10-30  8:15   ` Leon Romanovsky
2022-10-26 21:56 ` [PATCH net v2 5/5] macsec: clear encryption keys from the stack after setting up offload Sabrina Dubroca
2022-10-30  8:16   ` Leon Romanovsky
2022-10-27  8:45 ` [PATCH net v2 0/5] macsec: offload-related fixes Antoine Tenart

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=Y14yD7i53usq1ge8@unreal \
    --to=leon@kernel.org \
    --cc=atenart@kernel.org \
    --cc=irusskikh@marvell.com \
    --cc=mstarovoitov@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    /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).