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

Ilya Maximets i.maximets at ovn.org
Fri Feb 7 14:43:36 UTC 2020


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.

NACK for this version. Will wait for v3.

> 
> Changelog:
> - v1->v2
>  * Remove TPACKET_V1 and TPACKET_V2 which is obsolete
>  * Add include/linux/if_packet.h
>  * Change include/sparse/linux/if_packet.h

Please, place the change log under the '---'.  It should not be part
of a commit message.

> 
> Signed-off-by: Yi Yang <yangyi01 at inspur.com>
> Co-authored-by: William Tu <u9012063 at gmail.com>
> Signed-off-by: William Tu <u9012063 at gmail.com>


More information about the dev mailing list