Using range option of netmap's pkt-gen generate packets with bad IP and UDP checksum. Fix: Applying the attached patch. Patch attached with submission follows: How-To-Repeat: If you pkt-gen this this kind of range option: -f tx -l 60 -d 2.1.3.1-2.1.3.10 -s 1.1.3.1-1.1.3.10 A tcpdump on the receiving host will display that it's recveing lot's of packets with bad checksums: 19:31:28.029702 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 46, bad cksum 31ac (->31a1)!) 1.1.3.9.0 > 2.1.3.4.0: [bad udp cksum 0x2a23 -> 0x2a18!] UDP, length 18 19:31:28.029704 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 46, bad cksum 31ac (->31a3)!) 1.1.3.10.0 > 2.1.3.1.0: [bad udp cksum 0x2a23 -> 0x2a1a!] UDP, length 18 19:31:28.029705 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 46, bad cksum 31ac (->31a6)!) 1.1.3.4.0 > 2.1.3.4.0: [bad udp cksum 0x2a23 -> 0x2a1d!] UDP, length 18 19:31:28.029706 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 46, bad cksum 31ac (->31a4)!)
Responsible Changed From-To: freebsd-bugs->freebsd-net Over to maintainer(s).
Created attachment 157306 [details] patch for pkt-gen (freebsd -current) Here is an improved patch that allow to optionally use the "software UDP checksum" because some NIC like Chelsio allow hardwarde checksuming in netmap mode.
Created attachment 157307 [details] patch for pkt-gen (freebsd 10.1)
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Equivalent patches were pushed upstream.