aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2008-11-21 00:09:23 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-21 00:09:23 -0500
commit0eb3aa9bab20217fb42244ccdcb5bf8a002f504c (patch)
treeb7d5a846b674a4f26ce4c1aa3b90f72fe9ce83d0 /drivers/net/ixgbe
parent33dbabc4a7f7bd72313c73a3c199f31f3900336f (diff)
DCB: Add interface to query the state of PFC feature.
Adds a netlink interface for Data Center Bridging (DCB) to get and set the enable state of the Priority Flow Control (PFC) feature. Primarily, this is a way to turn off PFC in the driver while DCB remains enabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 5921795f8403..dd940a8f9357 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -405,6 +405,18 @@ static u8 ixgbe_dcbnl_setnumtcs(struct net_device *netdev, int tcid, u8 num)
405 return -EINVAL; 405 return -EINVAL;
406} 406}
407 407
408static u8 ixgbe_dcbnl_getpfcstate(struct net_device *netdev)
409{
410 struct ixgbe_adapter *adapter = netdev_priv(netdev);
411
412 return !!(adapter->flags & IXGBE_FLAG_DCB_ENABLED);
413}
414
415static void ixgbe_dcbnl_setpfcstate(struct net_device *netdev, u8 state)
416{
417 return;
418}
419
408struct dcbnl_rtnl_ops dcbnl_ops = { 420struct dcbnl_rtnl_ops dcbnl_ops = {
409 .getstate = ixgbe_dcbnl_get_state, 421 .getstate = ixgbe_dcbnl_get_state,
410 .setstate = ixgbe_dcbnl_set_state, 422 .setstate = ixgbe_dcbnl_set_state,
@@ -422,6 +434,8 @@ struct dcbnl_rtnl_ops dcbnl_ops = {
422 .setall = ixgbe_dcbnl_set_all, 434 .setall = ixgbe_dcbnl_set_all,
423 .getcap = ixgbe_dcbnl_getcap, 435 .getcap = ixgbe_dcbnl_getcap,
424 .getnumtcs = ixgbe_dcbnl_getnumtcs, 436 .getnumtcs = ixgbe_dcbnl_getnumtcs,
425 .setnumtcs = ixgbe_dcbnl_setnumtcs 437 .setnumtcs = ixgbe_dcbnl_setnumtcs,
438 .getpfcstate = ixgbe_dcbnl_getpfcstate,
439 .setpfcstate = ixgbe_dcbnl_setpfcstate
426}; 440};
427 441