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

Yi Yang (杨燚)-云服务集团 yangyi01 at inspur.com
Fri Feb 14 00:59:23 UTC 2020


No, block size and frame size are defined by user, you can specify any size, but block size must be pagesize aligned, please read v3 patch and try it in your environment.

-----邮件原件-----
发件人: William Tu [mailto:u9012063 at gmail.com] 
发送时间: 2020年2月14日 8:38
收件人: Ilya Maximets <i.maximets at ovn.org>
抄送: yang_y_yi at 126.com; ovs-dev <ovs-dev at openvswitch.org>; yang_y_yi <yang_y_yi at 163.com>; Ben Pfaff <blp at ovn.org>; Yi Yang (杨燚)-云服务集团 <yangyi01 at inspur.com>
主题: Re: [ovs-dev] [PATCH v2] Use TPACKET_V3 to accelerate veth for userspace datapath

On Fri, Feb 7, 2020 at 6:43 AM Ilya Maximets <i.maximets at ovn.org> wrote:
>
> On 2/7/20 12:50 PM, 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: it can't support TSO which is in progress.
>
> So, this patch effectively breaks TSO functionality in compile time, 
> i.e. it compiles out the TSO capable function invocation.
> I don't think that we should mege that. For this patch to be 
> acceptable, tpacket implementation should support TSO or it should be 
> possible to dynamically switch to usual sendmmsg if we want to enable TSO support.
>
I think it's impossible to support tpacket + TSO, because tpacket pre-allocate a ring buffer with 2K buffer size, and each descriptor can only point to one entry.
(If I understand correctly)

So I think we should dynamically switch back to sendmmsg when TSO is enabled.

Regards,
William


More information about the dev mailing list