From: Sabrina Dubroca <sd@queasysnail.net>
To: Emeel Hakim <ehakim@nvidia.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 4/4] macsec: Add MACsec rx_handler change support
Date: Wed, 5 Apr 2023 11:35:30 +0200 [thread overview]
Message-ID: <ZC1A4r9TtR8VP3sr@hog> (raw)
In-Reply-To: <20230329122107.22658-5-ehakim@nvidia.com>
2023-03-29, 15:21:07 +0300, Emeel Hakim wrote:
> Offloading device drivers will mark offloaded MACsec SKBs with the
> corresponding SCI in the skb_metadata_dst so the macsec rx handler will
> know to which interface to divert those skbs, in case of a marked skb
> and a mismatch on the dst MAC address, divert the skb to the macsec
> net_device where the macsec rx_handler will be called.
Sorry, I don't understand what you're trying to say here and in the
subject line.
To me, "Add MACsec rx_handler change support" sounds like you're
changing what function is used as ->rx_handler, which is not what this
patch is doing.
> Example of such a case is having a MACsec with VLAN as an inner header
> ETHERNET | SECTAG | VLAN packet.
>
> Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
> ---
> drivers/net/macsec.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
> index 25616247d7a5..88b00ea4af68 100644
> --- a/drivers/net/macsec.c
> +++ b/drivers/net/macsec.c
> @@ -1048,6 +1048,15 @@ static enum rx_handler_result handle_not_macsec(struct sk_buff *skb)
>
> __netif_rx(nskb);
> }
> +
> + if (md_dst && md_dst->type == METADATA_MACSEC &&
> + (find_rx_sc(&macsec->secy, md_dst->u.macsec_info.sci))) {
We already do that exact find_rx_sc call earlier in the same loop,
can't we skip it now?
> + skb->dev = ndev;
> + skb->pkt_type = PACKET_HOST;
> + ret = RX_HANDLER_ANOTHER;
> + goto out;
> + }
> +
> continue;
> }
>
> --
> 2.21.3
>
--
Sabrina
next prev parent reply other threads:[~2023-04-05 9:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 12:21 [PATCH net-next v2 0/4] Support MACsec VLAN Emeel Hakim
2023-03-29 12:21 ` [PATCH net-next v2 1/4] vlan: Add MACsec offload operations for VLAN interface Emeel Hakim
2023-03-29 14:43 ` Sabrina Dubroca
2023-03-29 18:42 ` Leon Romanovsky
2023-03-30 17:19 ` Sabrina Dubroca
2023-03-30 17:42 ` Jakub Kicinski
2023-03-31 14:33 ` Emeel Hakim
2023-03-30 18:56 ` Leon Romanovsky
2023-03-30 20:32 ` Sabrina Dubroca
2023-04-03 9:29 ` Emeel Hakim
2023-04-04 12:53 ` Sabrina Dubroca
2023-04-04 14:37 ` Emeel Hakim
2023-04-05 9:35 ` Sabrina Dubroca
2023-04-05 9:27 ` Sabrina Dubroca
2023-04-05 9:36 ` Emeel Hakim
2023-03-29 12:21 ` [PATCH net-next 2/4] net/mlx5: Support MACsec over VLAN Emeel Hakim
2023-03-29 12:21 ` [PATCH net-next 3/4] net/mlx5: Consider VLAN interface in MACsec TX steering rules Emeel Hakim
2023-03-29 12:21 ` [PATCH net-next 4/4] macsec: Add MACsec rx_handler change support Emeel Hakim
2023-04-05 9:35 ` Sabrina Dubroca [this message]
2023-04-05 9:41 ` Emeel Hakim
2023-03-29 18:37 ` [PATCH net-next v2 0/4] Support MACsec VLAN Leon Romanovsky
-- strict thread matches above, loose matches on Subject: below --
2023-03-26 7:26 [PATCH net-next " Emeel Hakim
2023-03-26 7:26 ` [PATCH net-next 4/4] macsec: Add MACsec rx_handler change support Emeel Hakim
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=ZC1A4r9TtR8VP3sr@hog \
--to=sd@queasysnail.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ehakim@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).