* [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic
@ 2009-04-28 8:34 Jeff Kirsher
2009-04-28 8:35 ` [net-next PATCH 2/6] igb: make rxcsum configuration seperate from multiqueue Jeff Kirsher
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Jeff Kirsher @ 2009-04-28 8:34 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
This change updates the timeout logic so that it is not possible to have a
sucessful check for message and still return an error if countdown = 0.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Reported-by: Juha Leppanen <juha_motorsportscom@luukku.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/e1000_mbx.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/igb/e1000_mbx.c b/drivers/net/igb/e1000_mbx.c
index 840782f..ed9058e 100644
--- a/drivers/net/igb/e1000_mbx.c
+++ b/drivers/net/igb/e1000_mbx.c
@@ -140,13 +140,13 @@ static s32 igb_poll_for_msg(struct e1000_hw *hw, u16 mbx_id)
struct e1000_mbx_info *mbx = &hw->mbx;
int countdown = mbx->timeout;
- if (!mbx->ops.check_for_msg)
+ if (!countdown || !mbx->ops.check_for_msg)
goto out;
while (mbx->ops.check_for_msg(hw, mbx_id)) {
+ countdown--;
if (!countdown)
break;
- countdown--;
udelay(mbx->usec_delay);
}
out:
@@ -165,13 +165,13 @@ static s32 igb_poll_for_ack(struct e1000_hw *hw, u16 mbx_id)
struct e1000_mbx_info *mbx = &hw->mbx;
int countdown = mbx->timeout;
- if (!mbx->ops.check_for_ack)
+ if (!countdown || !mbx->ops.check_for_ack)
goto out;
while (mbx->ops.check_for_ack(hw, mbx_id)) {
+ countdown--;
if (!countdown)
break;
- countdown--;
udelay(mbx->usec_delay);
}
out:
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next PATCH 2/6] igb: make rxcsum configuration seperate from multiqueue
2009-04-28 8:34 [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic Jeff Kirsher
@ 2009-04-28 8:35 ` Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:35 ` [net-next PATCH 3/6] igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY Jeff Kirsher
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Jeff Kirsher @ 2009-04-28 8:35 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
The igb driver was being incorrectly setup to only allow disabling receive
checksum if multiqueue was disabled. This change corrects that so that
RXCSUM is configured regardless of queue configuration.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/e1000_defines.h | 2 +-
drivers/net/igb/igb_main.c | 30 +++++++++++-------------------
2 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index ad2d319..65acbba 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -289,8 +289,8 @@
#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400
/* Receive Checksum Control */
+#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */
#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */
-#define E1000_RXCSUM_IPPCSE 0x00001000 /* IP payload checksum enable */
#define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */
/* Header split receive */
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ab846ec..4ecf4df 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2236,29 +2236,21 @@ static void igb_configure_rx(struct igb_adapter *adapter)
mrqc |= (E1000_MRQC_RSS_FIELD_IPV6_UDP_EX |
E1000_MRQC_RSS_FIELD_IPV6_TCP_EX);
-
wr32(E1000_MRQC, mrqc);
-
- /* Multiqueue and raw packet checksumming are mutually
- * exclusive. Note that this not the same as TCP/IP
- * checksumming, which works fine. */
- rxcsum = rd32(E1000_RXCSUM);
- rxcsum |= E1000_RXCSUM_PCSD;
- wr32(E1000_RXCSUM, rxcsum);
- } else {
+ } else if (adapter->vfs_allocated_count) {
/* Enable multi-queue for sr-iov */
- if (adapter->vfs_allocated_count)
- wr32(E1000_MRQC, E1000_MRQC_ENABLE_VMDQ);
- /* Enable Receive Checksum Offload for TCP and UDP */
- rxcsum = rd32(E1000_RXCSUM);
- if (adapter->rx_csum)
- rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE;
- else
- rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE);
-
- wr32(E1000_RXCSUM, rxcsum);
+ wr32(E1000_MRQC, E1000_MRQC_ENABLE_VMDQ);
}
+ /* Enable Receive Checksum Offload for TCP and UDP */
+ rxcsum = rd32(E1000_RXCSUM);
+ /* Disable raw packet checksumming */
+ rxcsum |= E1000_RXCSUM_PCSD;
+ /* Don't need to set TUOFL or IPOFL, they default to 1 */
+ if (!adapter->rx_csum)
+ rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL);
+ wr32(E1000_RXCSUM, rxcsum);
+
/* Set the default pool for the PF's first queue */
igb_configure_vt_default_pool(adapter);
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next PATCH 3/6] igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY
2009-04-28 8:34 [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic Jeff Kirsher
2009-04-28 8:35 ` [net-next PATCH 2/6] igb: make rxcsum configuration seperate from multiqueue Jeff Kirsher
@ 2009-04-28 8:35 ` Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:35 ` [net-next PATCH 4/6] sctp: add feature bit for SCTP offload in hardware Jeff Kirsher
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Jeff Kirsher @ 2009-04-28 8:35 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
Both of these drivers do a check to verify ip_summed is set to
CHECKSUM_UNNECESSARY prior to passing the packet to GRO. GRO itself
already does such a check so it is redundant and can be removed as this
will likely cause out of order issues when receiving a packet that didn't
pass checksum validation.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/igb_main.c | 20 ++++++--------------
drivers/net/ixgbe/ixgbe_main.c | 17 +++++------------
2 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 4ecf4df..f7f8612 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -4430,20 +4430,12 @@ static void igb_receive_skb(struct igb_ring *ring, u8 status,
bool vlan_extracted = (adapter->vlgrp && (status & E1000_RXD_STAT_VP));
skb_record_rx_queue(skb, ring->queue_index);
- if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
- if (vlan_extracted)
- vlan_gro_receive(&ring->napi, adapter->vlgrp,
- le16_to_cpu(rx_desc->wb.upper.vlan),
- skb);
- else
- napi_gro_receive(&ring->napi, skb);
- } else {
- if (vlan_extracted)
- vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
- le16_to_cpu(rx_desc->wb.upper.vlan));
- else
- netif_receive_skb(skb);
- }
+ if (vlan_extracted)
+ vlan_gro_receive(&ring->napi, adapter->vlgrp,
+ le16_to_cpu(rx_desc->wb.upper.vlan),
+ skb);
+ else
+ napi_gro_receive(&ring->napi, skb);
}
static inline void igb_rx_checksum_adv(struct igb_adapter *adapter,
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index c45e4e7..42b803d 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -459,23 +459,16 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,
u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan);
skb_record_rx_queue(skb, q_vector - &adapter->q_vector[0]);
- if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
+ if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) {
if (adapter->vlgrp && is_vlan && (tag != 0))
vlan_gro_receive(napi, adapter->vlgrp, tag, skb);
else
napi_gro_receive(napi, skb);
} else {
- if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) {
- if (adapter->vlgrp && is_vlan && (tag != 0))
- vlan_hwaccel_receive_skb(skb, adapter->vlgrp, tag);
- else
- netif_receive_skb(skb);
- } else {
- if (adapter->vlgrp && is_vlan && (tag != 0))
- vlan_hwaccel_rx(skb, adapter->vlgrp, tag);
- else
- netif_rx(skb);
- }
+ if (adapter->vlgrp && is_vlan && (tag != 0))
+ vlan_hwaccel_rx(skb, adapter->vlgrp, tag);
+ else
+ netif_rx(skb);
}
}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next PATCH 4/6] sctp: add feature bit for SCTP offload in hardware
2009-04-28 8:34 [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic Jeff Kirsher
2009-04-28 8:35 ` [net-next PATCH 2/6] igb: make rxcsum configuration seperate from multiqueue Jeff Kirsher
2009-04-28 8:35 ` [net-next PATCH 3/6] igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY Jeff Kirsher
@ 2009-04-28 8:35 ` Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:36 ` [net-next PATCH 5/6] igb: Enable SCTP checksum offloading Jeff Kirsher
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Jeff Kirsher @ 2009-04-28 8:35 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Jesse Brandeburg, Vlad Yasevich, Jeff Kirsher
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
this is the sctp code to enable hardware crc32c offload for
adapters that support it.
Originally by: Vlad Yasevich <vladislav.yasevich@hp.com>
modified by Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
include/linux/netdevice.h | 2 ++
net/sctp/output.c | 17 ++++++++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3116745..6768861 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -670,7 +670,9 @@ struct net_device
#define NETIF_F_GRO 16384 /* Generic receive offload */
#define NETIF_F_LRO 32768 /* large receive offload */
+/* the GSO_MASK reserves bits 16 through 23 */
#define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */
+#define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */
/* Segmentation offload features */
#define NETIF_F_GSO_SHIFT 16
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 7d08f52..f0c91df 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -412,6 +412,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
/* Build the SCTP header. */
sh = (struct sctphdr *)skb_push(nskb, sizeof(struct sctphdr));
+ skb_reset_transport_header(nskb);
sh->source = htons(packet->source_port);
sh->dest = htons(packet->destination_port);
@@ -527,15 +528,25 @@ int sctp_packet_transmit(struct sctp_packet *packet)
* Note: Adler-32 is no longer applicable, as has been replaced
* by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
*/
- if (!sctp_checksum_disable && !(dst->dev->features & NETIF_F_NO_CSUM)) {
+ if (!sctp_checksum_disable &&
+ !(dst->dev->features & (NETIF_F_NO_CSUM | NETIF_F_SCTP_CSUM))) {
__u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
/* 3) Put the resultant value into the checksum field in the
* common header, and leave the rest of the bits unchanged.
*/
sh->checksum = sctp_end_cksum(crc32);
- } else
- nskb->ip_summed = CHECKSUM_UNNECESSARY;
+ } else {
+ if (dst->dev->features & NETIF_F_SCTP_CSUM) {
+ /* no need to seed psuedo checksum for SCTP */
+ nskb->ip_summed = CHECKSUM_PARTIAL;
+ nskb->csum_start = (skb_transport_header(nskb) -
+ nskb->head);
+ nskb->csum_offset = offsetof(struct sctphdr, checksum);
+ } else {
+ nskb->ip_summed = CHECKSUM_UNNECESSARY;
+ }
+ }
/* IP layer ECN support
* From RFC 2481
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next PATCH 5/6] igb: Enable SCTP checksum offloading
2009-04-28 8:34 [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic Jeff Kirsher
` (2 preceding siblings ...)
2009-04-28 8:35 ` [net-next PATCH 4/6] sctp: add feature bit for SCTP offload in hardware Jeff Kirsher
@ 2009-04-28 8:36 ` Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:36 ` [net-next PATCH 6/6] ixgbe: enable hardware offload for sctp Jeff Kirsher
2009-04-28 8:54 ` [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic David Miller
5 siblings, 1 reply; 12+ messages in thread
From: Jeff Kirsher @ 2009-04-28 8:36 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Jesse Brandeburg, Vlad Yasevich, Jeff Kirsher
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Originally from: Vlad Yasevich <vladislav.yasevich@hp.com>
This patch, both the driver portion and the sctp code was
modified by Jesse Brandeburg and is
Copyright(c) 2009 Intel Corporation.
Thanks go to Vlad for starting this work.
Intel 82576 chipset supports SCTP checksum offloading. This
patch enables this functionality in the driver. A new NETIF
feature is introduced for SCTP checksum offload. If the driver
supports CRC32c checksum, it can set this feature flag. The
hardware can offload both transmit and receive.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/e1000_82575.h | 1 +
drivers/net/igb/e1000_defines.h | 1 +
drivers/net/igb/igb_ethtool.c | 12 +++++++++---
drivers/net/igb/igb_main.c | 21 ++++++++++++++++++++-
4 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/drivers/net/igb/e1000_82575.h b/drivers/net/igb/e1000_82575.h
index eaf9770..0f16aba 100644
--- a/drivers/net/igb/e1000_82575.h
+++ b/drivers/net/igb/e1000_82575.h
@@ -130,6 +130,7 @@ struct e1000_adv_tx_context_desc {
#define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */
#define E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */
#define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */
+#define E1000_ADVTXD_TUCMD_L4T_SCTP 0x00001000 /* L4 packet TYPE of SCTP */
/* IPSec Encrypt Enable for ESP */
#define E1000_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */
#define E1000_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index 65acbba..3bda3db 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -291,6 +291,7 @@
/* Receive Checksum Control */
#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */
#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */
+#define E1000_RXCSUM_CRCOFL 0x00000800 /* CRC32 offload enable */
#define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */
/* Header split receive */
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 27eae49..b1367ce 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -293,10 +293,16 @@ static u32 igb_get_tx_csum(struct net_device *netdev)
static int igb_set_tx_csum(struct net_device *netdev, u32 data)
{
- if (data)
+ struct igb_adapter *adapter = netdev_priv(netdev);
+
+ if (data) {
netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
- else
- netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
+ if (adapter->hw.mac.type == e1000_82576)
+ netdev->features |= NETIF_F_SCTP_CSUM;
+ } else {
+ netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
+ NETIF_F_SCTP_CSUM);
+ }
return 0;
}
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index f7f8612..bca7e9f 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1345,6 +1345,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
if (pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;
+ if (adapter->hw.mac.type == e1000_82576)
+ netdev->features |= NETIF_F_SCTP_CSUM;
+
adapter->en_mng_pt = igb_enable_mng_pass_thru(&adapter->hw);
/* before reading the NVM, reset the controller to put the device in a
@@ -2249,6 +2252,10 @@ static void igb_configure_rx(struct igb_adapter *adapter)
/* Don't need to set TUOFL or IPOFL, they default to 1 */
if (!adapter->rx_csum)
rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL);
+ else if (adapter->hw.mac.type == e1000_82576)
+ /* Enable Receive Checksum Offload for SCTP */
+ rxcsum |= E1000_RXCSUM_CRCOFL;
+
wr32(E1000_RXCSUM, rxcsum);
/* Set the default pool for the PF's first queue */
@@ -3064,11 +3071,15 @@ static inline bool igb_tx_csum_adv(struct igb_adapter *adapter,
tu_cmd |= E1000_ADVTXD_TUCMD_IPV4;
if (ip_hdr(skb)->protocol == IPPROTO_TCP)
tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
+ else if (ip_hdr(skb)->protocol == IPPROTO_SCTP)
+ tu_cmd |= E1000_ADVTXD_TUCMD_L4T_SCTP;
break;
case cpu_to_be16(ETH_P_IPV6):
/* XXX what about other V6 headers?? */
if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
+ else if (ipv6_hdr(skb)->nexthdr == IPPROTO_SCTP)
+ tu_cmd |= E1000_ADVTXD_TUCMD_L4T_SCTP;
break;
default:
if (unlikely(net_ratelimit()))
@@ -4449,14 +4460,22 @@ static inline void igb_rx_checksum_adv(struct igb_adapter *adapter,
/* TCP/UDP checksum error bit is set */
if (status_err &
(E1000_RXDEXT_STATERR_TCPE | E1000_RXDEXT_STATERR_IPE)) {
+ /*
+ * work around errata with sctp packets where the TCPE aka
+ * L4E bit is set incorrectly on 64 byte (60 byte w/o crc)
+ * packets, (aka let the stack check the crc32c)
+ */
+ if (!((adapter->hw.mac.type == e1000_82576) &&
+ (skb->len == 60)))
+ adapter->hw_csum_err++;
/* let the stack verify checksum errors */
- adapter->hw_csum_err++;
return;
}
/* It must be a TCP or UDP packet with a valid checksum */
if (status_err & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))
skb->ip_summed = CHECKSUM_UNNECESSARY;
+ dev_dbg(&adapter->pdev->dev, "cksum success: bits %08X\n", status_err);
adapter->hw_csum_good++;
}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next PATCH 6/6] ixgbe: enable hardware offload for sctp
2009-04-28 8:34 [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic Jeff Kirsher
` (3 preceding siblings ...)
2009-04-28 8:36 ` [net-next PATCH 5/6] igb: Enable SCTP checksum offloading Jeff Kirsher
@ 2009-04-28 8:36 ` Jeff Kirsher
2009-04-28 8:55 ` David Miller
2009-04-28 8:54 ` [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic David Miller
5 siblings, 1 reply; 12+ messages in thread
From: Jeff Kirsher @ 2009-04-28 8:36 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Jesse Brandeburg, Jeff Kirsher
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Inspired by: Vlad Yasevich <vladislav.yasevich@hp.com>
This is the code to enable ixgbe for hardware offload support
of CRC32c on both transmit and receive of SCTP traffic.
only 82599 supports this offload, not 82598.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_ethtool.c | 11 +++++++++--
drivers/net/ixgbe/ixgbe_main.c | 9 +++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index f0a20fa..a499b6b 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -311,10 +311,17 @@ static u32 ixgbe_get_tx_csum(struct net_device *netdev)
static int ixgbe_set_tx_csum(struct net_device *netdev, u32 data)
{
- if (data)
+ struct ixgbe_adapter *adapter = netdev_priv(netdev);
+
+ if (data) {
netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
- else
+ if (adapter->hw.mac.type == ixgbe_mac_82599EB)
+ netdev->features |= NETIF_F_SCTP_CSUM;
+ } else {
netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
+ if (adapter->hw.mac.type == ixgbe_mac_82599EB)
+ netdev->features &= ~NETIF_F_SCTP_CSUM;
+ }
return 0;
}
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 42b803d..c3dff8f 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4189,12 +4189,18 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
if (ip_hdr(skb)->protocol == IPPROTO_TCP)
type_tucmd_mlhl |=
IXGBE_ADVTXD_TUCMD_L4T_TCP;
+ else if (ip_hdr(skb)->protocol == IPPROTO_SCTP)
+ type_tucmd_mlhl |=
+ IXGBE_ADVTXD_TUCMD_L4T_SCTP;
break;
case cpu_to_be16(ETH_P_IPV6):
/* XXX what about other V6 headers?? */
if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
type_tucmd_mlhl |=
IXGBE_ADVTXD_TUCMD_L4T_TCP;
+ else if (ipv6_hdr(skb)->nexthdr == IPPROTO_SCTP)
+ type_tucmd_mlhl |=
+ IXGBE_ADVTXD_TUCMD_L4T_SCTP;
break;
default:
if (unlikely(net_ratelimit())) {
@@ -4718,6 +4724,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
netdev->features |= NETIF_F_TSO6;
netdev->features |= NETIF_F_GRO;
+ if (adapter->hw.mac.type == ixgbe_mac_82599EB)
+ netdev->features |= NETIF_F_SCTP_CSUM;
+
netdev->vlan_features |= NETIF_F_TSO;
netdev->vlan_features |= NETIF_F_TSO6;
netdev->vlan_features |= NETIF_F_IP_CSUM;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic
2009-04-28 8:34 [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic Jeff Kirsher
` (4 preceding siblings ...)
2009-04-28 8:36 ` [net-next PATCH 6/6] ixgbe: enable hardware offload for sctp Jeff Kirsher
@ 2009-04-28 8:54 ` David Miller
5 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2009-04-28 8:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, alexander.h.duyck
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 28 Apr 2009 01:34:54 -0700
> This change updates the timeout logic so that it is not possible to have a
> sucessful check for message and still return an error if countdown = 0.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Reported-by: Juha Leppanen <juha_motorsportscom@luukku.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [net-next PATCH 2/6] igb: make rxcsum configuration seperate from multiqueue
2009-04-28 8:35 ` [net-next PATCH 2/6] igb: make rxcsum configuration seperate from multiqueue Jeff Kirsher
@ 2009-04-28 8:54 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2009-04-28 8:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, alexander.h.duyck
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 28 Apr 2009 01:35:14 -0700
> The igb driver was being incorrectly setup to only allow disabling receive
> checksum if multiqueue was disabled. This change corrects that so that
> RXCSUM is configured regardless of queue configuration.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [net-next PATCH 3/6] igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY
2009-04-28 8:35 ` [net-next PATCH 3/6] igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY Jeff Kirsher
@ 2009-04-28 8:54 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2009-04-28 8:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, alexander.h.duyck
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 28 Apr 2009 01:35:33 -0700
> Both of these drivers do a check to verify ip_summed is set to
> CHECKSUM_UNNECESSARY prior to passing the packet to GRO. GRO itself
> already does such a check so it is redundant and can be removed as this
> will likely cause out of order issues when receiving a packet that didn't
> pass checksum validation.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [net-next PATCH 4/6] sctp: add feature bit for SCTP offload in hardware
2009-04-28 8:35 ` [net-next PATCH 4/6] sctp: add feature bit for SCTP offload in hardware Jeff Kirsher
@ 2009-04-28 8:54 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2009-04-28 8:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, jesse.brandeburg, vladislav.yasevich
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 28 Apr 2009 01:35:52 -0700
> this is the sctp code to enable hardware crc32c offload for
> adapters that support it.
>
> Originally by: Vlad Yasevich <vladislav.yasevich@hp.com>
>
> modified by Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [net-next PATCH 5/6] igb: Enable SCTP checksum offloading
2009-04-28 8:36 ` [net-next PATCH 5/6] igb: Enable SCTP checksum offloading Jeff Kirsher
@ 2009-04-28 8:54 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2009-04-28 8:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, jesse.brandeburg, vladislav.yasevich
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 28 Apr 2009 01:36:13 -0700
> Originally from: Vlad Yasevich <vladislav.yasevich@hp.com>
>
> This patch, both the driver portion and the sctp code was
> modified by Jesse Brandeburg and is
>
> Copyright(c) 2009 Intel Corporation.
>
> Thanks go to Vlad for starting this work.
>
> Intel 82576 chipset supports SCTP checksum offloading. This
> patch enables this functionality in the driver. A new NETIF
> feature is introduced for SCTP checksum offload. If the driver
> supports CRC32c checksum, it can set this feature flag. The
> hardware can offload both transmit and receive.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [net-next PATCH 6/6] ixgbe: enable hardware offload for sctp
2009-04-28 8:36 ` [net-next PATCH 6/6] ixgbe: enable hardware offload for sctp Jeff Kirsher
@ 2009-04-28 8:55 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2009-04-28 8:55 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, jesse.brandeburg
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 28 Apr 2009 01:36:35 -0700
> Inspired by: Vlad Yasevich <vladislav.yasevich@hp.com>
>
> This is the code to enable ixgbe for hardware offload support
> of CRC32c on both transmit and receive of SCTP traffic.
>
> only 82599 supports this offload, not 82598.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-04-28 8:55 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 8:34 [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic Jeff Kirsher
2009-04-28 8:35 ` [net-next PATCH 2/6] igb: make rxcsum configuration seperate from multiqueue Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:35 ` [net-next PATCH 3/6] igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:35 ` [net-next PATCH 4/6] sctp: add feature bit for SCTP offload in hardware Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:36 ` [net-next PATCH 5/6] igb: Enable SCTP checksum offloading Jeff Kirsher
2009-04-28 8:54 ` David Miller
2009-04-28 8:36 ` [net-next PATCH 6/6] ixgbe: enable hardware offload for sctp Jeff Kirsher
2009-04-28 8:55 ` David Miller
2009-04-28 8:54 ` [net-next PATCH 1/6] igb: reconfigure mailbox timeout logic David Miller
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).