Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5002785rwl; Mon, 10 Apr 2023 22:01:13 -0700 (PDT) X-Google-Smtp-Source: AKy350bFVA2HRxs46L6vGyV1FpBl1ThaWYfODgdeI7QEIdchXYKXtYwAPWsaA7sQ1CKK0dFcLYlx X-Received: by 2002:a17:907:3e14:b0:94a:a087:5796 with SMTP id hp20-20020a1709073e1400b0094aa0875796mr4060229ejc.38.1681189272922; Mon, 10 Apr 2023 22:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681189272; cv=none; d=google.com; s=arc-20160816; b=b107KmhXcQYbv6er8cy3dlfqR2N4XAUp+avc01VBrhNnj1BCx33+SX7B99cuoPAAMD 7dtZw/5Fq6PNmUQ8sSmBEt8x0Z5JTwE0e7EXCW3OIN7XdoDr+HZzW+ATif0rX3wuVgQT SMdg093F2g1LgCy+BdbZ9VMSN5l0tnXEFVb1yXyAFdKJlOiGkQWSxwV5ZqZjrBa/UCFt yTnM2PbROmnm49sPFSEoamvGHYXHkxfvYycJrT5PC6OJq1CCL7wZM+7JP+NZkf4JLL7c IQx0j8USgxucxKUiVjRIz8j+0NDDGcgajDf0hb7YugL9DtIR7ysCBOPmoPHXLh7OPUt1 nTUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:comments :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=KZfBLpN/gahf4Na+DiCMXXdGEJe19xHkIm66KVYL3RU=; b=YQA4JhLZejvUXOds+LwTODG+/jdzRgA5P+3VIHzV+ZQcMkiGFYMF3F1+ZVSjImpm+m l2lq88lLgXetVQuCLQ63ijlXfU4HmjKgwICRCVR25MkLH3H1SRseSH/Nb0c1y2hp/KGi q1eUoJA7Z24IYwnohx0DsF0kO7gm6YV5JZTjAMWolGrIlQF9wilhINHh/rnHCS2pknw8 qW0obHexNekvLwaBJSYH7bVgvXFLSh0E6R7f56sNDhQ+PcOEZqbGlARkhoXANELSEgX1 r++zGOy9a26lJiw8vifByeBkhqbpdCwAa67ibzuylljxEzs5gEd2/phPA6BVIyFo2UOs q0jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=wXVAx+Nv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020aa7c910000000b004fbbd7bee7csi1107522edt.58.2023.04.10.22.00.45; Mon, 10 Apr 2023 22:01:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=wXVAx+Nv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229990AbjDKE63 (ORCPT + 99 others); Tue, 11 Apr 2023 00:58:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbjDKE61 (ORCPT ); Tue, 11 Apr 2023 00:58:27 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A78173E for ; Mon, 10 Apr 2023 21:58:25 -0700 (PDT) Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 685153F236 for ; Tue, 11 Apr 2023 04:58:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1681189103; bh=KZfBLpN/gahf4Na+DiCMXXdGEJe19xHkIm66KVYL3RU=; h=From:To:cc:Subject:In-reply-to:References:MIME-Version: Content-Type:Date:Message-ID; b=wXVAx+NvdegvvpUD6OOFsuukq4xI5TADWG8uJEnaKwDNs8FqEyDKLD4sMrDLWboGM RZajAd7tAOpmtmqoWM4q3mCbPAg2jME5IuvVTQZhyYuw3/5rfV+Y1mpFLURZQ4XU85 xye/sTagXn+seHcTsHXoLMly3xPUbKf+ZvfFeDnBCLGF8xHhNC6ffl5rQRdyEx3c3i UfPgNC08rHsdA54gbnqAWMxMjSPjunjXiuxIEpCcdhV/CPJYJtd8LlRFgzzti2ac7w AFkAvmT6OPAMvJoYMvt43h6CCfb4mOksRgC9lAgkLyX1AAmkzDtHB1Tqx4/Zs1lN+Y mCwEix4Ubka5g== Received: by mail-pl1-f197.google.com with SMTP id c8-20020a170902d48800b001a1e0fd4085so4427179plg.20 for ; Mon, 10 Apr 2023 21:58:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681189101; x=1683781101; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KZfBLpN/gahf4Na+DiCMXXdGEJe19xHkIm66KVYL3RU=; b=ybEyLfA79s2lpdd6hhBjPkEcWfTIEks0HXCcK0HJKzxuHL8Vv+CY765ooMTApB4rPs ex2GCkDyx8Vfa/u7BPwzZNJmS0Tn48FvOfnywtvRVf0VHTIcEqYaBhltuYmIjU7kLCwi TiZmob/Q/qXut60ifugcAoierk1WGOzZX5jlJYyI1n3HKuPqC+PeKeJ8HejIVwPg3+J6 W2+3jTceMJ0LxEgiz5GupTWfuONUfVLxIiTbrBxCjsnKXsJjp9tPDi6THLhXyw5o9kND 7lkcwgRhJ/vk1tcVUxy0HF+kHdm5i2tYhiTxVKWIzal8vmZOEV41cBaXntzGvw6YPnhm ePKg== X-Gm-Message-State: AAQBX9dJwXG+Hm3kee3el93/A8dX8Am2YUe1uxtryM2/sjNdQBB2hwLN Mbgw5mGtwN3BI7Oym55LJ1QItKKCgrZrBqpL4cogMZeFAaSDWN2QFCFXqj+tWLX3JqOK+/RMx0p nCoS64vwKoOL6s6hEmsDz4RWfga3mOiabgNVvBkwM/Q== X-Received: by 2002:a05:6a20:33a8:b0:e3:8710:6848 with SMTP id f40-20020a056a2033a800b000e387106848mr8659164pzd.41.1681189101491; Mon, 10 Apr 2023 21:58:21 -0700 (PDT) X-Received: by 2002:a05:6a20:33a8:b0:e3:8710:6848 with SMTP id f40-20020a056a2033a800b000e387106848mr8659142pzd.41.1681189101180; Mon, 10 Apr 2023 21:58:21 -0700 (PDT) Received: from famine.localdomain ([50.125.80.253]) by smtp.gmail.com with ESMTPSA id p25-20020a62ab19000000b00638c9a2ba5csm2351342pff.62.2023.04.10.21.58.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2023 21:58:20 -0700 (PDT) Received: by famine.localdomain (Postfix, from userid 1000) id 1772F61E6E; Mon, 10 Apr 2023 21:58:20 -0700 (PDT) Received: from famine (localhost [127.0.0.1]) by famine.localdomain (Postfix) with ESMTP id 103909FB79; Mon, 10 Apr 2023 21:58:20 -0700 (PDT) From: Jay Vosburgh To: Liang Li cc: vfalico@gmail.com, andy@greyhouse.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, Paolo Abeni , ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Hangbin Liu , "Toppins, Jonathan" Subject: Re: [Question] About bonding offload In-reply-to: References: Comments: In-reply-to Liang Li message dated "Tue, 11 Apr 2023 09:47:14 +0800." X-Mailer: MH-E 8.6+git; nmh 1.6; Emacs 29.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27296.1681189100.1@famine> Date: Mon, 10 Apr 2023 21:58:20 -0700 Message-ID: <27297.1681189100@famine> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Liang Li wrote: >Hi Everyone, > >I'm a redhat network-qe and am testing bonding offload. e.g. gso,tso,gro,lro. >I got two questions during my testing. > >1. The tcp performance has no difference when bonding GRO is on versus off. >When testing with bonding, I always get ~890 Mbits/sec bandwidth no >matter whether GRO is on. >When testing with a physical NIC instead of bonding on the same >machine, with GRO off, I get 464 Mbits/sec bandwidth, with GRO on, I >get 897 Mbits/sec bandwidth. >So looks like the GRO can't be turned off on bonding? Well, it's probably more correct to say that GRO is unimplemented for "stacked on top" interfaces like bonding (or bridge, vlan, team, etc). GRO operates early in the receive processing, when the device driver is receiving packets, typically by calling napi_gro_receive() from its NAPI poll function. This is well before bonding, bridge, et al, are involved, as these drivers don't do NAPI at all. >I used iperf3 to test performance. >And I limited iperf3 process cpu usage during my testing to simulate a >cpu bottleneck. >Otherwise it's difficult to see bandwidth differences when offload is >on versus off. > >I reported a bz for this: https://bugzilla.redhat.com/show_bug.cgi?id=2183434 > >2. Should bonding propagate offload configuration to slaves? >For now, only "ethtool -K bond0 lro off" can be propagated to slaves, >others can't be propagated to slaves, e.g. > ethtool -K bond0 tso on/off > ethtool -K bond0 gso on/off > ethtool -K bond0 gro on/off > ethtool -K bond0 lro on >All above configurations can't be propagated to bonding slaves. The LRO case is because it's set in NETIF_F_UPPER_DISABLES, as checked in netdev_sync_upper_features() and netdev_sync_lower_features(). A subset of features is handled in bond_compute_features(). Some feature changes, e.g., scatter-gather, do propagate upwards (but not downwards), as bonding handles NETDEV_FEAT_CHANGE events for its members (but not vice versa). TSO, GSO, and GRO aren't handled in either of these situations, and so changes don't propagate at all. Whether they should or not is a separate, complicated, question. E.g., should features propagate upwards, or downwards? How many levels of nesting? -J >I reports a bz for this: https://bugzilla.redhat.com/show_bug.cgi?id=2183777 > >I am using the RHEL with kernel 4.18.0-481.el8.x86_64. > >BR, >Liang Li > --- -Jay Vosburgh, jay.vosburgh@canonical.com