On Wed, Apr 02, 2025 at 08:10:01PM +0800, Jijie Shao wrote:
From: Jian Shen <shenjian15@xxxxxxxxxx>Overall this looks good to me.
The VF driver missed to store the rx VLAN tag strip state when
user change the rx VLAN tag offload state. And it will default
to enable the rx vlan tag strip when re-init VF device after
reset. So if user disable rx VLAN tag offload, and trig reset,
then the HW will still strip the VLAN tag from packet nad fill
into RX BD, but the VF driver will ignore it for rx VLAN tag
offload disabled. It may cause the rx VLAN tag dropped.
Fixes: b2641e2ad456 ("net: hns3: Add support of hardware rx-vlan-offload to HNS3 VF driver")
Signed-off-by: Jian Shen <shenjian15@xxxxxxxxxx>
Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
...
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.hFWIIW, as there is space I would have used two bools here.
index cccef3228461..1e452b14b04e 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
@@ -252,7 +252,8 @@ struct hclgevf_dev {
u16 *vector_status;
int *vector_irq;
- bool gro_en;
+ u32 gro_en :1;
+ u32 rxvtag_strip_en :1;
unsigned long vlan_del_fail_bmap[BITS_TO_LONGS(VLAN_N_VID)];
--
2.33.0