public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel•com>
To: davem@davemloft•net
Cc: netdev@vger•kernel.org, jeff@garzik•org,
	Don Skidmore <donald.c.skidmore@intel•com>,
	Eric W Multanen <eric.w.multanen@intel•com>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel•com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel•com>
Subject: [NET-NEXT PATCH 1/2] net: add error return for dcb setstate
Date: Fri, 12 Dec 2008 01:52:21 -0800	[thread overview]
Message-ID: <20081212095221.4416.83327.stgit@lost.foo-projects.org> (raw)

From: Don Skidmore <donald.c.skidmore@intel•com>

DCB had no way to know if setstate had failed in the driver. This
patch enables dcb netlink code to handle the status for the DCB
setstate interface.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel•com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel•com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel•com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel•com>
---

 include/net/dcbnl.h |    2 +-
 net/dcb/dcbnl.c     |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h
index 91e0a3d..775cfc8 100644
--- a/include/net/dcbnl.h
+++ b/include/net/dcbnl.h
@@ -26,7 +26,7 @@
  */
 struct dcbnl_rtnl_ops {
 	u8   (*getstate)(struct net_device *);
-	void (*setstate)(struct net_device *, u8);
+	u8   (*setstate)(struct net_device *, u8);
 	void (*getpermhwaddr)(struct net_device *, u8 *);
 	void (*setpgtccfgtx)(struct net_device *, int, u8, u8, u8, u8);
 	void (*setpgbwgcfgtx)(struct net_device *, int, u8);
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 79a351d..d0c12f0 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -714,9 +714,8 @@ static int dcbnl_setstate(struct net_device *netdev, struct nlattr **tb,
 
 	value = nla_get_u8(tb[DCB_ATTR_STATE]);
 
-	netdev->dcbnl_ops->setstate(netdev, value);
-
-	ret = dcbnl_reply(0, RTM_SETDCB, DCB_CMD_SSTATE, DCB_ATTR_STATE,
+	ret = dcbnl_reply(netdev->dcbnl_ops->setstate(netdev, value),
+	                  RTM_SETDCB, DCB_CMD_SSTATE, DCB_ATTR_STATE,
 	                  pid, seq, flags);
 
 	return ret;


             reply	other threads:[~2008-12-12  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12  9:52 Jeff Kirsher [this message]
2008-12-12  9:52 ` [NET-NEXT PATCH 2/2] net: fix dcbnl_setnumtcs operation check Jeff Kirsher
2008-12-15  9:06   ` David Miller
2008-12-15  9:05 ` [NET-NEXT PATCH 1/2] net: add error return for dcb setstate 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=20081212095221.4416.83327.stgit@lost.foo-projects.org \
    --to=jeffrey.t.kirsher@intel$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=donald.c.skidmore@intel$(echo .)com \
    --cc=eric.w.multanen@intel$(echo .)com \
    --cc=jeff@garzik$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=peter.p.waskiewicz.jr@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox