From 3efac5a0012979ae236fe1247b773317ef5f1c88 Mon Sep 17 00:00:00 2001 From: Peter P Waskiewicz Jr Date: Sun, 1 Feb 2009 01:19:20 -0800 Subject: ixgbe: Update copyright dates, bump the driver version number New year, new copyright date ranges. Also bump the driver version number to reflect many of the recent changes. Signed-off-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/ixgbe/ixgbe_dcb_nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ixgbe/ixgbe_dcb_nl.c') diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 4129976953f..dd9d1d63a59 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c @@ -1,7 +1,7 @@ /******************************************************************************* Intel 10 Gigabit PCI Express Linux driver - Copyright(c) 1999 - 2008 Intel Corporation. + Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License, -- cgit v1.2.3 From 235ea828a1640ed493562a5fe08aa666ff84fbc4 Mon Sep 17 00:00:00 2001 From: PJ Waskiewicz Date: Fri, 27 Feb 2009 15:44:48 +0000 Subject: ixgbe: Add DCB for 82599, remove BCN support This patch adds the DCB (Data Center Bridging) support for 82599 hardware. This is similar to how the 82598 DCB code works. This patch also removes the BCN (Backwards Congestion Notification) netlink configuration code from the driver. BCN was a pre-standard congestion notification framework, and was not what the IEEE body decided upon for standard congestion management. QCN (802.1Qau), Quantized Congestion Notification is the accepted standard, which is not supported by 82599, hence we remove the support altogether. Signed-off-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/ixgbe/ixgbe_dcb_nl.c | 193 +-------------------------------------- 1 file changed, 1 insertion(+), 192 deletions(-) (limited to 'drivers/net/ixgbe/ixgbe_dcb_nl.c') diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index dd9d1d63a59..087cf886f2a 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c @@ -35,6 +35,7 @@ #define BIT_PG_RX 0x04 #define BIT_PG_TX 0x08 #define BIT_BCN 0x10 +#define BIT_LINKSPEED 0x80 int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, struct ixgbe_dcb_config *dst_dcb_cfg, int tc_max) @@ -89,25 +90,6 @@ int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, src_dcb_cfg->tc_config[i - DCB_PFC_UP_ATTR_0].dcb_pfc; } - for (i = DCB_BCN_ATTR_RP_0; i < DCB_BCN_ATTR_RP_ALL; i++) { - dst_dcb_cfg->bcn.rp_admin_mode[i - DCB_BCN_ATTR_RP_0] = - src_dcb_cfg->bcn.rp_admin_mode[i - DCB_BCN_ATTR_RP_0]; - } - dst_dcb_cfg->bcn.bcna_option[0] = src_dcb_cfg->bcn.bcna_option[0]; - dst_dcb_cfg->bcn.bcna_option[1] = src_dcb_cfg->bcn.bcna_option[1]; - dst_dcb_cfg->bcn.rp_alpha = src_dcb_cfg->bcn.rp_alpha; - dst_dcb_cfg->bcn.rp_beta = src_dcb_cfg->bcn.rp_beta; - dst_dcb_cfg->bcn.rp_gd = src_dcb_cfg->bcn.rp_gd; - dst_dcb_cfg->bcn.rp_gi = src_dcb_cfg->bcn.rp_gi; - dst_dcb_cfg->bcn.rp_tmax = src_dcb_cfg->bcn.rp_tmax; - dst_dcb_cfg->bcn.rp_td = src_dcb_cfg->bcn.rp_td; - dst_dcb_cfg->bcn.rp_rmin = src_dcb_cfg->bcn.rp_rmin; - dst_dcb_cfg->bcn.rp_w = src_dcb_cfg->bcn.rp_w; - dst_dcb_cfg->bcn.rp_rd = src_dcb_cfg->bcn.rp_rd; - dst_dcb_cfg->bcn.rp_ru = src_dcb_cfg->bcn.rp_ru; - dst_dcb_cfg->bcn.rp_wrtt = src_dcb_cfg->bcn.rp_wrtt; - dst_dcb_cfg->bcn.rp_ri = src_dcb_cfg->bcn.rp_ri; - return 0; } @@ -444,175 +426,6 @@ static void ixgbe_dcbnl_setpfcstate(struct net_device *netdev, u8 state) return; } -static void ixgbe_dcbnl_getbcnrp(struct net_device *netdev, int priority, - u8 *setting) -{ - struct ixgbe_adapter *adapter = netdev_priv(netdev); - - *setting = adapter->dcb_cfg.bcn.rp_admin_mode[priority]; -} - - -static void ixgbe_dcbnl_getbcncfg(struct net_device *netdev, int enum_index, - u32 *setting) -{ - struct ixgbe_adapter *adapter = netdev_priv(netdev); - - switch (enum_index) { - case DCB_BCN_ATTR_BCNA_0: - *setting = adapter->dcb_cfg.bcn.bcna_option[0]; - break; - case DCB_BCN_ATTR_BCNA_1: - *setting = adapter->dcb_cfg.bcn.bcna_option[1]; - break; - case DCB_BCN_ATTR_ALPHA: - *setting = adapter->dcb_cfg.bcn.rp_alpha; - break; - case DCB_BCN_ATTR_BETA: - *setting = adapter->dcb_cfg.bcn.rp_beta; - break; - case DCB_BCN_ATTR_GD: - *setting = adapter->dcb_cfg.bcn.rp_gd; - break; - case DCB_BCN_ATTR_GI: - *setting = adapter->dcb_cfg.bcn.rp_gi; - break; - case DCB_BCN_ATTR_TMAX: - *setting = adapter->dcb_cfg.bcn.rp_tmax; - break; - case DCB_BCN_ATTR_TD: - *setting = adapter->dcb_cfg.bcn.rp_td; - break; - case DCB_BCN_ATTR_RMIN: - *setting = adapter->dcb_cfg.bcn.rp_rmin; - break; - case DCB_BCN_ATTR_W: - *setting = adapter->dcb_cfg.bcn.rp_w; - break; - case DCB_BCN_ATTR_RD: - *setting = adapter->dcb_cfg.bcn.rp_rd; - break; - case DCB_BCN_ATTR_RU: - *setting = adapter->dcb_cfg.bcn.rp_ru; - break; - case DCB_BCN_ATTR_WRTT: - *setting = adapter->dcb_cfg.bcn.rp_wrtt; - break; - case DCB_BCN_ATTR_RI: - *setting = adapter->dcb_cfg.bcn.rp_ri; - break; - default: - *setting = -1; - } -} - -static void ixgbe_dcbnl_setbcnrp(struct net_device *netdev, int priority, - u8 setting) -{ - struct ixgbe_adapter *adapter = netdev_priv(netdev); - - adapter->temp_dcb_cfg.bcn.rp_admin_mode[priority] = setting; - - if (adapter->temp_dcb_cfg.bcn.rp_admin_mode[priority] != - adapter->dcb_cfg.bcn.rp_admin_mode[priority]) - adapter->dcb_set_bitmap |= BIT_BCN; -} - -static void ixgbe_dcbnl_setbcncfg(struct net_device *netdev, int enum_index, - u32 setting) -{ - struct ixgbe_adapter *adapter = netdev_priv(netdev); - - switch (enum_index) { - case DCB_BCN_ATTR_BCNA_0: - adapter->temp_dcb_cfg.bcn.bcna_option[0] = setting; - if (adapter->temp_dcb_cfg.bcn.bcna_option[0] != - adapter->dcb_cfg.bcn.bcna_option[0]) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_BCNA_1: - adapter->temp_dcb_cfg.bcn.bcna_option[1] = setting; - if (adapter->temp_dcb_cfg.bcn.bcna_option[1] != - adapter->dcb_cfg.bcn.bcna_option[1]) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_ALPHA: - adapter->temp_dcb_cfg.bcn.rp_alpha = setting; - if (adapter->temp_dcb_cfg.bcn.rp_alpha != - adapter->dcb_cfg.bcn.rp_alpha) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_BETA: - adapter->temp_dcb_cfg.bcn.rp_beta = setting; - if (adapter->temp_dcb_cfg.bcn.rp_beta != - adapter->dcb_cfg.bcn.rp_beta) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_GD: - adapter->temp_dcb_cfg.bcn.rp_gd = setting; - if (adapter->temp_dcb_cfg.bcn.rp_gd != - adapter->dcb_cfg.bcn.rp_gd) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_GI: - adapter->temp_dcb_cfg.bcn.rp_gi = setting; - if (adapter->temp_dcb_cfg.bcn.rp_gi != - adapter->dcb_cfg.bcn.rp_gi) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_TMAX: - adapter->temp_dcb_cfg.bcn.rp_tmax = setting; - if (adapter->temp_dcb_cfg.bcn.rp_tmax != - adapter->dcb_cfg.bcn.rp_tmax) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_TD: - adapter->temp_dcb_cfg.bcn.rp_td = setting; - if (adapter->temp_dcb_cfg.bcn.rp_td != - adapter->dcb_cfg.bcn.rp_td) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_RMIN: - adapter->temp_dcb_cfg.bcn.rp_rmin = setting; - if (adapter->temp_dcb_cfg.bcn.rp_rmin != - adapter->dcb_cfg.bcn.rp_rmin) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_W: - adapter->temp_dcb_cfg.bcn.rp_w = setting; - if (adapter->temp_dcb_cfg.bcn.rp_w != - adapter->dcb_cfg.bcn.rp_w) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_RD: - adapter->temp_dcb_cfg.bcn.rp_rd = setting; - if (adapter->temp_dcb_cfg.bcn.rp_rd != - adapter->dcb_cfg.bcn.rp_rd) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_RU: - adapter->temp_dcb_cfg.bcn.rp_ru = setting; - if (adapter->temp_dcb_cfg.bcn.rp_ru != - adapter->dcb_cfg.bcn.rp_ru) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_WRTT: - adapter->temp_dcb_cfg.bcn.rp_wrtt = setting; - if (adapter->temp_dcb_cfg.bcn.rp_wrtt != - adapter->dcb_cfg.bcn.rp_wrtt) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - case DCB_BCN_ATTR_RI: - adapter->temp_dcb_cfg.bcn.rp_ri = setting; - if (adapter->temp_dcb_cfg.bcn.rp_ri != - adapter->dcb_cfg.bcn.rp_ri) - adapter->dcb_set_bitmap |= BIT_BCN; - break; - default: - break; - } -} - struct dcbnl_rtnl_ops dcbnl_ops = { .getstate = ixgbe_dcbnl_get_state, .setstate = ixgbe_dcbnl_set_state, @@ -633,9 +446,5 @@ struct dcbnl_rtnl_ops dcbnl_ops = { .setnumtcs = ixgbe_dcbnl_setnumtcs, .getpfcstate = ixgbe_dcbnl_getpfcstate, .setpfcstate = ixgbe_dcbnl_setpfcstate, - .getbcncfg = ixgbe_dcbnl_getbcncfg, - .getbcnrp = ixgbe_dcbnl_getbcnrp, - .setbcncfg = ixgbe_dcbnl_setbcncfg, - .setbcnrp = ixgbe_dcbnl_setbcnrp }; -- cgit v1.2.3 From 09a3b1f8b1af7220fd7a3caf18e6841a7f5a6c6e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sat, 21 Mar 2009 13:40:01 -0700 Subject: ixgbe: fix select_queue management Convert ixgbe to use net_device_ops properly. Rather than changing the select_queue function pointer just check the flag. Signed-off-by: Stephen Hemminger Acked-by: Peter P Waskiewicz Jr Signed-off-by: David S. Miller --- drivers/net/ixgbe/ixgbe_dcb_nl.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/net/ixgbe/ixgbe_dcb_nl.c') diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 087cf886f2a..8a9939ee292 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c @@ -102,12 +102,6 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev) return !!(adapter->flags & IXGBE_FLAG_DCB_ENABLED); } -static u16 ixgbe_dcb_select_queue(struct net_device *dev, struct sk_buff *skb) -{ - /* All traffic should default to class 0 */ - return 0; -} - static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) { u8 err = 0; @@ -135,7 +129,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) kfree(adapter->rx_ring); adapter->tx_ring = NULL; adapter->rx_ring = NULL; - netdev->select_queue = &ixgbe_dcb_select_queue; adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED; adapter->flags |= IXGBE_FLAG_DCB_ENABLED; @@ -154,7 +147,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) kfree(adapter->rx_ring); adapter->tx_ring = NULL; adapter->rx_ring = NULL; - netdev->select_queue = NULL; adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; adapter->flags |= IXGBE_FLAG_RSS_ENABLED; -- cgit v1.2.3 From bb3daa4a5960cd9d39bad88679fcf587b456c05d Mon Sep 17 00:00:00 2001 From: PJ Waskiewicz Date: Wed, 25 Mar 2009 22:10:42 +0000 Subject: ixgbe: Allow Priority Flow Control settings to survive a device reset When changing DCB parameters, ixgbe needs to have the MAC reset. The way the flow control code is setup today, PFC will be disabled on a reset. This patch adds a new flow control type for PFC, and then has the netlink layer take care of toggling which type of flow control to enable. Signed-off-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/ixgbe/ixgbe_dcb_nl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/ixgbe/ixgbe_dcb_nl.c') diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 8a9939ee292..0a8731f1f23 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c @@ -130,6 +130,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) adapter->tx_ring = NULL; adapter->rx_ring = NULL; + adapter->hw.fc.requested_mode = ixgbe_fc_pfc; adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED; adapter->flags |= IXGBE_FLAG_DCB_ENABLED; ixgbe_init_interrupt_scheme(adapter); @@ -138,6 +139,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) } else { /* Turn off DCB */ if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { + adapter->hw.fc.requested_mode = ixgbe_fc_default; if (netif_running(netdev)) netdev->netdev_ops->ndo_stop(netdev); ixgbe_reset_interrupt_capability(adapter); -- cgit v1.2.3