Page MenuHomeFreeBSD

genet: pullup minimum header amount for IPv4
ClosedPublic

Authored by karels on Jun 20 2021, 6:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 28, 11:40 PM
Unknown Object (File)
Mon, Jan 27, 7:40 AM
Unknown Object (File)
Sat, Jan 25, 7:50 PM
Unknown Object (File)
Sat, Jan 25, 7:13 PM
Unknown Object (File)
Sat, Jan 18, 5:18 PM
Unknown Object (File)
Fri, Jan 17, 5:34 PM
Unknown Object (File)
Wed, Jan 15, 8:23 PM
Unknown Object (File)
Wed, Jan 15, 1:02 AM
Subscribers

Details

Summary

The genet driver (RPi4 Ethernet) had code to pull headers into the
first mbuf if there was only an Ethernet header there. This was
originally needed for ICMPv6 replies, then for forwarded IPv6/TCP.
Now a situation has been found where it is needed for IPv4, when
using NAT with IPFW. Generalize to do this for all protocols.
Rather than using an IPv6-related definition for the length, move
the length to a variable that can be set with sysctl
(hw.genet.tx_hdr_min). Move an old tunable to a new RDTUN variable
with a better name.

PR: 25607

Test Plan

tested by users that reported the problems

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40039
Build 36928: arc lint + arc unit

Event Timeline

sys/arm64/broadcom/genet/if_genet.c
107

Maybe something like "maximum number of mbufs to pass per call to if_input" or something like that?

"send" implied the TX direction on my first read

Fix text according to Ed's suggestion.

karels added inline comments.
sys/arm64/broadcom/genet/if_genet.c
107

Good suggestion, thanks.

Any other comments? Anyone able to approve?

This revision is now accepted and ready to land.Jun 22 2021, 11:05 PM