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...