Message ID | 20231018112621.463893-1-ivecera@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4719429vqb; Wed, 18 Oct 2023 04:27:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwuaN9CAgOcHPdxOF5mZk5vJN+oQrneXV01GTB790vavggFGvquVBVHvFZHSToFOp+trKn X-Received: by 2002:a05:6a00:1ca1:b0:6b3:c72d:b01 with SMTP id y33-20020a056a001ca100b006b3c72d0b01mr4934983pfw.1.1697628449042; Wed, 18 Oct 2023 04:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697628449; cv=none; d=google.com; s=arc-20160816; b=egnNL78Y8e8cWXzKBpRdZ0kgCA22P8YANx04CzVFe9BioAp4QlOl5NVZeJyFYfoSq6 FTu2RuYqrBJcKtD+K5lB9h3yeNxYNb0pXn38uRAiAWP5syCbSj+JXWzWO66ZXoQwxSRP uRW54CN3kxNvLT9oW2speREO2TYDJqN0EwUj3qwq7HeHwh2IhAi+SUBez+SrME8IUyGa Yfb93ScL/00a2jD429S+wSzKTD+FwM89VThjecs41ZWDleZK8p5EwQQ+uQIVYw2FvQoi L2B21ZHow7A6UGnH0rlyBL+QBhwNp65VfCQM0sH8NaDIZG2n4lhQBsXxdxVoa+5I3o8U h7CA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=LC+JUkUMT+93nTpU6gFosVyFPXlgCxZT1NxP3orC2Vw=; fh=uMjiMdinOIp/mbM/Zw8q7zVjOWeJB/K9UmyEmCeID0M=; b=Ul8dDBwJlVymSMin3mbXbseFHGBpyXHYlU60kGm+G+m6ecTtmMG7rIRRcD0ZLb2asr +NfBg7ZeKIIex7iHhCpkdXWpp+QXIMX7HKmC6NFE1JixbGXSnce5l5v7mQWu/zit74mg 2ZW8cMBGyiAZAwQJ41XAUq0IROoUYBTUErr7fsJwu8ANJpA+KWbP3I0YQdtlU1CyuN6R T3HnebWItEbi7EIRomxZfaeS1g4hQBsxdKp8fLPRRjT1N8wR0ngybhsCiBgqmtq30vJY 30ijZjaEuzNXO4kpBCLCpdtvqCdNo2fvrKIHPdBVoXPP7iMVGtvRqPXjIlk5Vji+GGQ8 cmTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HpJRN5GO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a6-20020aa78e86000000b006bdfb718e16si3551820pfr.80.2023.10.18.04.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 04:27:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HpJRN5GO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 52BA780D6E53; Wed, 18 Oct 2023 04:27:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbjJRL1P (ORCPT <rfc822;lkml4gm@gmail.com> + 24 others); Wed, 18 Oct 2023 07:27:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbjJRL1O (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Oct 2023 07:27:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61EF0FE for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 04:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697628392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LC+JUkUMT+93nTpU6gFosVyFPXlgCxZT1NxP3orC2Vw=; b=HpJRN5GOyW70JsR2QEsZ/fTc9bgiizucqQoevUb4WIJRyVekY7lKsobVRLBpQpeMHKpf6+ p6SBGtFIOU63HeyY95F9mq1fblwZ26iWXAJMidx3gk6wcQxh7TQDWUr+FodVa7hgzA/tqa nwmYADv9a0PHTV3lvkBpFB3ibbEATmw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-688-0XlQQ09WNBCF9GWRvoz_Gg-1; Wed, 18 Oct 2023 07:26:24 -0400 X-MC-Unique: 0XlQQ09WNBCF9GWRvoz_Gg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DFF9F10201E0; Wed, 18 Oct 2023 11:26:23 +0000 (UTC) Received: from p1.luc.com (unknown [10.45.226.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4923F492BEE; Wed, 18 Oct 2023 11:26:22 +0000 (UTC) From: Ivan Vecera <ivecera@redhat.com> To: netdev@vger.kernel.org Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>, Jesse Brandeburg <jesse.brandeburg@intel.com>, Tony Nguyen <anthony.l.nguyen@intel.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, intel-wired-lan@lists.osuosl.org (moderated list:INTEL ETHERNET DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Date: Wed, 18 Oct 2023 13:26:20 +0200 Message-ID: <20231018112621.463893-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 04:27:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780092448522625379 X-GMAIL-MSGID: 1780092448522625379 |
Series |
[net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
|
|
Commit Message
Ivan Vecera
Oct. 18, 2023, 11:26 a.m. UTC
Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new
PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with
existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag.
Move the affected flag at the end of the flags and fix its value.
Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 10/18/23 13:26, Ivan Vecera wrote: > Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new > PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with > existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag. > > Move the affected flag at the end of the flags and fix its value. > > Cc: Mateusz Palczewski <mateusz.palczewski@intel.com> > Signed-off-by: Ivan Vecera <ivecera@redhat.com> > --- > drivers/net/ethernet/intel/i40e/i40e.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h > index 6e310a53946782..55bb0b5310d5b4 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e.h > +++ b/drivers/net/ethernet/intel/i40e/i40e.h > @@ -580,7 +580,6 @@ struct i40e_pf { > #define I40E_FLAG_DISABLE_FW_LLDP BIT(24) > #define I40E_FLAG_RS_FEC BIT(25) > #define I40E_FLAG_BASE_R_FEC BIT(26) > -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27) > /* TOTAL_PORT_SHUTDOWN > * Allows to physically disable the link on the NIC's port. > * If enabled, (after link down request from the OS) > @@ -603,6 +602,7 @@ struct i40e_pf { such mistake happened only because list of flags is dispersed so much :/ > * in abilities field of i40e_aq_set_phy_config structure > */ > #define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27) > +#define I40E_FLAG_VF_VLAN_PRUNING BIT(28) > > struct i40e_client_instance *cinst; > bool stat_offsets_loaded; Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
On Wed, Oct 18, 2023 at 01:26:20PM +0200, Ivan Vecera wrote: > Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new > PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with > existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag. > > Move the affected flag at the end of the flags and fix its value. > > Cc: Mateusz Palczewski <mateusz.palczewski@intel.com> > Signed-off-by: Ivan Vecera <ivecera@redhat.com> Hi Ivan, I agree with the correctness of this patch and that it was introduced by the cited commit. However, I do wonder if, as a fix for 'net': 1) The patch description could include some discussion of what problem is resolved, and, ideally, how I user might get into such a situation. 2) The following fixes tag is appropriate. Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning") ...
On 19. 10. 23 11:15, Simon Horman wrote: > On Wed, Oct 18, 2023 at 01:26:20PM +0200, Ivan Vecera wrote: >> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new >> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with >> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag. >> >> Move the affected flag at the end of the flags and fix its value. >> >> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com> >> Signed-off-by: Ivan Vecera <ivecera@redhat.com> > > Hi Ivan, > > I agree with the correctness of this patch and that it was > introduced by the cited commit. > > However, I do wonder if, as a fix for 'net': > > 1) The patch description could include some discussion of > what problem is resolved, and, ideally, how I user might > get into such a situation. > > 2) The following fixes tag is appropriate. > > Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning") > Ahh, thanks Simon! I forgot to add Fixes: tag. Will fix it by v2 and add the reproducer. Thanks, Ivan
On 10/18/2023 5:30 AM, Przemek Kitszel wrote: > On 10/18/23 13:26, Ivan Vecera wrote: >> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new >> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with >> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag. >> >> Move the affected flag at the end of the flags and fix its value. >> >> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com> >> Signed-off-by: Ivan Vecera <ivecera@redhat.com> >> --- >> drivers/net/ethernet/intel/i40e/i40e.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h >> index 6e310a53946782..55bb0b5310d5b4 100644 >> --- a/drivers/net/ethernet/intel/i40e/i40e.h >> +++ b/drivers/net/ethernet/intel/i40e/i40e.h >> @@ -580,7 +580,6 @@ struct i40e_pf { >> #define I40E_FLAG_DISABLE_FW_LLDP BIT(24) >> #define I40E_FLAG_RS_FEC BIT(25) >> #define I40E_FLAG_BASE_R_FEC BIT(26) >> -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27) >> /* TOTAL_PORT_SHUTDOWN >> * Allows to physically disable the link on the NIC's port. >> * If enabled, (after link down request from the OS) >> @@ -603,6 +602,7 @@ struct i40e_pf { > > such mistake happened only because list of flags is dispersed so much :/ Better yet if we didn't hard-code the bits, and instead defined them via an enumeration so that its not possible :D These aren't even ABI so there's not a backwards compatibility risk either. Thanks, Jake
On 10/19/2023 12:48 PM, Ivan Vecera wrote: > Dne čt 19. 10. 2023 21:24 uživatel Jacob Keller <jacob.e.keller@intel.com> > napsal: > >> >> >> On 10/18/2023 5:30 AM, Przemek Kitszel wrote: >>> On 10/18/23 13:26, Ivan Vecera wrote: >>>> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new >>>> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with >>>> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag. >>>> >>>> Move the affected flag at the end of the flags and fix its value. >>>> >>>> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com> >>>> Signed-off-by: Ivan Vecera <ivecera@redhat.com> >>>> --- >>>> drivers/net/ethernet/intel/i40e/i40e.h | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h >> b/drivers/net/ethernet/intel/i40e/i40e.h >>>> index 6e310a53946782..55bb0b5310d5b4 100644 >>>> --- a/drivers/net/ethernet/intel/i40e/i40e.h >>>> +++ b/drivers/net/ethernet/intel/i40e/i40e.h >>>> @@ -580,7 +580,6 @@ struct i40e_pf { >>>> #define I40E_FLAG_DISABLE_FW_LLDP BIT(24) >>>> #define I40E_FLAG_RS_FEC BIT(25) >>>> #define I40E_FLAG_BASE_R_FEC BIT(26) >>>> -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27) >>>> /* TOTAL_PORT_SHUTDOWN >>>> * Allows to physically disable the link on the NIC's port. >>>> * If enabled, (after link down request from the OS) >>>> @@ -603,6 +602,7 @@ struct i40e_pf { >>> >>> such mistake happened only because list of flags is dispersed so much :/ >> >> Better yet if we didn't hard-code the bits, and instead defined them via >> an enumeration so that its not possible :D These aren't even ABI so >> there's not a backwards compatibility risk either. >> >> Thanks, >> Jake >> > > Hi Jake, > I have been preparing another series for iwl-next that covers this > conversion. I will submit it tomorrow or on the weekend. > > Ivan > Great, thanks! -Jake >> >
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 6e310a53946782..55bb0b5310d5b4 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h @@ -580,7 +580,6 @@ struct i40e_pf { #define I40E_FLAG_DISABLE_FW_LLDP BIT(24) #define I40E_FLAG_RS_FEC BIT(25) #define I40E_FLAG_BASE_R_FEC BIT(26) -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27) /* TOTAL_PORT_SHUTDOWN * Allows to physically disable the link on the NIC's port. * If enabled, (after link down request from the OS) @@ -603,6 +602,7 @@ struct i40e_pf { * in abilities field of i40e_aq_set_phy_config structure */ #define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27) +#define I40E_FLAG_VF_VLAN_PRUNING BIT(28) struct i40e_client_instance *cinst; bool stat_offsets_loaded;