Age | Commit message (Collapse) | Author |
|
|
|
when the macro can change without automatically fixing the comment.
instead add a diagnostic that checks that the biggest cluster size is
always MAXMCLBYTES.
requested by and ok kettenis@
|
|
cluster the generic network stack will be able to give you.
it also recognises that external storage on an mbuf may be bigger than
MCLBYTES. its only when m_pullup or m_pulldown need to allocate
another cluster that they now check the len argument, and now they
do it against MAXMCLBYTES.
this is required for me to do pfsync on jumbo frames as the m_pulldown
for the subregions fail beyond MCLBYTES into the packet.
ok deraadt@ mikeb@ henning@ blambert@
manpage changes ok jmc@
|
|
ok deraadt@ claudio@ blambert@ mikeb@
|
|
|
|
|
|
unconditional, always on. 8 priority levels, as every better switch, the
vlan header etc etc. ok ryan mpf sthen, pea tested as well
|
|
|
|
Requested by dlg@
ok oga@
|
|
essentially identical; the only difference being that m_pullup2 is
capable of handling mbuf clusters, but called m_pullup for shorter
lengths (!).
testing dlg@ ok claudio@
|
|
The problems during the hackathon were not caused by this (most likely).
prodded by deraadt@ and beck@
|
|
defined in all of uipc_mbuf.c. I use this function a lot for quick
printf debugging.
|
|
got broken. Most /usr/src/regress/sys/kern/splice/args-oobinline-*
regression tests fail when they split an mbuf at out-of-band data.
ok claudio@, deraadt@
|
|
and we aren't sure what's causing them.
shouted oks by many before I even built a kernel with the diff.
|
|
the caller and the function that the function will not fail to allocate
memory and return a NULL pointer. However, m_dup_pkthdr() violates
this contract, making it possible for functions that pass M_WAITOK to
be surprised in ways that hurt.
Fix this by passing the wait flag all the way down the functions that
actually do the allocation for m_dup_pkthdr() so that we won't be
surprised.
man page update forthcoming
ok claudio@
|
|
- Use km_alloc for all backend allocations in pools.
- Use km_alloc for the emergmency kentry allocations in uvm_mapent_alloc
- Garbage collect uvm_km_getpage, uvm_km_getpage_pla and uvm_km_putpage
ariane@ ok
|
|
to cleave a single mbuf in twain, but managed to fail in divergent
and horrible ways in doing so in anything resembling a sane manner
introduce m_split_mbuf() and remake the previous into wrappers
around that
pounded by phessler@
ok claudio@
|
|
failure. The man page explained it the other way around. Change
the return code to the more obvious 0 or ENOMEM and document this.
ok krw@ markus@ miod@ jmc@
|
|
also modify the hiwat mark. This was done in pool_sethardlimit() until
rev. 1.99. Without this the mbuf cluster pool may return free pages too
quickly with the result that m_clget() may fail while populating DMA rings.
Seems to fix some hangs seen on MCLGETI() interfaces on i386 e.g. PR 6524.
A proper fix is to make all drivers handle empty rings but that will take
a while to implement. With and OK mikeb@
|
|
such commands are implemented.
"Ja! You'll need to update ddb.4 as well, of course." miod@
|
|
with an mbuf pointer as argument to see the contents of it.
OK thib@, deraadt@
|
|
|
|
instead of letting hardware rings grow on every interrupt, restrict
it so it can only grow once per softclock tick. we can only punish
the rings on softclock ticks, so it make sense to only grow on
softclock tick boundaries too.
the rings are now punished after >1 lost softclock tick rather than
>2. mclgeti is now more aggressive at detecting livelock.
the rings get punished by an 8th, rather than by half.
we now allow the rings to be punished again even if the system is
already considered in livelock.
without this diff a livelocked system will have its rx ring sizes
scale up and down very rapidly, while holding the rings low for too
long. this affected throughput significantly.
discussed and tested heavily at j2k10. there are still some games
with softnet we can play, but this is a good first step.
"put it in" and ok deraadt@
ok claudio@ krw@ henning@ mcbride@
if we find out that it sucks we can pull it out again later. till then
we'll run with it and see how it goes.
|
|
data in it. m_getptr() hops over empty buffers and points to the first
allocated data byte. Because of this the m_dup_pkthdr() call done by
m_copym0() can panic because not the first mbuf is passed.
Found the hard way by myself, diff by blambert@ commiitting for him since
he is not around. Tested and OK myself
|
|
mysterious and unused mbtypes[] array in mbuf.h.
ok tedu@, deraadt@
|
|
|
|
are required to detect that.
Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error
ok claudio@ henning@ krw@
|
|
if we allocate memory before applying constraints we get memory outside
the constraints allocated in the pool. this is bad.
ok claudio@
|
|
which contains the constraints for DMA/memory allocation for each
architecture, and dma_constraints which contains the range of addresses
that are dma accessable by the system.
This is based on ariane@'s physcontig diff, with lots of bugfixes and
additions the following additions by my self:
Introduce a new function pool_set_constraints() which sets the address
range for which we allocate pages for the pool from, this is now used
for the mbuf/mbuf cluster pools to keep them dma accessible.
The !direct archs no longer stuff pages into the kernel object in
uvm_km_getpage_pla but rather do a pmap_extract() in uvm_km_putpages.
Tested heavily by my self on i386, amd64 and sparc64. Some tests on
alpha and SGI.
"commit it" beck, art, oga, deraadt
"i like the diff" deraadt
|
|
also gets a bit of a KNF scrubbing at claudio@'s insistence. Shaves some
bytes from the kernel as well.
tested by phessler@ and zinovnik@, thanks
ok claudio@
|
|
from Brad Tilley <brad at 16systems dot com>;
ok oga@
|
|
ok henning
|
|
with m_tag_copy_chain() failures.
Use m_defrag() to eliminate hand rolled defragging of mbufs and
some uses of M_DUP_PKTHDR().
Original diff from thib@, claudio@'s feedback integrated by me.
Tests kevlo@ claudio@, "reads ok" blambert@
ok thib@ claudio@, "m_defrag() bits ok" kettenis@
|
|
struct to 0/NULL. no performance impact but way less error prone on
addition of new pkthdr field (as just ran into with a theo diff). ok theo
|
|
running out of mbufs for rx rings.
if the system low watermark is lower than a rx rings low watermark,
we'll never send a packet up the stack, we'll always recycle it.
found by thib@ on a bge
sadface
|
|
to free some for use on the rx rings on network cards.
this modifies m_cluncount to advise callers when we're in such a
situation, and makes them responsible for freeing up the cluster
for allocation by MCLGETI later.
fixes an awesome lockup with sis(4) henning has been experiencing.
this is not the best fix, but it is better than the current situation.
yep deraadt@ tested by henning@
|
|
ok dlg thib
|
|
to the per-ipf mbuf cluster reference counters
ok dlg claudio
|
|
|
|
the chain
ok henning
|
|
the most common operation is checking for a particular tag to be there.
in the majority of the cases it is not.
introduce a "tagsset" in the mbuf packet header which has a bit for
each mbuf tag type that is in the chain set, checking for its existance
is now as easy and cheap as (tagsset & type) != 0. theo ok
|
|
this lets m_freem() only do one splnet/splx instead of repeating this all
the way down a chain
ok henning claudio dlg
|
|
|
|
reducing the amount of splnet/splx dancing required.. especially in the
worst case (of m_cldrop)
ok dlg kettenis damien
|
|
addition of rdomain to struct pkthdr.
"Doh!" claudio@
ok henning@
|
|
alternate routing table and separate them from other interfaces in distinct
routing tables. The same network can now be used in any doamin at the same
time without causing conflicts.
This diff is mostly mechanical and adds the necessary rdomain checks accross
net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6.
input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
|
|
calling M_PREPEND is now #define'd to be calling m_prepend.
Shaves an unknown but assumed-to-be-nontrivial amount from the kernel.
ok claudio@ henning@(who may have had to okay this twice to get me to notice)
|
|
the panic string.
|
|
did not care either and with this packets from drivers with external buffers
(e.g. wpi(4)) would trigger this panic through pf(4).
Found the hard way by Tim van der Molen tbvdm (at) xs4all (dot) nl
|
|
(M_TRAILINGSPACE()) and allocate one cluster if needed (instead of chaining
many mbufs). Somewhat needed for the rl(4) fix to ensure that the ethernet
header is in one mbuf for sure. Tested by landry@ and myself
|