[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4A9BF56C.3030002@ixiacom.com>
Date: Mon, 31 Aug 2009 19:08:12 +0300
From: Lucian Adrian Grijincu <lgrijincu@...acom.com>
To: netdev@...r.kernel.org
Subject: differences in skb allocation in fill_packet_ipv4 and fill_packet_ipv6
The skb is allocated differently in fill_packet_ipv4 and fill_packet_ipv6 (net/core/pktgen.c).
in fill_packet_ipv4():
datalen = (odev->hard_header_len + 16) & ~0xf;
skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + datalen +
pkt_dev->pkt_overhead, GFP_ATOMIC);
but in fill_packet_ipv6():
skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16 +
pkt_dev->pkt_overhead, GFP_ATOMIC);
hard_header_len was first added here in:
7ac5459ec0f074022818af35c589b9e2b406d7c3
[PKTGEN]: Respect hard_header_len of device.
A snip from the patch:
- skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC);
+ datalen = (odev->hard_header_len + 16) & ~0xf;
+ skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + datalen, GFP_ATOMIC);
This patch only modifies fill_packet_ipv4(). Did someone forget to update
fill_packet_ipv6() as well or was this an ipv4-specific change (and why
would it be so)?
--
.
..: Lucian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists