[SOLVED] re(4) incorrect checksum

Pyun YongHyeon pyunyh at gmail.com
Sat Jan 20 05:18:13 UTC 2007


On Thu, Jan 11, 2007 at 05:34:19PM +0100, Pietro Cerutti wrote:
 > On 1/11/07, Pyun YongHyeon <pyunyh at gmail.com> wrote:
 > >In if_re.c, rev 1.46.2.18 wpaul@ fixed a long standing checksum
 > >offload issue by padding. Does re(4) work when you disable only Tx
 > >checksum offload?(i.e. ifconfig re0 -txcsum)
 > 
 > yes, because -txcsum also disables Rx checksum on my NIC.
 > 
 > # ifconfig re0
 > ....
 > options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
 > ....
 > # ifconfig re0 -txcsum
 > ....
 > options=18<VLAN_MTU,VLAN_HWTAGGING>
 > ....
 > 

How about attached one?
Please make sure to test 'ping -s 1473 ipaddr_of_gateway'.

-- 
Regards,
Pyun YongHyeon
-------------- next part --------------
Index: if_rlreg.h
===================================================================
RCS file: /home/ncvs/src/sys/pci/if_rlreg.h,v
retrieving revision 1.64
diff -u -r1.64 if_rlreg.h
--- if_rlreg.h	16 Jan 2007 20:35:23 -0000	1.64
+++ if_rlreg.h	20 Jan 2007 05:05:21 -0000
@@ -443,7 +443,12 @@
 #define RL_RX_BUF_SZ		RL_RXBUF_64
 #define RL_RXBUFLEN		(1 << ((RL_RX_BUF_SZ >> 11) + 13))
 #define RL_TX_LIST_CNT		4
-#define RL_MIN_FRAMELEN		60
+/*
+ * re(4) hardware IPv4 Tx checksum offload could be mangled with 28 bytes
+ * or less IP packets.
+ */
+#define RL_TXCSUM_MINLEN	28
+#define RL_MIN_FRAMELEN		(ETHER_HDR_LEN + RL_TXCSUM_MINLEN)
 #define RL_TXTHRESH(x)		((x) << 11)
 #define RL_TX_THRESH_INIT	96
 #define RL_RX_FIFOTHRESH	RL_RXFIFO_NOTHRESH


More information about the freebsd-hackers mailing list