From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: unexpected GRO/veth behavior Date: Mon, 10 Sep 2018 07:56:46 -0700 Message-ID: References: <4106d3f7eee7f0186fcfdd0331cdafeecd3240c0.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: eric.dumazet@gmail.com, Toshiaki Makita To: Paolo Abeni , netdev@vger.kernel.org Return-path: Received: from mail-wm0-f66.google.com ([74.125.82.66]:36463 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728510AbeIJTvT (ORCPT ); Mon, 10 Sep 2018 15:51:19 -0400 Received: by mail-wm0-f66.google.com with SMTP id j192-v6so21869778wmj.1 for ; Mon, 10 Sep 2018 07:56:50 -0700 (PDT) In-Reply-To: <4106d3f7eee7f0186fcfdd0331cdafeecd3240c0.camel@redhat.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 09/10/2018 07:44 AM, Paolo Abeni wrote: > hi all, > > while testing some local patches I observed that the TCP tput in the > following scenario: > > # the following enable napi on veth0, so that we can trigger the > # GRO path with namespaces > ip netns add test > ip link add type veth > ip link set dev veth0 netns test > ip -n test link set lo up > ip -n test link set veth0 up > ip -n test addr add dev veth0 172.16.1.2/24 > ip link set dev veth1 up > ip addr add dev veth1 172.16.1.1/24 > IDX=`ip netns exec test cat /sys/class/net/veth0/ifindex` > > # 'xdp_pass' is a NO-OP XDP program that simply return XDP_PASS > ip netns exec test ./xdp_pass $IDX & > taskset 0x2 ip netns exec test iperf3 -s -i 60 & > taskset 0x1 iperf3 -c 172.16.1.2 -t 60 -i 60 > > is quite lower than expected (~800Mbps). 'perf' shows a weird topmost > offender: > But... why GRO would even be needed in this scenario ? GRO is really meant for physical devices, having to mess with skb->sk adds extra cost in this already heavy cost engine. Virtual devices should already be fed with TSO packets.