From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 4D3D6A0662 for ; Mon, 18 Mar 2019 10:56:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3DA8D11A4; Mon, 18 Mar 2019 10:56:43 +0100 (CET) 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) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2I9pApi008985; Mon, 18 Mar 2019 02:56:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=mHGDYwpAyj77n2FCoYtTWqdM0kzyn5Yru48nQEqUoLo=; b=gJsWNypRBBWz5A6qymF8u1G06XE5sQyZTRx+jSKW1WjcbeQXO+CEc46P4wtvzwEkK9uq xEyPnoD7k2a1RKOvHYCoQPpk4QsJO3GPhOGbrQLdG4PKQLiKv+FnPn3wNdbqGUNZ/vW+ jgLIGYvXTi1r5Uwwg2Kl8TqAoKFOWP1BgDX+iDZlsFIvDhCu2v9jCItIAsrY9nHXgm8d QQwnM0jeq80ohdON6iHPMr9LD3IUzh0Gi6MBarkT5iffud929OinVd1lYVDdc/HZO9bV t9K6/rBL4SiZ4mMAp8oIf/7tlS59Y5FkiuvBHZJ8Fyu03wL3qdiFQrxhzZq2ba0KQYh2 yg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2r90njmj55-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 18 Mar 2019 02:56:41 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 18 Mar 2019 02:56:38 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (104.47.32.59) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 18 Mar 2019 02:56:38 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mHGDYwpAyj77n2FCoYtTWqdM0kzyn5Yru48nQEqUoLo=; b=dJwjUHA5B/YrOxiFzZqLRNox0pDocHlDl1ZTouQ0pEvdRBgwR2E7KMthnFzpi0gpwR2SjDF8W4tBgS8Lz1+xU3RWdECntC1OwWr3vf5rPcLg7tRUO23VwMu6eXWsGS+NnrlprIIdcWf2RVAG2hyVMZjepiil8hNJ6kjSKPI0ghA= Received: from DM6PR18MB2427.namprd18.prod.outlook.com (20.179.104.21) by DM6PR18MB2507.namprd18.prod.outlook.com (20.179.105.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Mon, 18 Mar 2019 09:56:37 +0000 Received: from DM6PR18MB2427.namprd18.prod.outlook.com ([fe80::59e4:7c16:2667:7140]) by DM6PR18MB2427.namprd18.prod.outlook.com ([fe80::59e4:7c16:2667:7140%2]) with mapi id 15.20.1709.015; Mon, 18 Mar 2019 09:56:37 +0000 From: Nithin Kumar Dabilpuram To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger CC: "dev@dpdk.org" , Ferruh Yigit , Nithin Kumar Dabilpuram , "xiao.w.wang@intel.com" Thread-Topic: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Thread-Index: AQHU3XDgpM1XxI1Q9UOgfxbq1uAcwg== Date: Mon, 18 Mar 2019 09:56:37 +0000 Message-ID: <20190318095613.28167-1-ndabilpuram@marvell.com> References: <20190219064840.12046-1-ndabilpuram@marvell.com> In-Reply-To: <20190219064840.12046-1-ndabilpuram@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PN1PR01CA0092.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::32) To DM6PR18MB2427.namprd18.prod.outlook.com (2603:10b6:5:180::21) x-mailer: git-send-email 2.8.4 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e1839321-3d2e-4d13-3fc7-08d6ab8802b0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:DM6PR18MB2507; x-ms-traffictypediagnostic: DM6PR18MB2507: x-microsoft-antispam-prvs: x-forefront-prvs: 098076C36C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(346002)(376002)(396003)(39850400004)(189003)(199004)(76176011)(6116002)(2616005)(26005)(11346002)(97736004)(6506007)(386003)(446003)(3846002)(6436002)(102836004)(486006)(52116002)(55236004)(256004)(6486002)(476003)(6512007)(71190400001)(71200400001)(66066001)(186003)(53936002)(99286004)(25786009)(54906003)(8936002)(1076003)(4326008)(5660300002)(8676002)(81166006)(81156014)(2906002)(36756003)(50226002)(14454004)(305945005)(86362001)(478600001)(105586002)(7736002)(110136005)(68736007)(106356001)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR18MB2507; H:DM6PR18MB2427.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: QgZ8jZXfCMKodwkDYT/wSQ1gHxHs+t7ffmFny4IkL6kRqeE6uGdkkc0jdVHO6k5fMCrMvXYbz8wxCEpZnlIj1k4HsylpC6httpUwOLzFXZpGt6hlj01jgocfFo02klnKeyEuLkO1L/inscoePhRDOj43ueMXi1FLMCd0qH0lBEkGUCHN4wYluHxBs8P1l4NdzTVvEJR2pXHhawjbJjNAv7N1j+EYivljHqGgi1QSBeZOnPMGWp55oJi1HSpje97aCvXW9FzEDBZbYm1/t+CmvY6MlIQIDSmYKEK+K2y7aee+pNRct0PAt/gwpqN5ZwNQsubefP07NA9p0gUkBgtzC6BjxfQqr9fhSKOrCfW5fQKXuYglnsJC8A6/47tkpGuvbkvqQ0bhEdpoMeOKpGXfyF1Ez12FjcY1D5AMx439Aak= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e1839321-3d2e-4d13-3fc7-08d6ab8802b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2019 09:56:37.1863 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2507 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-18_07:, , signatures=0 Subject: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190318095637.cmv4Fluozof3DKvKrmlKdi1GkfWDPc0t5KyIGt6fVT8@z> 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