From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] app/testpmd:vlan filter fail Date: Thu, 01 Feb 2018 03:07:03 +0100 Message-ID: <7990034.yJyxX93kgV@xps> References: <20180201012653.173890-1-yanglong.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, shahafs@mellanox.com, wenzhuo.lu@intel.com To: Yanglong Wu Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 992A21B84E for ; Thu, 1 Feb 2018 03:07:50 +0100 (CET) In-Reply-To: <20180201012653.173890-1-yanglong.wu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 [...] > --- 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.