[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4FE2B981.6010704@intel.com>
Date: Wed, 20 Jun 2012 23:04:49 -0700
From: John Fastabend <john.r.fastabend@...el.com>
To: Thomas Graf <tgraf@...g.ch>
CC: davem@...emloft.net, netdev@...r.kernel.org, lucy.liu@...el.com,
alexander.h.duyck@...el.com
Subject: Re: [PATCH 2/8] dcbnl: Shorten all command handling functions
On 6/13/2012 5:54 AM, Thomas Graf wrote:
> Allocating and sending the skb in dcb_doit() allows for much
> shorter and cleaner command handling functions.
>
> The huge switch statement is replaced with an array based definition
> of the handling function and reply message type.
>
> Signed-off-by: Thomas Graf <tgraf@...g.ch>
> ---
> net/dcb/dcbnl.c | 722 +++++++++++++------------------------------------------
> 1 files changed, 172 insertions(+), 550 deletions(-)
>
[...]
> @@ -1054,32 +885,27 @@ static int __dcbnl_pg_setcfg(struct net_device *netdev, struct nlattr **tb,
> }
> }
>
> - ret = dcbnl_reply(0, RTM_SETDCB,
> - (dir ? DCB_CMD_PGRX_SCFG : DCB_CMD_PGTX_SCFG),
> - DCB_ATTR_PG_CFG, pid, seq, flags);
> + ret = nla_put_u8(skb, (dir ? DCB_CMD_PGRX_SCFG : DCB_CMD_PGTX_SCFG), 0);
Previously, this returned DCB_ATTR_PG_CFG now it is returning RX or TX
variants. Although I like this implementation better I think in order
to not break user space application we should keep the previous
behavior. At least one app is checking these return codes.
I'll post a patch shortly. Thomas if you ACK it that would be great.
Thanks,
John
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists