[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1464268102.5939.88.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Thu, 26 May 2016 06:08:22 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Feng Tang <feng.tang@...el.com>
Cc: David Miller <davem@...emloft.net>, edumazet@...gle.com,
johannes@...solutions.net, jarod@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: alx: use custom skb allocator
On Thu, 2016-05-26 at 16:41 +0800, Feng Tang wrote:
> On Wed, May 25, 2016 at 07:53:41PM -0400, David Miller wrote:
> >
> > But now that we have at least two instances of this code we really
> > need to put a common version somewhere. :-/
>
> I agree, and furthermore I noticed there are some similar routines
> in the 4 individual Atheros drivers atlx/alx/atl1c/atl1e, which may
> be unified by a simple framework for them all. Maybe the driver
> maintainer from Atheros could take a look, as they can reach all
> the real HWs :)
Note that you could also use the napi_get_frags() API that other drivers
use, and you attach page frags to the skb.
(Ie use small skb->head allocations where the stack will pull the
headers, but use your own page based allocations for the frames)
This might allow you to use the page reuse trick that some Intel drivers
use.
Look for igb_can_reuse_rx_page() for an example.
Thanks.
Powered by blists - more mailing lists