[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8983cae-a97f-2616-249b-e8bbfe4dcb7a@gmail.com>
Date: Thu, 14 Dec 2017 13:08:09 -0700
From: David Ahern <dsahern@...il.com>
To: Alexander Aring <aring@...atatu.com>, jhs@...atatu.com
Cc: xiyou.wangcong@...il.com, jiri@...nulli.us, davem@...emloft.net,
netdev@...r.kernel.org, kernel@...atatu.com,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCHv2 net-next 10/15] net: sch: api: add extack support in
tcf_block_get
On 12/14/17 11:39 AM, Alexander Aring wrote:
> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
> index 446ef956a79c..173107ed3726 100644
> --- a/net/sched/cls_api.c
> +++ b/net/sched/cls_api.c
> @@ -282,20 +282,24 @@ static void tcf_block_offload_unbind(struct tcf_block *block, struct Qdisc *q,
> }
>
> int tcf_block_get_ext(struct tcf_block **p_block, struct Qdisc *q,
> - struct tcf_block_ext_info *ei)
> + struct tcf_block_ext_info *ei,
> + struct netlink_ext_ack *extack)
> {
> struct tcf_block *block = kzalloc(sizeof(*block), GFP_KERNEL);
> struct tcf_chain *chain;
> int err;
>
> - if (!block)
> + if (!block) {
> + NL_SET_ERR_MSG(extack, "No tcf block given");
Wrong message for the failure. !block means kzalloc failed.
> return -ENOMEM;
> + }
> INIT_LIST_HEAD(&block->chain_list);
> INIT_LIST_HEAD(&block->cb_list);
>
> /* Create chain 0 by default, it has to be always present. */
> chain = tcf_chain_create(block, 0);
> if (!chain) {
> + NL_SET_ERR_MSG(extack, "Failed to create new tcf chain");
> err = -ENOMEM;
> goto err_chain_create;
> }
Powered by blists - more mailing lists