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

Thomas Monjalon thomas at monjalon.net
Thu Feb 1 03:07:03 CET 2018


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.wu at 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.



More information about the dev mailing list