# Which Ethernet hardware acceleration features should be disabled for IPFW + in-kernel NAT?



## robroy (Jun 9, 2020)

FreeBSD Friends,

Back on 10.0-RELEASE I learned that using in-kernel NAT with IPFW performed much better after disabling all of my NIC's hardware acceleration features.  At the time this meant `-tso -rxcsum -txcsum -vlanmtu -vlanhwtag -vlanhwtso`.

Today I'm configuring two bge(4) interfaces with 12.1-RELEASE-p5.  Unlike my 10.0-RELEASE days, these interfaces use LACP and tagged VLAN traffic.

The default accelerations look like this:

`options=c019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>`

By supplying `-tso -rxcsum -txcsum -vlanmtu -vlanhwtag -vlanhwtso`, I was able to cut the accelerations down to this:

`options=80080<VLAN_HWCSUM,LINKSTATE>`

`iperf -s` and `iperf -c` tests between this computer and another showed only a 2% throughput loss after switching the stuff off.

This performance is still OK, but not knowing whether I _really_ needed to disable _everything_ bugs me.

Does anybody know whether it's still necessary to disable hardware acceleration features, in general, with IPFW + in-kernel NAT?
Does anybody know which of these acceleration features I could leave enabled, without interfering with IPFW + in-kernel NAT?
Thanks very much!
Rob Roy


----------

