From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751542AbdKXFSr (ORCPT ); Fri, 24 Nov 2017 00:18:47 -0500 Received: from mail-pl0-f42.google.com ([209.85.160.42]:35023 "EHLO mail-pl0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbdKXFSp (ORCPT ); Fri, 24 Nov 2017 00:18:45 -0500 X-Google-Smtp-Source: AGs4zMaXfKCB6Aoexw4FyJKmSchFiZcRpuGS5Xnj8JFIVwTjCIEOmn+sbeYVlkMSJBWXD8hFBNXKeQ== Date: Thu, 23 Nov 2017 21:18:37 -0800 From: Stephen Hemminger To: Solio Sarabia Cc: netdev@vger.kernel.org, davem@daveloft.net, kys@microsoft.com, shiny.sebastian@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net-sysfs: export gso_max_size attribute Message-ID: <20171123211837.0f5efa8b@xeon-e3> In-Reply-To: <1511397041-27994-1-git-send-email-solio.sarabia@intel.com> References: <1511397041-27994-1-git-send-email-solio.sarabia@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 22 Nov 2017 16:30:41 -0800 Solio Sarabia wrote: > The netdevice gso_max_size is exposed to allow users fine-control on > systems with multiple NICs with different GSO buffer sizes, and where > the virtual devices like bridge and veth, need to be aware of the GSO > size of the underlying devices. > > In a virtualized environment, setting the right GSO sizes for physical > and virtual devices makes all TSO work to be on physical NIC, improving > throughput and reducing CPU util. If virtual devices send buffers > greater than what NIC supports, it forces host to do TSO for buffers > exceeding the limit, increasing CPU utilization in host. > > Suggested-by: Shiny Sebastian > Signed-off-by: Solio Sarabia > --- > In one test scenario with Hyper-V host, Ubuntu 16.04 VM, with Docker > inside VM, and NTttcp sending 40 Gbps from one container, setting the > right gso_max_size values for all network devices in the chain, reduces > CPU overhead about 3x (for the sender), since all TSO work is done by > physical NIC. > > net/core/net-sysfs.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) You probably should expose gso_max_segs as well.