netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Hangbin Liu <liuhangbin@gmail.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@kernel.org>
Subject: Re: [PATCH (repost) net-next] sched: add extack for tfilter_notify
Date: Thu, 10 Nov 2022 09:27:09 -0800	[thread overview]
Message-ID: <20221110092709.06859da9@kernel.org> (raw)
In-Reply-To: <CAM0EoMm1Jx3mcGJK_XasTpVjm7uGHzVXhXN8=MAQUExJhuPFvw@mail.gmail.com>

On Thu, 10 Nov 2022 09:27:40 -0500 Jamal Hadi Salim wrote:
> > "Global", but they necessitate complicating the entire protocol
> > to use directly.
> >
> > Unless we want to create a separate netlink multicast channel for
> > just ext acks of a family. That's fine by me, I guess. I'm mostly
> > objecting to pretending notifications are multi-msg just to reuse
> > NLMSG_DONE, and forcing all notification listeners to deal with it.
> 
> TBH, I am struggling as well. NLMSG_DONE is really for multi-message
> (with kernel state) like dumps. Could we just extend nlmsg_notify()
> callers to take extack and pass it through and then have  nlmsg_notify()
> do the NLM_F_ACK_TLVS dance without MULTI flag? It would have to
> be backward compat and require user space changes which Hangbin's
> patch avoids but will be more general.

I think we'd need some sort of "internal / netlink level attributes"
to do that. We have only one attribute "space" inside any message,
defined by the family itself. So attribute type 1 for a TCA notification
is TCA_KIND, not NLMSGERR_ATTR_MSG.

We'd need changes to struct nlmsghdr to allow the nlmsghdr to have its
own set of attributes. Would be cool, but major surgery at this point.
I guess we could assume the families don't use high attr types, and say
that attr types > 0x400 are reserved for netlink. Put NLMSG_ATTRs there.
Seems risky, tho.

> > The more time we spend discussing this the more I'm inclined to say
> > "this is a typical tracing use case, just use the tracepoint" :(  
> 
> I understand your frustration but from an operational pov it is
> better to deal with one tool than two (Marcelo's point).

IDK, we can have a kernel hook into the trace point and generate 
the output over netlink, like we do with drop monitor and skb_free().
But I really doubt that its worth it. Also you can put a USDT into OvS
if you don't want to restart it. There are many options, not everything
is a nail :S

> The way i look at these uapi discussions is it is ok to discuss the
> color of the bike shed(within reason) because any decisions made here
> will have a long term effect.

To stretch the analogy - in my mind we have way too many one-off, 
odd looking bike sheds and not enough bikes (users) with netlink.

So anything that reads to me like "ooh, look at this neat trick 
I can do with netlink that I can totally hand parse in iproute2" 
rises the hair on my back :(

  reply	other threads:[~2022-11-10 17:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29  3:35 [PATCH (repost) net-next] sched: add extack for tfilter_notify Hangbin Liu
2022-10-01  2:03 ` Jakub Kicinski
2022-10-01 18:39 ` Cong Wang
2022-10-01 20:39   ` Marcelo Ricardo Leitner
2022-10-02 15:27     ` Jamal Hadi Salim
2022-10-26  9:58       ` Hangbin Liu
2022-11-02  1:26         ` Hangbin Liu
2022-11-02 15:33         ` Jamal Hadi Salim
2022-11-02 23:36           ` Jakub Kicinski
2022-11-04  2:39             ` Hangbin Liu
2022-11-08  9:11             ` Hangbin Liu
2022-11-08 18:55               ` Jakub Kicinski
2022-11-09 11:53                 ` Hangbin Liu
2022-11-10  1:52                   ` Jamal Hadi Salim
2022-11-10  2:20                     ` Jakub Kicinski
2022-11-10  6:29                       ` Hangbin Liu
2022-11-10 17:12                         ` Jakub Kicinski
2022-11-10 14:27                       ` Jamal Hadi Salim
2022-11-10 17:27                         ` Jakub Kicinski [this message]
2022-11-15  3:07                           ` Hangbin Liu
2022-11-15  4:51                             ` Jakub Kicinski
2022-11-15 12:42                               ` Jamal Hadi Salim
2022-11-15 12:44                               ` Hangbin Liu
2022-11-15 13:13                                 ` Jamal Hadi Salim
2022-11-15 13:57                                   ` Hangbin Liu
2022-11-15 16:26                                     ` Jamal Hadi Salim
2022-11-17  8:42                                       ` Hangbin Liu
2022-11-29  8:07                                       ` Hangbin Liu
2022-11-29 15:43                                         ` Jakub Kicinski
2022-11-30  8:44                                           ` Hangbin Liu

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=20221110092709.06859da9@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=liuhangbin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).