netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Marcelo Ricardo Leitner <mleitner@redhat.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Victor Nogueira <victor@mojatatu.com>,
	xiyou.wangcong@gmail.com, davem@davemloft.net, pabeni@redhat.com,
	edumazet@google.com, vladbu@nvidia.com,
	simon.horman@corigine.com, pctammela@mojatatu.com,
	netdev@vger.kernel.org, kernel@mojatatu.com
Subject: Re: [PATCH net-next v4 0/3] net/sched: Introduce tc block ports tracking and use
Date: Tue, 10 Oct 2023 09:41:11 +0200	[thread overview]
Message-ID: <ZSUAF7tzCq+Vwj2I@nanopsycho> (raw)
In-Reply-To: <CALnP8ZbD_09u+Qqd2N4VcrstuGexh7TiNAtL7n4pyUvLAQ8EOw@mail.gmail.com>

Mon, Oct 09, 2023 at 10:54:07PM CEST, mleitner@redhat.com wrote:
>On Sat, Oct 07, 2023 at 07:20:52PM +0200, Jiri Pirko wrote:
>> Sat, Oct 07, 2023 at 04:09:15PM CEST, jhs@mojatatu.com wrote:
>> >On Sat, Oct 7, 2023 at 8:43 AM Jiri Pirko <jiri@resnulli.us> wrote:
>...
>> >> My primary point is, this should be mirred redirect to block instead of
>> >> what we currently have only for dev. That's it.
>> >
>> >Agreed (and such a feature should be added regardless of this action).
>> >The tc block provides a simple abstraction, but do you think it is
>> >enough? Alternative is to use a list of ports given to mirred: it
>> >allows us to group ports from different tc blocks or even just a
>> >subset of what is in a tc block - but it will require a lot more code
>> >to express such functionality.
>>
>> Again, you attach filter to either dev or block. If you extend mirred
>> redirect to accept the same 2 types of target, I think it would be best.
>
>The difference here between filter and action here is that you don't
>really have an option for filters: you either attach it to either dev
>or block, or you create an entire new class of objects, say,
>"blockfilter", all while retaining the same filters, parameters, etc.
>I'm not aware of a single filter that behaves differently over a block
>than a netdev.

Why do you talk about different behaviour? Nobody suggested that. I have
no idea what you mean by "blockfilter".



>
>But for actions, there is the option, and despite the fact that both

Which option?


>"output packets", the semantics are not that close. It actually
>helps with parameter parsing, documentation (man pages), testing (as
>use and test cases can be more easily tracked) and perhaps more
>importantly: if I don't want this feature, I can disable the new
>module.
>
>Later someone will say "hey why not have a hash_dst_selector", so it
>can implement a load balancer through the block output? And mirred,
>once a simple use case (with an already complex implementation),
>becomes a partial implementation of bonding then. :)
>
>In short, I'm not sure if having the user to fiddle through a maze of
>options that only work in mode A or B or work differently is better
>than having more specialized actions (which can and should reuse code).

Sure, you can have "blockmirredredirect" that would only to the
redirection for block target. No problem. I don't see why it can't be
just a case of mirred redirect, but if people want that separate, why
not.

My problem with the action "blockcast" is that it somehow works with
configuration of an entity the filter is attached to:
blockX->filterY->blockcastZ

Z goes all the way down to blockX to figure out where to redirect the
packet. If that is not odd, then I don't know what else is.

Has other consequences, like what happens if the filter is not attached
to block, but dev directly? What happens is blockcast action is shared
among filter? Etc.

Configuration should be action property. That is my point.



>
>  Marcelo
>

  reply	other threads:[~2023-10-10  7:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 18:42 [PATCH net-next v4 0/3] net/sched: Introduce tc block ports tracking and use Victor Nogueira
2023-10-05 18:42 ` [PATCH net-next v4 1/3] net/sched: Introduce tc block netdev tracking infra Victor Nogueira
2023-10-05 18:42 ` [PATCH net-next v4 2/3] net/sched: cls_api: Expose tc block to the datapath Victor Nogueira
2023-10-05 18:42 ` [PATCH net-next v4 3/3] net/sched: act_blockcast: Introduce blockcast tc action Victor Nogueira
2023-10-06 12:59 ` [PATCH net-next v4 0/3] net/sched: Introduce tc block ports tracking and use Jiri Pirko
2023-10-06 15:37   ` Jamal Hadi Salim
2023-10-06 16:50     ` Jiri Pirko
2023-10-06 19:06       ` Jamal Hadi Salim
2023-10-06 22:25         ` Jakub Kicinski
2023-10-06 23:00           ` Jamal Hadi Salim
2023-10-07 10:20             ` Jiri Pirko
2023-10-07 11:06               ` Jamal Hadi Salim
2023-10-07 12:43                 ` Jiri Pirko
2023-10-07 14:09                   ` Jamal Hadi Salim
2023-10-07 17:20                     ` Jiri Pirko
2023-10-08 12:38                       ` Jamal Hadi Salim
2023-10-09 20:54                       ` Marcelo Ricardo Leitner
2023-10-10  7:41                         ` Jiri Pirko [this message]
2023-10-10 11:54                           ` Marcelo Ricardo Leitner
2023-10-07 10:22         ` Jiri Pirko

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=ZSUAF7tzCq+Vwj2I@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=kernel@mojatatu.com \
    --cc=kuba@kernel.org \
    --cc=mleitner@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pctammela@mojatatu.com \
    --cc=simon.horman@corigine.com \
    --cc=victor@mojatatu.com \
    --cc=vladbu@nvidia.com \
    --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).