From: Jiri Pirko <jiri@resnulli.us>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Amritha Nambiar <amritha.nambiar@intel.com>,
intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
"Duyck, Alexander H" <alexander.h.duyck@intel.com>,
Netdev <netdev@vger.kernel.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>
Subject: Re: [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e
Date: Thu, 12 Oct 2017 09:30:22 +0200 [thread overview]
Message-ID: <20171012073022.GB14672@nanopsycho> (raw)
In-Reply-To: <CAKgT0UcAKvhRKJPKf3DR3yGoLU_mM3UWV-vksd_KY+-yveWaxQ@mail.gmail.com>
Thu, Oct 12, 2017 at 09:05:10AM CEST, alexander.duyck@gmail.com wrote:
>On Wed, Oct 11, 2017 at 1:58 PM, Jiri Pirko <jiri@resnulli.us> wrote:
>> Wed, Oct 11, 2017 at 10:46:52PM CEST, davem@davemloft.net wrote:
>>>From: Jiri Pirko <jiri@resnulli.us>
>>>Date: Wed, 11 Oct 2017 22:38:32 +0200
>>>
>>>> Wed, Oct 11, 2017 at 07:46:27PM CEST, alexander.duyck@gmail.com wrote:
>>>>>On Wed, Oct 11, 2017 at 5:56 AM, Jiri Pirko <jiri@resnulli.us> wrote:
>>>>>> Wed, Oct 11, 2017 at 02:24:12AM CEST, amritha.nambiar@intel.com wrote:
>>>>>>>This patch series enables configuring cloud filters in i40e
>>>>>>>using the tc-flower classifier. The classification function
>>>>>>>of the filter is to match a packet to a class. cls_flower is
>>>>>>>extended to offload classid to hardware. The offloaded classid
>>>>>>>is used direct matched packets to a traffic class on the device.
>>>>>>>The approach here is similar to the tc 'prio' qdisc which uses
>>>>>>>the classid for band selection. The ingress qdisc is called ffff:0,
>>>>>>>so traffic classes are ffff:1 to ffff:8 (i40e has max of 8 TCs).
>>>>>>
>>>>>>
>>>>>> NACK. This clearly looks like abuse of classid to something
>>>>>> else. Classid is here to identify qdisc instance. However, you use it
>>>>>> for hw tclass identification. This is mixing of apples and oranges.
>>>>>>
>>>>>> Why?
>>>>>>
>>>>>> Please don't try to abuse things! This is not nice.
>>>>>
>>>>>This isn't an abuse. This is reproducing in hardware what is already
>>>>>the behavior for software. Isn't that how offloads are supposed to
>>>>>work?
>>>>
>>>> What is meaning of classid in HW? Classid is SW only identification of
>>>> qdisc instances. No relation to HW instances = abuse.
>>>
>>>Jiri I really don't see what the problem is.
>>>
>>>As long as the driver does the right thing when changes are made to the
>>>qdisc, it doesn't really matter what "key" they use to refer to it.
>>>
>>>It could have just as easily used the qdisc pointer and then internally
>>>use some IDR allocated ID to refer to it in the driver and hardware.
>>>
>>>But that's such a waste, we have a unique handle already so why can't
>>>the driver just use that?
>>
>> Well if I see classid, I expect it should refer to qdisc instance. So
>> far, this has been always a case. But for some drivers, this would mean
>> something totally different and unrelated. So what should I think?
>> What's next? Classid could be abused to identify something else. I don't
>> understand why.
>
>The general idea is we are trying to offload some of the qdisc work
>down into the hardware. It is kind of hard to do that without
>providing this sort of abstraction.
Well you expect classid being 0-7, to identify the tclass in hw.
What is I pass something else? I think that what DaveM suggests makes
sense. You should accept every classid and map it to 0-7 internally in
driver.
>
>> classid in kernel and tclass in hw are 2 completely unrelated things.
>> Why they should share the same userspace api? What am I missing that
>> indicates this is not an abuse?
>
>This is both true and not quite true. In the case of mqprio it is
>already creating virtual qdiscs for each traffic class. That is
>essentially what we are trying to emulate on the receive side. That
>was why we thought we might use this abstraction.
>
>> There should be clean and well-defined userspace api:
>> 1) classid to identify qdisc instances
>> 2) something else to identify HW tclasses
>
>I agree with the well defined userspace api portion of this. However I
>somewhat disagree on the HW tclasses argument as we have virtual
>qdiscs floating around inside of mqprio for instance that represent
>the same type of thing. You will find that the classid values with a
>minor value less than or equal to the number of TCs don't actually
>exist other than for collecting statistics. If that is all you are
>looking for we could probably update ingress and clsact to at a
>minimum display the class IDs and treat them as full virtual classids
>within the qdisc. I figure it wouldn't make sense to add statistics
Agreed. I'm not happy how clsact ingress/egress classids are
implemented. The virtual qdiscs you are suggesting make sense.
>since they don't actually enqueue any packets.
>
>One thought I am considering, is what if we change the class ID of the
>virtual qdiscs for mqprio that represent priority based traffic
>classes so that we reserved TC_H_MIN values 0xFFE0 - 0xFFEF to
>represent traffic classes 0 through 15? The advantage would be that it
>would make the classid layout for mqprio closer to what is already
>there for mq, and then in addition we would have a block of values we
>could use as reserved for mq, mqprio, ingress, and clsact to represent
>what you refer to as the HW tclasses since mqprio is already doing
>something like this.
>
>- Alex
prev parent reply other threads:[~2017-10-12 7:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 0:24 [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e Amritha Nambiar
2017-10-11 0:24 ` [jkirsher/next-queue PATCH v4 1/6] cls_flower: Offload classid to hardware Amritha Nambiar
2017-10-11 0:24 ` [jkirsher/next-queue PATCH v4 2/6] i40e: Map TCs with the VSI seids Amritha Nambiar
2017-10-11 0:24 ` [jkirsher/next-queue PATCH v4 3/6] i40e: Cloud filter mode for set_switch_config command Amritha Nambiar
2017-10-11 23:30 ` [Intel-wired-lan] " Shannon Nelson
2017-10-26 21:10 ` Nambiar, Amritha
2017-10-11 0:24 ` [jkirsher/next-queue PATCH v4 4/6] i40e: Admin queue definitions for cloud filters Amritha Nambiar
2017-10-11 23:30 ` [Intel-wired-lan] " Shannon Nelson
2017-10-11 0:24 ` [jkirsher/next-queue PATCH v4 5/6] i40e: Clean up of " Amritha Nambiar
2017-10-11 23:30 ` [Intel-wired-lan] " Shannon Nelson
2017-10-11 0:24 ` [jkirsher/next-queue PATCH v4 6/6] i40e: Enable cloud filters via tc-flower Amritha Nambiar
2017-10-11 23:30 ` [Intel-wired-lan] " Shannon Nelson
2017-10-26 21:29 ` Nambiar, Amritha
2017-10-26 21:35 ` Shannon Nelson
2017-10-26 21:47 ` Nambiar, Amritha
2017-10-11 12:42 ` [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e Jamal Hadi Salim
2017-10-11 22:41 ` Nambiar, Amritha
2017-10-11 12:56 ` Jiri Pirko
2017-10-11 17:46 ` Alexander Duyck
2017-10-11 20:38 ` Jiri Pirko
2017-10-11 20:46 ` David Miller
2017-10-11 20:58 ` Jiri Pirko
2017-10-11 21:19 ` David Miller
2017-10-11 21:28 ` Jiri Pirko
2017-10-12 7:05 ` Alexander Duyck
2017-10-12 7:30 ` Jiri Pirko [this message]
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=20171012073022.GB14672@nanopsycho \
--to=jiri@resnulli.us \
--cc=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=amritha.nambiar@intel.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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).