* [PATCH net 0/2] net: fix using wrong flags to check features
@ 2022-07-29 10:17 Guangbin Huang
2022-07-29 10:17 ` [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() Guangbin Huang
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Guangbin Huang @ 2022-07-29 10:17 UTC (permalink / raw)
To: davem, kuba, edumazet, pabeni, snelson, brett, drivers,
anthony.l.nguyen, jesse.brandeburg
Cc: intel-wired-lan, netdev, linux-kernel, lipeng321, huangguangbin2
We find that some drivers may use wrong flags to check features, so fix
them.
Jian Shen (2):
net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in
ice_vsi_sync_fltr()
net: ionic: fix error check for vlan flags in ionic_set_nic_features()
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.33.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr()
2022-07-29 10:17 [PATCH net 0/2] net: fix using wrong flags to check features Guangbin Huang
@ 2022-07-29 10:17 ` Guangbin Huang
2022-07-29 17:15 ` Nguyen, Anthony L
2022-07-29 10:17 ` [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features() Guangbin Huang
2022-08-01 19:50 ` [PATCH net 0/2] net: fix using wrong flags to check features patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Guangbin Huang @ 2022-07-29 10:17 UTC (permalink / raw)
To: davem, kuba, edumazet, pabeni, snelson, brett, drivers,
anthony.l.nguyen, jesse.brandeburg
Cc: intel-wired-lan, netdev, linux-kernel, lipeng321, huangguangbin2
From: Jian Shen <shenjian15@huawei.com>
vsi->current_netdev_flags is used store the current net device
flags, not the active netdevice features. So it should use
vsi->netdev->featurs, rather than vsi->current_netdev_flags
to check NETIF_F_HW_VLAN_CTAG_FILTER.
Fixes: 1babaf77f49d ("ice: Advertise 802.1ad VLAN filtering and offloads for PF netdev")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 9f02b60459f1..bc68dc5c6927 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -433,7 +433,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
IFF_PROMISC;
goto out_promisc;
}
- if (vsi->current_netdev_flags &
+ if (vsi->netdev->features &
NETIF_F_HW_VLAN_CTAG_FILTER)
vlan_ops->ena_rx_filtering(vsi);
}
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features()
2022-07-29 10:17 [PATCH net 0/2] net: fix using wrong flags to check features Guangbin Huang
2022-07-29 10:17 ` [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() Guangbin Huang
@ 2022-07-29 10:17 ` Guangbin Huang
2022-07-29 16:32 ` Shannon Nelson
2022-08-01 19:50 ` [PATCH net 0/2] net: fix using wrong flags to check features patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Guangbin Huang @ 2022-07-29 10:17 UTC (permalink / raw)
To: davem, kuba, edumazet, pabeni, snelson, brett, drivers,
anthony.l.nguyen, jesse.brandeburg
Cc: intel-wired-lan, netdev, linux-kernel, lipeng321, huangguangbin2
From: Jian Shen <shenjian15@huawei.com>
The prototype of input features of ionic_set_nic_features() is
netdev_features_t, but the vlan_flags is using the private
definition of ionic drivers. It should use the variable
ctx.cmd.lif_setattr.features, rather than features to check
the vlan flags. So fixes it.
Fixes: beead698b173 ("ionic: Add the basic NDO callbacks for netdev support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
---
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index f3568901eb91..1443f788ee37 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1437,7 +1437,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif,
if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH)
ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL);
- if ((vlan_flags & features) &&
+ if ((vlan_flags & le64_to_cpu(ctx.cmd.lif_setattr.features)) &&
!(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features)))
dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n");
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features()
2022-07-29 10:17 ` [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features() Guangbin Huang
@ 2022-07-29 16:32 ` Shannon Nelson
0 siblings, 0 replies; 6+ messages in thread
From: Shannon Nelson @ 2022-07-29 16:32 UTC (permalink / raw)
To: Guangbin Huang, davem, kuba, edumazet, pabeni, brett, drivers,
anthony.l.nguyen, jesse.brandeburg
Cc: intel-wired-lan, netdev, linux-kernel, lipeng321
On 7/29/22 3:17 AM, Guangbin Huang wrote:
> From: Jian Shen <shenjian15@huawei.com>
>
> The prototype of input features of ionic_set_nic_features() is
> netdev_features_t, but the vlan_flags is using the private
> definition of ionic drivers. It should use the variable
> ctx.cmd.lif_setattr.features, rather than features to check
> the vlan flags. So fixes it.
>
> Fixes: beead698b173 ("ionic: Add the basic NDO callbacks for netdev support")
>
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Good catch - thanks!
Acked-by: Shannon Nelson <snelson@pensando.io>
> ---
> drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index f3568901eb91..1443f788ee37 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -1437,7 +1437,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif,
> if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH)
> ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL);
>
> - if ((vlan_flags & features) &&
> + if ((vlan_flags & le64_to_cpu(ctx.cmd.lif_setattr.features)) &&
> !(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features)))
> dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n");
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr()
2022-07-29 10:17 ` [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() Guangbin Huang
@ 2022-07-29 17:15 ` Nguyen, Anthony L
0 siblings, 0 replies; 6+ messages in thread
From: Nguyen, Anthony L @ 2022-07-29 17:15 UTC (permalink / raw)
To: Guangbin Huang, davem, kuba, edumazet, pabeni, snelson, brett,
drivers, Brandeburg, Jesse
Cc: intel-wired-lan, netdev, linux-kernel, lipeng321
On 7/29/2022 3:17 AM, Guangbin Huang wrote:
> From: Jian Shen <shenjian15@huawei.com>
>
> vsi->current_netdev_flags is used store the current net device
> flags, not the active netdevice features. So it should use
> vsi->netdev->featurs, rather than vsi->current_netdev_flags
> to check NETIF_F_HW_VLAN_CTAG_FILTER.
>
> Fixes: 1babaf77f49d ("ice: Advertise 802.1ad VLAN filtering and offloads for PF netdev")
>
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Acked-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 9f02b60459f1..bc68dc5c6927 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -433,7 +433,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
> IFF_PROMISC;
> goto out_promisc;
> }
> - if (vsi->current_netdev_flags &
> + if (vsi->netdev->features &
> NETIF_F_HW_VLAN_CTAG_FILTER)
> vlan_ops->ena_rx_filtering(vsi);
> }
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net 0/2] net: fix using wrong flags to check features
2022-07-29 10:17 [PATCH net 0/2] net: fix using wrong flags to check features Guangbin Huang
2022-07-29 10:17 ` [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() Guangbin Huang
2022-07-29 10:17 ` [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features() Guangbin Huang
@ 2022-08-01 19:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-01 19:50 UTC (permalink / raw)
To: Guangbin Huang
Cc: davem, kuba, edumazet, pabeni, snelson, brett, drivers,
anthony.l.nguyen, jesse.brandeburg, intel-wired-lan, netdev,
linux-kernel, lipeng321
Hello:
This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 29 Jul 2022 18:17:53 +0800 you wrote:
> We find that some drivers may use wrong flags to check features, so fix
> them.
>
> Jian Shen (2):
> net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in
> ice_vsi_sync_fltr()
> net: ionic: fix error check for vlan flags in ionic_set_nic_features()
>
> [...]
Here is the summary with links:
- [net,1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr()
https://git.kernel.org/netdev/net/c/7dc839fe4761
- [net,2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features()
https://git.kernel.org/netdev/net/c/a86e86db5e6d
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] 6+ messages in thread
end of thread, other threads:[~2022-08-01 19:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 10:17 [PATCH net 0/2] net: fix using wrong flags to check features Guangbin Huang
2022-07-29 10:17 ` [PATCH net 1/2] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() Guangbin Huang
2022-07-29 17:15 ` Nguyen, Anthony L
2022-07-29 10:17 ` [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features() Guangbin Huang
2022-07-29 16:32 ` Shannon Nelson
2022-08-01 19:50 ` [PATCH net 0/2] net: fix using wrong flags to check features 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).