netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: netdev <netdev@vger.kernel.org>, bogdan.hamciuc@freescale.com
Subject: pktgen issue with "Observe needed_headroom of the device"
Date: Mon, 23 May 2016 12:44:56 -0700	[thread overview]
Message-ID: <57435DB8.6090807@candelatech.com> (raw)

Regarding this commit:

879c7220e828af8bd82ea9d774c7e45c46b976e4

net: pktgen: Observe needed_headroom of the device

     Allocate enough space so as not to force the outgoing net device to do
     skb_realloc_headroom().

     Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
     Signed-off-by: David S. Miller <davem@davemloft.net>


I think it may be incorrect.  It seems that pkt_overhead is meant to be
the data-portion of the skb, not lower-level padding?

For instance:

	int pkt_overhead;	/* overhead for MPLS, VLANs, IPSEC etc */
...

	/* Eth + IPh + UDPh + mpls */
	datalen = pkt_dev->cur_pkt_size - 14 - 20 - 8 -
		  pkt_dev->pkt_overhead;

So, maybe we need to add that LL_RESERVED_SPACE to the size when allocating
the skb in pktgen_alloc_skb and leave it out of pkt_overhead?

And for that matter, what is that '+ 64 +' for in the size calculation?
Looks a lot like some fudge factor from long ago?

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

                 reply	other threads:[~2016-05-23 19:44 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=57435DB8.6090807@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=bogdan.hamciuc@freescale.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).