mbuf.9 (72a3951459cd8937c6b6f0b43804c39889c4ae30) mbuf.9 (c8185672b28957105341b2ce95fd497e209ad64c)
1.\" Copyright (c) 2000 FreeBSD Inc.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 509 unchanged lines hidden (view full) ---

518all but the first
519.Fa len
520bytes.
521In case of failure, it returns
522.Dv NULL
523and attempts to restore the chain to its original state.
524.El
525.Sh STRESS TESTING
1.\" Copyright (c) 2000 FreeBSD Inc.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 509 unchanged lines hidden (view full) ---

518all but the first
519.Fa len
520bytes.
521In case of failure, it returns
522.Dv NULL
523and attempts to restore the chain to its original state.
524.El
525.Sh STRESS TESTING
526When running a kernel compiled with the option MBUF_STRESS_TEST,
527the following sysctl-controlled options may be used to create
528various failure / extreme cases for testing of network drivers
526When running a kernel compiled with the option
527.Dv MBUF_STRESS_TEST ,
528the following
529.Xr sysctl 8 Ns
530-controlled options may be used to create
531various failure/extreme cases for testing of network drivers
529and other mbuf-reliant parts of the kernel.
532and other mbuf-reliant parts of the kernel.
530.Pp
531.Va net.inet.ip.mbuf_frag_size
532causes ip_output to fragment outgoing mbuf chains into fragments of
533the specified size. Setting this option to 1 is an excellent way to
533.Bl -tag -width ident
534.It Va net.inet.ip.mbuf_frag_size
535Causes
536.Fn ip_output
537to fragment outgoing mbuf chains into fragments of the specified size.
538Setting this variable to 1 is an excellent way to
534test the long mbuf chain handling ability of network drivers.
539test the long mbuf chain handling ability of network drivers.
535.Pp
536.Va kern.ipc.m_defragrandomfailures
537causes the function m_defrag to randomly fail, returning NULL. Any
538piece of code which uses m_defrag should be tested with this feature.
540.It Va kern.ipc.m_defragrandomfailures
541Causes the function
542.Fn m_defrag
543to randomly fail, returning
544.Dv NULL .
545Any piece of code which uses
546.Fn m_defrag
547should be tested with this feature.
548.El
539.Sh RETURN VALUES
540See above.
541.Sh HISTORY
542.\" Please correct me if I'm wrong
543Mbufs appeared in an early version of
544.Bx .
545Besides for being used for network packets, they were used
546to store various dynamic structures, such as routing table
547entries, interface addresses, protocol control blocks, etc.
548.Sh AUTHORS
549The original
550.Nm
551man page was written by Yar Tikhiy.
549.Sh RETURN VALUES
550See above.
551.Sh HISTORY
552.\" Please correct me if I'm wrong
553Mbufs appeared in an early version of
554.Bx .
555Besides for being used for network packets, they were used
556to store various dynamic structures, such as routing table
557entries, interface addresses, protocol control blocks, etc.
558.Sh AUTHORS
559The original
560.Nm
561man page was written by Yar Tikhiy.