Hi,

On Wed, Feb 28, 2018 at 4:45 AM, Jiri Pirko <j...@resnulli.us> wrote:
> From: Nogah Frankel <nog...@mellanox.com>
>
> Offload sch_prio graft command for capable drivers.
> Warn in case of a failure, unless the graft was done as part of a destroy
> operation (the new qdisc is a noop) or if all the qdiscs (the parent, the
> old child, and the new one) are not offloaded.
>
> Signed-off-by: Nogah Frankel <nog...@mellanox.com>
> Reviewed-by: Yuval Mintz <yuv...@mellanox.com>
> Signed-off-by: Jiri Pirko <j...@mellanox.com>
> ---
>  include/net/pkt_cls.h |  8 ++++++++
>  net/sched/sch_prio.c  | 32 ++++++++++++++++++++++++++++++++
...
> +               if (*old)
> +                       any_qdisc_is_offloaded |= (*old)->flags &
> +                                                  TCQ_F_OFFLOADED;
> +
> +               if (any_qdisc_is_offloaded)
> +                       NL_SET_ERR_MSG(extack, "Offloading graft operation 
> failed.");
> +       }
> +
>         return 0;
>  }
>

I guess to make extack working, you need to return an errno if failed.

- Alex

Reply via email to