01/02/2018 02:26, Yanglong Wu:
> 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>
[...]
> --- 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;

This patch is wrong.

If you are trying to use VLAN filtering with testpmd,
you must enable it with --enable-hw-vlan-filter.

Reply via email to