mav [Mon, 25 Aug 2008 22:26:46 +0000 (22:26 +0000)]
MFC r180943
Don't use memcpy() to copy several bytes.
Store IDs is host order. It is not so important to bloat code for it.
Combine m_adj() and M_PREPEND() into single M_PREPEND().
mav [Mon, 25 Aug 2008 21:46:45 +0000 (21:46 +0000)]
MFC r180828
Add hash table lookup for a fully connected raw sockets.
This gives significant performance improvements when many raw sockets used.
Benchmarks of mpd handeling 1000 simultaneous PPTP connections show up to 50%
performance boost. With higher number of connections benefit becomes even
bigger. PopTop snd others should also get some benefits.
MFC r180833, r180874
According to in_pcb.h protocol binding information has double locking.
It allows access it while list travercing holding only global pcbinfo lock.
This relaxed locking noticably increses receive socket lookup performance.
mav [Mon, 25 Aug 2008 21:19:36 +0000 (21:19 +0000)]
MFC r180836
Increase UDBHASHSIZE from 16 to 128 items.
Previous value was chosen 10 years ago and not very effective now.
This change gives several percents speedup on 1000 L2TP mpd links.
jkim [Mon, 25 Aug 2008 19:06:02 +0000 (19:06 +0000)]
MFC: Sync. BPF JIT compiler with HEAD.
- r179967, r179968, r179977, r179978:
Rehash and clean up BPF JIT compiler macros to emit opcodes closer
to GNU as(1) generated codes and micro-optimize.
- r181644, r181645:
Replace number of stack usages with registers. Note amd64 version
does not use stack any more because it has more registers.
- r181697:
Remove unnecessary jump instructions of zero offsets.
- r181700, r181848, r181853:
Correctly check unsignedness of all registers used for load instructions
with (in)direct offsets and sync. with sys/net/bpf_filter.c
- r181648, r181649, 181846:
Update copyrights, fix style(9) nits, remove unused macros, and make
JIT compilers compilable on user land.
kensmith [Mon, 25 Aug 2008 17:33:43 +0000 (17:33 +0000)]
We're less than a week from code freeze for the 7.1-REL release cycle.
Start calling RELENG_7 "7.1-PRERELEASE" now to warn people that we're
nearing code freeze so things might get a bit bumpy.
kientzle [Mon, 25 Aug 2008 01:55:40 +0000 (01:55 +0000)]
MFC r181542,r181555: Minor test suite fixup so that the test suite
works against the libarchive 1.x API. Not needed by 7-STABLE, but
it's nice to minimize the differences between 7-STABLE and CURRENT.
philip [Fri, 22 Aug 2008 08:09:13 +0000 (08:09 +0000)]
MFC r181753:
Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting
to 1. This can be used to disable the 80pin cable check on systems which
forget to set the bit -- such as certain laptops and Soekris boards.
thompsa [Fri, 22 Aug 2008 03:08:31 +0000 (03:08 +0000)]
MFC r174150, r174240, r179009, r179720
Sync sys/compat/ndis to HEAD.
- Correct the calculation for the number of 100ns intervals since January 1,
1601. The 1601 - 1970 period was in seconds rather than 100ns units.
- Remove duplication by having NdisGetCurrentSystemTime call ntoskrnl_time.
- Implement functions required by some ndis drivers.
- Fix a panic when it occurred during initializing the ndis driver because it
try to read network address through ifnet structure which is NULL until the
ndis driver's initialization is finished.
- fix a page fault that it occurred during ifp is NULL. This bug happens when
NDIS driver's initialization is failed and NDIS driver's trying to call
NdisWriteErrorLogEntry().
weongyo [Thu, 21 Aug 2008 05:40:38 +0000 (05:40 +0000)]
MFC r180754
when NDIS framework try to query/set informations NDIS drivers can
return NDIS_STATUS_PENDING. In this case, it's waiting for 5 secs to
get the response from drivers now. However, some NDIS drivers can send
the response before NDIS framework gets ready to receive it so we might
always be blocked for 5 secs in current implementation. NDIS framework
should reset the event before calling NDIS driver's callback not after.
weongyo [Thu, 21 Aug 2008 05:30:26 +0000 (05:30 +0000)]
MFC r179855
handle .INF files for PCMCIA correctly that specify multiple entries in
their [Manufacturer] sections and prevent a case that NDIS_PCI_DEV_TABLE
definition was always emitted that it's only emitted once if a .INF file
is for PCI.
weongyo [Thu, 21 Aug 2008 05:13:55 +0000 (05:13 +0000)]
MFC r179423
Fix a panic that a priority value which is passed to cv_broadcastpri(9)
can be < 0. We don't ignore a `increment' argument but at least we keep
a priority value of NDIS threads over PRI_MIN_KERN.
yongari [Thu, 21 Aug 2008 02:03:01 +0000 (02:03 +0000)]
MFC r180950:
s/printf/device_printf/g
Don't hard code function name in device_printf() and use __func__.
While I'm here nuke bfe_unit in softc as it's not needed anymore.
jhb [Wed, 20 Aug 2008 18:33:09 +0000 (18:33 +0000)]
MFC: Attach the cpufreq child devices with specific orders to enforce
relative priority of some of the drivers that manage the same state (e.g.
ichss0 vs est0).
philip [Wed, 20 Aug 2008 11:33:13 +0000 (11:33 +0000)]
MFC r181467, r181593:
Add glxsb(4) driver for the Security Block in AMD Geode LX processors (as
found in Soekris hardware, for instance). The hardware supports
acceleration of AES-128-CBC accessible through crypto(4) and supplies
entropy to random(4).
yongari [Wed, 20 Aug 2008 05:19:41 +0000 (05:19 +0000)]
MFC r176264:
Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame.
o Removed unneeded jlist lock which was used to manage jumbo
buffers.
o Don't reinitialize hardware if MTU was not changed.
o Added additional check for minimal MTU size.
o Added a new tunable hw.skc.jumbo_disable to disable jumbo frame
support for the driver. The tunable could be set for systems that
do not need to use jumbo frames and it would save
(9K * number of Rx descriptors) bytes kernel memory.
o Jumbo buffer allocation failure is no longer critical error for
the operation of sk(4). If sk(4) encounter the allocation failure
it just disables jumbo frame support and continues to work without
user intervention.
With these changes jumbo frame performance of sk(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure. Previously sk(4) tried to allocate physically contiguous
memory, 3388KB for 256 Rx descriptors. Sometimes that amount of
contiguous memory region could not be available for running systems
which in turn resulted in failure of loading the driver.
yongari [Wed, 20 Aug 2008 05:12:30 +0000 (05:12 +0000)]
MFC r176859:
Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame. Also remove unneeded jlist lock which
is no longer required to protect jumbo buffers.
With these changes jumbo frame performance of nfe(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure anymore.
yongari [Wed, 20 Aug 2008 04:46:46 +0000 (04:46 +0000)]
MFC r181619:
Restore link state handling which was broken in rev 1.69.
Also report current link state while auto-negotiation is in
progress.
With this change link loss should be reported within a second
and drivers that rely on link state should work.
emaste [Tue, 19 Aug 2008 19:31:58 +0000 (19:31 +0000)]
Update locking table, based on changes in r173444:
- Have SPIN / want SPIN adds the "Recursion is defined per lock" footnote.
- Have sx / want Slp & have sx / want rw changed from no to ok.
kib [Tue, 19 Aug 2008 12:36:40 +0000 (12:36 +0000)]
MFC r179175:
Implement the per-open file data for the cdev.
The td_fpop member of the struct thread is appended to the end, and cleared
in the thread allocator to keep struct thread KBI-compatible on RELENG_7.
MFC r181635:
Remove unnecessary locking around pointer fetch.
kmacy [Tue, 19 Aug 2008 01:16:12 +0000 (01:16 +0000)]
In anticipation of MFCing physically contiguous jumbo frames MFC r177921:
Reintroduce UMA_SLAB_KMAP; however, change its spelling to
UMA_SLAB_KERNEL for consistency with its sibling UMA_SLAB_KMEM.
(UMA_SLAB_KMAP met its original demise in revision 1.30 of
vm/uma_core.c.) UMA_SLAB_KERNEL is now required by the jumbo frame
allocators. Without it, UMA cannot correctly return pages from the
jumbo frame zones to the VM system because it resets the pages' object
field to NULL instead of the kernel object. In more detail, the jumbo
frame zones are created with the option UMA_ZONE_REFCNT. This causes
UMA to overwrite the pages' object field with the address of the slab.
However, when UMA wants to release these pages, it doesn't know how to
restore the object field, so it sets it to NULL. This change teaches
UMA how to reset the object field to the kernel object.
Fix a regression introduced in r179289 splitting up ip6_savecontrol()
into v4-only vs. v6-only inp_flags processing.
When ip6_savecontrol_v4() is called from ip6_savecontrol() we
were not passing back the **mp thus the information will be missing
in userland.
Istead of going with a *** as suggested in the PR we are returning
**mp now and passing in the v4only flag as a pointer argument.
Introduce and use rwlocks throughout the inpcbinfo and inpcb infrastructure,
and protocols that depend on that infrastructure, including UDP, TCP, and
IP raw sockets. Significant parts of this work were reviewed by Bjoern Zeeb,
and tested by Paul Saab, Kris Keneway, and George Neville-Neil, whose
contributions to this work are greatly appreciated.
Tested by: ps, kris, gnn, Mike Tancsa <mike at sentex dot net>
Reviewed by: bz, des
sam [Mon, 18 Aug 2008 01:20:39 +0000 (01:20 +0000)]
MFC r179467
5416 and similar chips grew another region in the pci clock domain
where register accesses do not pass through the byte-lane hardware;
extend the register op macros to deal with this
yar [Sat, 16 Aug 2008 19:17:36 +0000 (19:17 +0000)]
MFC r173217,176789,176792-176793,176839,176842
Don't forget to set MAKEFLAGS in the childs' environment
from the .MAKEFLAGS global variable even if it's empty or
unset. This means setting MAKEFLAGS to just an empty string
in the latter case.
The non-POSIX environment variable MAKE was superseded
by MAKEFLAGS ages ago, so don't mention it in comments.
Update the manpage accordingly and make the whole description of
MAKEFLAGS and .MAKEFLAGS more consistent as this change indeed
brings more consistency into the reliable behaviour of make(1).
Give more details in the manpage on the following topics:
o How global, command-line, and environment variables relate.
o What peculiarities the -f option has WRT ${MAKEFLAGS}.
(.Dd in the manpage is already beyond the date of those changes
in HEAD.)
dwmalone [Sat, 16 Aug 2008 11:48:10 +0000 (11:48 +0000)]
MFC:
Add a new ioctl for changing the read filter (BIOCSETFNR). This is
just like BIOCSETF but it doesn't drop all the packets buffered on
the discriptor and reset the statistics.
Also, when setting the write filter, don't drop packets waiting to
be read or reset the statistics.
jhb [Fri, 15 Aug 2008 20:16:21 +0000 (20:16 +0000)]
MFC: If the kernel fails to allocate resources for the initial value of a
PCI BAR, then zero the BAR and clear the resource list entry so that a
new resource will be allocated by the device driver.
kib [Fri, 15 Aug 2008 09:08:35 +0000 (09:08 +0000)]
MFC r177535 by peter:
(Micro)optimization of cpu_switch for amd64.
Because r173004 (pure kernel threads) is not MFCed to stable/7, I use
P_KTHREAD flag from curthread->td_proc->p_flag instead of TDP_KTHREAD
flag from curthread->td_pflags to test whether the fs/gs bases need to
be restored [1].
No objections for MFC from: peter
Suggested by: jhb [1]
MFC r180992:
Bring back the save/restore of the %ds, %es, %fs and %gs registers for
the 32bit images on amd64.
The end result is almost complete syncronization of the
amd64/amd64/cpu_switch.S between head and stable/7, besides TDP_KTHREAD
difference.
edwin [Fri, 15 Aug 2008 01:12:28 +0000 (01:12 +0000)]
MFC of r180208, r181413, r181418, r181421, r181424
Set magic fbsd:nokeywords property
Remove Theory, which isn't part of the zoneinfo module but came out
of /head/usr.sbin/zic (and isn't installed from there neither).
MFC of tzdata2008c
- Africa/Morocco will have DST in 2008.
- Asia/Choibalsan should be GMT+08:00.
- Asia/Pakistan will have DST in 2008.
MFC of tzdata2008d
- Mauritius will have a DST experiment between 2008-11-01 and 2009-03-31.
- Add/Fix historical data for C-Eur, the SovietZone, Germany,
Bahamas, San Luis.
- Add information about West Para (America/Santarem)
- America/Eirunepe and America/Rio_Branco go to UTC-4
MFC on tzdata2008e:
- Fix dates in 2008/2009 for Africa/Mauritius.
- Leap second notification for the end of 2008.