[ovs-dev] 答复: 答复: [PATCH v7] Use TPACKET_V3 to accelerate veth for userspace datapath
Yi Yang (杨燚)-云服务集团
yangyi01 at inspur.com
Wed Mar 18 23:56:58 UTC 2020
William, that can't fix Ilya's concern, we can fix thread-safe issues if most of code in lib/netdev-linux.c is not thread-safe, we also have to consider how we can fix scalability issue, obviously it isn't scalable that one ovs-vswitchd thread handles all the such interfaces, this is performance bottleneck and the performance is linearly related with number of interfaces. I think pmd thread is our natural choice, we have no reason to refuse this way, we can first fix them if current code does have issues to support pmd thread.
If it is difficult to support pmd currently, I can remove ".is_pmd = true", if a user wants to do that way, maybe we can add an option in interface level, options:is_pmd=true, but I'm not sure if is_pmd can be set on adding interface.
发件人: William Tu [mailto:u9012063 at gmail.com]
发送时间: 2020年3月19日 5:42
收件人: Yi Yang (杨燚)-云服务集团 <yangyi01 at inspur.com>
抄送: i.maximets at ovn.org; yang_y_yi at 163.com; ovs-dev at openvswitch.org
主题: Re: [ovs-dev] 答复: [PATCH v7] Use TPACKET_V3 to accelerate veth for userspace datapath
On Wed, Mar 18, 2020 at 6:22 AM Yi Yang (杨燚)-云服务集团 <yangyi01 at inspur.com> wrote:
> Ilya, raw socket for the interface type of which is "system" has been
> set to non-block mode, can you explain which syscall will lead to
> sleep? Yes, pmd thread will consume CPU resource even if it has
> nothing to do, but all the type=dpdk ports are handled by pmd thread,
> here we just let system interfaces look like a DPDK interface. I
> didn't see any problem in my test, it will be better if you can tell
> me what will result in a problem and how I can reproduce it. By the
> way, type=tap/internal interfaces are still be handled by ovs-vswitchd thread.
> In addition, only one line change is there, ".is_pmd = true,",
> ".is_pmd = false," will keep it in ovs-vswitchd if there is any other
> concern. We can change non-thread-safe parts to support pmd.
Hi Yiyang an Ilya,
How about making tpacket_v3 a new netdev class with type="tpacket"?
Like my original patch:
Users have to create it specifically by doing type="tpacket", ex:
$ ovs-vsctl add-port br0 enp2s0 -- set interface enp2s0 type="tpacket"
And we can set is_pmd=true for this particular type.
More information about the dev