[dpdk-dev] [PATCH] librte_pmd_packet: add PMD for AF_PACKET-based virtual devices

John W. Linville linville at tuxdriver.com
Fri Jul 11 17:30:06 CEST 2014


On Fri, Jul 11, 2014 at 05:04:04PM +0200, Thomas Monjalon wrote:
> 2014-07-11 10:51, John W. Linville:
> > On Fri, Jul 11, 2014 at 03:26:39PM +0200, Thomas Monjalon wrote:
> > > 2014-07-10 16:32, John W. Linville:
> > > > This is a Linux-specific virtual PMD driver backed by an AF_PACKET
> > > > socket.  This implementation uses mmap'ed ring buffers to limit copying
> > > > and user/kernel transitions.  The PACKET_FANOUT_HASH behavior of
> > > > AF_PACKET is used for frame reception.  In the current implementation,
> > > > Tx and Rx queues are always paired, and therefore are always equal
> > > > in number -- changing this would be a Simple Matter Of Programming.
> > > > 
> > > > Interfaces of this type are created with a command line option like
> > > > "--vdev=eth_packet0,iface=...".  There are a number of options availabe
> > > > 
> > > > as arguments:
> > > >  - Interface is chosen by "iface" (required)
> > > >  - Number of queue pairs set by "qpairs" (optional, default: 16)
> > > >  - AF_PACKET MMAP block size set by "blocksz" (optional, default: 4096)
> > > >  - AF_PACKET MMAP frame size set by "framesz" (optional, default: 2048)
> > > >  - AF_PACKET MMAP frame count set by "framecnt" (optional, default: 512)
> > > > 
> > > > Signed-off-by: John W. Linville <linville at tuxdriver.com>
> > > > ---
> > > > This PMD is intended to provide a means for using DPDK on a broad
> > > > range of hardware without hardware-specific PMDs and (hopefully)
> > > > with better performance than what PCAP offers in Linux.  This might
> > > > be useful as a development platform for DPDK applications when
> > > > DPDK-supported hardware is expensive or unavailable.
> > > 
> > > Thank you for this nice work.
> > > 
> > > I think it would be well suited to host this PMD as an external one in
> > > order to make it work also with DPDK 1.7.0.
> > 
> > I'm not sure I understand the suggestion -- you don't want to merge
> > the driver for 1.8?  Or you just want to host this patch somewhere,
> > so people can still use it w/ 1.7?
> 
> I suggest to have a separated repository here:
> 	http://dpdk.org/browse/

I really don't see any reason not to merge it.  It was already delayed
by me waiting for all the PMD init changes to settle out in the 1.6
release, and I still had to do a few touch-ups for it to compile on
1.7.  I definitely do not want to have to do that over and over again.

Why wouldn't you just merge it?  If someone wants to use it on 1.7,
they can just apply the patch.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.


More information about the dev mailing list