From: Sabrina Dubroca <sd@queasysnail.net>
To: Leon Romanovsky <leon@kernel.org>
Cc: Antoine Tenart <atenart@kernel.org>,
netdev@vger.kernel.org,
Mark Starovoytov <mstarovoitov@marvell.com>,
Igor Russkikh <irusskikh@marvell.com>
Subject: Re: [PATCH net 0/5] macsec: offload-related fixes
Date: Thu, 20 Oct 2022 15:54:28 +0200 [thread overview]
Message-ID: <Y1FTFOsZxELhvWT4@hog> (raw)
In-Reply-To: <Y05HeGnTKBY0RVI4@unreal>
2022-10-18, 09:28:08 +0300, Leon Romanovsky wrote:
> On Fri, Oct 14, 2022 at 04:03:56PM +0200, Antoine Tenart wrote:
> > Quoting Leon Romanovsky (2022-10-14 13:03:57)
> > > On Fri, Oct 14, 2022 at 09:43:45AM +0200, Sabrina Dubroca wrote:
> > > > 2022-10-14, 09:13:39 +0300, Leon Romanovsky wrote:
> > > > > On Thu, Oct 13, 2022 at 04:15:38PM +0200, Sabrina Dubroca wrote:
> > > > > > I'm working on a dummy offload for macsec on netdevsim. It just has a
> > > > > > small SecY and RXSC table so I can trigger failures easily on the
> > > > > > ndo_* side. It has exposed a couple of issues.
> > > > > >
> > > > > > The first patch will cause some performance degradation, but in the
> > > > > > current state it's not possible to offload macsec to lower devices
> > > > > > that also support ipsec offload.
> > > > >
> > > > > Please don't, IPsec offload is available and undergoing review.
> > > > > https://lore.kernel.org/netdev/cover.1662295929.git.leonro@nvidia.com/
> > > > >
> > > > > This is whole series (XFRM + driver) for IPsec full offload.
> > > > > https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/log/?h=xfrm-next
> > >
> > > > That patchset is also doing nothing to address the issue I'm refering
> > > > to here, where xfrm_api_check rejects the macsec device because it has
> > > > the NETIF_F_HW_ESP flag (passed from the lower device) and no xfrmdev_ops.
> > >
> > > Of course, why do you think that IPsec series should address MACsec bugs?
> >
> > I was looking at this and the series LGTM. I don't get the above
> > concern, can you clarify?
> >
> > If a lower device has both IPsec & MACsec offload capabilities:
> >
> > - Without the revert: IPsec can be offloaded to the lower dev, MACsec
> > can't. That's a bug.
>
> And how does it possible that mlx5 macsec offload work?
Well, I don't know. AFAICT, xfrm_api_check will be called for every
new net_device created in the system, so a new macsec device with
NETIF_F_HW_ESP will be rejected. Am I missing something?
I don't have access to mlx5 NICs with macsec offload so I can't check
how that would work. My guess is that for some reason, the mlx5 driver
didn't expose the NETIF_F_HW_ESP feature (CONFIG_MLX5_EN_IPSEC=n?).
The only other possibility I see is CONFIG_XFRM=n.
>
> >
> > - With the revert: IPsec and MACsec can be offloaded to the lower dev.
> > Some features might not propagate to the MACsec dev, which won't allow
> > some performance optimizations in the MACsec data path.
>
> My concern is related to this sentence: "it's not possible to offload macsec
> to lower devices that also support ipsec offload", because our devices support
> both macsec and IPsec offloads at the same time.
>
> I don't want to see anything (even in commit messages) that assumes that IPsec
> offload doesn't exist.
I don't understand what you're saying here. Patch #1 from this series
is exactly about the macsec device acknowledging that ipsec offload
exists. The rest of the patches is strictly macsec stuff and says
nothing about ipsec. Can you point out where, in this series, I'm
claiming that ipsec offload doesn't exist?
--
Sabrina
next prev parent reply other threads:[~2022-10-20 13:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 14:15 [PATCH net 0/5] macsec: offload-related fixes Sabrina Dubroca
2022-10-13 14:15 ` [PATCH net 1/5] Revert "net: macsec: report real_dev features when HW offloading is enabled" Sabrina Dubroca
2022-10-13 14:15 ` [PATCH net 2/5] macsec: delete new rxsc when offload fails Sabrina Dubroca
2022-10-13 14:15 ` [PATCH net 3/5] macsec: fix secy->n_rx_sc accounting Sabrina Dubroca
2022-10-14 6:16 ` Leon Romanovsky
2022-10-14 7:43 ` Sabrina Dubroca
2022-10-14 11:08 ` Leon Romanovsky
2022-10-13 14:15 ` [PATCH net 4/5] macsec: fix detection of RXSCs when toggling offloading Sabrina Dubroca
2022-10-13 14:15 ` [PATCH net 5/5] macsec: clear encryption keys from the stack after setting up offload Sabrina Dubroca
2022-10-14 6:13 ` [PATCH net 0/5] macsec: offload-related fixes Leon Romanovsky
2022-10-14 7:43 ` Sabrina Dubroca
2022-10-14 11:03 ` Leon Romanovsky
2022-10-14 14:03 ` Antoine Tenart
2022-10-18 6:28 ` Leon Romanovsky
2022-10-20 13:54 ` Sabrina Dubroca [this message]
2022-10-23 7:52 ` Leon Romanovsky
2022-10-24 8:24 ` Sabrina Dubroca
2022-10-24 8:43 ` Leon Romanovsky
2022-10-24 22:05 ` Sabrina Dubroca
2022-10-25 6:55 ` Leon Romanovsky
2022-10-14 14:44 ` Sabrina Dubroca
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=Y1FTFOsZxELhvWT4@hog \
--to=sd@queasysnail.net \
--cc=atenart@kernel.org \
--cc=irusskikh@marvell.com \
--cc=leon@kernel.org \
--cc=mstarovoitov@marvell.com \
--cc=netdev@vger.kernel.org \
/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).