[dpdk-dev] [PATCH] app/testpmd:vlan filter fail

Yanglong Wu yanglong.wu at intel.com
Thu Feb 1 02:26:53 CET 2018


And-operartion with a constant will
always lead to fail for vlan filter.

fix:0074d02fc(convert to new Rx offloads API)
Signed-off-by: Yanglong Wu <yanglong.wu at intel.com>
---
 lib/librte_ether/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index f285ba278..d468bb4a1 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2288,7 +2288,7 @@ rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
-	if (!(dev->data->dev_conf.rxmode.offloads &
+	if (!(dev->data->dev_conf.rxmode.offloads ||
 	      DEV_RX_OFFLOAD_VLAN_FILTER)) {
 		RTE_PMD_DEBUG_TRACE("port %d: vlan-filtering disabled\n", port_id);
 		return -ENOSYS;
-- 
2.11.0



More information about the dev mailing list