From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0086.outbound.protection.outlook.com [104.47.0.86]) by dpdk.org (Postfix) with ESMTP id E690D2BF1 for ; Sun, 4 Feb 2018 07:27:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=maY8qGDVLBGG9EKD7A8lYXhm0we2qs3SGuElO+Nrtlw=; b=hUkW5QC0WiSTCDMNS+6Nffn0n2iOm5ZWX0/fqQqbulADEXs0riZd4v7IzC6i6jL/hITKABekFycKTKD5zTWWJ2zuuO4AnZv2XaIFRgGnXBeuicnsWPpdi/bBuilZS1fe8CpUeYlvSjABxZPjMyzfDmsbSb3oQm4Xl/MLqGjbUmI= Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by VI1PR05MB1406.eurprd05.prod.outlook.com (10.162.123.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Sun, 4 Feb 2018 06:27:11 +0000 Received: from VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::cd00:54ee:63a8:937c]) by VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::cd00:54ee:63a8:937c%13]) with mapi id 15.20.0444.023; Sun, 4 Feb 2018 06:27:11 +0000 From: Shahaf Shuler To: Yanglong Wu , "dev@dpdk.org" CC: "wenzhuo.lu@intel.com" Thread-Topic: [PATCH] app/testpmd:vlan filter fail Thread-Index: AQHTm+Re9Mf/vltgYESw0+PMCjR1wKOTyRMA Date: Sun, 4 Feb 2018 06:27:11 +0000 Message-ID: References: <20180202050950.64400-1-yanglong.wu@intel.com> In-Reply-To: <20180202050950.64400-1-yanglong.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.107] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB1406; 7:23UWypkC22cVw9QFcdAQdGdTbrLMx3wNby4bmN7k/GViVSPxAKhjbdCYSm//mAdQwiJQD6G/yCeu5bQFSLU0IfFIvgCwvKdLqOidLH4cCF44hDkQPnwY2IwvY7rXp6bZqz1zA15qXvF/WFLmcoLb2haXrqmZYa5Z0IPRZQwsEMmvVhvYi/t0EFXW74Tk4bhihbgi9GL3ngfhdMRI0d3aWOMFcVOwOMmGJZl0/zsLhZYFcEf8pZeNBaRlbVDte87M x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 60d98c61-af16-4035-cebc-08d56b98531a x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:VI1PR05MB1406; x-ms-traffictypediagnostic: VI1PR05MB1406: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3231101)(2400082)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR05MB1406; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1406; x-forefront-prvs: 05739BA1B5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(346002)(39380400002)(39860400002)(199004)(189003)(229853002)(2906002)(8936002)(8676002)(55016002)(2501003)(9686003)(5250100002)(81166006)(186003)(6436002)(81156014)(110136005)(102836004)(4326008)(6246003)(59450400001)(2950100002)(2900100001)(53936002)(25786009)(3846002)(6116002)(6506007)(68736007)(7696005)(76176011)(5660300001)(97736004)(3660700001)(105586002)(26005)(86362001)(7736002)(74316002)(305945005)(33656002)(66066001)(106356001)(316002)(478600001)(3280700002)(14454004)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1406; H:VI1PR05MB3149.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Y0KmqLOjA0dulQeDNVwfYu+XTh+U5cpNqhqbXrcfkcLAd9jZ5wc2eJ06wlQx92uzfWvJNtaQUc45NbWUzd7myg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60d98c61-af16-4035-cebc-08d56b98531a X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2018 06:27:11.5009 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1406 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: Sun, 04 Feb 2018 06:27:14 -0000 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 0= and > port_conf.rxmode.offloads is assigned as 0 again if hw_vlan_filter =3D 1.= So it > will always lead to fail for vlan filter 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 > 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