From: Vlad Buslov <vladbu@nvidia•com>
To: Jamal Hadi Salim <jhs@mojatatu•com>
Cc: Vlad Buslov <vlad@buslov•dev>, <dsahern@gmail•com>,
<stephen@networkplumber•org>, <netdev@vger•kernel.org>,
<davem@davemloft•net>, <xiyou.wangcong@gmail•com>,
<jiri@resnulli•us>, <ivecera@redhat•com>,
Vlad Buslov <vladbu@mellanox•com>
Subject: Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump
Date: Mon, 26 Oct 2020 13:28:52 +0200 [thread overview]
Message-ID: <ygnh7drdz0nf.fsf@nvidia.com> (raw)
In-Reply-To: <89a5434b-06e9-947a-d364-acd2a306fc4d@mojatatu.com>
On Sat 24 Oct 2020 at 20:40, Jamal Hadi Salim <jhs@mojatatu•com> wrote:
> On 2020-10-23 8:48 a.m., Vlad Buslov wrote:
>> On Thu 22 Oct 2020 at 17:05, Jamal Hadi Salim <jhs@mojatatu•com> wrote:
>>> On 2020-10-21 4:19 a.m., Vlad Buslov wrote:
>>>>
>>>> On Tue 20 Oct 2020 at 15:29, Jamal Hadi Salim <jhs@mojatatu•com> wrote:
>>>>> On 2020-10-19 11:18 a.m., Vlad Buslov wrote:
>>>>> My worry is you have a very specific use case for your hardware or
>>>>> maybe it is ovs - where counters are uniquely tied to filters and
>>>>> there is no sharing. And possibly maybe only one counter can be tied
>>>>> to a filter (was not sure if you could handle more than one action
>>>>> in the terse from looking at the code).
>>>>
>>>> OVS uses cookie to uniquely identify the flow and it does support
>>>> multiple actions per flow.
>>>
>>>
>>> ok, so they use it like a flowid/classid to identify the flow.
>>> In our use case the cookie stores all kinds of other state that
>>> the controller can avoid to lookup after a query.
>>> index otoh is universal i.e two different users can intepret it
>>> per action tying it specific stats.
>>> IOW: I dont think it replaces the index.
>>> Do they set cookies on all actions in a flow?
>>
>> AFAIK on only one action per flow.
>>
>
> To each their own i guess. Sounds like it is being used as flowid
> entity.
> We pack a lot of metaencoding into those cookies. And to us
> a "service" is essentially a filter match folowed by a graph
> of actions (which could cyclic).
>
>
>>>> Cookie only consumes space in resulting netlink packet if used set the
>>>> cookie during action init. Otherwise, the cookie attribute is omitted.
>>>
>>> True, but: I am wondering why it is even considered in when terseness
>>> was a requirement (and index was left out).
>>
>> There was several reasons for me to include it:
>>
>> - As I wrote in previous email its TLV is only included in dump if user
>> set the cookie. Users who don't use cookies don't lose any performance
>> of terse dump.
>>
>> - Including it didn't require any changes to tc_action_ops->dump() (like
>> passing 'terse' flag or introducing dedicated terse_dump() callback)
>> because it is processed in tcf_action_dump_1().
>>
>> - OVS was the main use-case for us because it relies on filter dump for
>> flow revalidation and uses cookie to identify the flows.
>>
>
> Which is fine - but it is a very ovs specific need.
>>>
>>>>> In our case we totally bypass filters to reduce the amount of data
>>>>> crossing to user space (tc action ls). Theres still a lot of data
>>>>> crossing which we could trim with a terse dump. All we are interested
>>>>> in are stats. Another alternative is perhaps to introduce the index for
>>>>> the direct dump.
>>>>
>>>> What is the direct dump?
>>>
>>> tc action ls ...
>>> Like i said in our use cases to get the stats we just dumped the actions
>>> we wanted. It is a lot less data than having the filter + actions.
>>> And with your idea of terseness we can trim down further how much
>>> data by removing all the action attributes coming back if we set TERSE
>>> flag in such a request. But the index has to be there to make sense.
>>
>> Yes, that makes sense. I guess introducing something like 'tc action -br
>> ls ..' mode implemented by means of existing terse flag + new 'also
>> output action index' flag would achieve that goal.
>>
>
> Right. There should be no interest in the cookie here at all. Maybe
> it could be optional with a flag indication.
> Have time to cook a patch? I'll taste/test it.
Patch to make cookie in filter terse dump optional? That would break
existing terse dump users that rely on it (OVS).
>
> cheers,
> jamal
next prev parent reply other threads:[~2020-10-26 11:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 14:42 [PATCH iproute2-next v3 0/2] Implement filter terse dump mode support Vlad Buslov
2020-10-16 14:42 ` [PATCH iproute2-next v3 1/2] tc: skip actions that don't have options attribute when printing Vlad Buslov
2020-10-16 14:42 ` [PATCH iproute2-next v3 2/2] tc: implement support for terse dump Vlad Buslov
2020-10-16 16:07 ` Jamal Hadi Salim
2020-10-16 16:42 ` Vlad Buslov
2020-10-17 11:20 ` Jamal Hadi Salim
2020-10-18 12:16 ` Vlad Buslov
2020-10-19 13:48 ` Jamal Hadi Salim
2020-10-19 15:18 ` Vlad Buslov
2020-10-20 12:29 ` Jamal Hadi Salim
2020-10-21 8:19 ` Vlad Buslov
2020-10-22 14:05 ` Jamal Hadi Salim
2020-10-23 12:48 ` Vlad Buslov
2020-10-24 17:40 ` Jamal Hadi Salim
2020-10-26 11:28 ` Vlad Buslov [this message]
2020-10-26 14:52 ` David Ahern
2020-10-26 15:06 ` Vlad Buslov
2020-10-26 15:17 ` David Ahern
2020-10-26 17:12 ` Jamal Hadi Salim
2020-10-26 17:46 ` Vlad Buslov
2020-10-26 18:01 ` Jamal Hadi Salim
2020-10-26 18:03 ` Vlad Buslov
2020-10-26 19:56 ` Jamal Hadi Salim
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=ygnh7drdz0nf.fsf@nvidia.com \
--to=vladbu@nvidia$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@gmail$(echo .)com \
--cc=ivecera@redhat$(echo .)com \
--cc=jhs@mojatatu$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=netdev@vger$(echo .)kernel.org \
--cc=stephen@networkplumber$(echo .)org \
--cc=vlad@buslov$(echo .)dev \
--cc=vladbu@mellanox$(echo .)com \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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