From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: John Fastabend <john.r.fastabend@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 08/21] ixgbe: DCB, implement ieee_setapp dcbnl ops
Date: Sat, 12 Mar 2011 04:20:15 -0800 [thread overview]
Message-ID: <1299932428-3114-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1299932428-3114-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: John Fastabend <john.r.fastabend@intel.com>
Implement ieee_setapp dcbnl ops in ixgbe. This is required
to setup FCoE which requires dedicated resources. If the
app data is not for FCoE then no action is taken in ixgbe
except to add it to the dcb_app_list.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_dcb_nl.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index d7c456f..8d139f7 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -709,6 +709,35 @@ static int ixgbe_dcbnl_ieee_setpfc(struct net_device *dev,
return err;
}
+static int ixgbe_dcbnl_ieee_setapp(struct net_device *dev,
+ struct dcb_app *app)
+{
+ struct ixgbe_adapter *adapter = netdev_priv(dev);
+
+ if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE))
+ return -EINVAL;
+#ifdef IXGBE_FCOE
+ if (app->selector == 1 && app->protocol == ETH_P_FCOE) {
+ if (adapter->fcoe.tc == app->priority)
+ goto setapp;
+
+ /* In IEEE mode map up to tc 1:1 */
+ adapter->fcoe.tc = app->priority;
+ adapter->fcoe.up = app->priority;
+
+ /* Force hardware reset required to push FCoE
+ * setup on {tx|rx}_rings
+ */
+ adapter->dcb_set_bitmap |= BIT_APP_UPCHG;
+ ixgbe_dcbnl_set_all(dev);
+ }
+
+setapp:
+#endif
+ dcb_setapp(dev, app);
+ return 0;
+}
+
static u8 ixgbe_dcbnl_getdcbx(struct net_device *dev)
{
struct ixgbe_adapter *adapter = netdev_priv(dev);
@@ -759,6 +788,7 @@ const struct dcbnl_rtnl_ops dcbnl_ops = {
.ieee_setets = ixgbe_dcbnl_ieee_setets,
.ieee_getpfc = ixgbe_dcbnl_ieee_getpfc,
.ieee_setpfc = ixgbe_dcbnl_ieee_setpfc,
+ .ieee_setapp = ixgbe_dcbnl_ieee_setapp,
.getstate = ixgbe_dcbnl_get_state,
.setstate = ixgbe_dcbnl_set_state,
.getpermhwaddr = ixgbe_dcbnl_get_perm_hw_addr,
--
1.7.4
next prev parent reply other threads:[~2011-03-12 12:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-12 12:20 [net-next-2.6 00/21][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 01/21] ixgbevf: Fix Version String Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 02/21] ixgbevf: Fix Driver String Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 03/21] igb: Add Energy Efficient Ethernet (EEE) for i350 devices Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 04/21] igb: Update NVM functions to work with " Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 05/21] igb: Add DMA Coalescing feature to driver Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 06/21] igb: Bump version to 3.0.6 Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 07/21] ixgbe: DCB, implement capabilities flags Jeff Kirsher
2011-03-12 12:20 ` Jeff Kirsher [this message]
2011-03-12 12:20 ` [net-next-2.6 09/21] ixgbe: DCB remove ixgbe_fcoe_getapp routine Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 10/21] ixgbe: DCB, use multiple Tx rings per traffic class Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 11/21] ixgbe: enable ndo_tc_setup Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 12/21] ixgbe: DCB: enable RSS to be used with DCB Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 13/21] ixgbe: DCB, missed translation from 8021Qaz TSA to CEE link strict Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 14/21] ixgbe: IEEE 802.1Qaz, implement priority assignment table Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 15/21] ixgbe: DCB during ifup use correct CEE or IEEE mode Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 16/21] ixgbe: remove timer reset to 0 on timeout Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 17/21] ixgbe: update PHY code to support 100Mbps as well as 1G/10G Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 18/21] ixgbe: correct typo in define name Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 19/21] ixgbe: DCB, set minimum bandwidth per traffic class Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 20/21] ixgbe: add support for VF Transmit rate limit using iproute2 Jeff Kirsher
2011-03-12 12:20 ` [net-next-2.6 21/21] ixgbe: DCB, PFC not cleared until reset occurs Jeff Kirsher
2011-03-12 22:42 ` [net-next-2.6 00/21][pull request] Intel Wired LAN Driver Updates 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=1299932428-3114-9-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=bphilips@novell.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=john.r.fastabend@intel.com \
--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 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).