]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoFill in some more Rockridge details in ISO9660 support: Ignore PD
Tim Kientzle [Sat, 12 Feb 2005 22:48:38 +0000 (22:48 +0000)]
Fill in some more Rockridge details in ISO9660 support: Ignore PD
(padding) entries, extract inode value from PX entry, recognize SP and
ST (start/end of SUSP extensions).

I don't enforce SP yet, as I've seen CDROMs which use Rockridge
extensions but don't have the SP record (which is officially
required).

The ISO9660 support is now mature enough to extract FreeBSD
distribution CDROMs created with mkisofs.

19 years agoFlush input when reading from pipe to avoid "broken pipe" warnings.
Tim Kientzle [Sat, 12 Feb 2005 22:44:50 +0000 (22:44 +0000)]
Flush input when reading from pipe to avoid "broken pipe" warnings.
For example, when using 'gunzip | tar' to decompress.
Also, fix some style issues (write null character as '\0').

Thanks to: Jaakko Heinonen

19 years ago- Fixed description of the "destroy" command options.
Ruslan Ermilov [Sat, 12 Feb 2005 21:47:05 +0000 (21:47 +0000)]
- Fixed description of the "destroy" command options.
- Document the "nuke" command.
- Mention which commands correspond to which functions.

19 years agoAdd ibcntl as alias for ibcnt
Poul-Henning Kamp [Sat, 12 Feb 2005 21:07:09 +0000 (21:07 +0000)]
Add ibcntl as alias for ibcnt
Add ibsta and start to use it.
Rename the argument structure more sensibly.
Improve timeout and error handling

19 years agoAlso build the netblast sub-directory, not just netreceive and netsend.
Robert Watson [Sat, 12 Feb 2005 20:04:23 +0000 (20:04 +0000)]
Also build the netblast sub-directory, not just netreceive and netsend.

MFC after: 3 days

19 years agoMark the signum argument to signal_handler() as __unused.
Robert Watson [Sat, 12 Feb 2005 20:03:30 +0000 (20:03 +0000)]
Mark the signum argument to signal_handler() as __unused.

MFC after: 3 days

19 years agoRestore previous cookie. Old programs will work with new node OK,
Gleb Smirnoff [Sat, 12 Feb 2005 19:23:20 +0000 (19:23 +0000)]
Restore previous cookie. Old programs will work with new node OK,
new programs with old node wil receive EINVAL trying to access new
messages.

Submitted by: ru

19 years ago- bzero sockaddr_dl
Gleb Smirnoff [Sat, 12 Feb 2005 19:19:29 +0000 (19:19 +0000)]
- bzero sockaddr_dl
- use constant instead of number

Suggested by: ru

19 years agoBack out no longer necessary work-arounds added in rev. 1.59 for building
Marius Strobl [Sat, 12 Feb 2005 19:19:20 +0000 (19:19 +0000)]
Back out no longer necessary work-arounds added in rev. 1.59 for building
SBus-only kernels regarding ofw_machdep.c.

19 years ago- Re-write OF_decode_addr() with a bus-neutral approach, adding support
Marius Strobl [Sat, 12 Feb 2005 19:13:51 +0000 (19:13 +0000)]
- Re-write OF_decode_addr() with a bus-neutral approach, adding support
  for nodes hanging off of Central (untested), FireHose (untested) and
  PCI (tested) busses.
- Add an additional parameter to OF_decode_addr() which specifies the
  index of the register bank to decode.

These should allow to eventually add support for the Z8530 hanging off of
FireHose to uart(4) and to write support for PCI-based graphics adapters.

Suggested by: tmm (back in '03)

19 years agoMerge revision 1.5 from NetBSD: Fix a typo in a comment.
Marius Strobl [Sat, 12 Feb 2005 19:12:17 +0000 (19:12 +0000)]
Merge revision 1.5 from NetBSD: Fix a typo in a comment.
NetBSD rev. 1.4 (addition of the OFW_PCI_PHYS_HI_BUS macro) had already
been merged prior to adding this file to FreeBSD (with the 1.3 tag though).

19 years agoFix typo in a comment.
Ruslan Ermilov [Sat, 12 Feb 2005 18:10:26 +0000 (18:10 +0000)]
Fix typo in a comment.

19 years agoAdd to CFLAGS.
Ruslan Ermilov [Sat, 12 Feb 2005 18:09:20 +0000 (18:09 +0000)]
Add to CFLAGS.

19 years agoValidate ifc->ifc_len before submitting its incarnation to sbuf_new,
Xin LI [Sat, 12 Feb 2005 17:51:12 +0000 (17:51 +0000)]
Validate ifc->ifc_len before submitting its incarnation to sbuf_new,
which will finally lead to kernel panic.

Security: This prevents a local (root-launched) DoS
Submitted by: Wojciech A. Koszek [dunstan at freebsd czest pl]
PR: 77421
MFC After: 1 week

19 years agoSplit the ibfoo API into its own file.
Poul-Henning Kamp [Sat, 12 Feb 2005 17:39:50 +0000 (17:39 +0000)]
Split the ibfoo API into its own file.
Implement ibdma() (only affects ibrd() mode)
Implement ibeot()

19 years agoConnect ng_source(4) to the build.
Ruslan Ermilov [Sat, 12 Feb 2005 17:04:21 +0000 (17:04 +0000)]
Connect ng_source(4) to the build.

19 years agoFallout from the ALTQ import.
Ruslan Ermilov [Sat, 12 Feb 2005 17:03:01 +0000 (17:03 +0000)]
Fallout from the ALTQ import.

19 years agoImprove the mining of MAC address from the card:
Warner Losh [Sat, 12 Feb 2005 16:44:15 +0000 (16:44 +0000)]
Improve the mining of MAC address from the card:
o Add a fallback location for the MAC address.  Most of the early ne2000
  PC Cards were built from the same parts, so most of them have the same
  address in the CIS to grab the MAC from.  Use this address as our
  fallback if we don't find anything better.
o Add printf, in bootverbose, noting the MAC addresses that we find along
  the way.

# Better sanity checking of the MAC address is needed.  Will have to
# investigate using/creating a centralized function to do this as a number
# of other PC Card drivers each have their own ad-hoc tests.

19 years agoAllocate enough space for new tag.
Gleb Smirnoff [Sat, 12 Feb 2005 16:26:36 +0000 (16:26 +0000)]
Allocate enough space for new tag.

Pointy hat to: glebius

19 years agoFix typo. We want to unlock mutex here.
Pawel Jakub Dawidek [Sat, 12 Feb 2005 16:19:03 +0000 (16:19 +0000)]
Fix typo. We want to unlock mutex here.

Submitted by: Andreas Kohn <andreas.kohn@gmail.com>
MFC after: 1 week

19 years agoFix prototype for ibeot()
Poul-Henning Kamp [Sat, 12 Feb 2005 15:49:50 +0000 (15:49 +0000)]
Fix prototype for ibeot()

19 years agoUse the eot argument field for ibeot().
Poul-Henning Kamp [Sat, 12 Feb 2005 15:49:20 +0000 (15:49 +0000)]
Use the eot argument field for ibeot().

19 years agoWhen netgraph(4) was converted to use mbuf_tags(9) instead of meta-data
Gleb Smirnoff [Sat, 12 Feb 2005 14:54:19 +0000 (14:54 +0000)]
When netgraph(4) was converted to use mbuf_tags(9) instead of meta-data
a definite setup was broken: two ng_ksockets are connected to each other,
connect()ed to different remote hosts, and bind()ed to different local
interfaces. In this case one ng_ksocket is fooled with tag from the other
one.

Put node id into tag. In rcvdata method utilize tag only if it has our
own id inside or id equals zero. The latter case is added to support
packets send by some third, not ng_ksocket node.

MFC after: 1 week

19 years agoBump __FreeBSD_version for removal of matherr() from libm. (matherr()
David Schultz [Sat, 12 Feb 2005 13:19:11 +0000 (13:19 +0000)]
Bump __FreeBSD_version for removal of matherr() from libm.  (matherr()
went out of fashion when the third edition of SVID de-supported it
nearly 20 years ago, and it has never actually worked in FreeBSD.)

19 years agoConnect ng_atmllc(4) to the build.
Ruslan Ermilov [Sat, 12 Feb 2005 12:49:32 +0000 (12:49 +0000)]
Connect ng_atmllc(4) to the build.

19 years agoDon't export symbols, all netgraph modules appear to have
Ruslan Ermilov [Sat, 12 Feb 2005 12:42:54 +0000 (12:42 +0000)]
Don't export symbols, all netgraph modules appear to have
proper module dependencies.

While here, removed stray -Wall from CFLAGS.

19 years agoBitrot: the ethernet parse type is long standard.
Ruslan Ermilov [Sat, 12 Feb 2005 12:35:56 +0000 (12:35 +0000)]
Bitrot: the ethernet parse type is long standard.

19 years agoTwo problems here:
Ruslan Ermilov [Sat, 12 Feb 2005 12:04:10 +0000 (12:04 +0000)]
Two problems here:

1.  Dependency on netgraph module was broken (wrong version).
2.  Netgraph node type was never destroyed on unload.  This
    was masked by problem #1.

Fixed both by using NETGRAPH_INIT().  Now netgraph node type
is created on module load, as in the rest of netgraph modules.

19 years agoDocument multicast membership control messages.
Gleb Smirnoff [Sat, 12 Feb 2005 11:52:14 +0000 (11:52 +0000)]
Document multicast membership control messages.

19 years agoAdd two new netgraph messages NGM_ETHER_ADD_MULTI and NGM_ETHER_DEL_MULTI,
Gleb Smirnoff [Sat, 12 Feb 2005 11:41:32 +0000 (11:41 +0000)]
Add two new netgraph messages NGM_ETHER_ADD_MULTI and NGM_ETHER_DEL_MULTI,
to join and leave Ethernet multicast membership, respectively. Messages
take MAC address as argument.

Sponsored by: Rinet ISP

19 years agoRemoved redundant MODULE_VERSION().
Ruslan Ermilov [Sat, 12 Feb 2005 11:14:25 +0000 (11:14 +0000)]
Removed redundant MODULE_VERSION().

19 years agoMake netgraph ISR and callout MPSAFE.
Gleb Smirnoff [Sat, 12 Feb 2005 09:52:36 +0000 (09:52 +0000)]
Make netgraph ISR and callout MPSAFE.

Reviewed by: rwatson, ru

19 years agoFix comparisons that test if an unsigned value is < 0.
Stefan Farfeleder [Sat, 12 Feb 2005 08:45:12 +0000 (08:45 +0000)]
Fix comparisons that test if an unsigned value is < 0.

Reviewed by: tjr

19 years agoAdd comment about MAC mining
Warner Losh [Sat, 12 Feb 2005 08:27:46 +0000 (08:27 +0000)]
Add comment about MAC mining

19 years agoRemove a shadow declaration of 'error' that caused certain tests to be
Scott Long [Sat, 12 Feb 2005 04:51:19 +0000 (04:51 +0000)]
Remove a shadow declaration of 'error' that caused certain tests to be
pointless.

Submitted by: Coverity Prevent analysis tool

19 years agoAdd lock assertion.
Alan Cox [Sat, 12 Feb 2005 03:48:54 +0000 (03:48 +0000)]
Add lock assertion.

Tested by: jhb

19 years agoAdd much needed descriptions for a number of the IPC related sysctl OIDs.
Christian S.J. Peron [Sat, 12 Feb 2005 01:22:39 +0000 (01:22 +0000)]
Add much needed descriptions for a number of the IPC related sysctl OIDs.
This information will be very useful for people who are tuning applications
which have a dependence on IPC mechanisms.

The following OIDs were documented:

Message queues:
 kern.ipc.msgmax
 kern.ipc.msgmni
 kern.ipc.msgmnb
 kern.ipc.msgtlq
 kern.ipc.msgssz
 kern.ipc.msgseg

Semaphores:
 kern.ipc.semmap
 kern.ipc.semmni
 kern.ipc.semmns
 kern.ipc.semmnu
 kern.ipc.semmsl
 kern.ipc.semopm
 kern.ipc.semume
 kern.ipc.semusz
 kern.ipc.semvmx
 kern.ipc.semaem

Shared memory:
 kern.ipc.shmmax
 kern.ipc.shmmin
 kern.ipc.shmmni
 kern.ipc.shmseg
 kern.ipc.shmall
 kern.ipc.shm_use_phys
 kern.ipc.shm_allow_removed
 kern.ipc.shmsegs

These new descriptions can be viewed using sysctl -d

PR: kern/65219
Submitted by: Dan Nelson <dnelson at allantgroup dot com> (modified)
No objections: developers@
Descriptions reviewed by: gnn
MFC after: 1 week

19 years agoBumped up the driver version, following recent changes.
Vinod Kashyap [Sat, 12 Feb 2005 01:16:28 +0000 (01:16 +0000)]
Bumped up the driver version, following recent changes.

19 years agoReally old PCMCIA cards stored the MAC address in the attribute memory
Warner Losh [Sat, 12 Feb 2005 00:45:22 +0000 (00:45 +0000)]
Really old PCMCIA cards stored the MAC address in the attribute memory
at some offset.  Unlike newer cards, the MAC address wasn't part of
the CIS as a specific FUNCE.  These older cards were having their MAC
address show up as 0:2:4:6:8:a because that's what's in the ROM
locations that would be there in a real ne2000.

This patch allows one to specify the offset for the MAC address for
these cards.  Specify one for the IBM Ethernet II card, as it is one
that has this problem.  One shouldn't specify this unless the MAC
address really isn't in the CIS at all.

Side note: The novell probe likely shouldn't read the MAC address, and
that should be moved to the bus specific attach routine(s), maybe as a
convenience function in if_ed_novell.c.

My IBM Ethernet II (aka Info Mover) now has a believable MAC address.

19 years agoNo one cares about when the manpage first appeared. Mention when the driver
Christian Brueffer [Sat, 12 Feb 2005 00:42:14 +0000 (00:42 +0000)]
No one cares about when the manpage first appeared.  Mention when the driver
appeared instead.

MFC after: 3 days

19 years agostyle: fix indentation and spacing.
Gleb Smirnoff [Fri, 11 Feb 2005 23:17:50 +0000 (23:17 +0000)]
style: fix indentation and spacing.

Submitted by: ru

19 years agoDo not trust ipfw: check m_len always, not only after m_dup.
Gleb Smirnoff [Fri, 11 Feb 2005 23:07:22 +0000 (23:07 +0000)]
Do not trust ipfw: check m_len always, not only after m_dup.

Submitted by: ru

19 years ago- do m_pullup() after m_dup()
Gleb Smirnoff [Fri, 11 Feb 2005 22:28:58 +0000 (22:28 +0000)]
- do m_pullup() after m_dup()
- clean style in previous commit

Suggested by: ru

19 years agoMake sure the last command byte makes it onto the wire.
Poul-Henning Kamp [Fri, 11 Feb 2005 22:24:02 +0000 (22:24 +0000)]
Make sure the last command byte makes it onto the wire.

19 years agopullup to sizeof struct ip before sending to ip_output.
Gleb Smirnoff [Fri, 11 Feb 2005 21:26:39 +0000 (21:26 +0000)]
pullup to sizeof struct ip before sending to ip_output.

Suggested by: ru

19 years agoDon't read more than the given 'len' bytes from the 'big' string.
Pawel Jakub Dawidek [Fri, 11 Feb 2005 21:07:51 +0000 (21:07 +0000)]
Don't read more than the given 'len' bytes from the 'big' string.

PR: misc/77369
Submitted by: Ed Maste <emaste@phaedrus.sandvine.ca>
MFC after: 1 week

19 years agoFurther embellish rev. 1.180: protect against -fno-strict-aliasing
Ruslan Ermilov [Fri, 11 Feb 2005 21:04:20 +0000 (21:04 +0000)]
Further embellish rev. 1.180: protect against -fno-strict-aliasing
being already in CFLAGS (as is the case with "make buildkernel").

NB: rev. 1.180 is only needed due to a broken setting of CFLAGS in
tinderbox.

19 years agoPackets from ipfw come with IP header in host byte order. Netgraph works
Gleb Smirnoff [Fri, 11 Feb 2005 20:53:41 +0000 (20:53 +0000)]
Packets from ipfw come with IP header in host byte order. Netgraph works
with net byte order. Change byte order to net in ng_ipfw_input(), change
byte order to host before ip_output(), do not change before ip_input().

In collaboration with: ru

19 years agoStylistic fixes: push variable into a local context (this part is going
Hartmut Brandt [Fri, 11 Feb 2005 17:03:18 +0000 (17:03 +0000)]
Stylistic fixes: push variable into a local context (this part is going
to be split out into a function soon). Also there is no need to write
back the colon that we have NUL-ed - the string is going to be freed
anyway.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agosysctl node vm.stats can not be static (for ia64 reasons).
Poul-Henning Kamp [Fri, 11 Feb 2005 16:34:14 +0000 (16:34 +0000)]
sysctl node vm.stats can not be static (for ia64 reasons).

19 years agoAdd a bit more caveat text about MUTEX_PROFILING -- try to avoid using it
Robert Watson [Fri, 11 Feb 2005 15:17:57 +0000 (15:17 +0000)]
Add a bit more caveat text about MUTEX_PROFILING -- try to avoid using it
with other profiling and debugging options, such as INVARIANTS, WITNESS,
kernel profiling, etc.  They all interfere with each other nastily and
will generate fairly useless results.

19 years agoAdd SIGTHR (32) into list of signals permitted to be delivered to the
Maxim Sobolev [Fri, 11 Feb 2005 14:02:42 +0000 (14:02 +0000)]
Add SIGTHR (32) into list of signals permitted to be delivered to the
suid application. The problem is that Linux applications using old Linux
threads (pre-NPTL) use signal 32 (linux SIGRTMIN) for communication between
thread-processes. If such an linux application is installed suid or sgid
and security.bsd.conservative_signals=1 (default), then permission will be
denied to send such a signal and the application will freeze.

I believe the same will be true for native applications that use libthr,
since libthr uses SIGTHR for implementing conditional variables.

PR: 72922
Submitted by: Andriy Gapon <avg@icyb.net.ua>
MFC after: 2 weeks

19 years agoSemctl with IPC_STAT command should return zero in case of success.
Maxim Sobolev [Fri, 11 Feb 2005 13:46:55 +0000 (13:46 +0000)]
Semctl with IPC_STAT command should return zero in case of success.

PR: 73778
Submitted by: Andriy Gapon <avg@icyb.net.ua>
MFC after: 2 weeks

19 years agoConvert several instances of negative logic to positive logic.
Hartmut Brandt [Fri, 11 Feb 2005 10:49:01 +0000 (10:49 +0000)]
Convert several instances of negative logic to positive logic.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoMake non-SOFTUPDATES kernels compile again.
Poul-Henning Kamp [Fri, 11 Feb 2005 08:13:31 +0000 (08:13 +0000)]
Make non-SOFTUPDATES kernels compile again.

Integrate the stubfile into the main file now that license issues have been
long resolved.

19 years agoDiff reduction with p4.
Warner Losh [Fri, 11 Feb 2005 07:50:03 +0000 (07:50 +0000)]
Diff reduction with p4.

19 years agoExpand BSS.
David E. O'Brien [Fri, 11 Feb 2005 07:37:25 +0000 (07:37 +0000)]
Expand BSS.

19 years agoImprove EOS handling.
Poul-Henning Kamp [Fri, 11 Feb 2005 06:57:02 +0000 (06:57 +0000)]
Improve EOS handling.

19 years agoEliminate the ED_VENDOR_{PCCARD,LINKSYS} types. These cards really
Warner Losh [Fri, 11 Feb 2005 06:02:27 +0000 (06:02 +0000)]
Eliminate the ED_VENDOR_{PCCARD,LINKSYS} types.  These cards really
are NOVELL NE2000 with just a tiny quirk that's non vendor specific.
Instead, use the chip_type of DL100XX instead.  This is more inline
with how the AX88190 support was added, and seems a little cleaner.

19 years agoSkip PNP probes. If there are isapnp or pnpbios instances of this driver,
Warner Losh [Fri, 11 Feb 2005 03:56:13 +0000 (03:56 +0000)]
Skip PNP probes.  If there are isapnp or pnpbios instances of this driver,
then we can support them later.  This keeps the pbio probe from claiming
lots of otherwise unused pnpbios devices on my laptop.

19 years agoFix build error (s/wd80x3.c/if_ed_wd80x3.c/).
Yoshihiro Takahashi [Fri, 11 Feb 2005 03:44:03 +0000 (03:44 +0000)]
Fix build error (s/wd80x3.c/if_ed_wd80x3.c/).

19 years agoMerged from sys/dev/sio/sio.c revision 1.458.
Yoshihiro Takahashi [Fri, 11 Feb 2005 03:41:34 +0000 (03:41 +0000)]
Merged from sys/dev/sio/sio.c revision 1.458.

19 years agoMerge in patch to support AP scanning via ifconfig and the new
Bill Paul [Fri, 11 Feb 2005 02:13:12 +0000 (02:13 +0000)]
Merge in patch to support AP scanning via ifconfig and the new
net80211 API.

Submitted by: Stephane E. Potvin sepotvin at videotron dot ca

19 years agoAdjust TX threshold on every TX underrun. Some supported cards (8139-based)
Max Laier [Fri, 11 Feb 2005 01:05:52 +0000 (01:05 +0000)]
Adjust TX threshold on every TX underrun.  Some supported cards (8139-based)
can retransmit on TX underrun and set TOK in addition to TUND.  Also add a
check to prevent overflow of the addressable threshold.

This fixes some reports of rl(4) slowness, believed to be related to ALTQ
before.

PR: kern/61448
Submitted by: Tim Draegen-Gilman <timNOeudaemonSPAMnet> (with changes)
MFC after: 1 week

19 years agoWhen processing a timeout() callout and returning it to the free
Ian Dowse [Fri, 11 Feb 2005 00:14:00 +0000 (00:14 +0000)]
When processing a timeout() callout and returning it to the free
list, set `curr_callout' to NULL. This ensures that we won't attempt
to cancel the current callout if the original callout structure
gets recycled while we wait to acquire Giant.

This is reported to fix an intermittent syscons problem that was
introduced by revision 1.96.

19 years agoMove enable/disable 16bit access routines into if_ed. Slightly
Warner Losh [Thu, 10 Feb 2005 23:48:13 +0000 (23:48 +0000)]
Move enable/disable 16bit access routines into if_ed.  Slightly
pessmize the error recover path through edintr by calling these
functions, rather than expanding it inline.  This error path already
does a lot in it, so an extra function call will be lost in the noise.
It also happens rarely.

19 years agouse
Warner Losh [Thu, 10 Feb 2005 23:31:27 +0000 (23:31 +0000)]
use
while (complicated-expr)
continune;
in preference to
while (complicated-expr);

since the code generated is identical, and the former is easier to read,
especially for complicated-expr that reach to the end of the line...

19 years agoRemove lots of tab/space errors introduced by massive cut-n-paste action.
Julian Elischer [Thu, 10 Feb 2005 22:38:51 +0000 (22:38 +0000)]
Remove lots of tab/space errors introduced by massive cut-n-paste action.

Noticed from: diffs of the last commit.
MFC after: 1 week

19 years agoImplement support for buffers larger than PAGE_SIZE in MemGuard. Adds
Bosko Milekic [Thu, 10 Feb 2005 22:36:05 +0000 (22:36 +0000)]
Implement support for buffers larger than PAGE_SIZE in MemGuard.  Adds
a little bit of complexity but performance requirements lacking (this is
a debugging allocator after all), it's really not too bad (still
only 317 lines).

Also add an additional check to help catch really weird 3-threads-involved
races: make memguard_free() write to the first page handed back, always,
before it does anything else.

Note that there is still a problem in VM+PMAP (specifically with
vm_map_protect) w.r.t. MemGuard uses it, but this will be fixed shortly
and this change stands on its own.

19 years agoTake into account that Pinnacle screwed up their PCI ID in the beginning..
Julian Elischer [Thu, 10 Feb 2005 22:26:28 +0000 (22:26 +0000)]
Take into account that Pinnacle screwed up their PCI ID in the beginning..
Older cards have it reversed.
Also, use some already defined values instead of magic numbers.

PR:  73324
Submitted by: arne_woerner@yahoo.com
MFC after: 1 week

19 years agoOptimize the way reference counting is performed with Mbufs. We
Bosko Milekic [Thu, 10 Feb 2005 22:23:02 +0000 (22:23 +0000)]
Optimize the way reference counting is performed with Mbufs.  We
do not need to perform an extra memory fetch in the Packet (Mbuf+Cluster)
constructor to initialize the reference counter anymore.  The reference
counts are located in a separate memory region (in the slab header,
because this zone is UMA_ZONE_REFCNT), so the memory fetch resulted very
often in a cache miss.  Additionally, and perhaps more significantly,
optimize the free mbuf+cluster (packet) case, which is very common, to
no longer require an atomic operation on free (to verify the reference
counter) if the reference on the cluster has never been increased (also
very common).  Reduces an atomic on mbuf free on average.

Original patch submitted by: Gerrit Nagelhout <gnagelhout@sandvine.com>

19 years agobump the Makefile config versions now that config is 600001...
John-Mark Gurney [Thu, 10 Feb 2005 21:15:31 +0000 (21:15 +0000)]
bump the Makefile config versions now that config is 600001...

Forgotten by: des

19 years agoAdd strspn() to libkern.
Gleb Smirnoff [Thu, 10 Feb 2005 20:39:39 +0000 (20:39 +0000)]
Add strspn() to libkern.

Ok'ed by: rwatson

19 years agoDeclare "cnt" (a number of bytes to read or write) as an "ssize_t", not
Colin Percival [Thu, 10 Feb 2005 20:19:17 +0000 (20:19 +0000)]
Declare "cnt" (a number of bytes to read or write) as an "ssize_t", not
as a "long" in dofileread() and dofilewrite().

Discussed with: jhb

19 years agoread(), pread(), write(), and pwrite() return EINVAL if they are asked
Colin Percival [Thu, 10 Feb 2005 20:09:01 +0000 (20:09 +0000)]
read(), pread(), write(), and pwrite() return EINVAL if they are asked
for more than INT_MAX bytes.

19 years ago1. Revert back to the way the older driver handled XPT_PATH_INQ. This seems to
Vinod Kashyap [Thu, 10 Feb 2005 18:07:33 +0000 (18:07 +0000)]
1. Revert back to the way the older driver handled XPT_PATH_INQ.  This seems to
   fix the problem with device discovery seen by some people.
2. Change to make 3ware CLI/3DM work on amd64.
3. Fix a potential problem that could cause the driver to do strlen(NULL) when
   using older firmware.

Reviewed by:scottl

19 years agoBuffers are already NUL-terminated so there is no need to explicitely add
Hartmut Brandt [Thu, 10 Feb 2005 17:01:46 +0000 (17:01 +0000)]
Buffers are already NUL-terminated so there is no need to explicitely add
a NULL.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agorev 1.19 fixed wpa supplicant but broke wpa authenticator; when operating
Sam Leffler [Thu, 10 Feb 2005 17:00:48 +0000 (17:00 +0000)]
rev 1.19 fixed wpa supplicant but broke wpa authenticator; when operating
as an authenticator need to always check for the unicast key in the node
(as was the case before)

Submitted by: Divy Le Ray

19 years agoMostly stylistic nits in preparation for splitting up Var_Parse:
Hartmut Brandt [Thu, 10 Feb 2005 17:00:16 +0000 (17:00 +0000)]
Mostly stylistic nits in preparation for splitting up Var_Parse:
use a more consistent style with regard to *str and str[0];
simplify code by introducing a temporary variable;
shift a break around and add braces where appropriate.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agopropagate state kept in the bss node when re-creating the node
Sam Leffler [Thu, 10 Feb 2005 16:59:04 +0000 (16:59 +0000)]
propagate state kept in the bss node when re-creating the node
on state transitions; this is a stopgap measure, need to rethink
how we do management of this state

Identified by: Divy Le Ray

19 years agoFixed usage().
Ruslan Ermilov [Thu, 10 Feb 2005 16:07:23 +0000 (16:07 +0000)]
Fixed usage().

19 years agoRequire at least one argument.
Ruslan Ermilov [Thu, 10 Feb 2005 16:04:22 +0000 (16:04 +0000)]
Require at least one argument.

19 years agoBump the version number for the addition of devices / nodevices.
Dag-Erling Smørgrav [Thu, 10 Feb 2005 15:16:25 +0000 (15:16 +0000)]
Bump the version number for the addition of devices / nodevices.

19 years agoLet the buffer just use the default size by specifying 0 as the size
Hartmut Brandt [Thu, 10 Feb 2005 14:53:29 +0000 (14:53 +0000)]
Let the buffer just use the default size by specifying 0 as the size
instead of specifying the default size explicitely.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoMark the modification of the input string (which should really be const)
Hartmut Brandt [Thu, 10 Feb 2005 14:52:14 +0000 (14:52 +0000)]
Mark the modification of the input string (which should really be const)
with a comment.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoStyle nits:
Hartmut Brandt [Thu, 10 Feb 2005 14:50:34 +0000 (14:50 +0000)]
Style nits:
Move some assignments nearer to where they actually used. Convert a loop
from a for() to a while() to make it clearer and add braces to the long
body of it. Split assignment from variable declaration.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoSync program's usage() with manpage's SYNOPSIS.
Ruslan Ermilov [Thu, 10 Feb 2005 14:47:06 +0000 (14:47 +0000)]
Sync program's usage() with manpage's SYNOPSIS.

19 years agoDescribe a pre-condition of Var_Parse().
Hartmut Brandt [Thu, 10 Feb 2005 14:43:22 +0000 (14:43 +0000)]
Describe a pre-condition of Var_Parse().

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoRemove a comment that's not actual anymore.
Hartmut Brandt [Thu, 10 Feb 2005 14:41:22 +0000 (14:41 +0000)]
Remove a comment that's not actual anymore.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoFix spacing by converting mixes of space and tab to tab. Also add a number
Hartmut Brandt [Thu, 10 Feb 2005 14:39:05 +0000 (14:39 +0000)]
Fix spacing by converting mixes of space and tab to tab. Also add a number
of empty lines in appropriate places.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoInitialise the status variable. W_SETTERMSIG uses its value.
Hartmut Brandt [Thu, 10 Feb 2005 14:32:14 +0000 (14:32 +0000)]
Initialise the status variable. W_SETTERMSIG uses its value.

Submitted by: stefanf

19 years agoFully document (no)?(device|option)s?.
Dag-Erling Smørgrav [Thu, 10 Feb 2005 14:26:21 +0000 (14:26 +0000)]
Fully document (no)?(device|option)s?.

This page should probably be repocopied to src/usr.sbin/config/.

19 years agoLst_Append returns void, so the other case of the ? statement
Hartmut Brandt [Thu, 10 Feb 2005 14:25:12 +0000 (14:25 +0000)]
Lst_Append returns void, so the other case of the ? statement
should also be void.

Submitted by: stefanf

19 years agoUpdate a little bit.
Poul-Henning Kamp [Thu, 10 Feb 2005 12:47:55 +0000 (12:47 +0000)]
Update a little bit.

19 years agoFull modernize cleanup:
Xin LI [Thu, 10 Feb 2005 12:43:16 +0000 (12:43 +0000)]
Full modernize cleanup:
- De-__P()
- constify where appropriate
- ANSI functions instead of K&R

Pointed out by: stefanf

19 years agoMake various vnode related functions static
Poul-Henning Kamp [Thu, 10 Feb 2005 12:28:58 +0000 (12:28 +0000)]
Make various vnode related functions static

19 years agoMake some file/filedesc related functions static
Poul-Henning Kamp [Thu, 10 Feb 2005 12:27:58 +0000 (12:27 +0000)]
Make some file/filedesc related functions static

19 years agoMake M_NETGRAPH_ETF static
Poul-Henning Kamp [Thu, 10 Feb 2005 12:26:57 +0000 (12:26 +0000)]
Make M_NETGRAPH_ETF static

19 years agoMake various mountpoint related functions static.
Poul-Henning Kamp [Thu, 10 Feb 2005 12:25:38 +0000 (12:25 +0000)]
Make various mountpoint related functions static.

19 years agoMake a SYSCTL_NODE static
Poul-Henning Kamp [Thu, 10 Feb 2005 12:23:29 +0000 (12:23 +0000)]
Make a SYSCTL_NODE static