# Ensure this returns 1$ sysctl net.inet.tcp.tsonet.inet.tcp.tso: 1# Enable tx checksum, tcp segmentation, and large receive offloading but NOT receive checksum offloading on the WAN device (e.g., vtnet0)$ ifconfig vtnet0 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso# Disable rx & tx checksum, tcp segmentation, and large receive offloading on the LAN device (e.g., vtnet1)$ ifconfig vtnet1 -rxcsum -txcsum -tso -lro -txcsum6 -vlanhwtag -vlanhwtso
# on opnsense-22.1$ ifconfig vtnet0 -rxcsum -txcsum -tso -lro -txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 -rxcsum -txcsum -tso -lro -txcsum6 -vlanhwtag -vlanhwtso# on client 1$ iperf3 -c 172.16.5.57 ...[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 6.43 GBytes 5.53 Gbits/sec 3018 sender[ 5] 0.00-10.00 sec 6.43 GBytes 5.52 Gbits/sec receiver$ iperf3 -c 172.16.5.57 -R[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 4.26 GBytes 3.66 Gbits/sec 2144 sender[ 5] 0.00-10.00 sec 4.26 GBytes 3.66 Gbits/sec receiver
# on opnsense-22.1$ ifconfig vtnet0 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso# on client 1$ iperf3 -c 172.16.5.57 ...[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 6.35 GBytes 5.46 Gbits/sec 1287 sender[ 5] 0.00-10.00 sec 6.35 GBytes 5.45 Gbits/sec receiver$ iperf3 -c 172.16.5.57 -R[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 4.40 GBytes 3.78 Gbits/sec 845 sender[ 5] 0.00-10.00 sec 4.40 GBytes 3.78 Gbits/sec receiver
# on opnsense-22.1$ ifconfig vtnet0 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso# on client 1$ iperf3 -c 172.16.5.57 iperf3: error - unable to connect to server: Connection timed out
# on opnsense-22.1$ ifconfig vtnet0 -rxcsum -txcsum -tso -lro -txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 rxcsum -txcsum -tso -lro -txcsum6 -vlanhwtag -vlanhwtso# on client 1$ iperf3 -c 172.16.5.57 iperf3: error - unable to connect to server: Connection timed out
# on opnsense-22.1$ ifconfig vtnet0 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso$ curl https://www.google.com(immediate full result)# on upstream firewallroot@fw:~ # tcpdump -nv host 172.16.5.58 -i ax0tcpdump: listening on ax0, link-type EN10MB (Ethernet), capture size 262144 bytes03:50:57.729234 IP (tos 0x0, ttl 63, id 26307, offset 0, flags [DF], proto TCP (6), length 60) 172.16.5.58.56398 > 172.253.122.147.443: Flags [S], cksum 0x0a68 (correct), seq 2786157904, win 64240, options [mss 1460,sackOK,TS val 2576672459 ecr 0,nop,wscale 7], length 003:50:57.734756 IP (tos 0x80, ttl 123, id 5969, offset 0, flags [none], proto TCP (6), length 60) 172.253.122.147.443 > 172.16.5.58.56398: Flags [S.], cksum 0xf663 (correct), seq 3977252634, ack 2786157905, win 65535, options [mss 1430,sackOK,TS val 1789175857 ecr 2576672459,nop,wscale 8], length 003:50:57.735172 IP (tos 0x0, ttl 63, id 26308, offset 0, flags [DF], proto TCP (6), length 52) 172.16.5.58.56398 > 172.253.122.147.443: Flags [.], cksum 0x2317 (correct), ack 1, win 502, options [nop,nop,TS val 2576672465 ecr 1789175857], length 0
# on opnsense-22.1$ ifconfig vtnet0 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso# on client 1$ curl https://www.google.com(hangs, no result)# on upstream firewallroot@fw:~ # tcpdump -nv host 172.16.5.58 -i ax0tcpdump: listening on ax0, link-type EN10MB (Ethernet), capture size 262144 bytes03:56:58.192294 IP (tos 0x0, ttl 63, id 18870, offset 0, flags [DF], proto TCP (6), length 60) 172.16.5.58.22311 > 172.253.122.103.443: Flags [S], cksum 0x387f (incorrect -> 0xe379), seq 4123969246, win 64240, options [mss 1460,sackOK,TS val 3062744264 ecr 0,nop,wscale 7], length 003:56:59.221337 IP (tos 0x0, ttl 63, id 18871, offset 0, flags [DF], proto TCP (6), length 60) 172.16.5.58.22311 > 172.253.122.103.443: Flags [S], cksum 0x387f (incorrect -> 0xdf74), seq 4123969246, win 64240, options [mss 1460,sackOK,TS val 3062745293 ecr 0,nop,wscale 7], length 003:57:01.237466 IP (tos 0x0, ttl 63, id 18872, offset 0, flags [DF], proto TCP (6), length 60)
# on opnsense-22.1$ ifconfig vtnet0 rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtsoroot@opnsense-22:~ # iperf3 -c 172.16.5.57[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 10.8 GBytes 9.24 Gbits/sec 7698 sender[ 5] 0.00-10.00 sec 10.8 GBytes 9.24 Gbits/sec receiverroot@opnsense-22:~ # iperf3 -c 172.16.5.57 -R[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 10.8 GBytes 9.27 Gbits/sec 50066 sender[ 5] 0.00-10.00 sec 10.8 GBytes 9.27 Gbits/sec receiver
# on opnsense-22.1$ ifconfig vtnet0 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtso$ ifconfig vtnet1 -rxcsum txcsum tso lro txcsum6 -vlanhwtag -vlanhwtsoroot@opnsense-22:~ # iperf3 -c 172.16.5.57[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 10.8 GBytes 9.29 Gbits/sec 11963 sender[ 5] 0.00-10.00 sec 10.8 GBytes 9.29 Gbits/sec receiverroot@opnsense-22:~ # iperf3 -c 172.16.5.57 -R[ ID] Interval Transfer Bitrate Retr[ 5] 0.00-10.00 sec 1.98 GBytes 1.70 Gbits/sec 189 sender[ 5] 0.00-10.00 sec 1.98 GBytes 1.70 Gbits/sec receiver
**RSS UPDATE**: I tried turning of RSS (dev.ax.0.rss_enabled="0" dev.ax.1.rss_enabled="0") and rebooting. I then re-tested send/receive with both single and parallel threads and observed no improvement. I believe since it's both src host:port and dst host:port in the hash, that -P4 should be able to generate different queue targets in the LSB of the hash and thus spread it across cores. Said more simply, I think this is a valid test, but I'm not fully up to speed on RSS. See here for more details: https://forum.opnsense.org/index.php?topic=24409.0
Those numbers are consistent with what I was experiencing with 21.x. You testing across LAN <-> WAN with pf enabled and NAT with just basic ACLs, right?