Call for re(4) checksum offload testers.

Bill Paul wpaul at FreeBSD.ORG
Wed Jan 24 19:13:09 UTC 2007


> 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 at windriver.com | Wind River Systems
=============================================================================
              <adamw> you're just BEGGING to face the moose
=============================================================================
-------------- next part --------------
--- 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,


More information about the freebsd-current mailing list