From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 364A41B1B0 for ; Mon, 5 Feb 2018 02:51:43 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2018 17:51:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,462,1511856000"; d="scan'208";a="15835077" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 04 Feb 2018 17:51:40 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 4 Feb 2018 17:51:40 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.253]) with mapi id 14.03.0319.002; Mon, 5 Feb 2018 09:51:39 +0800 From: "Wu, Yanglong" To: Shahaf Shuler , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [PATCH] app/testpmd:vlan filter fail Thread-Index: AQHTm+RjZ+iGej6hEECmzpQoDbs9ZKOTRHuAgAHLLcA= Date: Mon, 5 Feb 2018 01:51:38 +0000 Message-ID: References: <20180202050950.64400-1-yanglong.wu@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTk2NmNhOGUtZjZkNC00Mjk1LWJmZWItNTBjY2EwMzRjMWIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik5nUSt3TzlzM2VwcUNGb1c3ZVhTZHA0QmNWUmpIUHNENExFV2s5UmYzS0U9In0= x-ctpclassification: CTP_NT x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd:vlan filter fail 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: , X-List-Received-Date: Mon, 05 Feb 2018 01:51:44 -0000 Hi, Thanks for your review. I got it! Yanglong Wu -----Original Message----- From: Shahaf Shuler [mailto:shahafs@mellanox.com]=20 Sent: Sunday, February 4, 2018 2:27 PM To: Wu, Yanglong ; dev@dpdk.org Cc: Lu, Wenzhuo Subject: RE: [PATCH] app/testpmd:vlan filter fail Hi Wu, Indeed there is an issue here, but this is not the right fix. Friday, February 2, 2018 7:10 AM, Yanglong Wu: > Subject: [PATCH] app/testpmd:vlan filter fail >=20 > Removing out port_conf.rxmode.hw_vlan_filter =3D 1 will let it equal to=20 > 0 and port_conf.rxmode.offloads is assigned as 0 again if=20 > hw_vlan_filter =3D 1. So it will always lead to fail for vlan filter=20 > setting >=20 > Fix:0074d02fc(convert to new Rx offloads API) > Signed-off-by: Yanglong Wu > --- > app/test-pmd/testpmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index=20 > 5dc8ccac5..0751e573c 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2328,7 +2328,7 @@ init_port_dcb_config(portid_t pid, > retval =3D get_eth_dcb_conf(&port_conf, dcb_mode, num_tcs, pfc_en); > if (retval < 0) > return retval; > - port_conf.rxmode.offloads |=3D DEV_RX_OFFLOAD_VLAN_FILTER; > + port_conf.rxmode.hw_vlan_filter =3D 1; The VLAN filter resets because the rxmode.ignore_offload_bitfield is not se= t. If it was set, the ethdev rxmode convert functions would have convert th= e new flag to the old API (rxmode.hw_vlan_filter). Am not much familiar with this configuration but here is a suggested fix: diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index d8ac43268..caf282386 100644 =20 --- a/app/test-pmd/testpmd.c =20 +++ b/app/test-pmd/testpmd.c =20 @@ -2324,6 +2324,8 @@ init_port_dcb_config(portid_t pid, =20 rte_port =3D &ports[pid]; =20 =20 memset(&port_conf, 0, sizeof(struct rte_eth_conf));=20 + port_conf.rxmode =3D rte_port->dev_conf.rxmode; =20 + port_conf.txmode =3D rte_port->dev_conf.txmode; =20 /* Enter DCB configuration status */ =20 dcb_config =3D 1; =20 =20 The port_conf for the dcb configuration will inherit the same configuration= of the port (which has the ignore_offload_bitfield set). Otherwise, at least the rxmode.ignore_offload_bitfield must be set.=20 >=20 > /** > * Write the configuration into the device. > -- > 2.11.0