From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1DA75A00C4; Thu, 31 Oct 2019 17:38:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C6561C2F4; Thu, 31 Oct 2019 17:38:16 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id EE6821C2EA for ; Thu, 31 Oct 2019 17:38:14 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9VGZHrF000971; Thu, 31 Oct 2019 09:38:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=y2B+9NllPRycoPFsh2//4E75DGr9SdQZsmJ23tRaMTo=; b=XKppFZSdanU1v7ddFg7keMIeYfugALaQaG6Kppj8OsmfE9mRBi2bJj8yyf0LL9GCrjl4 7RGTuXk1KNpJirLQuwWCmZ+Auoo03S6YGjIks8fw2RHqvuyWSehHbamzXS7ZgSCwaUBm dJVc1wvf8uuYZzRRhhAfxlJ1YEGtRpQQDdVGZI1K3EhDZT0fjEmckFrGYATCg+r/A2Qq rAa8QGMVgPcG2i+TbGTO+GlIIqUqtnQdPjMH5aONE/FpaTKFpkpbU5DR7YQEGrd5+tDH 1MgbRyqtxMcxgL1+F4OTvJEA+/t5lx9SPwLIuYRFAjUFVJsLE5NvWwQkL7pFHJwj2nWb 6g== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2vxwjm86kr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2019 09:38:13 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 31 Oct 2019 09:38:12 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.56) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 31 Oct 2019 09:38:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uhhk04YYTcD9Zg6elz9EBT8gY/iuxUM90LA+QPoeHQ4YPmTKwOcLRUThBZOgboXBv7vLjvuZ36Iwz/HAHXPGSlU3fT7u1WzGL3kutzWH6e6KxquwzFsJ8heFlVDT0kkGAMmIRR6ditWuPuzWtVNe0e9blSecGySblYcp98bDeuIoZbTR0cBdHVD9TykNxInUFG05uNSGhwMXXFHOAPwZ2fIAbcb+DdkhtYBv528plGHKVv8GS//X4fgC/c+QjOR29xjz1jN0LHp+f/g0Yt+TC2w6cxVWrmeEZa4BG7vHPh3ZcMhbrOVgWJ6/fQ7aZ4xCzCGXH+04Oo8ibkI0i/VGfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y2B+9NllPRycoPFsh2//4E75DGr9SdQZsmJ23tRaMTo=; b=Y6Bhi7hTAFR9Wqpp+g8Puse/DAMRQm8ibAZQURRB5c+wTWrzqVfRgSN0UBHvzoOMZp6/LgTWiXXiN5PfY+8MCv/JEvpLJP4DQpE1dPd5d2oXLftvTm4NnkyNzMvQukk3g2JMFS+Y4eULlEpA7FUuMHfoyafjxHdj8IvS+GJ0m9MppFf7kjHu3tUa/6pzbjhZwHa/K5e1+q82gWRBYY1qS+7XhG8E5S6jJhs6aQPbv9guGMqQwI1AxJrpCcbTCejGvVQE8df3SoQQ9a0ndRStuMmeqhij63OohQ4r2BUu9HhzkD5IwthSs5xqGfPywmdmWeEyU+TjVpLoc1HAw85k2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y2B+9NllPRycoPFsh2//4E75DGr9SdQZsmJ23tRaMTo=; b=I+F62PRCKrKBmb5psm56x+844/iOUD0SM3h8wtdUx8DHr40wMoKc3V+KBAfYvn07I5mgPga7H2dI9MMz67WZYCfj7LYyyo0inVSaP/qloAviSdG6cmzJ/PZJtbyOB2ZbdNq4nowqh3K6x+KB2B7kIXnCeNJ6k1YazjeZLk+ISAc= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.160) by CY4PR1801MB1832.namprd18.prod.outlook.com (10.171.254.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Thu, 31 Oct 2019 16:38:11 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::d918:c54e:c3b1:3167]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::d918:c54e:c3b1:3167%7]) with mapi id 15.20.2387.028; Thu, 31 Oct 2019 16:38:11 +0000 From: Pavan Nikhilesh Bhagavatula To: Thomas Monjalon , "arybchenko@solarflare.com" CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" , Jerin Jacob Kollanukkaran , John McNamara , Marko Kovacevic Thread-Topic: [dpdk-dev] [PATCH v15 1/7] ethdev: add set ptype function Thread-Index: AdWP/yoyjqUHxt6/Tf++ajUsUDV6xw== Date: Thu, 31 Oct 2019 16:38:11 +0000 Message-ID: Accept-Language: en-IN, en-US Content-Language: en-US X-Mentions: arybchenko@solarflare.com X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.171.125.115] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 16713922-b022-49ed-afbb-08d75e20b7e2 x-ms-traffictypediagnostic: CY4PR1801MB1832: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 02070414A1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(346002)(366004)(39860400002)(136003)(189003)(199004)(25786009)(476003)(2906002)(33656002)(5660300002)(3846002)(86362001)(71190400001)(66446008)(478600001)(66476007)(66556008)(4326008)(64756008)(256004)(8676002)(110136005)(71200400001)(14444005)(8936002)(81156014)(486006)(76116006)(66946007)(81166006)(54906003)(6116002)(74316002)(6506007)(6246003)(6436002)(2501003)(66066001)(102836004)(7736002)(305945005)(9686003)(14454004)(99286004)(55016002)(7696005)(52536014)(26005)(229853002)(316002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1832; H:CY4PR1801MB1863.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: BCL:0; x-microsoft-antispam-message-info: +7yC0QNamexj39bbf3dlx2GReJWB9PVhWe8ueiRTmbOOtqykxPr9DNgCWzkCqMR09mQJJbFK53l1hMCjVe3vAXhLHdd79yM643h/j26JiCq340v0hb3DWokSVpjE2t5iTtxRrVvw8962Y9gsDh5MEMi7BFH9fJEOc9rxD7JEGjSz36qrpUoJH2slf6X5xFjJwjj5x6AhkjcvG8WHchqOCJtcVfmBGnjJPhjkE0MOq1NmGK0VlewddbweYukl9ZvBVLOZr0ubLSKNr/XU7rBbv46/XoHt5mnceqx60U8WQcVEArSbdsK1pbiqf08gz7Ys6i5spKAXYK2fqD0cDtl5QZyxK0yELLJoVK71C+HlX07c6bFWwSiMdkYkA+Jd9EFxE/f/6k8sQjFiy/iCA7DsRSraExZ+1ESWcdhLDZo4S29R1tEsDFMBrwENhMuLDycb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 16713922-b022-49ed-afbb-08d75e20b7e2 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2019 16:38:11.0896 (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-CrossTenant-userprincipalname: MlEbOQVKXqRyzIQ20JYHHXSq4O2i1ROGFC5BCVXD7Wp+rslc4yzXe3PTj1zi3MSbZlaJFOTwz4oEeAm6ZZAh+SYUMAGaiD+YW1jg5VnXf3k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1832 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-31_06:2019-10-30,2019-10-31 signatures=0 Subject: Re: [dpdk-dev] [PATCH v15 1/7] ethdev: add set ptype function 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" >29/10/2019 16:37, pbhagavatula@marvell.com: >> From: Pavan Nikhilesh >> --- a/doc/guides/rel_notes/release_19_11.rst >> +++ b/doc/guides/rel_notes/release_19_11.rst >> @@ -231,6 +231,14 @@ New Features >> * Added a console command to testpmd app, ``show port (port_id) >ptypes`` which >> gives ability to print port supported ptypes in different protocol >layers. >> >> +* **Added ethdev API to set supported packet types** >> + >> + * Added new API ``rte_eth_dev_set_supported_ptypes`` that >allows an >> + application to inform PMD about packet types classification the >application >> + is interested in >> + * This scheme will allow PMDs to avoid lookup to internal ptype >table on Rx >> + and thereby improve Rx performance if application wishes do so. > >You just added or rebased this paragraph at the end. >As mentioned in the release notes files (top of the section), >there is an order for presenting features. Will fix in v16. > >> Removed Items >> ------------- >> --- a/lib/librte_ethdev/rte_ethdev.h >> +++ b/lib/librte_ethdev/rte_ethdev.h >> +/** >> + * @warning >> + * @b EXPERIMENTAL: this API may change without prior notice. >> + * >> + * Inform Ethernet device of the packet types classification the >recipient is >> + * interested in. > >This is a bit convoluted. >What about this? >"Optimize driver handling of packet types by reducing its range." @arybchenko@solarflare.com Thoughts? > >> + * >> + * Application can use this function to set only specific ptypes that i= t's >> + * interested. This information can be used by the PMD to optimize >Rx path. >> + * >> + * The function accepts an array `set_ptypes` allocated by the caller >to >> + * store the packet types set by the driver, the last element of the >array >> + * is set to RTE_PTYPE_UNKNOWN. The size of the `set_ptype` array >should be >> + * `rte_eth_dev_get_supported_ptypes() + 1` else it might only be >filled >> + * partially. >> + * >> + * @param port_id >> + * The port identifier of the Ethernet device. >> + * @param ptype_mask >> + * The ptype family that application is interested in should be >bitwise OR of >> + * RTE_PTYPE_*_MASK or 0. >> + * @param set_ptypes >> + * An array pointer to store set packet types, allocated by caller. T= he >> + * function marks the end of array with RTE_PTYPE_UNKNOWN. >> + * @param num >> + * Size of the array pointed by param ptypes. >> + * Should be rte_eth_dev_get_supported_ptypes() + 1 to >accommodate the >> + * set ptypes. >> + * @return >> + * - (0) if Success. >> + * - (-ENODEV) if *port_id* invalid. >> + * - (-EINVAL) if *ptype_mask* is invalid (or) set_ptypes is NULL and >> + * num > 0. >> + */ > >John, please you check the English wording? > >> +__rte_experimental >> +int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t >ptype_mask, >> + uint32_t *set_ptypes, unsigned int >num); > >I don't like the name of the function because they are >not "supported" packet types but "requested". >What about replacing "set_supported" with "set_allowed", or >"white_list"? "white_list" seems ok but hope it doesn't call for blacklisting API. >