All of lore.kernel.org
 help / color / mirror / Atom feed
* differences in skb allocation in fill_packet_ipv4 and fill_packet_ipv6
@ 2009-08-31 16:08 Lucian Adrian Grijincu
  0 siblings, 0 replies; only message in thread
From: Lucian Adrian Grijincu @ 2009-08-31 16:08 UTC (permalink / raw)
  To: netdev

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-31 16:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-31 16:08 differences in skb allocation in fill_packet_ipv4 and fill_packet_ipv6 Lucian Adrian Grijincu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.