Subject: Re: [PATCH net 2/2] net/sched: act_api: add specific EXT_WARN_MSG for tc action

From: Hangbin Liu <[email-masked]>
Date: Thu, 16 Mar 2023 11:33:42 +0800

On Wed, Mar 15, 2023 at 02:49:43PM -0400, Jamal Hadi Salim wrote:
> On Wed, Mar 15, 2023 at 5:47 AM Hangbin Liu <[email-masked]> wrote:
> >
> > On Tue, Mar 14, 2023 at 06:35:29PM -0400, Jamal Hadi Salim wrote:
> > > Sorry, only thing i should have mentioned earlier - not clear from here:
> > > Do you get two ext warns now in the same netlink message? One for the
> > > action and one for the cls?
> > > Something to check:
> > > on terminal1 > tc monitor
> > > on terminal2 > run a command which will get the offload to fail and
> > > see what response you get
> > >
> > > My concern is you may be getting two warnings in one message.
> >
> > From the result we only got 1 warning message.
> >
> > # tc qdisc add dev enp4s0f0np0 ingress
> > # tc filter add dev enp4s0f0np0 ingress flower verbose ct_state +trk+new action drop
> > Warning: mlx5_core: matching on ct_state +new isn't supported.
> >
> > # tc monitor
> > qdisc ingress ffff: dev enp4s0f0np0 parent ffff:fff1 ----------------
> > added chain dev enp4s0f0np0 parent ffff: chain 0
> > added filter dev enp4s0f0np0 ingress protocol all pref 49152 flower chain 0 handle 0x1
> >   ct_state +trk+new
> >   not_in_hw
> >         action order 1: gact action drop
> >          random type none pass val 0
> >          index 1 ref 1 bind 1
> >
> > mlx5_core: matching on ct_state +new isn't supported
> > ^C
> 
> Thanks for checking. I was worried from the quick glance that you will
> end up calling the action code with extack from cls and that the
> warning will be duplicated.

The action info should be filled via dump function, which will not call
tca_get_fill(). So I think it should be safe. Please correct me if I missed
anything.

Thanks
Hangbin