From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758002Ab2FFSKi (ORCPT ); Wed, 6 Jun 2012 14:10:38 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:55174 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630Ab2FFSKg (ORCPT ); Wed, 6 Jun 2012 14:10:36 -0400 Subject: Re: [PATCH v9] tilegx network driver: initial support From: Eric Dumazet To: Chris Metcalf Cc: bhutchings@solarflare.com, arnd@arndb.de, David Miller , linux-kernel@vger.kernel.org, netdev@vger.kernel.org In-Reply-To: <201206042023.q54KNEZp003834@farm-0002.internal.tilera.com> References: <201205201636.q4KGaoA3003845@farm-0027.internal.tilera.com> <20120520.165546.1211013675964130504.davem@davemloft.net> <201205240115.q4O1FwqG006336@lab-41.internal.tilera.com> <20120524.003148.700603156196416506.davem@davemloft.net> <201205251853.q4PIrE7T000723@lab-41.internal.tilera.com> <201206042023.q54KNEZp003834@farm-0002.internal.tilera.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 06 Jun 2012 20:10:23 +0200 Message-ID: <1339006223.26966.36.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2012-06-04 at 16:12 -0400, Chris Metcalf wrote: > This change adds support for the tilegx network driver based on the > GXIO IORPC support in the tilegx software stack, using the on-chip > mPIPE packet processing engine. > > + > +/* Do "TSO" handling for egress. > + * > + * Normally drivers set NETIF_F_TSO only to support hardware TSO; > + * otherwise the stack uses scatter-gather to implement GSO in software. > + * On our testing, enabling GSO support (via NETIF_F_SG) drops network > + * performance down to around 7.5 Gbps on the 10G interfaces, although > + * also dropping cpu utilization way down, to under 8%. But > + * implementing "TSO" in the driver brings performance back up to line > + * rate, while dropping cpu usage even further, to less than 4%. In > + * practice, profiling of GSO shows that skb_segment() is what causes > + * the performance overheads; we benefit in the driver from using > + * preallocated memory to duplicate the TCP/IP headers. > + */ All this stuff cost about 300 lines of code in this driver, without IPv6 support. I am pretty sure this performance problem should be solved in net/{core| ipv4|ipv6} instead What TCP performance do you get with TSO/GSO and SG off ?