[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20071011.170024.38701852.davem@davemloft.net>
Date: Thu, 11 Oct 2007 17:00:24 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: kristrev@....uio.no
Cc: netdev@...r.kernel.org, linux-net@...r.kernel.org
Subject: Re: Non-linear SKBs
From: Kristian Evensen <kristrev@....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.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists