Skip to contentSkip to conversation

net/ice: fix vlan filter Tx issue

PATCH Applied Qiming Yang 2 participants 2 messages Jan 14, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: fix vlan filter Tx issue

This patch fixed Tx error and allowed untagged packets in when vlan filter on.

Fixes e0dcf94a0d7f ("net/ice: support VLAN ops")
---
 drivers/net/ice/ice_ethdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/ice/ice_ethdev.c +8 -2
index 0a81e04..4672d12 100644
@@ -2183,14 +2183,20 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on)
 	if (ret) {
 		PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan rx pruning",
 			    on ? "enable" : "disable");
-		ret = -EINVAL;
+		return -EINVAL;
 	} else {
 		vsi->info.valid_sections |=
 			rte_cpu_to_le_16(ICE_AQ_VSI_PROP_SW_VALID |
 					 ICE_AQ_VSI_PROP_SECURITY_VALID);
 	}
 
-	return ret;
+	/* consist with other drivers, allow untagged packet when vlan filter on */
+	if (on)
+		ret = ice_add_vlan_filter(vsi, 0);
+	else
+		ret = ice_remove_vlan_filter(vsi, 0);
+
+	return 0;
 }
 
 static int
Signature · 1 line
2.9.5
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Monday, January 14, 2019 9:36 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ice: fix vlan filter Tx issue

Quoted 5 lines

This patch fixed Tx error and allowed untagged packets in when vlan filter on.

Fixes e0dcf94a0d7f ("net/ice: support VLAN ops")

Applied to dpdk-next-net-intel.

Thanks
Qi