differences in skb allocation in fill_packet_ipv4 and fill_packet_ipv6
Subsystems (2)
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