From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: jeff@garzik.org, davem@davemloft.net
Cc: netdev@vger.kernel.org, Eric Multanen <eric.w.multanen@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [NET-NEXT PATCH 7/7] DCB: Fixes for the setpfcstate and setnumtcs command.
Date: Fri, 07 Nov 2008 16:55:07 -0800 [thread overview]
Message-ID: <20081108005455.17939.81006.stgit@gitlost.lost> (raw)
In-Reply-To: <20081108005042.17939.47091.stgit@gitlost.lost>
From: Eric Multanen <eric.w.multanen@intel.com>
Removes invalid extra call to the setnumtcs operation.
Fix dcbnl_setpfcstate by referencing the PFC state attribute and calling the setpfcstate operation.
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
net/dcb/dcbnl.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index a8e0c79..b2bda3f 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -467,7 +467,6 @@ static int dcbnl_setnumtcs(struct net_device *netdev, struct nlattr **tb,
struct nlattr *data[DCB_NUMTCS_ATTR_MAX + 1];
int ret = -EINVAL;
u8 value;
- u8 status;
int i;
if (!tb[DCB_ATTR_NUMTCS] || !netdev->dcbnl_ops->setstate)
@@ -490,14 +489,11 @@ static int dcbnl_setnumtcs(struct net_device *netdev, struct nlattr **tb,
ret = netdev->dcbnl_ops->setnumtcs(netdev, i, value);
if (ret)
- goto err;
+ goto operr;
}
- value = nla_get_u8(tb[DCB_ATTR_STATE]);
-
- status = netdev->dcbnl_ops->setnumtcs(netdev, i, value);
-
- ret = dcbnl_reply(!!status, RTM_SETDCB, DCB_CMD_SNUMTCS,
+operr:
+ ret = dcbnl_reply(!!ret, RTM_SETDCB, DCB_CMD_SNUMTCS,
DCB_ATTR_NUMTCS, pid, seq, flags);
err:
@@ -528,9 +524,9 @@ static int dcbnl_setpfcstate(struct net_device *netdev, struct nlattr **tb,
if (!tb[DCB_ATTR_PFC_STATE] || !netdev->dcbnl_ops->setpfcstate)
return ret;
- value = nla_get_u8(tb[DCB_ATTR_STATE]);
+ value = nla_get_u8(tb[DCB_ATTR_PFC_STATE]);
- netdev->dcbnl_ops->setstate(netdev, value);
+ netdev->dcbnl_ops->setpfcstate(netdev, value);
ret = dcbnl_reply(0, RTM_SETDCB, DCB_CMD_PFC_SSTATE, DCB_ATTR_PFC_STATE,
pid, seq, flags);
next prev parent reply other threads:[~2008-11-08 0:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-08 0:51 [RESEND][NET-NEXT PATCH 1/7] ixgbe: this patch adds support for DCB to the kernel and ixgbe driver Jeff Kirsher
2008-11-08 0:51 ` [RESEND][NET-NEXT PATCH 2/7] DCB: Add interface to query for the DCB capabilities of an device Jeff Kirsher
2008-11-08 0:52 ` [RESEND][NET-NEXT PATCH 3/7] DCB: Add interface to query # of TCs supported by device Jeff Kirsher
2008-11-08 0:53 ` [RESEND][NET-NEXT PATCH 4/7] DCB: Add interface to query the state of PFC feature Jeff Kirsher
2008-11-08 0:53 ` [RESEND][NET-NEXT PATCH 5/7] DCB: Add support for DCB BCN Jeff Kirsher
2008-11-08 0:54 ` [RESEND][NET-NEXT PATCH 6/7] DCB: setting pg will cause tx unit hangs Jeff Kirsher
2008-11-08 0:55 ` Jeff Kirsher [this message]
2008-11-14 16:14 ` [RFC][NET-NEXT PATCH 1/7] ixgbe: this patch adds support for DCB to the kernel and ixgbe driver Jeff Kirsher
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=20081108005455.17939.81006.stgit@gitlost.lost \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=eric.w.multanen@intel.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/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.