All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Rosenbaum <rosenbaumalex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Guy Shattah <sguy-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Yishai Hadas
	<yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Raed Salem <raeds-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Alex Rosenbaum <alexr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Tzahi Oved <tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-next 00/16] Flow counters support
Date: Sun, 29 Oct 2017 17:21:20 +0200	[thread overview]
Message-ID: <CAFgAxU-UcRapsoRn3hNUn27xgY370gUJ+WWE4URBq84ufkCXtA@mail.gmail.com> (raw)
In-Reply-To: <20171027155955.GA15922-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On Fri, Oct 27, 2017 at 5:59 PM, Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> On Fri, Oct 27, 2017 at 03:46:57PM +0000, Guy Shattah wrote:
>> On Wed, Oct 25, 2017 at 06:17:15PM +0300, Jason Gunthorpe wrote:
>> >On Wed, Oct 25, 2017 at 05:58:15PM +0300, Yishai Hadas wrote:
>>
>> counters are not group in hardware unique but in an intuitive way.
>
> I don't think you understand my remark.
>
> I do not want to expose the idea of hardware limited groupings of
> counters to the user at all.
>
> If the user needs counters 1,2 then the user should request those
> counters only. Hardware that needs to sample, say, counter 1,2,3,4 to
> get those will have to figure that out internally.

Since this is all about measuring verbs objects, it seems sensible for
us to group the counters by that same verbs sets.
But we don't have to go that way.
We can keep a flat list describing all available counters for all verbs objects.
Or maybe you're thinking of some other method for the user to learn
about available counters and their respectful objects?

> If the API requires a complex query interface just for the user it use
> it at all, then it is a total failure in my view. And that seems to be
> what is proposed here.
>
>> >That is unfortunate, and kind of lame, but you can still use the
>> >proposed API by re-ordering things. Continue to have
>> >ibv_add_sampling_point_flow, however a NULL flow argument will make
>> >the counters become added when the flow is created:
>> >
>> >?counters = ibv_create_counters([..]);

to clarify, does this create a single counter collection? what is
referred to as counter_set in the RFC/patches? or multiple counter's'?
I assume the '[..]' is ibv_context.


>> >?ibv_add_sampling_point_flow(counters, 1, NULL, [..])

so do we really need the flow object handle is this API (the 'NULL')?
why not go with a 'ibv_set_sampling_point(counters, 1, [..])' which
covers any/all counter definition for any object?
and when needed add the ibv_attach_sampling_point_qp().

and we need to clear the definition of '[..]'... does user learns what
inputs are valid from a describe API, or some other method (re the
above describe API question)?


>> >?flow_attr.counters = counters;
>> >?ibv_create_flow(qp, &flow_attr);

Works OK for mlx5 HW/driver

>> As mentioned earlier - current hardware support attachment of counters
>> only during the creation of the object (flow/qp/etc).
>
> And as I explained, the above addresses that.
>
>> Your proposal could be useful in the case where a structure of a dynamic
>> counter set is to be modified. However - since it is not the current case,
>> there is no benefit in dividing the build of such a counter-set into
>> several steps.
>
> The purpose is to make the API less dependent on specific
> implementation details.
>
> Mellanox drivers may wish to implement ibv_add_sampling_point_* as
> some kind of internal bookkeeping in userspace, other drives may wish
> to do kernel calls. It depends on how each type of hardware works.

Yes, we definitely need to make sure the API allows this u.s.
bookkeeping and reduce the amount system calls.
So the verbs CMD will allow 1 or more sampling points definitions.
In an OVS use case there can be many 10,000'nd of flows + counters and
this needs to be fast.

> You need to stop looking at the API through a Mellanox only lense.

In our patches we listed all vendor specific counter types in the
vendor driver code, and allow access to this set through generic verbs
in the describe API.
In our api, any vendor could utilize the same api to expose their
vendor specific counters.
In your suggestion, how do vendors add their specific HW dependent counters?

Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-10-29 15:21 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 14:41 [PATCH rdma-next 00/16] Flow counters support Yishai Hadas
     [not found] ` <1508424118-27205-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-10-19 14:41   ` [PATCH rdma-next 01/16] IB/core: Expose max_counter_sets capability Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 02/16] IB/uverbs: " Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 03/16] IB/core: Introduce counter set describe verb Yishai Hadas
     [not found]     ` <1508424118-27205-4-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-10-20 10:44       ` Christopher Lameter
2017-10-21  0:29         ` Guy Shattah
     [not found]           ` <AM6PR0502MB37838B19976EDF1D04C74751BD400-md96bDB8+JV1k1TWM4Wt8cDSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-22 12:00             ` Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 04/16] IB/uverbs: Add describe counter set support Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 05/16] IB/core: Introduce counter set object and its create/destroy verbs Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 06/16] IB/uverbs: Add create/destroy counter set support Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 07/16] IB/core: Introduce counter set query verb Yishai Hadas
     [not found]     ` <1508424118-27205-8-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-10-20 10:48       ` Christopher Lameter
2017-10-20 15:40         ` Guy Shattah
2017-10-19 14:41   ` [PATCH rdma-next 08/16] IB/uverbs: Add query counter set support Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 09/16] IB/core: Add support for flow counter set Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 10/16] IB/uverbs: " Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 11/16] net/mlx5: Export flow counter related API Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 12/16] net/mlx5: Expand mlx5_fc_query_cached to return absolute counters values Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 13/16] IB/mlx5: Add counter set operations Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 14/16] IB/mlx5: Pass mlx5_flow_act struct instead of multiple arguments Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 15/16] IB/mlx5: Add flow counter set support Yishai Hadas
2017-10-19 14:41   ` [PATCH rdma-next 16/16] IB/mlx5: Expose max_counter_sets capability Yishai Hadas
2017-10-23 16:51   ` [PATCH rdma-next 00/16] Flow counters support Jason Gunthorpe
     [not found]     ` <20171023165118.GA18097-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-23 17:00       ` Leon Romanovsky
2017-10-25 14:58       ` Yishai Hadas
     [not found]         ` <b003f6e5-d7ce-3775-a1dc-0fd0f507a515-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-10-25 15:17           ` Jason Gunthorpe
     [not found]             ` <20171025151734.GA15557-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-27 15:46               ` Guy Shattah
     [not found]                 ` <AM6PR0502MB3783A1186AA0ABDCCD5359AEBD5A0-md96bDB8+JV1k1TWM4Wt8cDSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-27 15:59                   ` Jason Gunthorpe
     [not found]                     ` <20171027155955.GA15922-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-29 15:21                       ` Alex Rosenbaum [this message]
     [not found]                         ` <CAFgAxU-UcRapsoRn3hNUn27xgY370gUJ+WWE4URBq84ufkCXtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-29 18:00                           ` Jason Gunthorpe
     [not found]                             ` <20171029180019.GE4488-uk2M96/98Pc@public.gmane.org>
2017-11-01  9:32                               ` Alex Rosenbaum
     [not found]                                 ` <CAFgAxU_CMxQ616wBd-vkvyJ905ndLHrabmWtJ-Ye_hgSwWqiag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-01 18:18                                   ` Jason Gunthorpe
     [not found]                                     ` <20171101181807.GJ1030-uk2M96/98Pc@public.gmane.org>
2017-11-01 18:59                                       ` Alex Rosenbaum
     [not found]                                         ` <CAFgAxU-DsOr9T9P6gqvZ9AviE45_34vZ1WUgUehmF-kb2j8JtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-01 19:01                                           ` Jason Gunthorpe
     [not found]                                             ` <20171101190119.GL1030-uk2M96/98Pc@public.gmane.org>
2017-11-01 19:46                                               ` Alex Rosenbaum
     [not found]                                                 ` <CAFgAxU9FZQC3JC6sEjB9W3YqHyF5StJ8_=mDQsF0eCWr9010hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-01 21:16                                                   ` Jason Gunthorpe
     [not found]                                                     ` <20171101211629.GA18874-uk2M96/98Pc@public.gmane.org>
2017-11-02  6:50                                                       ` Alex Rosenbaum
     [not found]                                                         ` <CAFgAxU8GNEiyzwHqrYyxs8J7T0TUqmN7JrZukkA0JgYSgY8FoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-02 15:38                                                           ` Jason Gunthorpe
     [not found]                                                             ` <20171102153848.GF18874-uk2M96/98Pc@public.gmane.org>
2017-11-02 16:11                                                               ` Alex Rosenbaum
     [not found]                                                                 ` <CAFgAxU_Ouzk1bsBpZ==gTetD3OVGVosgeJRvwqErqz5s2utHBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-02 16:19                                                                   ` Jason Gunthorpe
     [not found]                                                                     ` <20171102161928.GJ18874-uk2M96/98Pc@public.gmane.org>
2017-12-27 15:59                                                                       ` Alex Rosenbaum

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=CAFgAxU-UcRapsoRn3hNUn27xgY370gUJ+WWE4URBq84ufkCXtA@mail.gmail.com \
    --to=rosenbaumalex-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=alexr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=raeds-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sguy-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.