mirror_ubuntu-kernels/drivers/net/ethernet/intel/i40e
Ivan Vecera 665e7d83c5 i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
Commit c87c938f62 ("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: c87c938f62 ("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>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-10-20 12:49:45 +01:00
..
i40e_adminq_cmd.h i40e: allow toggling loopback mode via ndo_set_features callback 2022-12-12 15:24:47 -08:00
i40e_adminq.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_adminq.h i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_alloc.h i40e: use int for i40e_status 2023-02-09 08:35:53 -08:00
i40e_client.c i40e: use ERR_PTR error print in i40e messages 2023-02-09 08:35:53 -08:00
i40e_common.c i40e: prevent crash on probe if hw registers have invalid values 2023-10-13 17:57:05 -07:00
i40e_dcb_nl.c i40e: use ERR_PTR error print in i40e messages 2023-02-09 08:35:53 -08:00
i40e_dcb.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_dcb.h i40e: use int for i40e_status 2023-02-09 08:35:53 -08:00
i40e_ddp.c i40e: Replace one-element array with flex-array member in struct i40e_package_header 2023-08-10 07:32:41 -07:00
i40e_debugfs.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_devids.h i40e: Add basic support for I710 devices 2022-09-06 12:49:00 -07:00
i40e_diag.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_diag.h i40e: fix registers dump after run ethtool adapter self test 2023-03-29 21:47:31 -07:00
i40e_ethtool.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_hmc.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_hmc.h i40e: use int for i40e_status 2023-02-09 08:35:53 -08:00
i40e_lan_hmc.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_lan_hmc.h i40e: use int for i40e_status 2023-02-09 08:35:53 -08:00
i40e_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
i40e_nvm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-18 12:44:56 -07:00
i40e_osdep.h i40e: use int for i40e_status 2023-02-09 08:35:53 -08:00
i40e_prototype.h i40e: Remove unused function declarations 2023-08-08 14:56:12 -07:00
i40e_ptp.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_register.h i40e: Fix dropped jumbo frames statistics 2022-06-30 13:09:00 -07:00
i40e_trace.h i40e: add xdp_buff to i40e_ring struct 2023-03-09 13:11:24 -08:00
i40e_txrx_common.h i40e, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full 2022-04-15 21:10:41 +02:00
i40e_txrx.c i40e: xsk: add RX multi-buffer support 2023-07-19 09:56:50 -07:00
i40e_txrx.h i40e: xsk: add RX multi-buffer support 2023-07-19 09:56:50 -07:00
i40e_type.h i40e: Replace one-element array with flex-array member in struct i40e_profile_aq_section 2023-08-10 10:41:54 -07:00
i40e_virtchnl_pf.c i40e: Fix VF VLAN offloading when port VLAN is configured 2023-09-15 09:15:16 -07:00
i40e_virtchnl_pf.h virtchnl: i40e/iavf: rename iwarp to rdma 2023-01-25 08:55:19 -08:00
i40e_xsk.c i40e: xsk: remove count_mask 2023-10-19 17:27:21 -07:00
i40e_xsk.h i40e: Fix DMA mappings leak 2022-10-14 08:24:31 +01:00
i40e.h i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value 2023-10-20 12:49:45 +01:00
Makefile