[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c02005b9d8794d14bc2149f468ab571c@BY2PR03MB524.namprd03.prod.outlook.com>
Date: Wed, 15 Oct 2014 05:34:24 +0000
From: "Jiafei.Pan@...escale.com" <Jiafei.Pan@...escale.com>
To: David Miller <davem@...emloft.net>
CC: "jkosina@...e.cz" <jkosina@...e.cz>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"LeoLi@...escale.com" <LeoLi@...escale.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"Jiafei.Pan@...escale.com" <Jiafei.Pan@...escale.com>
Subject: RE: [PATCH] net: use hardware buffer pool to allocate skb
> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Wednesday, October 15, 2014 12:25 PM
> To: Pan Jiafei-B37022
> Cc: jkosina@...e.cz; netdev@...r.kernel.org; Li Yang-Leo-R58472; linux-
> doc@...r.kernel.org
> Subject: Re: [PATCH] net: use hardware buffer pool to allocate skb
>
> From: Pan Jiafei <Jiafei.Pan@...escale.com>
> Date: Wed, 15 Oct 2014 11:26:11 +0800
>
> > In some platform, there are some hardware block provided
> > to manage buffers to improve performance. So in some case,
> > it is expected that the packets received by some generic
> > NIC should be put into such hardware managed buffers
> > directly, so that such buffer can be released by hardware
> > or by driver.
> >
> > This patch provide such general APIs for generic NIC to
> > use hardware block managed buffers without any modification
> > for generic NIC drivers.
>
> Why are existing interfaces insufficent for your needs?
>
> Several ethernet drivers already build SKBs from block
> buffer pools.
>
Yes, for this matter, in order to do this we should modify the Ethernet
drivers. For example, driver A want to driver B, C, D.. to support driver
A's Hardware block access functions, so we have to modify driver B, C, D...
It will be so complex for this matter.
But by using my patch, I just modify a Ethernet device (I don't care
Which driver it is used) flag in driver A in order to implement this
Ethernet device using hardware block access functions provided by
Driver A.
> They allocate pools of pages which the hardware divides into various
> powers of 2, then the RX descriptor says what pieces of which pools
> were used to hold the data for a packet, and then the SKB is
> constructed with page frags pointing to those locations.
>
> It's very cheap, inexpensive, and existing APIs are considered to
> cover all use cases.
--
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