Commit Graph

143048 Commits

Author SHA1 Message Date
Konstantin Belousov
d6568724e1 Shared lookup makes it possible to create several negative cache
entries for one name. Then, creating inode with that name would remove
one entry, leaving others dormant. Reclaiming the vnode would uncover
negative entries, causing false return of ENOENT from the calls like
stat, that do not create inode.

Prevent creation of the duplicated negative entries.

Reported and debugged with:	pho
Reviewed by:	jhb
X-MFC:	after shared lookup changes
2008-12-02 11:14:16 +00:00
Konstantin Belousov
ffdaeffe21 Do not lock vnode interlock around reading of v_iflag to check VI_DOOMED.
Read of the pointer is atomic, and flag cannot be set while vnode lock
is held.

Requested by:	jhb
MFC after:	1 month
2008-12-02 11:12:50 +00:00
Joseph Koshy
dfd9bc23c9 - Efficiency tweak: when checking for PMC overflows, only go to
hardware for PMCs that have been configured for sampling.

- Bug fix: acknowledge PMC hardware overflows irrespective of the
  the (software) PMC's state.
2008-12-02 10:46:35 +00:00
Peter Wemm
a8f4518c30 kf_offset was supposed to be signed. 2008-12-02 10:39:47 +00:00
Peter Wemm
de94a63bd1 Attempt a quick bandaid for arm build breakage. I went to the trouble of
maintaining alignment, but I'm not sure how to tell gcc this.
2008-12-02 10:10:50 +00:00
Kip Macy
f3c713fdaf - fix bug where dnsperf would stop transmitting after a few seconds
- break complex conditionals in to multiple lines to avoid wrapping
- remove copious unused debug statements
- be more aggressive about cleaning in the calling thread
- eliminate usage of ENOSPC
- increase number of iterations that cxgbsp can do
- eliminate "initerr" usage to simplify ENOBUFS handling
- when coalescing pass all packets to BPF
- always set overrun if hardware queue is full
2008-12-02 07:01:18 +00:00
Peter Wemm
43151ee6cf Merge user/peter/kinfo branch as of r185547 into head.
This changes struct kinfo_filedesc and kinfo_vmentry such that they are
same on both 32 and 64 bit platforms like i386/amd64 and won't require
sysctl wrapping.

Two new OIDs are assigned.  The old ones are available under
COMPAT_FREEBSD7 - but it isn't that simple.  The superceded interface
was never actually released on 7.x.

The other main change is to pack the data passed to userland via the
sysctl.  kf_structsize and kve_structsize are reduced for the copyout.
If you have a process with 100,000+ sockets open, the unpacked records
require a 132MB+ copyout.  With packing, it is "only" ~35MB.  (Still
seriously unpleasant, but not quite as devastating).  A similar problem
exists for the vmentry structure - have lots and lots of shared libraries
and small mmaps and its copyout gets expensive too.

My immediate problem is valgrind.  It traditionally achieves this
functionality by parsing procfs output, in a packed format.  Secondly, when
tracing 32 bit binaries on amd64 under valgrind, it uses a cross compiled
32 bit binary which ran directly into the differing data structures in 32
vs 64 bit mode.  (valgrind uses this to track file descriptor operations
and this therefore affected every single 32 bit binary)

I've added two utility functions to libutil to unpack the structures into
a fixed record length and to make it a little more convenient to use.
2008-12-02 06:50:26 +00:00
Warner Losh
7d0fb1f7ef Don't call destroy_dev on the alias. This fixes half a dozen PRs I think. 2008-12-02 04:54:31 +00:00
Paul Saab
8f49dd912a Fix world by including opt_route.h 2008-12-02 04:45:33 +00:00
Kip Macy
2760fcd0a6 return ENOBUFS when ring is full 2008-12-02 03:58:10 +00:00
Pyun YongHyeon
59ef640d9e Add 8168D support.
Submitted by:	Andrew < andrewwtulloch <> gmail DOT com >
2008-12-02 03:39:34 +00:00
Pyun YongHyeon
bd4fa9d9e7 Add VLAN hardware tag insertion/stripping support. Tx/Rx checksum
offload for VLAN frames are also supported. The VLAN hardware
assistance is available only on 82550/82551 based controllers.
While I'm here change the confusing name of bit1 in byte 22 of
configuration block to vlan_drop_en. The bit controls whether
hardware strips VLAN tagged frame or not. Special thanks to wpaul
who sent valuable VLAN related information to me.

Tested on:	i386, sparc64
2008-12-02 02:30:12 +00:00
Peter Wemm
38ddd08dd6 Delete a bunch of empty mergeinfo records caused by local copies. 2008-12-02 02:26:15 +00:00
Pyun YongHyeon
af75b654d2 Make sure to clear PMDR register by writing back power management
events. Just reading PMDR register was not enough to have fxp(4)
immuninize against received magic packets during system boot.

Tested by:	Alexey Shuvaev < shuvaev <> physik DOT uni-wuerzburg DOT de >
2008-12-02 02:12:34 +00:00
Kip Macy
e44730ed21 The pkthdr field is flowid not rss_hash 2008-12-02 00:51:56 +00:00
Kip Macy
6b9003b6e6 - fix multiqueue conditional
- don't leak mbuf tags in the non-conditional case

Found by: Navdeep Parhar
2008-12-02 00:48:08 +00:00
Kip Macy
6b58e3f4db integrate use after free fixes from private branch
Found by: kkenn@
2008-12-02 00:39:50 +00:00
Sam Leffler
c60b227c2c correct typo
Submitted by:	Ole Vole
2008-12-01 23:09:58 +00:00
Alexander Kabaev
6ee7dd87ba Shared memory objects that have size which is not necessarily equal to
exact multiple of system page size should still be allowed to be mapped
in their entirety to match the regular vnode backed file behavior.

Reported by: ed
Reviewed by: jhb
2008-12-01 22:33:50 +00:00
Christian Brueffer
24b410f8fe Add ixgbe(4) and upgt(4). 2008-12-01 21:15:04 +00:00
Alexander Kabaev
97df383415 Invoke _rtld_atfork_post earlier, before we reinitialize rtld locks
by switching into single-thread mode.

libthr ignores broken use of lock bitmaps used by default rtld locking
implementation, this in turn turns lock handoff in _rtld_thread_init
into NOP. This in turn makes child processes of forked multi-threaded
programs to run with _thr_signal_block still in effect, with most
signals blocked.

Reported by: phk, kib
2008-12-01 21:00:25 +00:00
Alexander Motin
92bf0e27a0 Add controller suspend/resume support.
To be able to correctly suspend/resume with card inserted,
respective support should be also implemented at mmc and mmcsd layers.
2008-12-01 17:45:56 +00:00
Sergey Skvortsov
637fd955fe Fix typo.
Approved by:	ru
2008-12-01 17:39:34 +00:00
Sam Leffler
3364462355 Switch to ath hal source code. Note this removes the ath_hal
module; the ath module now brings in the hal support.  Kernel
config files are almost backwards compatible; supplying

device ath_hal

gives you the same chip support that the binary hal did but you
must also include

options AH_SUPPORT_AR5416

to enable the extended format descriptors used by 11n parts.
It is now possible to control the chip support included in a
build by specifying exactly which chips are to be supported
in the config file; consult ath_hal(4) for information.
2008-12-01 16:53:01 +00:00
Sam Leffler
1477970585 import ath hal 2008-12-01 16:43:08 +00:00
Giorgos Keramidas
a294460257 The times(3) function returns the number of CLK_TCKs since the
startup time of FreeBSD, not since the UNIX Epoch.

PR:		docs/122359
Submitted by:	Viktor &#352;tujber
MFC after:	1 week
2008-12-01 15:27:00 +00:00
Ivan Voras
499c86ebd5 Trivial patch to show on which geom has the error been detected.
Submitted by:	Rick C. Petty
Approved by:	gnn (mentor)
MFC after:	1 month
2008-12-01 15:02:00 +00:00
Ken Smith
f34015d47b Catch up with the disappearance of sys/dev/hfa. 2008-12-01 14:34:42 +00:00
Ruslan Ermilov
e95f37bb69 Fix fread() to return a correct value on platforms where sizeof(int) !=
sizeof(size_t), i.e. on all 64-bit platforms.

Reported by:	Andrey V. Elsukov
MFC after:	3 days
2008-12-01 14:33:34 +00:00
Ken Smith
5c83795371 Adjustments to make a tags file a bit more suitable to amd64.
Reviewed by:	peter
2008-12-01 14:15:10 +00:00
Jason Evans
d7ba3e423a Fix a lock order reversal bug that could cause deadlock during fork(2).
Reported by:	kib
2008-12-01 10:20:59 +00:00
Stanislav Sedov
129c518d68 - Fix spelling error in comments.
PR:		arm/128891
Submitted by:	Pavel Pankov <pankov_p@mail.ru>
Approved by:	kib (mentor)
2008-12-01 10:16:25 +00:00
Kevin Lo
2470db385c Remove The Netgear WG111v2 support 2008-12-01 10:05:34 +00:00
Kevin Lo
5d8debe208 The Netgear WG111v2 USB dongle contains a RTL8187 chip,
not a GW3887 chip.

Obtained from:	OpenBSD
2008-12-01 10:04:39 +00:00
Kip Macy
69c4b66c6d null out m_next when marshalling a packet 2008-12-01 05:44:08 +00:00
Kip Macy
f35c2d6551 Update internal mac stats every time the tick task is called
if we don't do this "netstat -w 1" will frequently see negative
differences in packets sent
2008-12-01 05:43:30 +00:00
Kip Macy
45839f4aeb don't manually track statistics 2008-12-01 04:42:39 +00:00
Kip Macy
ceac50eb77 Proper fix for tracking ifnet statistics 2008-12-01 04:41:45 +00:00
Attilio Rao
ccc55b33b7 Fix an inverted check introduced in r184554.
Submitted by:	tegge
Pointy hat to:	me
2008-12-01 03:00:26 +00:00
David Xu
6d9b63d6c8 Revision 184199 had not been fully reverted, add missing piece.
Reported by: phk
2008-12-01 01:54:55 +00:00
Alexander Motin
69c43a238b Restore AHCI suspend/resume support,
broken with modularization commit (rev 183724).
2008-12-01 01:34:18 +00:00
Alfred Perlstein
4bb9ca574c Provide a 'tinderbox' target that compiles enough of FreeBSD that
a developer can rest reasonably assured that the tinderbox will not
be broken.  This target leverages most of 'universe' but will exit
non-zero and output a summary at the end.

"make tinderbox"
2008-12-01 00:45:51 +00:00
Marcel Moolenaar
6647711279 Allow boot code to be smaller than what the scheme expects.
This effectively changes the boot code size to be an upper
bound and makes the interface more flexible.
2008-12-01 00:07:17 +00:00
Marcel Moolenaar
08b6360ca3 Print error messages as-is, when they don't conform to
<errno> [<parameter> 'value']
These are error messages from (lib)geom itself.
2008-11-30 23:46:31 +00:00
Marcel Moolenaar
e419ba879f Call gctl_free() after we processed the error string.
It's being freed as part of the request.
2008-11-30 23:38:44 +00:00
Stanislav Sedov
41f93bedab - Get rid of unused variable in KTR checks. This allows ktr(4) enabled
ARM kernel to compile.

PR:		arm/128897
Submitted by:	Pankov Pavel <pankov_p@mail.ru>
Reviewed by:	raj
Approved by:	kib (mentor, implicit)
MFC after:	1 week
2008-11-30 22:58:27 +00:00
Stanislav Sedov
2f2cadc3cc - Get rid of extra include file, erroneously added by the
previous commit. This include file was required by the
  first version of the patch.

Approved by:	kib (mentor, implicit)
2008-11-30 22:40:11 +00:00
Stanislav Sedov
b739b60532 - Obtain main clock frequency dynamically based on CKGR_MCFR register
contents.
- It is possible to override the dynamic configuration by using
  AT91C_MAIN_CLOCK option in kernel config.

PR:		arm/128961 (based on)
Submitted by:	Bjorn Konig <bkoenig@alpha-tierchen.de>
Reviewed by:	imp
Approved by:	kib (mentor, implicit)
2008-11-30 22:33:03 +00:00
Sam Leffler
fe7432d7f0 cover up sun4v namespace pollution 2008-11-30 21:59:44 +00:00
Ivan Voras
1a2bea865b It's silly to claim recv(2) is to be removed in favour of recvfrom(2)
(at least at this time :) ).

Approved by:	gnn (mentor)
2008-11-30 21:40:01 +00:00