adding fields to struct mbuf

Kajetan Staszkiewicz <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>
Hello group,

I'm researching loop prevention in pfil. There are cases where packets
are reinjected into the network stack and would be handled by the same
hooks again, i.e. pf + dummynet where currently pf itself handles loop
prevention on its own. My current experiment's approach to making loop
prevention a general, non-pf-specific thing is to create a new mtag with
pointer to the last hook and update it in pfil.c/pfil_mbuf_common().
That works good so far, but it means memory allocation when pfil hooks
are involved. I'm unsure what the impact on performance would be.
Another approach would be to extend struct mbuf, or probably rather
struct m_pkthdr, to contain the aforementioned pointer. But is changing
that struct something that can be easily done and approved and merged?

For those curious the experiment will be uploaded to Phabricator soon-ish.

-- 
| pozdrawiam / regards | Powered by Debian and FreeBSD  |
| Kajetan Staszkiewicz |   www: http://tuxpowered.net   |
|                      | matrix: @vegeta:tuxpowered.net |
`----------------------^--------------------------------'
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEfSEIcxY9kDeZvSZsgKrXf6bzAFMFAmiLTXsFAwAAAAAACgkQgKrXf6bzAFPj
Hw/7BT7Njffile+zQQIo1orsmYy47Vl7QkGYa3wgp9UBc0Dpcqz21AqctTMeEjjl4PyTMV8gVQoQ
SdR9r/yUwpCbHenqdoJ9HXUx5NY7Yz8OP3FZUGh2pDtpTuHOoYpMzDXPXY5cGmEwY3w9rs7A5UzG
3qTDTbrvlsjps7BJzmeWozWJ/3dvloW8DBJaI0E6zUx0Ze2ucBJ6QidKiqTYQpPjW2JssZjJATT+
84LwOHUMbAfBwuNCIA610V0tp1YgW0glmJMj0n1aouwvzwf925TNnhoQfFtksbpINt/MlyIaDxvR
DEaTO2o7zc7SXZapLxot/JOw1UhB9408foxU1FZsWA2+GLUFkWJtze7sbt2wiqgRoVwWdn+DWBl7
VZ9Z95MOhlq6RwPIEr1MzlHia+comImcYGLavcr8E6yRVr23RHE+Z2nRMZsN/uhJYXzURF7C7ulx
tL4MsEpAOrk5zjhJDxfMAfAF2Ehh7cCOXnTW7ghNrH+ty058zw0GLVUg28BVPL73oht+XbnYNkaO
G5D90hzE0mK4IOw9nHYKUEFVVXRt7qrlndrE8JAZ6zxaK/PmWFjcuIr7xogtPBUZ44YgmuYOITlL
u/3SH1LzE4smwGjgozvTphB/zQOfAiR1ZeWK4aMy40mCCU461DuTfeE1X+6Gf3tagYyd8w7mhLhK
2jU=
=t9ct
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.