[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250701175325.5c1970b9@kernel.org>
Date: Tue, 1 Jul 2025 17:53:25 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
<horms@...nel.org>, Andrew Lunn <andrew+netdev@...n.ch>, Shuah Khan
<shuah@...nel.org>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, gustavold@...il.com
Subject: Re: [PATCH net-next 6/7] netpoll: move Ethernet setup to push_eth()
helper
On Fri, 27 Jun 2025 10:55:52 -0700 Breno Leitao wrote:
> +static void push_eth(struct netpoll *np, struct sk_buff *skb)
> +{
> + struct ethhdr *eth;
> +
> + eth = eth_hdr(skb);
> + ether_addr_copy(eth->h_source, np->dev->dev_addr);
> + ether_addr_copy(eth->h_dest, np->remote_mac);
> +}
Can you move the pushing of the header and setting h_proto here?
if the goal of the series is to slice up the code per network layer
then its a bit odd for the IP layer handlers to be pushing the L2
header and setting its proto.
Just:
if (np->ipv6)
eth->h_proto = htons(ETH_P_IPV6);
else
eth->h_proto = htons(ETH_P_IP);
no?
Unless there's some complication here that I'm missing...
--
pw-bot: cr
Powered by blists - more mailing lists