Hi Eric,
On Wed, 7 Oct 2026 at 00:00, Eric Dumazet [off-list ref] wrote:
Note to testers:
My LLM agreed with the change in vlan_dev_hard_header() (above), but said
that no change was needed in vlan_dev_hard_start_xmit() (below)
I'll need the patch applied to 6.18.y for testing, as I can't test it
personally and I want to provide testers with the same kernel/system
version as before just with minimal changes. So do I understand
correctly that the patch below is what you want to get tested, no
changes in vlan_dev_hard_start_xmit()?
Regards,
Jan
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 560521cf596e..67648152add8 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -49,42 +49,14 @@ static int vlan_dev_hard_header(struct sk_buff
*skb, struct net_device *dev,
unsigned int len)
{
struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
- struct vlan_hdr *vhdr;
- unsigned int vhdrlen = 0;
- u16 vlan_tci = 0;
- int rc;
-
- if (!(vlan->flags & VLAN_FLAG_REORDER_HDR)) {
- vhdr = skb_push(skb, VLAN_HLEN);
-
- vlan_tci = vlan->vlan_id;
- vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb->priority);
- vhdr->h_vlan_TCI = htons(vlan_tci);
-
- /*
- * Set the protocol type. For a packet of type ETH_P_802_3/2 we
- * put the length in here instead.
- */
- if (type != ETH_P_802_3 && type != ETH_P_802_2)
- vhdr->h_vlan_encapsulated_proto = htons(type);
- else
- vhdr->h_vlan_encapsulated_proto = htons(len);
-
- skb->protocol = vlan->vlan_proto;
- type = ntohs(vlan->vlan_proto);
- vhdrlen = VLAN_HLEN;
- }
+ struct net_device *real_dev = vlan->real_dev;
/* Before delegating work to the lower layer, enter our MAC-address */
if (saddr == NULL)
saddr = dev->dev_addr;
/* Now make the underlying real hard header */
- dev = vlan->real_dev;
- rc = dev_hard_header(skb, dev, type, daddr, saddr, len + vhdrlen);
- if (rc > 0)
- rc += vhdrlen;
- return rc;
+ return dev_hard_header(skb, real_dev, type, daddr, saddr, len);
}
static inline netdev_tx_t vlan_netpoll_send_skb(struct vlan_dev_priv
*vlan, struct sk_buff *skb)