* [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
@ 2023-10-19 16:37 Ivan Vecera
2023-10-19 19:19 ` Jacob Keller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ivan Vecera @ 2023-10-19 16:37 UTC (permalink / raw)
To: netdev
Cc: Mateusz Palczewski, Simon Horman, Jesse Brandeburg, Tony Nguyen,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Przemyslaw Patynowski, Sylwester Dziedziuch,
moderated list:INTEL ETHERNET DRIVERS, open list
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 <mateusz.palczewski@intel.com>
Cc: Simon Horman <horms@kernel.org>
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 {
* 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
2023-10-19 16:37 [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Ivan Vecera
@ 2023-10-19 19:19 ` Jacob Keller
2023-10-20 5:44 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-10-20 12:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jacob Keller @ 2023-10-19 19:19 UTC (permalink / raw)
To: Ivan Vecera, netdev
Cc: Mateusz Palczewski, Simon Horman, Jesse Brandeburg, Tony Nguyen,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Przemyslaw Patynowski, Sylwester Dziedziuch,
moderated list:INTEL ETHERNET DRIVERS, open list
On 10/19/2023 9:37 AM, 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.
>
> 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 <mateusz.palczewski@intel.com>
> Cc: Simon Horman <horms@kernel.org>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [Intel-wired-lan] [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
2023-10-19 16:37 [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Ivan Vecera
2023-10-19 19:19 ` Jacob Keller
@ 2023-10-20 5:44 ` Pucha, HimasekharX Reddy
2023-10-20 12:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Pucha, HimasekharX Reddy @ 2023-10-20 5:44 UTC (permalink / raw)
To: ivecera, netdev
Cc: Przemyslaw Patynowski, Palczewski, Mateusz, Brandeburg, Jesse,
open list, Eric Dumazet, Nguyen, Anthony L, Simon Horman,
Sylwester Dziedziuch, Jakub Kicinski, Paolo Abeni,
David S. Miller, moderated list:INTEL ETHERNET DRIVERS
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Ivan Vecera
> Sent: Thursday, October 19, 2023 10:07 PM
> To: netdev@vger.kernel.org
> Cc: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>; Palczewski, Mateusz <mateusz.palczewski@intel.com>; Brandeburg, Jesse <jesse.brandeburg@intel.com>; open list <linux-kernel@vger.kernel.org>; Eric Dumazet <edumazet@google.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Simon Horman <horms@kernel.org>; Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; David S. Miller <davem@davemloft.net>; moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
>
> 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 <mateusz.palczewski@intel.com>
> Cc: Simon Horman <horms@kernel.org>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
2023-10-19 16:37 [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Ivan Vecera
2023-10-19 19:19 ` Jacob Keller
2023-10-20 5:44 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
@ 2023-10-20 12:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-20 12:00 UTC (permalink / raw)
To: Ivan Vecera
Cc: netdev, mateusz.palczewski, horms, jesse.brandeburg,
anthony.l.nguyen, davem, edumazet, kuba, pabeni,
przemyslawx.patynowski, sylwesterx.dziedziuch, intel-wired-lan,
linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Thu, 19 Oct 2023 18:37:20 +0200 you 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.
>
> 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
>
> [...]
Here is the summary with links:
- [net,v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
https://git.kernel.org/netdev/net/c/665e7d83c538
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-20 12:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 16:37 [PATCH net v2] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Ivan Vecera
2023-10-19 19:19 ` Jacob Keller
2023-10-20 5:44 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-10-20 12:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).