Ethernet NIC drivers depending unconditionally on INET

Bjoern A. Zeeb bz at FreeBSD.org
Sat Jun 13 08:50:08 UTC 2009


On Sat, 13 Jun 2009, Michael Tuexen wrote:

> On Jun 13, 2009, at 10:01 AM, Pyun YongHyeon wrote:
>
>> On Sat, Jun 13, 2009 at 09:15:06AM +0200, Michael Tuexen wrote:
>>> On Jun 13, 2009, at 2:48 AM, Andrew Gallatin wrote:
>>> 
>>>> Michael Tuexen wrote:
>>>> 
>>>>> I'm not sure if we need additional IFCAP_RXCSUM6 IFCAP_TXCSUM6
>>>>> capabilities... Why would we want to enable IPv4 offloading and
>>>>> not IPv6 or vice versa?
>>>> 
>>>> I'd assume that some older hardware supports IPv4 offloads, but
>>>> might not have support for IPv6 offloads.
>>> Sure. But then the driver only provides the CSUM_ flags which
>>> are appropriate. For example, a similar thing is already in the
>>> igb driver:
>>> 
>>> 1167       if (ifp->if_capenable & IFCAP_TXCSUM) {
>>> 1168                 ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP);
>>> 1169 #if __FreeBSD_version >= 800000
>>> 1170                 if (adapter->hw.mac.type == e1000_82576)
>>> 1171                         ifp->if_hwassist |= CSUM_SCTP;
>>> 1172 #endif
>>> 1173         }
>> 
>> That would disable all IPv4/IPv6 checksum offloading if
>> administrator disable IFCAP_TXCSUM. If we have IFCAP_TXCSUM6/
>> IFCAP_RXCSUM6 users could choose best working one even if some part
>> of driver/controller had checksum offload bugs.
> Sure. That is what I wrote in my earlier mail: Do we want to
> provide a ability to disable/enable checksum offload for
> IPv4 and IPv6 individually...
> Besides this "working around bugs" I see no reason to do
> it. Some other capabilities TSO/TOE are IPv[46] specific.
> I have no strong opinion on this. What do others think?

I think if there are bugs the driver would have to make sure to handle
if_hwassist appropriately ; actually we are already doing this.  Often
it would be chip revision specific I guess so it doesn't really make
sense to break it down to IPv4/v6.

Either you turn it on and get what the driver thinks this chip can do
or you don't get any.  If there is a bug for a chip revision, enhance
the driver to know to handle it correctly and be done.

Actuallt that is exactly what you sample above is doing - enabling
CSUM_SCTP only for a specific chip.

/bz

-- 
Bjoern A. Zeeb                      The greatest risk is not taking one.


More information about the freebsd-net mailing list