Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp480756rdb; Thu, 19 Oct 2023 09:38:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/WsXzZS7cd8ROOiYmwiJf2vAAJ0mK2KHq2F2scSy6dR+Z88BKay7CpU4Q9F2t7u2gQf12 X-Received: by 2002:a05:6870:7810:b0:1e9:89b0:f2b3 with SMTP id hb16-20020a056870781000b001e989b0f2b3mr3471041oab.1.1697733506778; Thu, 19 Oct 2023 09:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697733506; cv=none; d=google.com; s=arc-20160816; b=EdZU7pUcG/zKhfYOCJac34GYOyz0UZ1v7V4EKreXmt9BLOGOiM/N1hjuJbvu/Q2irA 8T7Mcb2zKoSTWoqGEFemDxdPaD26vYR7APbU/F+tRZn/G/ZRWP+FgPN4q9P2SgXg5z58 QxQUufQUHPz4QbcbEkHl5fHKALXv2+ifbvAgGF513xrOZXpwizpkUZ8rBgxNtpprc/1i XU/w68NX0vLwK1UEAFCQIESzTktvoMW20nX5n7GRRrIvM9wWLC74vpgwBsp7qb7JNIkU r+6Yt3FhI3zLxTiPlRRharWwfHKBBZSxDd93qjgSBDuFWf8G6F0wY5m+qaT3aSGFI/aH quKw== 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=aCk5y5U6S6pBpWhKJtSh1SurFp9oD5gnKu4jbHvlKmo=; fh=xjNl7ZRH0zcr0dYKCj/Vj54mTY+YYUiHUJbx4XV8nBo=; b=ibSEdHEW91+L7mfJ1YN3PVUnaoQqTeiUeX1fY3kUyJJgDGDfSzeVJGR4HnFlc2veRO Qe8Wu29sqx3iaj3+QqmZCV7aD/jwyygI1aZsinOqxkQtNiNBYKWo7J7plNfrVEi0r4op LgW6Sx0fMA7WFhqLluI5e8nfCcihZoH3V2p5vwwoD+Ad5h4ecBCbhD8zxT2Fk422MqAZ dvOEc96SfV1Mg4elE33UmM/adGnNUyGeIQYEzI3FwstGNnqvTv5IgOLgiybmf92Cd6Y4 7j2Dd6Z3HSWkxdEtCjaRcFOVlaJawAeyI7vTb9qrrVayiubWUIvZHG8WJRChfHYbO4qs vYzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X6fTaqQq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id x5-20020a654145000000b005b4ef61bfc7si4545389pgp.596.2023.10.19.09.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 09:38:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X6fTaqQq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 95A2D83393AF; Thu, 19 Oct 2023 09:38:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344979AbjJSQiT (ORCPT + 99 others); Thu, 19 Oct 2023 12:38:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233020AbjJSQiS (ORCPT ); Thu, 19 Oct 2023 12:38:18 -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 B4E3711F for ; Thu, 19 Oct 2023 09:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697733449; 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=aCk5y5U6S6pBpWhKJtSh1SurFp9oD5gnKu4jbHvlKmo=; b=X6fTaqQqICf7mhj4EQS+pNAH1onDIkUXPFcgHa0ZbnoU1e9I67MUrgYdLZTTNDCtg93COO w+TVYzjuOGOcN6V/RkCCnNlO3xhL11OnuJhAsaW19ySl9yiU2lNmBaXhESlpDk46bFCeZZ b7cGNuKC3wG1bHtiQo5sXTSZi6yjj1Y= 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-444-TxVd3RA4PPiZ1DhsYil0lA-1; Thu, 19 Oct 2023 12:37:24 -0400 X-MC-Unique: TxVd3RA4PPiZ1DhsYil0lA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 E3B828E6D01; Thu, 19 Oct 2023 16:37:23 +0000 (UTC) Received: from p1.luc.com (unknown [10.45.226.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0379925C8; Thu, 19 Oct 2023 16:37:21 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Mateusz Palczewski , Simon Horman , Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Przemyslaw Patynowski , Sylwester Dziedziuch , intel-wired-lan@lists.osuosl.org (moderated list:INTEL ETHERNET DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Date: Thu, 19 Oct 2023 18:37:20 +0200 Message-ID: <20231019163721.1333370-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 19 Oct 2023 09:38:24 -0700 (PDT) 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. Reproducer: [root@cnb-03 ~]# ethtool --set-priv-flags enp2s0f0np0 link-down-on-close on [root@cnb-03 ~]# ethtool --set-priv-flags enp2s0f0np0 vf-vlan-pruning on [root@cnb-03 ~]# ethtool --set-priv-flags enp2s0f0np0 link-down-on-close off [ 6323.142585] i40e 0000:02:00.0: Setting link-down-on-close not supported on this port (because total-port-shutdown is enabled) netlink error: Operation not supported [root@cnb-03 ~]# ethtool --set-priv-flags enp2s0f0np0 vf-vlan-pruning off [root@cnb-03 ~]# ethtool --set-priv-flags enp2s0f0np0 link-down-on-close off The link-down-on-close flag cannot be modified after setting vf-vlan-pruning because vf-vlan-pruning shares the same bit with total-port-shutdown flag that prevents any modification of link-down-on-close flag. Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning") Cc: Mateusz Palczewski Cc: Simon Horman Signed-off-by: Ivan Vecera --- 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 { * 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; -- 2.41.0