Commit Graph

67 Commits

Author SHA1 Message Date
Ruslan Ermilov
ea26d58729 Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.
Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true
since the advent of MBUMA.

Reviewed by:	arch

There are ongoing disputes as to whether we want to switch to directly using
UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation.
2008-03-25 09:39:02 +00:00
Poul-Henning Kamp
cf827063a9 Give MEXTADD() another argument to make both void pointers to the
free function controlable, instead of passing the KVA of the buffer
storage as the first argument.

Fix all conventional users of the API to pass the KVA of the buffer
as the first argument, to make this a no-op commit.

Likely break the only non-convetional user of the API, after informing
the relevant committer.

Update the mbuf(9) manual page, which was already out of sync on
this point.

Bump __FreeBSD_version to 800016 as there is no way to tell how
many arguments a CPP macro needs any other way.

This paves the way for giving sendfile(9) a way to wait for the
passed storage to have been accessed before returning.

This does not affect the memory layout or size of mbufs.

Parental oversight by:	sam and rwatson.

No MFC is anticipated.
2008-02-01 19:36:27 +00:00
Bruce M Simpson
d305f4b99e Document m_pulldown().
Obtained from:	MBUF issues in 4.4BSD IPv6/IPsec support (itojun)
2007-02-26 15:17:19 +00:00
Robert Watson
db430f9709 Expand history and authors section of mbuf.9 man page to discuss recent
transition to mbuma (FreeBSD 5.3) and the fact that mbufs are now limited
almost entirely to packet storage, with straight UMA zones being used for
most other network data types.
2007-02-15 14:44:46 +00:00
Julian Elischer
1009bd1b0d Explicitly emphasize a facet of m_pullup() that some people seem to
frequently forget. i.e. that you can not keep using pointers to
within the old chain.
2006-12-08 23:44:30 +00:00
Maxim Konovalov
1cb58a0783 o GC MT_FTABLE removed in rev. 1.192 mbuf.h.
o Correct MT_HEADER define.
2006-07-24 07:32:23 +00:00
Sam Leffler
47e2996e8b promote fast ipsec's m_clone routine for public use; it is renamed
m_unshare and the caller can now control how mbufs are allocated

Reviewed by:	andre, luigi, mlaier
MFC after:	1 week
2006-03-15 21:11:11 +00:00
Andre Oppermann
cb752e17a9 Remove references to MEXT_ADD_REF, MEXT_REM_REF and MEXT_IS_REF
which were removed with rev. 1.179 of mbuf.h.

Sponsored by:	TCP/IP Optimization Fundraise 2005
2005-11-18 17:04:49 +00:00
Sam Leffler
9c3fd40489 describe m_align 2005-08-08 00:50:25 +00:00
Hiten Pandya
571dba6ec9 Use 'manual page' instead of 'man page' for consistency.
Approved by:	re (hrs)
2005-06-28 20:15:19 +00:00
Ruslan Ermilov
4f06896130 Assorted markup fixes and minor wordsmithing.
Approved by:	re
2005-06-15 13:31:23 +00:00
John-Mark Gurney
7ac139a904 add m_copyup function.. This can be used to help make our ip stack less
alignment restrictive, and help performance on some ethernet cards which
currently copy the entire packet a couple bytes to get the packet aligned
properly...

Wordsmithing by:	dwhite
Obtained from:	NetBSD (code only)
I'll clean it up later:	rwatson
2005-03-17 19:34:57 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Sam Leffler
b9def06b29 document m_append 2004-12-08 17:47:49 +00:00
John-Mark Gurney
b7131a2672 document that m_free returns m_next of the free'd mbuf 2004-08-28 03:46:18 +00:00
Maxim Konovalov
9193b9a5a1 MT_TAG is dead. 2004-07-07 16:48:16 +00:00
Ruslan Ermilov
5203edcdc5 Mechanically kill hard sentence breaks and double whitespaces. 2004-07-03 18:29:24 +00:00
Ruslan Ermilov
2c88a61c15 Forgot to bump the document date, *blush*. 2004-05-20 09:52:48 +00:00
Ruslan Ermilov
e85cc3f560 Document mbuf tags based on the OpenBSD manpage.
Submitted by:	Gleb Smirnoff
2004-05-20 09:34:19 +00:00
Maxim Konovalov
6c0137067b o Document m_getcl(9).
Submitted by:	Gleb Smirnoff
MFC after:	2 weeks
2004-05-04 14:53:34 +00:00
Maxim Konovalov
01e7fdafa7 o Add a missed description for m_free(9).
Optained from:	NetBSD
MFC after:	1 week
2004-04-28 14:53:49 +00:00
Ruslan Ermilov
f48cbcdecc Assorted mdoc(7) fixes. 2004-04-01 07:54:27 +00:00
Mike Silbersack
bdf861859a Fix last commit to conform to mdoc style.
Submitted by:	hmp
2004-04-01 07:36:56 +00:00
Mike Silbersack
a61bc764ce Document the m_defrag function. (Mostly copied from the description
in uipc_mbuf.c)
2004-04-01 06:50:21 +00:00
Ruslan Ermilov
6e485c0a7a mtod() returns pointer to the specified type, not necessarily "void *". 2004-02-27 17:14:00 +00:00
Bruce M Simpson
02312219eb Document the functions m_apply() and m_getptr().
Requested by: Maxim Konovalov
2004-02-11 02:39:24 +00:00
Alex Dupre
feccf50ce0 Fix MSIZE definition location.
PR:		docs/62129
Submitted by:	Lee Brotherston <lee@nerds.org.uk> (PR),
		Marc Silver <marcs@draenor.org> (patch)
Approved by:	blackend (mentor)
2004-02-01 22:33:59 +00:00
Yaroslav Tykhiy
76f80df62e As I've been pointed out by Andrew Gallatin, there are some
network interface cards smart (or twisted?) enough to be able
to calculate a TCP/UDP checksum for a packet fragmented by the
host CPU.  Therefore the paragraph on the case has been revised.
2004-01-21 23:32:50 +00:00
Yaroslav Tykhiy
fbde705ac4 A couple of minor clarifications. 2004-01-21 13:17:24 +00:00
Yaroslav Tykhiy
0193eb5ee9 Add a description for the hardware-assisted checksumming
facilities based on http://people.freebsd.org/~jlemon/csum.txt
and my own observations.
2004-01-21 12:45:37 +00:00
Yaroslav Tykhiy
238d9c5975 Reformat the list of essential mbuf fields according
to the nice style used in ifnet(9).
This includes specifying field types, starting descriptions
with a capital letter, and ending them with a full stop.
Improve the language a bit, as well.
2004-01-18 23:42:28 +00:00
Yaroslav Tykhiy
d2b7305939 Update the list of mbuf types from <sys/mbuf.h>. 2004-01-18 21:29:46 +00:00
Yaroslav Tykhiy
f434362a8a Update the list of possible mbuf flags from <sys/mbuf.h>. 2004-01-18 21:23:30 +00:00
Tom Rhodes
53b2520d01 Remove an extra 'for' in the HISTORY section. 2003-11-15 14:23:48 +00:00
Ruslan Ermilov
743d5d518c mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
Yaroslav Tykhiy
5d96084f89 Name a function argument "mbuf", not "buf", if it is
a pointer to struct mbuf for clarity and consistency.
2003-06-15 14:47:12 +00:00
Yaroslav Tykhiy
da72b9983c Add missing descriptions of macros M_ALIGN and MH_ALIGN.
Remove a reference to the defunct macro M_COPY_PKTHDR;
document the new functions m_dup_pkthdr() and m_move_pkthdr(),
and the macro variant of the latter, M_MOVE_PKTHDR().
2003-06-15 14:40:03 +00:00
Yaroslav Tykhiy
7b2fd1831f Add more markup to the mbuf(9) manpage. This includes:
- tagging plaintext "mbuf", "mbuf cluster", and "mbuf chain"
  with .Vt (variable type) since all of them are ways of managing
  data, i.e., they can be seen as data types;

- using .Vt/.Va instead of .Li (literal) where appropriate;

- tagging plaintext words that actually refer to function arguments
  with .Fa.

Suggested by:	ru
2003-06-15 14:14:11 +00:00
Yaroslav Tykhiy
be82a0bc5a Use .Va, not .Fa, to refer to structure members.
mdoc(7) contains an ambiguous statement on the issue,
but our mdoc(7) police's opinion is solid.

Suggested by:	ru
2003-06-15 12:42:41 +00:00
Ruslan Ermilov
c8185672b2 Assorted mdoc(7), grammar, spelling, and punctuation fixes.
Approved by:	re (blanket)
2003-05-21 15:49:01 +00:00
Hiten Pandya
72a3951459 Remove an extraneous .El' that was reported by groff -z`.
Approved by: des (mentor), re (scottl)
2003-05-16 19:57:38 +00:00
Mike Silbersack
5a00719d7b Add a description of m_defragrandomfailures. 2003-04-15 02:26:13 +00:00
Mike Silbersack
3cab047e0b Add info on how to use the MBUF_STRESS_TEST options. (Only 1 option
at present.)
2003-04-13 23:31:06 +00:00
Tom Rhodes
c65b53c5bc Return bits which were removed in revision 1.22.
Requested by:	imp
2003-02-24 05:59:12 +00:00
Alfred Perlstein
2a62ffb72d Catch up to WAIT/NOWAIT cleanup. 2003-01-21 08:57:35 +00:00
Robert Watson
eef9bd4c3f Caution programmers not to confuse M_DONTWAIT with M_NOWAIT. They
are not the same.

Suggested by:	Hiten Pandya <hiten@unixdaemons.com>
2003-01-18 03:25:40 +00:00
Ruslan Ermilov
e60fa8374d mdoc(7) police: catch up to the code changes.
Approved by:	re
2002-11-29 11:36:32 +00:00
Poul-Henning Kamp
0b1c0994a5 Add m_fixhdr() and m_length(). 2002-09-18 20:04:30 +00:00
Chad David
f16b3c0de4 Update function definitions and required include files to reflect
the current state of the system.

Approved by: alfred
2001-12-26 23:14:04 +00:00