ixgbe: Fix disabling of relaxed ordering with Tx DCA
Subsystems (2)
PATCH 1/5 ixgbe: Fix disabling of relaxed ordering with Tx DCA
From: Peter P Waskiewicz Jr <[email protected]>
82599 has a different register offset for the Tx DCA control registers. We disable relaxed ordering of the descriptor writebacks for Tx head writeback, but didn't disable it properly for 82599. However, this shouldn't be a visible issue, since ixgbe doesn't use Tx head writeback. This patch just makes sure we're not doing blind writes to offsets we don't expect.
---
drivers/net/ixgbe/ixgbe_main.c | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +20 -3
@@ -1885,12 +1885,29 @@ static void ixgbe_configure_tx(struct ixgbe_adapter *adapter)IXGBE_WRITE_REG (hw,IXGBE_TDT (j),0 ); adapter->tx_ring[i].head =IXGBE_TDH (j); adapter->tx_ring[i].tail =IXGBE_TDT (j); -/* Disable Tx Head Writeback RO bit, since this hoses +/* +* Disable Tx Head Writeback RO bit, since this hoses * bookkeeping if things aren't delivered in order. */ - txctrl =IXGBE_READ_REG (hw,IXGBE_DCA_TXCTRL (j)); +switch (hw->mac.type) { +case ixgbe_mac_82598EB: + txctrl =IXGBE_READ_REG (hw,IXGBE_DCA_TXCTRL (j)); +break ; +case ixgbe_mac_82599EB: +default : + txctrl =IXGBE_READ_REG (hw,IXGBE_DCA_TXCTRL_82599 (j)); +break ; + } txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN ; -IXGBE_WRITE_REG (hw,IXGBE_DCA_TXCTRL (j), txctrl); +switch (hw->mac.type) { +case ixgbe_mac_82598EB: +IXGBE_WRITE_REG (hw,IXGBE_DCA_TXCTRL (j), txctrl); +break ; +case ixgbe_mac_82599EB: +default : +IXGBE_WRITE_REG (hw,IXGBE_DCA_TXCTRL_82599 (j), txctrl); +break ; + } }if (hw->mac.type == ixgbe_mac_82599EB) {/* We enable 8 traffic classes, DCB only */
PATCH 2/5 ixgbe: Fix backplane flow control autoneg
From: Peter P Waskiewicz Jr <[email protected]>
Backplane flow control autonegotiation is currently broken for ixgbe devices. This patch fixes the flow control issues with clause 37 autoneg.
---
drivers/net/ixgbe/ixgbe_82598.c | 2 drivers/net/ixgbe/ixgbe_common.c | 228 ++++++++++++++++++++++++++++++-------- drivers/net/ixgbe/ixgbe_type.h | 9 ++ 3 files changed, 187 insertions(+), 52 deletions(-)
drivers/net/ixgbe/ixgbe_82598.c +1 -1
@@ -425,7 +425,7 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num)#endif /* CONFIG_DCB */ default :hw_dbg (hw,"Flow control param set incorrectly\n" ); - ret_val = -IXGBE_ERR_CONFIG ; + ret_val =IXGBE_ERR_CONFIG ; goto out;break ; }
drivers/net/ixgbe/ixgbe_common.c +177 -51
295 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_type.h +9 -0
@@ -1336,6 +1336,8 @@#define IXGBE_AUTOC_KX4_SUPP 0x80000000#define IXGBE_AUTOC_KX_SUPP 0x40000000#define IXGBE_AUTOC_PAUSE 0x30000000 +#define IXGBE_AUTOC_ASM_PAUSE 0x20000000 +#define IXGBE_AUTOC_SYM_PAUSE 0x10000000#define IXGBE_AUTOC_RF 0x08000000#define IXGBE_AUTOC_PD_TMR 0x06000000#define IXGBE_AUTOC_AN_RX_LOOSE 0x01000000
@@ -1404,6 +1406,8 @@#define IXGBE_LINK_UP_TIME 90/* 9.0 Seconds */ #define IXGBE_AUTO_NEG_TIME 45/* 4.5 Seconds */ +#define IXGBE_LINKS2_AN_SUPPORTED 0x00000040 +/* PCS1GLSTA Bit Masks */ #define IXGBE_PCS1GLSTA_LINK_OK 1#define IXGBE_PCS1GLSTA_SYNK_OK 0x10
@@ -1424,6 +1428,11 @@#define IXGBE_PCS1GLCTL_AN_ENABLE 0x10000#define IXGBE_PCS1GLCTL_AN_RESTART 0x20000 +/* ANLP1 Bit Masks */ +#define IXGBE_ANLP1_PAUSE 0x0C00 +#define IXGBE_ANLP1_SYM_PAUSE 0x0400 +#define IXGBE_ANLP1_ASM_PAUSE 0x0800 +/* SW Semaphore Register bitmasks */ #define IXGBE_SWSM_SMBI 0x00000001/* Driver Semaphore bit */ #define IXGBE_SWSM_SWESMBI 0x00000002/* FW Semaphore bit */
PATCH 3/5 ixgbe: Bump driver version number
In reply to Jeff KirsherFrom: Peter P Waskiewicz Jr <[email protected]>
A number of changes have gone in since the last version bump. Bump it to reflect the changes.
---
drivers/net/ixgbe/ixgbe_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +1 -1
@@ -49,7 +49,7 @@ char ixgbe_driver_name[] = "ixgbe";static const char ixgbe_driver_string[] ="Intel(R) 10 Gigabit PCI Express Network Driver" ; -#define DRV_VERSION "2.0.37-k2" +#define DRV_VERSION "2.0.44-k2"const char ixgbe_driver_version[] =DRV_VERSION ;static char ixgbe_copyright[] ="Copyright (c) 1999-2009 Intel Corporation." ;
PATCH 4/5 ixgbe patch to provide NIC's tx/rx counters via ethtool
In reply to Jeff KirsherFrom: Ben Greear <[email protected]>
When LRO is enabled, the received packet and byte counters represent the LRO'd packets, not the packets/bytes on the wire. The Intel 82599 NIC has registers that keep count of the physical packets. Add these counters to the ethtool stats. The byte counters are 36-bit, but the high 4 bits were being ignored in the 2.6.31 ixgbe driver: Read those as well to allow longer time between polling the stats to detect wraps.
---
drivers/net/ixgbe/ixgbe_ethtool.c | 4 ++++ drivers/net/ixgbe/ixgbe_main.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethtool.c +4 -0
@@ -53,6 +53,10 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { {"tx_packets", IXGBE_STAT(net_stats.tx_packets)}, {"rx_bytes", IXGBE_STAT(net_stats.rx_bytes)}, {"tx_bytes", IXGBE_STAT(net_stats.tx_bytes)}, + {"rx_pkts_nic", IXGBE_STAT(stats.gprc)}, + {"tx_pkts_nic", IXGBE_STAT(stats.gptc)}, + {"rx_bytes_nic", IXGBE_STAT(stats.gorc)}, + {"tx_bytes_nic", IXGBE_STAT(stats.gotc)}, {"lsc_int", IXGBE_STAT(lsc_int)}, {"tx_busy", IXGBE_STAT(tx_busy)}, {"non_eop_descs", IXGBE_STAT(non_eop_descs)},
drivers/net/ixgbe/ixgbe_main.c +5 -2
@@ -4449,10 +4449,13 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)/* 82598 hardware only has a 32 bit counter in the high register */ if (hw->mac.type == ixgbe_mac_82599EB) { +u64 tmp; adapter->stats.gorc +=IXGBE_READ_REG (hw,IXGBE_GORCL ); -IXGBE_READ_REG (hw,IXGBE_GORCH );/* to clear */ + tmp =IXGBE_READ_REG (hw,IXGBE_GORCH ) &0xF ;/* 4 high bits of GORC */ + adapter->stats.gorc += (tmp <<32 ); adapter->stats.gotc +=IXGBE_READ_REG (hw,IXGBE_GOTCL ); -IXGBE_READ_REG (hw,IXGBE_GOTCH );/* to clear */ + tmp =IXGBE_READ_REG (hw,IXGBE_GOTCH ) &0xF ;/* 4 high bits of GOTC */ + adapter->stats.gotc += (tmp <<32 ); adapter->stats.tor +=IXGBE_READ_REG (hw,IXGBE_TORL );IXGBE_READ_REG (hw,IXGBE_TORH );/* to clear */ adapter->stats.lxonrxc +=IXGBE_READ_REG (hw,IXGBE_LXONRXCNT );
PATCH 5/5 ixgbe: Remove ATR computation for UDP traffic
In reply to Jeff KirsherFrom: Peter P Waskiewicz Jr <[email protected]>
ATR support for UDP on 82599 needs to be redesigned, since the current model doesn't make much sense. The fallout from having it in though is it causes all UDP traffic to still compute the ATR hashes on transmit, which are useless. This removal will return upwards of 10% of relative computational overhead in forwarding tests.
---
drivers/net/ixgbe/ixgbe_main.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +0 -7
@@ -5091,7 +5091,6 @@ static void ixgbe_atr(struct ixgbe_adapter *adapter, struct sk_buff *skb,/* Right now, we support IPv4 only */ struct ixgbe_atr_input atr_input;struct tcphdr *th; -struct udphdr *uh;struct iphdr *iph =ip_hdr (skb);struct ethhdr *eth = (struct ethhdr *)skb->data;u16 vlan_id, src_port, dst_port, flex_bytes;
@@ -5105,12 +5104,6 @@ static void ixgbe_atr(struct ixgbe_adapter *adapter, struct sk_buff *skb, dst_port = th->dest; l4type |=IXGBE_ATR_L4TYPE_TCP ;/* l4type IPv4 type is 0, no need to assign */ - }else if (iph->protocol ==IPPROTO_UDP ) { - uh =udp_hdr (skb); - src_port = uh->source; - dst_port = uh->dest; - l4type |=IXGBE_ATR_L4TYPE_UDP ; -/* l4type IPv4 type is 0, no need to assign */ }else {/* Unsupported L4 header, just bail here */ return ;
David Miller
maintainerAll 5 patches applied, thanks!