Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2007 19:13:09 +0000 (GMT)
From:      wpaul@FreeBSD.ORG (Bill Paul)
To:        wpaul@FreeBSD.ORG (Bill Paul)
Cc:        pyunyh@gmail.com, freebsd-current@freebsd.org, r.c.ladan@gmail.com
Subject:   Re: Call for re(4) checksum offload testers.
Message-ID:  <20070124191309.D17A016A403@hub.freebsd.org>
In-Reply-To: <20070124190203.E80FB16A403@hub.freebsd.org> from Bill Paul at "Jan 24, 2007 07:02:03 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

--ELM82951187:-21975-0_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit


> Based on testing with my sample adapters, I think the right thing to do
> is skip the software padding in the TCP case. It appears that even
> the older 8169 adapters that botch the small IP fragment case will correctly
> handle this small TCP segment case. I'm attaching a patch which should
> fix the problem without breaking the workaround for other NICs. If you
> verify that this patch also fixes your problem, then this patch should
> be checked in instead of the other one.

Crap... I just realized as I hit the send button that I was testing
for the wrong flag in the rl_flags field. I'm sending the patch again,
hopefully correct this time.

-Bill
 
--
=============================================================================
-Bill Paul            (510) 749-2329 | Senior Engineer, Master of Unix-Fu
                 wpaul@windriver.com | Wind River Systems
=============================================================================
              <adamw> you're just BEGGING to face the moose
=============================================================================

--ELM82951187:-21975-0_
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename=re.patch
Content-Description: re.patch
Content-Transfer-Encoding: 7bit

--- if_re.c.orig	Wed Jan 24 10:38:14 2007
+++ if_re.c	Wed Jan 24 11:06:21 2007
@@ -2075,9 +2075,13 @@
 	 * the mbuf chain has too many fragments so the coalescing code
 	 * below can assemble the packet into a single buffer that's
 	 * padded out to the mininum frame size.
+	 *
+	 * Note: this appears unnecessary for TCP, and doing it for TCP
+	 * with PCIe adapters seems to result in bad checksums.
 	 */
 
-	if (arg.rl_flags && (*m_head)->m_pkthdr.len < RL_MIN_FRAMELEN)
+	if (arg.rl_flags && !(arg.rl_flags & RL_TDESC_CMD_TCPCSUM) &&
+            (*m_head)->m_pkthdr.len < RL_MIN_FRAMELEN)
 		error = EFBIG;
 	else
 		error = bus_dmamap_load_mbuf(sc->rl_ldata.rl_mtag, map,

--ELM82951187:-21975-0_--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070124191309.D17A016A403>