netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: jesse.brandeburg@intel.com
Cc: jgarzik@pobox.com, auke-jan.h.kok@intel.com,
	netdev@vger.kernel.org, john.ronciak@intel.com,
	Jeffrey.t.kirsher@intel.com, auke@foo-projects.org
Subject: Re: [PATCH 05/10] e1000: Update truesize with the length of the packet for packet split
Date: Fri, 14 Apr 2006 15:51:29 -0700 (PDT)	[thread overview]
Message-ID: <20060414.155129.121789313.davem@davemloft.net> (raw)
In-Reply-To: <Pine.WNT.4.63.0604141533250.2116@jbrandeb-desk.amr.corp.intel.com>

From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Fri, 14 Apr 2006 15:43:02 -0700 (Pacific Daylight Time)

> Please help me understand how you think it should work when we have a 
> device that wants to receive a packet using header in the skb->data, and 
> application data in the ->frags[]? 

If you're removing the pages from ->frags[] and you already accounted
for them in skb->truesize, then yes I guess it could be correct to
subtract it back out.

Looking at S2IO it's doing something very wrong with it's modification
of skb->truesize.  It's not changing the amount of memory allocated
to an SKB in any way yet it's bumping skb->truesize for some reason.
That will definitely lead to performance problems.

That's why generally when we see an skb->truesize modification, it's
just assumed to be a bug, it's generally not necessary but may be
so in your e1000 situation here.

Another problem to look out for is that once a socket has a reference
to an SKB you must never ever modify skb->truesize because doing so
will break socket memory accounting.  There is exactly one spot in
the TCP stack where we are able to do this by adjusting the socket
memory accounting variables carefully in a locked context at the same
time, but otherwise it's not safe to modify skb->truesize when there
is an attached socket.


  reply	other threads:[~2006-04-14 22:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-14 18:34 [PATCH 00/10] e1000: Driver fixes and update to 7.0.38-k2 Kok, Auke
2006-04-14 18:36 ` [PATCH 01/10] e1000: Remove PM warning DPRINTKs breaking 2.4.x kernels Kok, Auke
2006-04-14 18:36 ` [PATCH 02/10] e1000: Esb2 wol link cycle bug and uninitialized registers Kok, Auke
2006-04-14 18:36 ` [PATCH 03/10] e1000: De-inline functions to benefit from compiler smartness Kok, Auke
2006-04-14 18:36 ` [PATCH 04/10] e1000: Made an adapter struct variable into a local (txb2b) Kok, Auke
2006-04-14 18:36 ` [PATCH 05/10] e1000: Update truesize with the length of the packet for packet split Kok, Auke
2006-04-14 21:16   ` Jeff Garzik
2006-04-14 22:13     ` Jesse Brandeburg
2006-04-14 22:32       ` David S. Miller
2006-04-14 22:43         ` Jesse Brandeburg
2006-04-14 22:51           ` David S. Miller [this message]
2006-04-14 23:04             ` Jesse Brandeburg
2006-04-14 23:45               ` David S. Miller
2006-04-14 23:52                 ` Jesse Brandeburg
2006-04-14 18:37 ` [PATCH 06/10] e1000: Dead variable cleanup Kok, Auke
2006-04-14 18:37 ` [PATCH 07/10] e1000: Buffer optimizations for small MTU Kok, Auke
2006-04-14 18:37 ` [PATCH 08/10] e1000: implement more efficient tx queue locking Kok, Auke
2006-04-14 18:37 ` [PATCH 09/10] e1000: Version bump, contact fix, year string change Kok, Auke
2006-04-14 18:37 ` [PATCH 10/10] {e100{,0},ixgb}: Add Auke Kok as new patch maintainer for e{100,1000} and ixgb Kok, Auke
2006-04-14 19:01 ` [PATCH 00/10] e1000: Driver fixes and update to 7.0.38-k2 Jeff Garzik
2006-04-14 19:32   ` Auke Kok
2006-04-22  5:22   ` Herbert Xu
2006-04-23  5:53     ` David S. Miller
2006-04-23 14:13       ` Auke Kok

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=20060414.155129.121789313.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Jeffrey.t.kirsher@intel.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=auke@foo-projects.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=john.ronciak@intel.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).