From: Sabrina Dubroca <sd@queasysnail.net>
To: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Cc: netdev@vger.kernel.org, stable@vger.kernel.org,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>, Gal Pressman <gal@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>,
Yossi Kuperman <yossiku@nvidia.com>,
Benjamin Poirier <bpoirier@nvidia.com>,
Cosmin Ratiu <cratiu@nvidia.com>
Subject: Re: [PATCH net v2 2/4] ethernet: Add helper for assigning packet type when dest address does not match device address
Date: Tue, 23 Apr 2024 15:51:28 +0200 [thread overview]
Message-ID: <Zie84KZ--UBnBydc@hog> (raw)
In-Reply-To: <20240419213033.400467-3-rrameshbabu@nvidia.com>
2024-04-19, 14:30:17 -0700, Rahul Rameshbabu wrote:
> Enable reuse of logic in eth_type_trans for determining packet type.
>
> Suggested-by: Sabrina Dubroca <sd@queasysnail.net>
> Cc: stable@vger.kernel.org
> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> ---
> include/linux/etherdevice.h | 24 ++++++++++++++++++++++++
> net/ethernet/eth.c | 12 +-----------
> 2 files changed, 25 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> index 224645f17c33..f5868ac69dec 100644
> --- a/include/linux/etherdevice.h
> +++ b/include/linux/etherdevice.h
> @@ -607,6 +607,30 @@ static inline void eth_hw_addr_gen(struct net_device *dev, const u8 *base_addr,
> eth_hw_addr_set(dev, addr);
> }
>
> +/**
> + * eth_skb_pkt_type - Assign packet type if destination address does not match
> + * @skb: Assigned a packet type if address does not match @dev address
> + * @dev: Network device used to compare packet address against
> + *
> + * If the destination MAC address of the packet does not match the network
> + * device address, assign an appropriate packet type.
> + */
> +static inline void eth_skb_pkt_type(struct sk_buff *skb, struct net_device *dev)
Could you make dev const? Otherwise the series looks good to me.
Thanks.
--
Sabrina
next prev parent reply other threads:[~2024-04-23 13:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 21:30 [PATCH net v2 0/4] Fix isolation of broadcast traffic and unmatched unicast traffic with MACsec offload Rahul Rameshbabu
2024-04-19 21:30 ` [PATCH net v2 1/4] macsec: Enable devices to advertise whether they update sk_buff md_dst during offloads Rahul Rameshbabu
2024-04-19 21:30 ` [PATCH net v2 2/4] ethernet: Add helper for assigning packet type when dest address does not match device address Rahul Rameshbabu
2024-04-23 13:51 ` Sabrina Dubroca [this message]
2024-04-23 17:03 ` Rahul Rameshbabu
2024-04-19 21:30 ` [PATCH net v2 3/4] macsec: Detect if Rx skb is macsec-related for offloading devices that update md_dst Rahul Rameshbabu
2024-04-19 21:30 ` [PATCH net v2 4/4] net/mlx5e: Advertise mlx5 ethernet driver updates sk_buff md_dst for MACsec Rahul Rameshbabu
2024-04-20 19:38 ` [PATCH net v2 0/4] Fix isolation of broadcast traffic and unmatched unicast traffic with MACsec offload Benjamin Poirier
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=Zie84KZ--UBnBydc@hog \
--to=sd@queasysnail.net \
--cc=bpoirier@nvidia.com \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rrameshbabu@nvidia.com \
--cc=stable@vger.kernel.org \
--cc=tariqt@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).