netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NET-NEXT PATCH 1/2] net: add error return for dcb setstate
@ 2008-12-12  9:52 Jeff Kirsher
  2008-12-12  9:52 ` [NET-NEXT PATCH 2/2] net: fix dcbnl_setnumtcs operation check Jeff Kirsher
  2008-12-15  9:05 ` [NET-NEXT PATCH 1/2] net: add error return for dcb setstate David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Kirsher @ 2008-12-12  9:52 UTC (permalink / raw)
  To: davem
  Cc: netdev, jeff, Don Skidmore, Eric W Multanen,
	Peter P Waskiewicz Jr, Jeff Kirsher

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;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [NET-NEXT PATCH 2/2] net: fix dcbnl_setnumtcs operation check
  2008-12-12  9:52 [NET-NEXT PATCH 1/2] net: add error return for dcb setstate Jeff Kirsher
@ 2008-12-12  9:52 ` 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
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2008-12-12  9:52 UTC (permalink / raw)
  To: davem
  Cc: netdev, jeff, Don Skidmore, Eric W Multanen,
	Peter P Waskiewicz Jr, Jeff Kirsher

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

dcbml_setnumtcs wasn't checking for the presence of the setnumtcs
function.  Instead, it was checking for setstate which was a bug.

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>
---

 net/dcb/dcbnl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index d0c12f0..fc88fc4 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -469,7 +469,7 @@ static int dcbnl_setnumtcs(struct net_device *netdev, struct nlattr **tb,
 	u8 value;
 	int i;
 
-	if (!tb[DCB_ATTR_NUMTCS] || !netdev->dcbnl_ops->setstate)
+	if (!tb[DCB_ATTR_NUMTCS] || !netdev->dcbnl_ops->setnumtcs)
 		return ret;
 
 	ret = nla_parse_nested(data, DCB_NUMTCS_ATTR_MAX, tb[DCB_ATTR_NUMTCS],


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [NET-NEXT PATCH 1/2] net: add error return for dcb setstate
  2008-12-12  9:52 [NET-NEXT PATCH 1/2] net: add error return for dcb setstate Jeff Kirsher
  2008-12-12  9:52 ` [NET-NEXT PATCH 2/2] net: fix dcbnl_setnumtcs operation check Jeff Kirsher
@ 2008-12-15  9:05 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2008-12-15  9:05 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: netdev, jeff, donald.c.skidmore, eric.w.multanen,
	peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 12 Dec 2008 01:52:21 -0800

> 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>

How can this build if you don't also update ixgbe_dcbnl_set_state() et
al. to have a "u8" instead of a "void" return value too?

Oh I see, you send the update two patches later.

Don't do that, it breaks GIT bisect.

If you change the prototype for a method function, you must also
change all implementations of that method to match at the same time.

I've dropped both changes.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [NET-NEXT PATCH 2/2] net: fix dcbnl_setnumtcs operation check
  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
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-12-15  9:06 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: netdev, jeff, donald.c.skidmore, eric.w.multanen,
	peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 12 Dec 2008 01:52:45 -0800

> dcbml_setnumtcs wasn't checking for the presence of the setnumtcs
> function.  Instead, it was checking for setstate which was a bug.
> 
> 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>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-15  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12  9:52 [NET-NEXT PATCH 1/2] net: add error return for dcb setstate Jeff Kirsher
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).