DPDK patches and discussions
 help / color / mirror / Atom feed
From: Slava Ovsiienko <viacheslavo@nvidia.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	"Xueming(Steven) Li" <xuemingl@nvidia.com>,
	"Andrew Rybchenko" <arybchenko@solarflare.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"declan.doherty@intel.com" <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>,
	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>
Subject: Re: [dpdk-dev] [PATCH] ethdev: deprecate shared counters using action attribute
Date: Mon, 2 Nov 2020 17:48:05 +0000	[thread overview]
Message-ID: <MWHPR12MB1501E0A13D67954963EA14C0DF100@MWHPR12MB1501.namprd12.prod.outlook.com> (raw)
In-Reply-To: <77ee1d41-e3f4-b7c4-e268-c51448db7384@oktetlabs.ru>

> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Sent: Monday, November 2, 2020 18:40
> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Ferruh Yigit
> <ferruh.yigit@intel.com>; Xueming(Steven) Li <xuemingl@nvidia.com>;
> Andrew Rybchenko <arybchenko@solarflare.com>; 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>;
> 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>
> Subject: Re: [dpdk-dev] [PATCH] ethdev: deprecate shared counters using
> action attribute
> 
> On 11/2/20 7:12 PM, Slava Ovsiienko wrote:
> >> -----Original Message-----
> >> From: Ferruh Yigit <ferruh.yigit@intel.com>
> >> Sent: Monday, November 2, 2020 18:01
> >> To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>;
> Xueming(Steven)
> >> Li <xuemingl@nvidia.com>; Andrew Rybchenko
> >> <arybchenko@solarflare.com>; 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>; Slava 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>
> >> Subject: Re: [dpdk-dev] [PATCH] ethdev: deprecate shared counters
> >> using action attribute
> >>
> >> 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>
> >
> > It depends whether we are going to support multiple counters for the same
> flow.
> 
> Why? Query refers to a counter using action pointer. There is always one
> counter in one action. If you need more counters, just use more actions.
> 
Honestly, I wonder if someone wants to use multiple counters in the same flow.
That might happen if we add some unique attributes to the counter action
(say, count some complex events/traffic params).

Action pointer in the rte_flow_query() is just a pointer to some counter action
describing the counter. If we drop id field (and only action type COUNTER remains
in action description) - there would be no way to distinguish two (regular, not shared)
counters in the flow. Which one should be returned on query?  

> > If there is the only counter per flow we could get rid of the "id"
> > field either. If it is still needed, PMDs should generate counter id internally
> and id should not be exposed outside.
> >
> > With best regards, Slava
> >
> > PS. What about meters? The next good candidate to shared actions.
> >
> >


  reply	other threads:[~2020-11-02 17:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29  8:52 Andrew Rybchenko
2020-10-29 14:39 ` Ori Kam
2020-10-29 16:11   ` Thomas Monjalon
2020-11-01  7:49     ` Ori Kam
2020-11-03 17:21       ` Thomas Monjalon
2020-11-03 17:26         ` Andrew Rybchenko
2020-10-30 16:12 ` Xueming(Steven) Li
2020-11-01 10:45   ` Andrew Rybchenko
2020-11-02 16:01     ` Ferruh Yigit
2020-11-02 16:12       ` Slava Ovsiienko
2020-11-02 16:40         ` Andrew Rybchenko
2020-11-02 17:48           ` Slava Ovsiienko [this message]
2020-11-02 17:55             ` Andrew Rybchenko
2020-11-03 13:30               ` Xueming(Steven) Li
2020-11-03 13:34               ` Xueming(Steven) Li
2020-11-24 18:09       ` Ajit Khaparde
2020-11-26  9:08         ` Ori Kam
2020-11-26 12:23           ` Ferruh Yigit
2020-11-26 16:49             ` Ori Kam
2020-11-03 14:26 ` [dpdk-dev] [PATCH v2] " Andrew Rybchenko
2020-11-12 13:21   ` Ferruh Yigit
2020-11-24 17:51     ` Ferruh Yigit
2020-11-27 16:07     ` Bruce Richardson
2020-11-27 16:08     ` Bruce Richardson
2020-11-27 17:43       ` Ajit Khaparde
2020-11-27 18:11         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR12MB1501E0A13D67954963EA14C0DF100@MWHPR12MB1501.namprd12.prod.outlook.com \
    --to=viacheslavo@nvidia.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=andreyv@nvidia.com \
    --cc=arybchenko@solarflare.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.com \
    --cc=jasvinder.singh@intel.com \
    --cc=matan@nvidia.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=orika@nvidia.com \
    --cc=oulijun@huawei.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=shahafs@nvidia.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=thomas@monjalon.net \
    --cc=xavier.huwei@huawei.com \
    --cc=xuemingl@nvidia.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).