[ovs-dev] 答复: [PATCH v4] Use TPACKET_V3 to accelerate veth for userspace datapath

=?gb2312?B?WWkgWWFuZyAo0e6gRCkt1Ma3/s7xvK/NxQ==?= yangyi01 at inspur.com
Mon Feb 17 14:09:18 UTC 2020


Ilya, thank you so much for your comments, I'll fix them in next version.

For TSO support, this patch can work from functionality, but I checked
tpacket_v3 kernel code, I don't think tpacket_v3 kernel part can support it,
my test result also showed very bad performance if userspace-tso-enable is
set to true, for the case you're saying, current tpacket_v3 can't reach very
good performance.

I have a question, in openstack and vxlan scenario, can userspace-tso-enable
be set to true? Per TSO patch series comments, it can't support such case,
so I'm thinking how we can trade off TSO and tpacket_v3, from my
perspective, tpacket_v3 is the best choice for the cases TSO can't work. I
hope openstack can get good performance when it uses new OVS DPDK version
and don't need to do any change in neutron and ovs agent side. It will be
better if we can work out a good way to cover two used cases.

-----邮件原件-----
发件人: dev [mailto:ovs-dev-bounces at openvswitch.org] 代表 Ilya Maximets
发送时间: 2020年2月17日 21:12
收件人: ovs-dev at openvswitch.org
抄送: yang_y_yi at 163.com; yang_y_yi at 126.com; i.maximets at ovn.org
主题: Re: [ovs-dev] [PATCH v4] Use TPACKET_V3 to accelerate veth for
userspace datapath

On 2/16/20 2:10 AM, yang_y_yi at 126.com wrote:
> From: Yi Yang <yangyi01 at inspur.com>
> 
> We can avoid high system call overhead by using TPACKET_V3 and using 
> DPDK-like poll to receive and send packets (Note: send still needs to 
> call sendto to trigger final packet transmission).
> 
> From Linux kernel 3.10 on, TPACKET_V3 has been supported, so all the 
> Linux kernels current OVS supports can run
> TPACKET_V3 without any problem.
> 
> I can see about 30% performance improvement for veth compared to last 
> recvmmsg optimization if I use TPACKET_V3, it is about 1.98 Gbps, but 
> it was 1.47 Gbps before.
> 
> Note: Linux kernel TPACKET_V3 can't support TSO, so the performance is 
> very poor, please turn off tso for veth interfces in case 
> userspace-tso-enable is set to true.

So, does this patch supports TSO or not?
What if I want to have TSO support AND a good performance?


I didn't review the code, but have some patch-wide style comments:
1. Comments in code should be complete sentences, i.e. start with
   a capital letter and end with a period.
2. Don't parenthesize arguments of sizeof if possible.


Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
dev at openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


More information about the dev mailing list