HomeFreeBSD

MFstable/10 r281951,r281954:

Description

MFstable/10 r281951,r281954:

r281951:

Backport MHSIZE/MPKTHSIZE equivalents from head

These macros are equivalent to the ones on head, except they are only exposed
when _KERNEL is defined, i.e. to kernel code, whereas the code on head is exposed
to userland as well

This is for improved forwards compatibility with mbuf(9) macros in head@r277203+,
and is required for a clean MFC of r279393

This is a direct commit to stable/10

Differential Revision: https://reviews.freebsd.org/D2126
Reviewed by: glebius, rwatson
Sponsored by: EMC / Isilon Storage Division

r281954:

MFC r279393:

Pad RX copy alignment calculation to avoid illegal memory accesses

The optimization made in r239940 is valid for struct mbuf's current structure
and size in FreeBSD, but hardcodes assumptions about sizes of struct mbuf,
which are unfortunately broken if additional data is added to the beginning of
struct mbuf

X-MFC note (discussed with rwatson):

This change requires the MPKTHSIZE definition, which is only available after
head@r277203 and will not be MFCed as it breaks mbuf(9) KPI.

A direct commit to stable/10 and merges to other branches to add the necessary
definitions to work with the code as-is will be done to facilitate this MFC

PR: 194314
Approved/Reviewed by: erj, jfv
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
ngieAuthored on
Reviewer
glebius
Differential Revision
D2126: Backport MHSIZE/MPKTHSIZE
Parents
rS282846: MFC r282364, r282429, r282524:
Branches
Unknown
Tags
Unknown