HomeFreeBSD

genet: fix output packet corruption in uncommon case

Description

genet: fix output packet corruption in uncommon case

The code for the "shift" block in the COPY macro set the pointer for
the next copy block to the wrong value. In this case, the link-layer
header would be overwritten by the network-layer header. This case is
difficult or impossible to exercise in the current driver without
changing the value of the hw.genet.tx_hdr_min sysctl. Correct the
pointer. While here, remove a line in the macro that was marked
"unneeded", which was actually wrong.

PR: 263824
Submitted by: jiahali@blackberry.com

(cherry picked from commit 1de9aa4d4f7938f36e6485dad817908a6e45bb32)

Details

Provenance
karelsAuthored on May 9 2022, 12:19 PM
Parents
rGfb231965f9b7: mbuf: Properly set the default value for mb_use_ext_pgs
Branches
Unknown
Tags
Unknown