netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
To: netdev@vger.kernel.org
Subject: differences in skb allocation in fill_packet_ipv4 and fill_packet_ipv6
Date: Mon, 31 Aug 2009 19:08:12 +0300	[thread overview]
Message-ID: <4A9BF56C.3030002@ixiacom.com> (raw)

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

                 reply	other threads:[~2009-08-31 16:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9BF56C.3030002@ixiacom.com \
    --to=lgrijincu@ixiacom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).