From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nithin Kumar Dabilpuram Subject: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Date: Mon, 18 Mar 2019 09:56:37 +0000 Message-ID: <20190318095613.28167-1-ndabilpuram@marvell.com> References: <20190219064840.12046-1-ndabilpuram@marvell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , Ferruh Yigit , Nithin Kumar Dabilpuram , "xiao.w.wang@intel.com" To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Return-path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 6FDA5A3 for ; Mon, 18 Mar 2019 10:56:42 +0100 (CET) In-Reply-To: <20190219064840.12046-1-ndabilpuram@marvell.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN") Cc: xiao.w.wang@intel.com Signed-off-by: Nithin Dabilpuram --- v2: * Split change into two seperate patches as suggested. app/test-pmd/config.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index b9e5dd9..f800503 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2955,7 +2955,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vl= an_type, uint16_t tp_id) void tx_vlan_set(portid_t port_id, uint16_t vlan_id) { - int vlan_offload; struct rte_eth_dev_info dev_info; =20 if (port_id_is_invalid(port_id, ENABLED_WARN)) @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id) if (vlan_id_is_invalid(vlan_id)) return; =20 - vlan_offload =3D rte_eth_dev_get_vlan_offload(port_id); - if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) { - printf("Error, as QinQ has been enabled.\n"); - return; - } rte_eth_dev_info_get(port_id, &dev_info); if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) =3D=3D 0) { printf("Error: vlan insert is not supported by port %d\n", @@ -2983,7 +2977,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id) void tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer) { - int vlan_offload; struct rte_eth_dev_info dev_info; =20 if (port_id_is_invalid(port_id, ENABLED_WARN)) @@ -2993,11 +2986,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint= 16_t vlan_id_outer) if (vlan_id_is_invalid(vlan_id_outer)) return; =20 - vlan_offload =3D rte_eth_dev_get_vlan_offload(port_id); - if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) { - printf("Error, as QinQ hasn't been enabled.\n"); - return; - } rte_eth_dev_info_get(port_id, &dev_info); if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) =3D=3D 0) { printf("Error: qinq insert not supported by port %d\n", --=20 2.8.4