From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 96C48A04E7;
	Mon,  2 Nov 2020 17:01:31 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 13D68C96A;
	Mon,  2 Nov 2020 17:01:30 +0100 (CET)
Received: from mga12.intel.com (mga12.intel.com [192.55.52.136])
 by dpdk.org (Postfix) with ESMTP id 0F7B6C958
 for <dev@dpdk.org>; Mon,  2 Nov 2020 17:01:27 +0100 (CET)
IronPort-SDR: IwwQG3cAFGtMllveXT+/JgWRq6ebU5Lq/HHTVMdev4EpPFGCok7BnCRgMNFQCM5J0wAjIPykSb
 Vyti6nkdM7Hw==
X-IronPort-AV: E=McAfee;i="6000,8403,9793"; a="148187411"
X-IronPort-AV: E=Sophos;i="5.77,445,1596524400"; d="scan'208";a="148187411"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga005.jf.intel.com ([10.7.209.41])
 by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 02 Nov 2020 08:01:23 -0800
IronPort-SDR: 9nzwh7GxP2YGgKFpQ3qM/9ukFtTH7V1e+zE431WQw2CquEe3sdCrjyeWHE5gCbO6sy4t5qOq1B
 yNaF3t/OkREw==
X-IronPort-AV: E=Sophos;i="5.77,445,1596524400"; d="scan'208";a="538070363"
Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.219.143])
 ([10.213.219.143])
 by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 02 Nov 2020 08:01:16 -0800
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
 "Xueming(Steven) Li" <xuemingl@nvidia.com>,
 Andrew Rybchenko <arybchenko@solarflare.com>, "dev@dpdk.org" <dev@dpdk.org>,
 declan.doherty@intel.com
Cc: Andrey Vesnovaty <andreyv@nvidia.com>,
 NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
 Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>,
 Ori Kam <orika@nvidia.com>, "Wei Hu (Xavier)" <xavier.huwei@huawei.com>,
 "Min Hu (Connor)" <humin29@huawei.com>,
 Yisen Zhuang <yisen.zhuang@huawei.com>, Lijun Ou <oulijun@huawei.com>,
 Matan Azrad <matan@nvidia.com>, Shahaf Shuler <shahafs@nvidia.com>,
 Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
 Jasvinder Singh <jasvinder.singh@intel.com>,
 Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
 Ajit Khaparde <ajit.khaparde@broadcom.com>,
 Somnath Kotur <somnath.kotur@broadcom.com>,
 Qiming Yang <qiming.yang@intel.com>, Qi Zhang <qi.z.zhang@intel.com>
References: <1603961577-13264-1-git-send-email-arybchenko@solarflare.com>
 <BY5PR12MB43242909720DF9A8C20139BAA1150@BY5PR12MB4324.namprd12.prod.outlook.com>
 <362bab6b-1dcc-2254-20a0-4ee62b0cd69b@oktetlabs.ru>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <f7ea4066-4434-6662-2730-6dd466a5b984@intel.com>
Date: Mon, 2 Nov 2020 16:01:12 +0000
MIME-Version: 1.0
In-Reply-To: <362bab6b-1dcc-2254-20a0-4ee62b0cd69b@oktetlabs.ru>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Subject: Re: [dpdk-dev] [PATCH] ethdev: deprecate shared counters using
 action attribute
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On 11/1/2020 10:45 AM, Andrew Rybchenko wrote:
> On 10/30/20 7:12 PM, Xueming(Steven) Li wrote:
>> Hi Andrew,
>>
>>> -----Original Message-----
>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
>>> Sent: Thursday, October 29, 2020 4:53 PM
>>> To: dev@dpdk.org
>>> Cc: Andrey Vesnovaty <andreyv@nvidia.com>; NBU-Contact-Thomas
>>> Monjalon <thomas@monjalon.net>; Ferruh Yigit <ferruh.yigit@intel.com>;
>>> Ray Kinsella <mdr@ashroe.eu>; Neil Horman <nhorman@tuxdriver.com>;
>>> Ori Kam <orika@nvidia.com>; Andrew Rybchenko
>>> <andrew.rybchenko@oktetlabs.ru>
>>> Subject: [dpdk-dev] [PATCH] ethdev: deprecate shared counters using action
>>> attribute
>>>
>>> A new generic shared actions API may be used to create shared counter.
>>> There is no point to keep duplicate COUNT action specific capability to create
>>> shared counters.
>>>
>>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>> ---
>>> In fact, it looks like the next logical step is to remove struct
>>> rte_flow_action_count completely since counter ID makes sense for shared
>>> counters only. I think it will just make it easiser to use COUNT action.
>>> Comments are welcome.
>>>
>>>   doc/guides/rel_notes/deprecation.rst | 4 ++++
>>>   lib/librte_ethdev/rte_flow.h         | 6 +++++-
>>>   2 files changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/doc/guides/rel_notes/deprecation.rst
>>> b/doc/guides/rel_notes/deprecation.rst
>>> index 2e082499b8..4f3bac1a6d 100644
>>> --- a/doc/guides/rel_notes/deprecation.rst
>>> +++ b/doc/guides/rel_notes/deprecation.rst
>>> @@ -138,6 +138,10 @@ Deprecation Notices
>>>     will be limited to maximum 256 queues.
>>>     Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be
>>> removed.
>>>
>>> +* ethdev: Attribute ``shared`` of the ``struct rte_flow_action_count``
>>> +  is deprecated and will be removed in DPDK 21.11. Shared counters
>>> +should
>>> +  be managed using shared actions API (``rte_flow_shared_action_create``
>>> etc).
>>> +
>>>   * cryptodev: support for using IV with all sizes is added, J0 still can
>>>     be used but only when IV length in following structs
>>> ``rte_crypto_auth_xform``,
>>>     ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
>>> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index
>>> a8eac4deb8..2bb93d237a 100644
>>> --- a/lib/librte_ethdev/rte_flow.h
>>> +++ b/lib/librte_ethdev/rte_flow.h
>>> @@ -2287,6 +2287,9 @@ struct rte_flow_query_age {
>>>    * Counters can be retrieved and reset through ``rte_flow_query()``, see
>>>    * ``struct rte_flow_query_count``.
>>>    *
>>> + * @deprecated Shared attribute is deprecated, use generic
>>> + * RTE_FLOW_ACTION_TYPE_SHARED action.
>>> + *
>>>    * The shared flag indicates whether the counter is unique to the flow rule
>>> the
>>>    * action is specified with, or whether it is a shared counter.
>>>    *
>>> @@ -2299,7 +2302,8 @@ struct rte_flow_query_age {
>>>    * to all ports within that switch domain.
>>>    */
>>>   struct rte_flow_action_count {
>>> -    uint32_t shared:1; /**< Share counter ID with other flow rules. */
>>> +    /** @deprecated Share counter ID with other flow rules. */
>>> +    uint32_t shared:1;
>>>       uint32_t reserved:31; /**< Reserved, must be zero. */
>>>       uint32_t id; /**< Counter ID. */
>> Do you think id could be removed as well? neither non-shared flow counter query,
>> nor shared action query.
> 
> I'm not 100% sure, but yes, as I write above just after my Signed-off-by.
> 

cc'ed Declan + maintainers of PMDs for the 'id' field, but as far as I can see 
it is used out of the 'shared' context, so I am for going on with existing patch 
for now.

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>