Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp55741pxu; Thu, 3 Dec 2020 19:20:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJykmzn6HSStabnAzlHbNDlI1Ubg1zTbAE6EhLfKvJX/dL8yBR9X/lNr9EEocDFr9LWqqk/7 X-Received: by 2002:a17:906:2e55:: with SMTP id r21mr5377241eji.46.1607052000687; Thu, 03 Dec 2020 19:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607052000; cv=none; d=google.com; s=arc-20160816; b=dA/Amt+R7SIqcTKOtzvoGip3K35yYNXcjvNtu1siJTd3W6gZgeRzdkDu/M5AzqhLk3 QenOUL4PlYW6zf7LcNcJtvJ4CN0QnRF8p/9ca6puA0L+RASN3I6K87OOJcoPvw49MVPi TMuQSd0e+0xYGCw4D2Z5ujx87GMnSdgRdhj1NY7I9iGJy5FDa+ZzTfU/zVZ2Qn06/rP7 uCrND2+V78C0LEa5/a81v4SB94Mh6VLCOQolIhtQI09SMyTvm9Ph/TbND6CH5aXwRU8P 6L77bq8bKNBT2vHdhUhJtojqWy3Ws6ZjZSxoqZN5I8ZeKP5d7ChcW7w3QYyTKBCJfz68 Ftgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1ZZBwHUlkAo2mQlf/omWRQ3U/VftHPedEX4GpVFBakM=; b=fSZGhl9DyPAfooiJymIo9t/avH6O7yklQOvTPXoHI+j4d/4+qA+Ow0KibUUjN7rYrz 6D0ByrCxNeLntQf2iLE0QrPi/1KIadlogEbccbMCr+Jk5wNiovmy8q7alf5sOT25jzbu C9GIhQNYCQXQ9JMuQFlVdfz6atuUhuWQTk88aTU9xbJua5ARqgpvbE8qNG+0nQFqGJIn 6z8Y1vcvfKE4FEGpe2lqS4G4rkmhCSjztHOnWgznQqd219tOoWXjJWvJ54LwLdDtRl1I eFsJ31b6oQU5DCmuFyVTbcaCtS1HaSHSOqEWLboxLZsjcK0iCSDxu/LP1r14uYvmHEOM +K5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Adl2DmBr; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb11si2080861edb.446.2020.12.03.19.19.37; Thu, 03 Dec 2020 19:20:00 -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=@redhat.com header.s=mimecast20190719 header.b=Adl2DmBr; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727012AbgLDDPw (ORCPT + 99 others); Thu, 3 Dec 2020 22:15:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55728 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbgLDDPw (ORCPT ); Thu, 3 Dec 2020 22:15:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607051665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1ZZBwHUlkAo2mQlf/omWRQ3U/VftHPedEX4GpVFBakM=; b=Adl2DmBruljD8/IcVOV0N46HT/F9H/U3qSGSpzhy2Cf/Py19dSYggw12MV6wVlw/a/o0+m dmdOv3hwLZbKiNHe3C4bYugYdNC/dazGkSgEa9h2L4ns7mQecmiWClsh4hX6veTLLNZS5/ r+r+Ct7T0b+lApUZQ0D1Bw6Gi5dNXdA= Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-343-e-A_F7tzMVCGzm_jojPYxw-1; Thu, 03 Dec 2020 22:14:23 -0500 X-MC-Unique: e-A_F7tzMVCGzm_jojPYxw-1 Received: by mail-oo1-f69.google.com with SMTP id y4so2004224oou.15 for ; Thu, 03 Dec 2020 19:14:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1ZZBwHUlkAo2mQlf/omWRQ3U/VftHPedEX4GpVFBakM=; b=ezMkAEUrjsxuMcDq0oecL6paXy3vXPKyhEb/cHO6AWXVfa18TIa8Ay65gnNfPdVZTj PhczDRovDN4CijwB5puU3oiAK16ija9ZXrW4dI0ee7HFYdYIummGIWBv2m/bz0oTNCWr ZC/tZPXd0a3wsggcDHNxa9kexOv7tpZh98nXV5CXQa/F0kSc756BaPyIsz+dH3hlZwtp scidt6X1CgwEHp8nLexOG/4dckpUluWE932qnWOb2MOffLXxkS3vemKgPR4WCeWCsdDt 9NPmo8tiDeROJvi5pDbMXnpQld7nrRiLTgDwQN+/+JYLJLnopAid1CIWxLcii7cTkjkU C4qA== X-Gm-Message-State: AOAM532lpuKFu+eoY4TEufLS43fsjWdxreTm3UrE7VxQBMeWkMZH9m1r i90fTZcaPXoy+Yklp9gcQqQLobly3OGA9g0Pn3VurUGB0zxKLaN1XIQM3SZmllmuT/HAgneZHtH Mx7EGgUYb/jkPiD49PHvCFr/o9FkU0NPoSoj5gHAx X-Received: by 2002:aca:6255:: with SMTP id w82mr1659239oib.5.1607051663226; Thu, 03 Dec 2020 19:14:23 -0800 (PST) X-Received: by 2002:aca:6255:: with SMTP id w82mr1659227oib.5.1607051663014; Thu, 03 Dec 2020 19:14:23 -0800 (PST) MIME-Version: 1.0 References: <20201202173053.13800-1-jarod@redhat.com> <20201203004357.3125-1-jarod@redhat.com> <20201203085001.4901c97f@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> In-Reply-To: <20201203085001.4901c97f@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> From: Jarod Wilson Date: Thu, 3 Dec 2020 22:14:12 -0500 Message-ID: Subject: Re: [PATCH net v3] bonding: fix feature flag setting at init time To: Jakub Kicinski Cc: LKML , Ivan Vecera , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Thomas Davis , Netdev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Jarod Wilson jarod@redhat.com