All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.r.fastabend@intel.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: davem@davemloft.net, netdev@vger.kernel.org, lucy.liu@intel.com,
	alexander.h.duyck@intel.com
Subject: Re: [PATCH 2/8] dcbnl: Shorten all command handling functions
Date: Wed, 20 Jun 2012 23:04:49 -0700	[thread overview]
Message-ID: <4FE2B981.6010704@intel.com> (raw)
In-Reply-To: <3fea99383d5ee98b51bd8b0088bed38cdb59f375.1339591572.git.tgraf@suug.ch>

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@suug.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

  reply	other threads:[~2012-06-21  6:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 12:54 [PATCH 0/8] dcbnl: Major simplifications Thomas Graf
2012-06-13 12:54 ` [PATCH 1/8] dcbnl: Prepare framework to shorten handling functions Thomas Graf
2012-06-13 12:54 ` [PATCH 2/8] dcbnl: Shorten all command " Thomas Graf
2012-06-21  6:04   ` John Fastabend [this message]
2012-06-13 12:54 ` [PATCH 3/8] dcbnl: Remove now unused dcbnl_reply() Thomas Graf
2012-06-13 12:54 ` [PATCH 4/8] dcbnl: Use dcbnl_newmsg() where possible Thomas Graf
2012-06-13 12:54 ` [PATCH 5/8] dcbnl: Return consistent error codes Thomas Graf
2012-06-13 12:54 ` [PATCH 6/8] dcbnl: Move dcb app lookup code into dcb_app_lookup() Thomas Graf
2012-06-13 12:55 ` [PATCH 7/8] dcbnl: Move dcb app allocation into dcb_app_add() Thomas Graf
2012-06-13 12:55 ` [PATCH 8/8] dcbnl: Use type safe nlmsg_data() Thomas Graf
2012-06-13 22:55 ` [PATCH 0/8] dcbnl: Major simplifications David Miller
2012-06-14  7:54   ` Thomas Graf
2012-06-14 16:06     ` John Fastabend
2012-06-15  7:26       ` Thomas Graf
2012-06-16  3:53         ` John Fastabend
2012-06-14  8:40   ` [PATCH] dcbnl: Use BUG_ON() instead of BUG() Thomas Graf
2012-06-14  8:46     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE2B981.6010704@intel.com \
    --to=john.r.fastabend@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=lucy.liu@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.