netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Lior Nahmanson <liorna@nvidia.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Raed Salem <raeds@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Yossi Kuperman <yossiku@nvidia.com>
Subject: Re: [PATCH net-next v3 2/3] net/macsec: Add MACsec skb extension Rx Data path support
Date: Wed, 13 Jul 2022 11:34:52 -0700	[thread overview]
Message-ID: <20220713113452.3bbf10fd@kernel.org> (raw)
In-Reply-To: <PH0PR12MB544980DAD3694E4F532AB6B1BF899@PH0PR12MB5449.namprd12.prod.outlook.com>

On Wed, 13 Jul 2022 06:21:25 +0000 Lior Nahmanson wrote:
> For Rx there is no limitation for the number of different SCIs.
> from MACsec driver code:
> 
> struct macsec_secy {
> ...
>      struct macsec_rx_sc __rcu *rx_sc; // each rx_sc contains unique SCI
> };
> 
> static int macsec_add_rxsc(struct sk_buff *skb, struct genl_info *info)
> {
> ...
>     rx_sc = create_rx_sc(dev, sci);
> ...
> }
> 
> where create_rx_sc() adds new rx_sc node to the secy->rx_sc list.

Right, so instead of putting them on a list put them in a map (IDR?)
and pre-allocate the metadata dst here. Then the driver just does a
lookup. If lookup failed then the SCI is not configured and macsec will
not consume the packet, anyway.

  reply	other threads:[~2022-07-13 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 11:19 [PATCH net-next v3 00/3] Introduce MACsec offload SKB extension Lior Nahmanson
2022-06-13 11:19 ` [PATCH net-next v3 1/3] net/macsec: Add MACsec skb extension Tx Data path support Lior Nahmanson
2022-06-13 11:19 ` [PATCH net-next v3 2/3] net/macsec: Add MACsec skb extension Rx " Lior Nahmanson
2022-06-14 13:55   ` Paolo Abeni
2022-06-14 16:14     ` Jakub Kicinski
2022-06-21 12:39       ` Lior Nahmanson
2022-06-21 19:26         ` Jakub Kicinski
2022-07-12  6:50           ` Lior Nahmanson
2022-07-13  0:01             ` Jakub Kicinski
2022-07-13  6:21               ` Lior Nahmanson
2022-07-13 18:34                 ` Jakub Kicinski [this message]
2022-07-13 19:31                   ` Saeed Mahameed
2022-06-13 11:19 ` [PATCH net-next v3 3/3] net/macsec: Move some code for sharing with various drivers that implements offload Lior Nahmanson

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=20220713113452.3bbf10fd@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiri@nvidia.com \
    --cc=liorna@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=raeds@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=yossiku@nvidia.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).