Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2007 14:18:41 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Pietro Cerutti <pietro.cerutti@gmail.com>
Cc:        freebsd-hackers@freebsd.org, FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: [SOLVED] re(4) incorrect checksum
Message-ID:  <20070120051841.GD17584@cdnetworks.co.kr>
In-Reply-To: <e572718c0701110834w61c62d3fr93692f31127f3a42@mail.gmail.com>
References:  <e572718c0701110229q60a66d32o68f789c889b4a06@mail.gmail.com> <e572718c0701110251l23ffa961w1851f19347daf845@mail.gmail.com> <20070111121904.GD33964@cdnetworks.co.kr> <e572718c0701110834w61c62d3fr93692f31127f3a42@mail.gmail.com>

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

--QKdGvSO+nmPlgiQ/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Jan 11, 2007 at 05:34:19PM +0100, Pietro Cerutti wrote:
 > On 1/11/07, Pyun YongHyeon <pyunyh@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

--QKdGvSO+nmPlgiQ/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="if_re.csum.patch"

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

--QKdGvSO+nmPlgiQ/--



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