* [PATCH] atl1: deal with hardware rx checksum bug
@ 2008-08-05 0:05 Jay Cliburn
2008-08-07 5:56 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Jay Cliburn @ 2008-08-05 0:05 UTC (permalink / raw)
To: jeff, csnook, netdev
The L1 hardware contains a bug that flags a fragmented IP packet
as having an incorrect TCP/UDP checksum, even though the packet
is perfectly valid and its checksum is correct. There's no way to
distinguish between one of these good packets and a packet that
actually contains a TCP/UDP checksum error, so all we can do is
allow the packet to be handed up to the higher layers and let it
be sorted out there.
Add a comment describing this condition and remove the code that
currently fails to handle what may or may not be a checksum error.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
drivers/net/atlx/atl1.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index f12e3d1..e6a7bb7 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -1790,6 +1790,17 @@ static void atl1_rx_checksum(struct atl1_adapter *adapter,
{
struct pci_dev *pdev = adapter->pdev;
+ /*
+ * The L1 hardware contains a bug that erroneously sets the
+ * PACKET_FLAG_ERR and ERR_FLAG_L4_CHKSUM bits whenever a
+ * fragmented IP packet is received, even though the packet
+ * is perfectly valid and its checksum is correct. There's
+ * no way to distinguish between one of these good packets
+ * and a packet that actually contains a TCP/UDP checksum
+ * error, so all we can do is allow it to be handed up to
+ * the higher layers and let it be sorted out there.
+ */
+
skb->ip_summed = CHECKSUM_NONE;
if (unlikely(rrd->pkt_flg & PACKET_FLAG_ERR)) {
@@ -1816,14 +1827,6 @@ static void atl1_rx_checksum(struct atl1_adapter *adapter,
return;
}
- /* IPv4, but hardware thinks its checksum is wrong */
- if (netif_msg_rx_err(adapter))
- dev_printk(KERN_DEBUG, &pdev->dev,
- "hw csum wrong, pkt_flag:%x, err_flag:%x\n",
- rrd->pkt_flg, rrd->err_flg);
- skb->ip_summed = CHECKSUM_COMPLETE;
- skb->csum = htons(rrd->xsz.xsum_sz.rx_chksum);
- adapter->hw_csum_err++;
return;
}
--
1.5.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] atl1: deal with hardware rx checksum bug
2008-08-05 0:05 [PATCH] atl1: deal with hardware rx checksum bug Jay Cliburn
@ 2008-08-07 5:56 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-08-07 5:56 UTC (permalink / raw)
To: Jay Cliburn; +Cc: csnook, netdev
Jay Cliburn wrote:
> The L1 hardware contains a bug that flags a fragmented IP packet
> as having an incorrect TCP/UDP checksum, even though the packet
> is perfectly valid and its checksum is correct. There's no way to
> distinguish between one of these good packets and a packet that
> actually contains a TCP/UDP checksum error, so all we can do is
> allow the packet to be handed up to the higher layers and let it
> be sorted out there.
>
> Add a comment describing this condition and remove the code that
> currently fails to handle what may or may not be a checksum error.
>
> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
> ---
> drivers/net/atlx/atl1.c | 19 +++++++++++--------
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-07 5:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 0:05 [PATCH] atl1: deal with hardware rx checksum bug Jay Cliburn
2008-08-07 5:56 ` Jeff Garzik
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).