kern/91032: invalid IP checksum under if_bridge(4)+em(4)
Ralf S. Engelschall
rse at FreeBSD.org
Wed Dec 28 13:10:08 PST 2005
The following reply was made to PR kern/91032; it has been noted by GNATS.
From: "Ralf S. Engelschall" <rse at FreeBSD.org>
To: Gleb Smirnoff <glebius at FreeBSD.org>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: kern/91032: invalid IP checksum under if_bridge(4)+em(4) combination
Date: Wed, 28 Dec 2005 22:05:24 +0100
On Wed, Dec 28, 2005, Gleb Smirnoff wrote:
> On Wed, Dec 28, 2005 at 09:45:38PM +0100, Ralf S. Engelschall wrote:
> R> Another workaround would have been to put into the box a 100baseTX NIC
> R> driven by fxp(4) instead of the 1000baseTX NIC driven by em(4). Because
> R> the combination of if_bridge(4) and fxp(4) I've running fine with mostly
> R> the same configuration on another server.
> Not all fxp(4) cards can do checksum offloading. If you put the one
> that can't, then the seconds workaround doesn't differ from the first
> one. An problem ins't em specific in this case probably.
Yes, of course. I think we actually have two problems here: first
if_bridge(4) unconditionally clears the checksum, although I see no
reason for doing this in case of non-generated and just forwarded
packets. And the second problem (that the checksum is not re-calculated)
is more em(4) related or at least related to the packet flow through the
system in case a network device is attached to if_bridge(4).
> So important questions is: does the fxp card you used can do offloading?
According to the ifconfig(8) output on that box and the fact that I do
not see any "TXCSUM" in the "options", I would say this particular card
is not capable of doing "checksum offloading":
| net0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
| inet 172.16.120.130 netmask 0xffff0000 broadcast 172.16.255.255
| ether 00:07:e9:d9:4d:43
| media: Ethernet autoselect (100baseTX <full-duplex>)
| status: active
Ok, then it is clear why the bridging works fine on this FreeBSD
6.0-STABLE box while it was broken (and required the "ifconfig em0
-txcsum") on the other box.
rse at FreeBSD.org Ralf S. Engelschall
FreeBSD.org/~rse rse at engelschall.com
FreeBSD committer www.engelschall.com
More information about the freebsd-bugs