From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0050.outbound.protection.outlook.com [104.47.2.50]) by dpdk.org (Postfix) with ESMTP id 7E3162B86 for ; Tue, 7 Mar 2017 13:30:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GeS1q1+H69t5TPLH27UwlKAUXsgGTQgs8SuGWz4EkBQ=; b=EwSro/myGTkFbjqqLR1C/1LRxVgnKkTIZEfGf02gPLUxDbJH57nBDhHJ3Q/z6kicO/gKDPzpPMqJdSmUPvW72fSWrTNhNAF2thKrx4VamAYzwAFmvQq2jwhG2rF7dC/Ne9A3uZH5BSMqzuXrxMEdY0YD2cc/PaflY2KI7otca/A= Received: from HE1PR04MB1612.eurprd04.prod.outlook.com (10.164.48.150) by HE1PR04MB1609.eurprd04.prod.outlook.com (10.164.48.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Tue, 7 Mar 2017 12:30:00 +0000 Received: from HE1PR04MB1612.eurprd04.prod.outlook.com ([10.164.48.150]) by HE1PR04MB1612.eurprd04.prod.outlook.com ([10.164.48.150]) with mapi id 15.01.0947.020; Tue, 7 Mar 2017 12:30:00 +0000 From: Hemant Agrawal To: "dev@dpdk.org" Thread-Topic: Issue with rte_eth_dev_set_vlan_offload Thread-Index: AdKXPWwHnoSQVAxkQjW7GuMDtY7aDQ== Date: Tue, 7 Mar 2017 12:30:00 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: 8b1d0575-e648-4c90-d4ae-08d46555ac72 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:HE1PR04MB1609; x-microsoft-exchange-diagnostics: 1; HE1PR04MB1609; 7:VwNlnQF0BuWovzDkSwOOyvF6CzmfnFamASuVytqrMOaenWREZCOpnjXztN2wFtt9guzxoFBFrK0znLZYOTFW1E5ZGAqiIltriWXqg1zFL3hmDyPoKrIsThoCvbCYGkc9VJt1WyeuXcm0jV34KhK+amoY3ywhBaOi8q15eCsg2wL4Ddpx2HfZCCPIJf6z67UhxwulWm7CLMVyE09scq7vq+L4eSzHjlCICsn/kkWHErZQ5XJNZugIQhk5sW6SB2RYkVJ5oI+eBZjWtNqzPLiVNMvkZMohNDKAjelV1wCxRTXtTR0FjvjJ+Jx4mXRYTXkz9Cxmd5NDBnoaYgGme0/Smw== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(21748063052155); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(20161123558025)(6072148); SRVR:HE1PR04MB1609; BCL:0; PCL:0; RULEID:; SRVR:HE1PR04MB1609; x-forefront-prvs: 0239D46DB6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39850400002)(39450400003)(39860400002)(39410400002)(39840400002)(31014005)(7696004)(54356999)(86362001)(5660300001)(50986999)(2351001)(7736002)(106356001)(7116003)(74316002)(6916009)(122556002)(53936002)(189998001)(38730400002)(110136004)(92566002)(2900100001)(450100001)(790700001)(102836003)(6116002)(33656002)(3846002)(3280700002)(3660700001)(8936002)(68736007)(8676002)(25786008)(2501003)(2906002)(54896002)(9326002)(55016002)(6506006)(99286003)(77096006)(6306002)(5630700001)(81166006)(1730700003)(5640700003)(66066001)(9686003)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR04MB1609; H:HE1PR04MB1612.eurprd04.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2017 12:30:00.4508 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1609 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Issue with rte_eth_dev_set_vlan_offload 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: Tue, 07 Mar 2017 12:30:02 -0000 Hi, Currently the "rte_eth_dev_set_vlan_offload" support setting= of three different capabilities on the port i.e. strip, filter and extend The current implementation only returns error when this API is not implemen= ted by the PMD. 1. First issue is that the documentation says that "(-ENOSUP) if hardw= are-assisted VLAN filtering not configured." But the APIs is also about str= ip and extend. 2. These are three different capabilities, NICs may support one but no= t other. So, this API should return the which of these capabilities are not= supported by the hardware. I see following options to fix it: 1. This API should check the hw capabilities and return the error, if = there is a mismatch. In case of error, it may return the hw supported mas= k as a possible return value. 2. Split the APIs into three different APIs for each function. Regards, Hemant /** * Set VLAN offload configuration on an Ethernet device * Enable/Disable Extended VLAN by an Ethernet device, This is a register se= tup * available on some Intel NIC, not but all, please check the data sheet for * availability. * Enable/Disable VLAN Strip can be done on rx queue for certain NIC, but he= re * the configuration is applied on the port level. * * @param port_id * The port identifier of the Ethernet device. * @param offload_mask * The VLAN Offload bit mask can be mixed use with "OR" * ETH_VLAN_STRIP_OFFLOAD * ETH_VLAN_FILTER_OFFLOAD * ETH_VLAN_EXTEND_OFFLOAD * @return * - (0) if successful. * - (-ENOSUP) if hardware-assisted VLAN filtering not configured. * - (-ENODEV) if *port_id* invalid. */ int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);