Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Angelos D. Keromytis (angeloscvs.openbsd.org)
Date: Fri Aug 24 2001 - 09:31:58 CDT
Module name: src
Changes by: angeloscvs.openbsd.org 2001/08/24 08:31:58
sys/sys : mbuf.h
Add an M_READONLY() macro, which evaluates to true if the mbuf's
data area is not to be written to. This is the case for mbufs with
external storage which is either a non-cluster or a cluster referenced
by multiple mbufs.
Change M_LEADINGSPACE() and M_TRAILINGSPACE() to use M_READONLY(),
rather than their own testing for M_EXT. Previously, M_LEADINGSPACE()
treated all M_EXT mbufs as read-only (which causes an extra mbuf to
be needlessly allocated when sending large TCP packets), and
M_TRAILINGSPACE() previously did not treat any external storage as
read-only (could lead to data corruption of external storage buffers!).