[ovs-dev] 答复: [PATCH RFC] WIP: netdev-tpacket: Add AF_PACKET v3 support.
=?gb2312?B?WWkgWWFuZyAo0e6gRCkt1Ma3/s7xvK/NxQ==?=
yangyi01 at inspur.com
Mon Dec 23 00:35:02 UTC 2019
Thanks William, af_packet only can open tap interface, it can't create tap
interface. Tap interface onlu can be created by the below way
ovs-vsctl add-port tapX -- set interface tapX type=internal
this tap is very special, it is like a mystery to me so far. "ip tuntap add
tapX mode tap" can't work for such tap interface.
Anybody can tell me how I can create such a tap interface without using "
ovs-vsctl add-port tapX"
By the way, I tried af_packet for veth, the performance is very good, it is
about 4Gbps on my machine, but it used TPACKET_V2.
-----ÓʼþÔ¼þ-----
·¢¼þÈË: William Tu [mailto:u9012063 at gmail.com]
·¢ËÍʱ¼ä: 2019Äê12ÔÂ21ÈÕ 1:50
ÊÕ¼þÈË: Ben Pfaff <blp at ovn.org>
³ËÍ: dev at openvswitch.org; i.maximets at ovn.org; Yi Yang (Ñî D)-ÔÆ·þÎñ¼¯ÍÅ
<yangyi01 at inspur.com>; echaudro at redhat.com
Ö÷Ìâ: Re: [PATCH RFC] WIP: netdev-tpacket: Add AF_PACKET v3 support.
On Thu, Dec 19, 2019 at 08:44:30PM -0800, Ben Pfaff wrote:
> On Thu, Dec 19, 2019 at 04:41:25PM -0800, William Tu wrote:
> > Currently the performance of sending packets from userspace ovs to
> > kernel veth device is pretty bad as reported from YiYang[1].
> > The patch adds AF_PACKET v3, tpacket v3, as another way to tx/rx
> > packet to linux device, hopefully showing better performance.
> >
> > AF_PACKET v3 should get closed to 1Mpps, as shown[2]. However, my
> > current patch using iperf tcp shows only 1.4Gbps, maybe I'm doing
> > something wrong. Also DPDK has similar implementation using
> > AF_PACKET v2[3]. This is still work-in-progress but any feedbacks
> > are welcome.
>
> Is there a good reason that this is implemented as a new kind of
> netdev rather than just a new way for the existing netdev
> implementation to do packet i/o?
The AF_PACKET v3 is more like PMD mode driver (the netdev-afxdp and other
dpdk netdev), which has its own memory mgmt, ring structure, and polling the
descriptors. So I implemented it as a new kind. I feel its pretty different
than tap or existing af_packet netdev.
But integrate it to the existing netdev (lib/netdev-linux.c) is also OK.
William
More information about the dev
mailing list