From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75C57C433FE for ; Fri, 4 Dec 2020 03:15:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2BAC522513 for ; Fri, 4 Dec 2020 03:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727482AbgLDDPw (ORCPT ); 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-Google-Smtp-Source: ABdhPJzN78hUw/JrQhIanA7/trcLFQiN483Vjgq0gjfKP4OUu5Z+B+wiDa39AEa3lTF8AmmP9mJgTqDbGW6a6i4SCMM= 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