Re: [PATCH (repost) net-next] sched: add extack for tfilter_notify

Hangbin Liu
2022-11-15T13:57:51Z

On Tue, Nov 15, 2022 at 08:13:15AM -0500, Jamal Hadi Salim wrote:
> > > but I would prefer for the extack via notification to spread to other
> > > notifications.
> >
> > Not sure if we could find a way to pass the GROUP ID to netlink_ack(),
> > and use nlmsg_notify() instead of nlmsg_unicast() in it. Then the tc monitor
> > could handle the NLMSG_ERROR directly.
> >
>
> That's what I meant. Do you have time to try this? Otherwise i will make time.

Yes, I can have a try.

> Your patch is still very specific to cls. If you only look at h/w
> offload, actions can also
> be added independently and fail independently as well. But in general this would
> be useful for all notifications.

I saw your last mail mean to pass extack to nlmsg_notify() and do
the NLM_F_ACK_TLVS there. This is more agile but need to re-write what
netlink_ack() does. If we pass GROUP ID to netlink_ack() directly, we can
save this work. But from the call path like netlink_rcv_skb() ->
netlink_ack(). I don't have a good way to get the GROUP ID.

Should we write a new helper to convert the GROUP ID from nlmsg_type?
On the other hand, if we add this helper, not suer if we should only
add RTNLGRP_TC first in case other field do not want to multicast the ack
message?

Thanks
Hangbin