From: David Miller <davem@davemloft.net>
To: kristrev@ifi.uio.no
Cc: netdev@vger.kernel.org, linux-net@vger.kernel.org
Subject: Re: Non-linear SKBs
Date: Thu, 11 Oct 2007 17:00:24 -0700 (PDT) [thread overview]
Message-ID: <20071011.170024.38701852.davem@davemloft.net> (raw)
In-Reply-To: <470EA9AD.4020304@ifi.uio.no>
From: Kristian Evensen <kristrev@ifi.uio.no>
Date: Fri, 12 Oct 2007 00:54:37 +0200
> I have developed a small patch for the TCP code in 2.6.19 and it works
> flawlessly. A couple of days ago I decided to make it compatible with
> 2.6.22.5 and have stumbled upon a problem I cannot solve.
>
> In 2.6.19 it seems that all packets (at least the ones my patch work
> with) are linear, while they are non-linear in 2.6.22.5. I have searched
> through the code (focusing on tcp_sendmsg) to try to figure out what
> happens, but can't find any differences that would explain this. Does
> anyone know what might be the cause and if there is an easy way to
> return to linear skbs (unless that is totally stupid)? I would also like
> the benefits offered by the collapsing when retransmitting (which
> requires number of fragments to be 0).
If the underlying device can do scatter-gather and checksumming,
the TCP code builds outgoing packets by copying user date into
full system pages, and then attaching those pages into the SKB.
The protocol headers sit under the skb->data linear area, and
the user data mostly sits in the user pages under
skb_shinfo(skb)->frags[]
This increases the density of data packed into the memory allocated
compared to using skb->data for it. It also enormously simplifies
the logic necessary to support TSO.
next prev parent reply other threads:[~2007-10-12 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 22:54 Non-linear SKBs Kristian Evensen
2007-10-12 0:00 ` David Miller [this message]
2007-10-12 13:15 ` kristrev
2007-10-13 14:53 ` Kristian Evensen
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=20071011.170024.38701852.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kristrev@ifi.uio.no \
--cc=linux-net@vger.kernel.org \
--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).