[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080525130023.GA27792@2ka.mipt.ru>
Date: Sun, 25 May 2008 17:00:24 +0400
From: Evgeniy Polyakov <johnpol@....mipt.ru>
To: Keyur Chudgar <kchudgar@...c.com>
Cc: David Miller <davem@...emloft.net>, kchudgar.linux@...il.com,
netdev@...r.kernel.org
Subject: Re: Single packet receiving in multiple ring buffers
On Fri, May 23, 2008 at 09:08:10AM -0700, Keyur Chudgar (kchudgar@...c.com) wrote:
> > So, from perfomance viewpoint it looks like the best decision is to
> have first part of the packet in skb->data and the
> > rest in attached pages.
>
> If we follow this approach as to have first part of the packet in
> skb->data and the rest in attached pages,
> We will need to copy from page (which is programmed initially in buffer
> for hw) to skb->data (which is newly allocated)each time, even if the
> packet was of only single buffer. We can not program skb->data pointers
> and addresses of pages intermix in the buffers for hw.
I meant that you initialize hardware buffers to point to skb->data and
then to pages, not always to pages. In this case controller will DMA
data to skb->data and the rest of the packet into attached pages. If it
is not convenient to use such scheme, you can always put data into pages
and then copy tiny bit into skb->data to be able to specify IP layer
protocol, all the rest system will do for itself via pskb_may_copy() if
needed.
Essentially copy of such small amount of data like 40-60 bytes of all
headers is so small, that you will unlikely detect it in register
access, allocation noise, tcp state processing and eventual copy to
userspace, but nevertheless you can try to optimize it out of course.
--
Evgeniy Polyakov
--
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