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

Jamal Hadi Salim
2022-11-15T16:27:16Z

On Tue, Nov 15, 2022 at 8:57 AM Hangbin Liu <liuhangbin@gmail.com> wrote:
>
> On Tue, Nov 15, 2022 at 08:13:15AM -0500, Jamal Hadi Salim wrote:

> > 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?
>

Ok, I think i get what Jakub meant by "internal / netlink level attributes" now.
i.e the problem is there is a namespace collision for attributes between
the global NLMSG_ERROR and service local. It is more tricky than i thought.
How were you thinking of storing the extack info into the message?
Note: I wouldnt touch netlink_ack() - maybe write a separate helper for events.

cheers,
jamal