netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.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: Tue, 8 Nov 2022 10:55:44 -0800	[thread overview]
Message-ID: <20221108105544.65e728ad@kernel.org> (raw)
In-Reply-To: <Y2odOlWlonu1juWZ@Laptop-X1>

On Tue, 8 Nov 2022 17:11:22 +0800 Hangbin Liu wrote:
> On Wed, Nov 02, 2022 at 04:36:46PM -0700, Jakub Kicinski wrote:
> > Eish.
> > 
> > Hangbin, I'm still against this. Please go back to my suggestions /
> > questions. A tracepoint or an attribute should do. Multi-part messages
> > are very hard to map to normal programming constructs, and I don't
> > think there is any precedent for mutli-part notifications.  
> 
> Hi Jakub,
> 
> I checked the doc[1], the NLMSGERR_ATTR_MSG could only be in NLMSG_ERROR and
> NLMSG_DONE messages. But the tfilter_notify() set the nlmsg type to
> RTM_NEWTFILTER. Would you like to help explain what you mean of using
> attribute? Should I send a NLMSG_ERROR/NLMSG_DONE message separately after the
> tfilter_notify()?
> 
> [1] https://www.kernel.org/doc/html//next/userspace-api/netlink/intro.html#ext-ack

My initial thought was to add an attribute type completely independent
of the attribute space defined in enum nlmsgerr_attrs, add it in the
TCA_* space. So for example add a TCA_NTF_WARN_MSG which will carry the
string message.

We can also create a nest to carry the full nlmsgerr_attrs attributes
with their existing types (TCA_NTF_EXT_ACK?). Each nest gets
to choose what attribute set it carries.

That said, most of the ext_ack attributes refer to an input attribute by
specifying the offset within the request. The notification recipient
will not be able to resolve those in any meaningful way. So since only
the string message will be of interest I reckon adding a full nest is
an unnecessary complication?

  reply	other threads:[~2022-11-08 18:55 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 [this message]
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
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=20221108105544.65e728ad@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).