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...@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

Reply via email to