Gleb Smirnoff c93410229c Most Ethernet drivers that potentially can run a pfil(9) hook with
PFIL_MEMPTR flag are intentionally providing a memory address that
isn't aligned to pointer alignment. This is done to align an IPv4
or IPv6 header that is expected to follow Ethernet header.

When we return PFIL_REALLOCED we store a pointer to allocated mbuf
at this address. With this change the KPI changes to store the pointer
at aligned address, which usually yields in +2 bytes.

Provide two inlines:

pfil_packet_align() to get aligned pfil_packet_t for a misaligned one
pfil_mem2mbuf() to read out mbuf pointer from misaligned pfil_packet_t

Provide function pfil_realloc(), not used yet, that would convert a
memory pfil_packet_t to an mbuf one.

Reported by:	hps
Reviewed by:	hps, gallatin
2019-03-10 17:20:09 +00:00
..
2018-05-31 09:11:21 +00:00
2019-03-09 01:12:59 +00:00
2019-03-05 13:21:07 +00:00
2018-05-19 05:27:49 +00:00
2018-11-26 13:42:18 +00:00
2019-02-02 22:39:29 +00:00
2018-06-16 19:21:09 +00:00
2017-07-24 03:59:50 +00:00
2018-11-26 13:42:18 +00:00