On Sun, Dec 22, 2019 at 4:35 PM Yi Yang (杨燚)-云服务集团 <yangy...@inspur.com> wrote: > > 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.
Why not? What's the error message? you can create a tapX device using ip tuntap first, and add tapX using OVS using ovs-vsctl add-port tapX -- set interface tapX type=afxdp Regards, William > > 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:u9012...@gmail.com] > 发送时间: 2019年12月21日 1:50 > 收件人: Ben Pfaff <b...@ovn.org> > 抄送: d...@openvswitch.org; i.maxim...@ovn.org; Yi Yang (杨燚)-云服务集团 > <yangy...@inspur.com>; echau...@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 > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev