From owner-freebsd-net@freebsd.org Wed Nov 27 17:50:19 2019 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2398D1B2EF6 for ; Wed, 27 Nov 2019 17:50:19 +0000 (UTC) (envelope-from crapsh@monkeybrains.net) Received: from mail.monkeybrains.net (mail.monkeybrains.net [208.69.40.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.monkeybrains.net", Issuer "AlphaSSL CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47NSwT6L3jz4LW0 for ; Wed, 27 Nov 2019 17:50:17 +0000 (UTC) (envelope-from crapsh@monkeybrains.net) Received: from [10.2.86.111] (public.monkeybrains.net [208.69.41.107] (may be forged)) (authenticated bits=0) by mail.monkeybrains.net (8.15.2/8.15.2) with ESMTPSA id xARHoFMk010722 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 27 Nov 2019 09:50:16 -0800 (PST) (envelope-from crapsh@monkeybrains.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=monkeybrains.net; s=dkim; t=1574877016; bh=E8av/3+o1qcWizQCwRFe8q9xf29geUxB6X6VM6decRc=; h=Subject:To:References:From:Date:In-Reply-To; b=SLk8htKulopX3Yh+GvaVczdQaLEer3M3BgiGFPLsSO1FNIfyb1FBqHeHwp/SKgHzr bPr3yOBvqlqcnI93mB8IlWHHsm9Gy0S9IuzsM3ty96zafGcSnp2OC89WLzuK8WX1QH cn3v2HqcwODCMozkdsmKbJTSFW49tjcmgtMzVn20= X-Authentication-Warning: mail.monkeybrains.net: Host public.monkeybrains.net [208.69.41.107] (may be forged) claimed to be [10.2.86.111] Subject: Re: ix0 and ix1 ifconfig options different on Supermicro board To: freebsd-net@freebsd.org References: From: BulkMailForRudy Message-ID: <9f75e32b-be73-cfb8-b80d-1b2eff1caf17@monkeybrains.net> Date: Wed, 27 Nov 2019 09:50:15 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: clamav-milter 0.101.4 at mail.monkeybrains.net X-Virus-Status: Clean X-Rspamd-Queue-Id: 47NSwT6L3jz4LW0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=monkeybrains.net header.s=dkim header.b=SLk8htKu; dmarc=pass (policy=none) header.from=monkeybrains.net; spf=pass (mx1.freebsd.org: domain of crapsh@monkeybrains.net designates 208.69.40.19 as permitted sender) smtp.mailfrom=crapsh@monkeybrains.net X-Spamd-Result: default: False [-6.84 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[monkeybrains.net:s=dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[monkeybrains.net.dwl.dnswl.org : 127.0.5.0]; R_SPF_ALLOW(-0.20)[+ptr]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; HAS_XAW(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[monkeybrains.net:+]; DMARC_POLICY_ALLOW(-0.50)[monkeybrains.net,none]; IP_SCORE(-3.74)[ip: (-9.82), ipnet: 208.69.40.0/22(-4.91), asn: 32329(-3.93), country: US(-0.05)]; RCVD_IN_DNSWL_LOW(-0.10)[19.40.69.208.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:32329, ipnet:208.69.40.0/22, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2019 17:50:19 -0000 Thank you, Vincenzo. To anyone else looking this up, 'iperf' is not dependent on the TSO/LRO.   iperf -c 10.1.1.1 -P 4   --->  9.4Gbps   iperf3 -c 10.1.1.1 -P 4  --->  5.1Gbps I still find it odd that the default FreeBSD install has different options for ix0 and ix1. Rudy On 11/23/19 12:51 AM, Vincenzo Maffione wrote: > Hi, > TSO/LRO (for IPv4 and/or IPv6) will increase TCP bulk throughput on > machine X for those TCP connection where X is one of the two endpoints, > that is TCP connections that are local to X. That's why you are seing iperf > achieving higher throughput with TSO/LRO enabled. > TSO means that your local TCP stack will pass down large (e.g. 32K) packets > to the NIC driver, and the NIC will take care of segmentation. This is > beneficial for two reasons: (1) the segmentation work is done in hardware > rather than in the CPU, and this is typically faster (and also, you save > the CPU time for other stuff); (2) the per-packet cost of protocol > processing (TCP, IP, Ethernet) is amortized over a large amount of bytes, > which means that your total per-byte CPU time will be way lower. Most of > the gain actually comes from (2). > LRO is similar, but in the receive direction. > > However, if your device is a router it means that it forwards packets. > Therefore the local TCP stack is not involved, so TSO simply does not apply > (at least in FreeBSD). > I think LRO applies, but there is a latency hit, as suggested by the wiki > page you pointed. > > So no, enabling TSO/LRO will not increase the forwarding rate, but possibly > increase latency. You should keep it disabled. > > Cheers, > Vincenzo > > Il giorno ven 22 nov 2019 alle ore 22:47 BulkMailForRudy < > crapsh@monkeybrains.net> ha scritto: > >> I just did another test to a machine with a Chelsio card. >> >> Server D (cxl3) -> Server A = 3.5Gbps >> >> Turning on flags lro tso4 tso6 vlanhwtso , yields >> >> Server D (cxl3) -> Server A = 9.1 Gbps >> >> Oddly, this was an ipv4 iperf, but tso6 seems to help. >> >> I had settings turned off per >> https://wiki.freebsd.org/10gFreeBSD/Router#Disabling_LRO_and_TSO >> >> Servers A,B, and C are all running services. Server D is acting as a >> router. Are the LRO and TSO only for TCP to the box, or will it >> increase speeds for forwarding if I enable it? >> >> >> Thanks, >> >> Rudy >> >> >> On 11/22/19 1:30 PM, BulkMailForRudy wrote: >>> I have nearly identical setups, but ix0 and ix1 are getting different >>> options at boot. This seems to be the only difference I see between >>> machines and I am trying to answer the question, Why can Server A >>> iperf close to line rate while the other servers can not? >>> >>> The Test: iperf -P 3 -c REMOTE_ADDR >>> >>> Server A (ix1) -> Server C (ix0) = 9.4Gbps >>> Server B (ix0)-> Server C (ix0) = 5.6Gbps >>> Server C (ix0)-> A (ix1) or B (ix0) = 5.0Gbps >>> >>> >>> The motherboards are identical between A,B and C and the configs very >>> similar. The only difference is that Server A is plugged into ix1 >>> while Server B and C are using ix0. >>> >>> >>> I am not modifying the flags at boot (eg ifconfig -tso), yet ix0 lacks >>> TXCSUM,TSO4,TSO6,LRO,WOL. >>> >>> ix0: flags=8943 metric >>> 0 mtu 1500 >>> >> options=a538b9 >> >>> ether *ac:1f:6b:6a:14:6*4 >>> media: Ethernet autoselect (10Gbase-T ) >>> ix1: flags=8843 metric 0 mtu 1500 >>> >> options=e53fbb >> >>> ether *ac:1f:6b:6a:14:6*5 >>> media: Ethernet autoselect (10Gbase-T ) >>> >>> I did try adding some flags to ix0 and -- not sure if this was the >>> reason -- the box started acting oddly and I ended up rebooting it. >>> >>> >>> My hunch has is that there is somethign with the TSO4. >>> >>> >>> Rudy >>> >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >>> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >