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 5CE74A00BE; Fri, 1 Nov 2019 23:25:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A49051E876; Fri, 1 Nov 2019 23:25:43 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id 99D451E874 for ; Fri, 1 Nov 2019 23:25:42 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 107654EB; Fri, 1 Nov 2019 18:25:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 01 Nov 2019 18:25:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=iZxm08PXXYdl3fKH16FoIj/WoH7EvxwEcwcLhwq6BOI=; b=QUW6/R9uepU8 Qowz+8fh/zvekZdArGsCUdSV0GqCqrLD7mMAbPlVMIJpwY/+4vyszxDRFQIc4ICI U3z1VXZ1Gn3gAu1jy/KkFKK/Pldml/LuYRQGevPXzc8whvBuohC3ViScazMDRsTY XpsK86za+e8W9ijLgLTZQNjOovbA09A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=iZxm08PXXYdl3fKH16FoIj/WoH7EvxwEcwcLhwq6B OI=; b=XpYrMbGHnEPYDJH6dtsNs7QzdbCcQap7ZIejeCdNkCXLnTzW7kJepUTwK WHcO+L2pxObUfrUmBqGPWYjJn/GdhVYO1L2B+hsBsiRdZTMsGfOqoXv0yJvz2Fdr yqyLgF5AGxMKVWpQIZVllqNoSz3AaaaVppiYDTr/RGrgSUknYzGq8cfq4I8cntR6 TpRfwHVhubaCvx81sEf9q5LgfEvh4XduQmb57Rq3sFOGxaxwHCjVMWu9+f0709f7 2w3D3RIlocSzMQ/UC/5hQa7DsuKWyA02W/x7fBhCW7z+8G1j0MYfROo+sbmd/qm2 X9yi9kUQ7oEO+K9fsAiDjQ0aJdeEw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddtjedgudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc fkphepleefrdeirddugeelrdduudegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from xps.localnet (114.149.6.93.rev.sfr.net [93.6.149.114]) by mail.messagingengine.com (Postfix) with ESMTPA id EF4CD3060060; Fri, 1 Nov 2019 18:25:38 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko Cc: Pavan Nikhilesh Bhagavatula , "dev@dpdk.org" , "ferruh.yigit@intel.com" , Jerin Jacob Kollanukkaran , John McNamara , Marko Kovacevic Date: Fri, 01 Nov 2019 23:25:37 +0100 Message-ID: <2639486.gPBSui7x2o@xps> In-Reply-To: <55a8ec94-bfe8-d132-5122-d322f83f02b2@solarflare.com> References: <55a8ec94-bfe8-d132-5122-d322f83f02b2@solarflare.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 01/11/2019 11:55, Andrew Rybchenko: > On 10/31/19 7:38 PM, Pavan Nikhilesh Bhagavatula wrote: > >> 29/10/2019 16:37, pbhagavatula@marvell.com: > >>> From: Pavan Nikhilesh > >>> 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? > > Optimize is a possible side effect of the operation, but there is > no any promise that something will be optimized. > I thought that current description explains what happens. > Below statements try to explain why it may be useful. > Any other options? "Reduce range of packet types to handle." > >>> + * Application can use this function to set only specific ptypes that it'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. The > >>> + * 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. > > "white_list" suggests that it is guaranteed that nothing else will > be reported. At least for me. However, I agree that set_supported > is not nice and I accepted it just to keep API naming symmetric. > May be it is really misleading here. May be just: rte_eth_dev_set_ptypes()? Maybe the word "allowed" would better fit?