Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp476506pxu; Fri, 4 Dec 2020 07:49:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7lukyenQOwlnutYVD7oy6u2g+motW9YwucuIbe0XFThfxyXrdJ3Mr15IPrzOcaa9+a0vJ X-Received: by 2002:a17:907:1004:: with SMTP id ox4mr7577331ejb.240.1607096969581; Fri, 04 Dec 2020 07:49:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607096969; cv=none; d=google.com; s=arc-20160816; b=tRfJL0WGYLWZZ7J5zpWZBo7n0n95LbEsqnvyjkhR5WT+86pl6s1rHMea8Dbsdzo+TI X38K8YxqL4aeRpnO0PrL4RYj6naBZnyEepGqIlpFtacDUwJ/HT14Hd2Z35mjb+mdOLIy HcofTCuQUURtY55nUAFoBP5dV4GOWl6vz/uawKSTLN5A99uq0p48Jmdsa4D5MA6quVqP gRTGYA7iRYc8nxtwoaN0OTItiaj+K0FoAMRebZe/bQHx8Gh8I015tw74VhYqMgQz0tS0 Xz9xfY6mevuZk84m0qjjOgu4U7pEFAm+M+hWR4oB/b7jvSvcdP+xzzJdYDL8wFYpOGoF MC8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:dkim-signature :date; bh=W0dafyJSa2bMUijdNvBbQSGuAN50ivbo24UM0xgXU2I=; b=zllx6bInyQ3MhFw8ci8dMjM60EOxpaRMkLV5KnPArPid3lf4JksJYLbVHLfbkeLRAV nmfzO65L7NPouml5VlPkMARAHL0QFfIxwkYOxtOGpdN3TUBfWILGkOm8tYu0ZfGdA4Cp DzASYPT4SabDtI3Cln4C8s81T1DkMz6RvlxA9XR6CDy6VDZve/HC5UPIw0mE//XC4v1i 4OpgLXN1G3w0EFlVRvB7Iz/Zma6O/PF2WpLGJR2x6Cg4yywBKxDwi6RQ8ZaOS3t1xbZT OvFzoo4pJdxI7fH0bMHsPjcq3ztPTyT5HGWC3gzcjgshZKVZnmM6EqHfbTA2Q8HLFecK x6MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Uekk62PZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si3820280edl.381.2020.12.04.07.49.06; Fri, 04 Dec 2020 07:49:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Uekk62PZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730562AbgLDPp4 (ORCPT + 99 others); Fri, 4 Dec 2020 10:45:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:41822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727970AbgLDPpz (ORCPT ); Fri, 4 Dec 2020 10:45:55 -0500 Date: Fri, 4 Dec 2020 07:45:14 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607096715; bh=hlxC2FJCf6bk/llMDqBF/KGpuvay6rt+yKz7CcBwdnU=; h=From:To:Cc:Subject:In-Reply-To:References:From; b=Uekk62PZlUmeqbhHarwlfUt3dzmak0h9S0hOF1dhAcHvpLuar9PMmcyVex/qGMTU6 CXofqKh5qgNrfeBL+/5gCGtxMVJPI2r7LXjBMuXG3rgNJcv7kPhw2k8w35B6oEv5iw 8sIkuxnaDFzPOBlHDGJ5dOnJyJrUgPZ6U4dOm6BduNlTwLY8IR+LslxM17O/WifJ24 rmFgqnW41dCgUmmzJ/uZCUGNdjNmuugsLNOjOkcyzO/cGfwRjB6rQ4e3bidb27ujX4 A+7A1AMhILCvFs/qtdqJQ1VqTwXXxV7O9eI5ti12C59gomgBoQbe8k1ndj9ndi1GBq TIKPAfD637/tA== From: Jakub Kicinski To: Jarod Wilson Cc: LKML , Ivan Vecera , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Thomas Davis , Netdev Subject: Re: [PATCH net v3] bonding: fix feature flag setting at init time Message-ID: <20201204074514.6a249076@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> In-Reply-To: References: <20201202173053.13800-1-jarod@redhat.com> <20201203004357.3125-1-jarod@redhat.com> <20201203085001.4901c97f@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Dec 2020 22:14:12 -0500 Jarod Wilson wrote: > On Thu, Dec 3, 2020 at 11:50 AM Jakub Kicinski wrote: > > > > On Wed, 2 Dec 2020 19:43:57 -0500 Jarod Wilson wrote: > > > bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; > > > -#ifdef CONFIG_XFRM_OFFLOAD > > > - bond_dev->hw_features |= BOND_XFRM_FEATURES; > > > -#endif /* CONFIG_XFRM_OFFLOAD */ > > > bond_dev->features |= bond_dev->hw_features; > > > bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX; > > > #ifdef CONFIG_XFRM_OFFLOAD > > > - /* Disable XFRM features if this isn't an active-backup config */ > > > - if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) > > > - bond_dev->features &= ~BOND_XFRM_FEATURES; > > > + bond_dev->hw_features |= BOND_XFRM_FEATURES; > > > + /* Only enable XFRM features if this is an active-backup config */ > > > + if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP) > > > + bond_dev->features |= BOND_XFRM_FEATURES; > > > #endif /* CONFIG_XFRM_OFFLOAD */ > > > > This makes no functional change, or am I reading it wrong? > > You are correct, there's ultimately no functional change there, it > primarily just condenses the code down to a single #ifdef block, and > doesn't add and then remove BOND_XFRM_FEATURES from > bond_dev->features, instead omitting it initially and only adding it > when in AB mode. I'd poked at the code in that area while trying to > get to the bottom of this, thought it made it more understandable, so > I left it in, but ultimately, it's not necessary to fix the problem > here. Makes sense, but please split it out and send separately to net-next.