[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6UUBJQI6tIwn9tH@Laptop-X1>
Date: Fri, 23 Dec 2022 10:35:48 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: David Ahern <dsahern@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [PATCHv2 net-next] sched: multicast sched extack messages
On Thu, Dec 22, 2022 at 09:26:14AM -0700, David Ahern wrote:
> On 12/22/22 12:48 AM, Hangbin Liu wrote:
> > On Wed, Dec 21, 2022 at 05:28:17PM -0800, Jakub Kicinski wrote:
> >> On Wed, 21 Dec 2022 17:39:40 +0800 Hangbin Liu wrote:
> >>> + nlh = nlmsg_put(skb, portid, n->nlmsg_seq, NLMSG_ERROR, sizeof(*errmsg),
> >>> + NLM_F_ACK_TLVS | NLM_F_CAPPED);
> >>> + if (!nlh)
> >>> + return -1;
> >>> +
> >>> + errmsg = (struct nlmsgerr *)nlmsg_data(nlh);
> >>> + errmsg->error = 0;
> >>> + errmsg->msg = *n;
> >>> +
> >>> + if (nla_put_string(skb, NLMSGERR_ATTR_MSG, extack->_msg))
> >>> + return -1;
> >>> +
> >>> + nlmsg_end(skb, nlh);
> >>
> >> I vote "no", notifications should not generate NLMSG_ERRORs.
> >> (BTW setting pid and seq on notifications is odd, no?)
> >
> > I'm not sure if this error message should be counted to notifications generation.
> > The error message is generated as there is extack message, which is from
> > qdisc/filter adding/deleting.
> >
> > Can't we multicast error message?
> >
> > If we can't multicast the extack message via NLMSG_ERROR or NLMSG_DONE. I
> > think there is no other way to do it via netlink.
> >
>
> it is confusing as an API to send back information or debugging strings
> marked as an "error message."
>
I think it's OK to send back information with error message. Based on rfc3549,
An error code of zero indicates that the message is an ACK response.
An ACK response message contains the original Netlink message header,
which can be used to compare against (sent sequence numbers, etc).
I tried to do it on netlink_ack[1]. But Jakub pointed that the message ids
are not same families. So I moved it to net/sched.
I think the argue point is, can we multicast the error message?
[1] https://lore.kernel.org/all/Y4W9qEHzg5h9n%2Fod@Laptop-X1/
Thanks
Hangbin
Powered by blists - more mailing lists