]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoBug fix from Chelsio which addresses the issue of the device resetting
gnn [Tue, 2 Dec 2008 15:42:47 +0000 (15:42 +0000)]
Bug fix from Chelsio which addresses the issue of the device resetting
when it sees only received packets.  In some cases where a device only
recieves data it mistakenly thinks that its transmitting side is broken
and resets the device.

Obtained from: Chelsio Inc.
MFC after: 3 days

15 years agoUpdate format string for kve_start/end.
peter [Tue, 2 Dec 2008 15:08:33 +0000 (15:08 +0000)]
Update format string for kve_start/end.

15 years agoThis commits brings in a lot of documentation and some enhancement
luigi [Tue, 2 Dec 2008 14:57:48 +0000 (14:57 +0000)]
This commits brings in a lot of documentation and some enhancement
of the boot0.S code, with a number of compile-time selectable options,
the most interesting one being the ability to select PXE booting.

The code is completely compatible with the previous one, and with
the boot0cfg program. Even the actual code is largely unmodified,
with only minor rearrangements or fixes to make room for the new
features.

The behaviour of the standard build differs from the previous
version in the following, minor things:

+ 'noupdate' is the default, which means the code does not
  write back the selection to disk. You can enable the feature
  at runtime with boot0cfg, or changing the flags in the Makefile.

+ a drive number of 0x00 (floppy, or USB in floppy emulation) is
  now accepted as valid. Previously, it was overridden with 0x80,
  meaning that the partition table coming from the media was
  used to access sectors on a possibly different media.
  You can revert to the previous mode building with -DCHECK_DRIVE,
  and you can always use the 'setdrv' option in boot0cfg

+ certain FAT or NTFS partitions are listed as WIN instead of DOS.

+ the 'bel' character on a bad selection is replaced by a '#' to
  make it clear that the system is not hang even if the machine
  does not have a speaker. This can be reverted back at compile
  time, or at runtime with an upcoming boot0cfg option.

Additional features are available as compile time options,
and may be become the default if deemed useful. In particular:

+ INT18/PXE boot (make -DPXE)
  This option enables booting through INT 18h (which on certain
  BIOSes can be hooked to PXE) by pressing F6. There is unfortunately
  no room to print the additional menu option.
  Also, to make room for the code, the 'Default: ' string is
  changed to 'Boot: '

+ print current drive number (make -DTEST)
  Prints a line indicating the current drive number.
  This is useful to figure out what is going on for machines/bioses
  which remap drives in sometimes surprising ways.

+ disable numeric keys in console mode (make -DONLY_F_KEYS)
  Not really a significant option, but it is needed to make
  room for the -DTEST mode.

+ disable floppy support (make -DCHECK_DRIVE)
  Revert to the old behaviour of only accepting 0x80 and above
  as valid drive numbers.

MFC after: 6 weeks

15 years agoRemove unused variable.
ganbold [Tue, 2 Dec 2008 14:19:53 +0000 (14:19 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID: 3685

Approved by: jhb

15 years agoProvide custom simple allocator for rtld locks in libthr. The allocator
kib [Tue, 2 Dec 2008 11:58:31 +0000 (11:58 +0000)]
Provide custom simple allocator for rtld locks in libthr. The allocator
does not use any external symbols, thus avoiding possible recursion into
rtld to resolve symbols, when called.

Reviewed by: kan, davidxu
Tested by: rink
MFC after: 1 month

15 years agoShared lookup makes it possible to create several negative cache
kib [Tue, 2 Dec 2008 11:14:16 +0000 (11:14 +0000)]
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

15 years agoDo not lock vnode interlock around reading of v_iflag to check VI_DOOMED.
kib [Tue, 2 Dec 2008 11:12:50 +0000 (11:12 +0000)]
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

15 years ago- Efficiency tweak: when checking for PMC overflows, only go to
jkoshy [Tue, 2 Dec 2008 10:46:35 +0000 (10:46 +0000)]
- 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.

15 years agokf_offset was supposed to be signed.
peter [Tue, 2 Dec 2008 10:39:47 +0000 (10:39 +0000)]
kf_offset was supposed to be signed.

15 years agoAttempt a quick bandaid for arm build breakage. I went to the trouble of
peter [Tue, 2 Dec 2008 10:10:50 +0000 (10:10 +0000)]
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.

15 years ago- fix bug where dnsperf would stop transmitting after a few seconds
kmacy [Tue, 2 Dec 2008 07:01:18 +0000 (07:01 +0000)]
- 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

15 years agoMerge user/peter/kinfo branch as of r185547 into head.
peter [Tue, 2 Dec 2008 06:50:26 +0000 (06:50 +0000)]
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.

15 years agoDon't call destroy_dev on the alias. This fixes half a dozen PRs I think.
imp [Tue, 2 Dec 2008 04:54:31 +0000 (04:54 +0000)]
Don't call destroy_dev on the alias.  This fixes half a dozen PRs I think.

15 years agoFix world by including opt_route.h
ps [Tue, 2 Dec 2008 04:45:33 +0000 (04:45 +0000)]
Fix world by including opt_route.h

15 years agoreturn ENOBUFS when ring is full
kmacy [Tue, 2 Dec 2008 03:58:10 +0000 (03:58 +0000)]
return ENOBUFS when ring is full

15 years agoAdd 8168D support.
yongari [Tue, 2 Dec 2008 03:39:34 +0000 (03:39 +0000)]
Add 8168D support.

Submitted by: Andrew < andrewwtulloch <> gmail DOT com >

15 years agoPrune some whining.
peter [Tue, 2 Dec 2008 02:32:13 +0000 (02:32 +0000)]
Prune some whining.

15 years agoAdd VLAN hardware tag insertion/stripping support. Tx/Rx checksum
yongari [Tue, 2 Dec 2008 02:30:12 +0000 (02:30 +0000)]
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

15 years agoDelete a bunch of empty mergeinfo records caused by local copies.
peter [Tue, 2 Dec 2008 02:26:15 +0000 (02:26 +0000)]
Delete a bunch of empty mergeinfo records caused by local copies.

15 years agoMake sure to clear PMDR register by writing back power management
yongari [Tue, 2 Dec 2008 02:12:34 +0000 (02:12 +0000)]
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 >

15 years agoThe pkthdr field is flowid not rss_hash
kmacy [Tue, 2 Dec 2008 00:51:56 +0000 (00:51 +0000)]
The pkthdr field is flowid not rss_hash

15 years ago- fix multiqueue conditional
kmacy [Tue, 2 Dec 2008 00:48:08 +0000 (00:48 +0000)]
- fix multiqueue conditional
- don't leak mbuf tags in the non-conditional case

Found by: Navdeep Parhar

15 years agointegrate use after free fixes from private branch
kmacy [Tue, 2 Dec 2008 00:39:50 +0000 (00:39 +0000)]
integrate use after free fixes from private branch

Found by: kkenn@

15 years agocorrect typo
sam [Mon, 1 Dec 2008 23:09:58 +0000 (23:09 +0000)]
correct typo

Submitted by: Ole Vole

15 years agoShared memory objects that have size which is not necessarily equal to
kan [Mon, 1 Dec 2008 22:33:50 +0000 (22:33 +0000)]
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

15 years agoAdd ixgbe(4) and upgt(4).
brueffer [Mon, 1 Dec 2008 21:15:04 +0000 (21:15 +0000)]
Add ixgbe(4) and upgt(4).

15 years agoInvoke _rtld_atfork_post earlier, before we reinitialize rtld locks
kan [Mon, 1 Dec 2008 21:00:25 +0000 (21:00 +0000)]
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

15 years agoAdd controller suspend/resume support.
mav [Mon, 1 Dec 2008 17:45:56 +0000 (17:45 +0000)]
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.

15 years agoFix typo.
skv [Mon, 1 Dec 2008 17:39:34 +0000 (17:39 +0000)]
Fix typo.

Approved by: ru

15 years agoSwitch to ath hal source code. Note this removes the ath_hal
sam [Mon, 1 Dec 2008 16:53:01 +0000 (16:53 +0000)]
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.

15 years agoimport ath hal
sam [Mon, 1 Dec 2008 16:43:08 +0000 (16:43 +0000)]
import ath hal

15 years agoThe times(3) function returns the number of CLK_TCKs since the
keramida [Mon, 1 Dec 2008 15:27:00 +0000 (15:27 +0000)]
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

15 years agoTrivial patch to show on which geom has the error been detected.
ivoras [Mon, 1 Dec 2008 15:02:00 +0000 (15:02 +0000)]
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

15 years agoCatch up with the disappearance of sys/dev/hfa.
kensmith [Mon, 1 Dec 2008 14:34:42 +0000 (14:34 +0000)]
Catch up with the disappearance of sys/dev/hfa.

15 years agoFix fread() to return a correct value on platforms where sizeof(int) !=
ru [Mon, 1 Dec 2008 14:33:34 +0000 (14:33 +0000)]
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

15 years agoAdjustments to make a tags file a bit more suitable to amd64.
kensmith [Mon, 1 Dec 2008 14:15:10 +0000 (14:15 +0000)]
Adjustments to make a tags file a bit more suitable to amd64.

Reviewed by: peter

15 years agoFix a lock order reversal bug that could cause deadlock during fork(2).
jasone [Mon, 1 Dec 2008 10:20:59 +0000 (10:20 +0000)]
Fix a lock order reversal bug that could cause deadlock during fork(2).

Reported by: kib

15 years ago- Fix spelling error in comments.
stas [Mon, 1 Dec 2008 10:16:25 +0000 (10:16 +0000)]
- Fix spelling error in comments.

PR: arm/128891
Submitted by: Pavel Pankov <pankov_p@mail.ru>
Approved by: kib (mentor)

15 years agoRemove The Netgear WG111v2 support
kevlo [Mon, 1 Dec 2008 10:05:34 +0000 (10:05 +0000)]
Remove The Netgear WG111v2 support

15 years agoThe Netgear WG111v2 USB dongle contains a RTL8187 chip,
kevlo [Mon, 1 Dec 2008 10:04:39 +0000 (10:04 +0000)]
The Netgear WG111v2 USB dongle contains a RTL8187 chip,
not a GW3887 chip.

Obtained from: OpenBSD

15 years agonull out m_next when marshalling a packet
kmacy [Mon, 1 Dec 2008 05:44:08 +0000 (05:44 +0000)]
null out m_next when marshalling a packet

15 years agoUpdate internal mac stats every time the tick task is called
kmacy [Mon, 1 Dec 2008 05:43:30 +0000 (05:43 +0000)]
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

15 years agodon't manually track statistics
kmacy [Mon, 1 Dec 2008 04:42:39 +0000 (04:42 +0000)]
don't manually track statistics

15 years agoProper fix for tracking ifnet statistics
kmacy [Mon, 1 Dec 2008 04:41:45 +0000 (04:41 +0000)]
Proper fix for tracking ifnet statistics

15 years agoFix an inverted check introduced in r184554.
attilio [Mon, 1 Dec 2008 03:00:26 +0000 (03:00 +0000)]
Fix an inverted check introduced in r184554.

Submitted by: tegge
Pointy hat to: me

15 years agoDuplicate another few hundred lines of code in order to be compatible
peter [Mon, 1 Dec 2008 02:13:32 +0000 (02:13 +0000)]
Duplicate another few hundred lines of code in order to be compatible
with unreleased binaries.

15 years agoRevision 184199 had not been fully reverted, add missing piece.
davidxu [Mon, 1 Dec 2008 01:54:55 +0000 (01:54 +0000)]
Revision 184199 had not been fully reverted, add missing piece.

Reported by: phk

15 years agoUse libutil wrapper for kinfo_get{file|vmmap}()
peter [Mon, 1 Dec 2008 01:45:52 +0000 (01:45 +0000)]
Use libutil wrapper for kinfo_get{file|vmmap}()

15 years agoRestore AHCI suspend/resume support,
mav [Mon, 1 Dec 2008 01:34:18 +0000 (01:34 +0000)]
Restore AHCI suspend/resume support,
broken with modularization commit (rev 183724).

15 years agoProvide a 'tinderbox' target that compiles enough of FreeBSD that
alfred [Mon, 1 Dec 2008 00:45:51 +0000 (00:45 +0000)]
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"

15 years agoAllow boot code to be smaller than what the scheme expects.
marcel [Mon, 1 Dec 2008 00:07:17 +0000 (00:07 +0000)]
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.

15 years agoPrint error messages as-is, when they don't conform to
marcel [Sun, 30 Nov 2008 23:46:31 +0000 (23:46 +0000)]
Print error messages as-is, when they don't conform to
<errno> [<parameter> 'value']
These are error messages from (lib)geom itself.

15 years agoCall gctl_free() after we processed the error string.
marcel [Sun, 30 Nov 2008 23:38:44 +0000 (23:38 +0000)]
Call gctl_free() after we processed the error string.
It's being freed as part of the request.

15 years ago- Get rid of unused variable in KTR checks. This allows ktr(4) enabled
stas [Sun, 30 Nov 2008 22:58:27 +0000 (22:58 +0000)]
- 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

15 years agoAdd experimental front ends to the kinfo_vmentry and kinfo_filedesc
peter [Sun, 30 Nov 2008 22:40:14 +0000 (22:40 +0000)]
Add experimental front ends to the kinfo_vmentry and kinfo_filedesc
sysctls.

15 years ago- Get rid of extra include file, erroneously added by the
stas [Sun, 30 Nov 2008 22:40:11 +0000 (22:40 +0000)]
- 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)

15 years ago- Obtain main clock frequency dynamically based on CKGR_MCFR register
stas [Sun, 30 Nov 2008 22:33:03 +0000 (22:33 +0000)]
- 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)

15 years agocover up sun4v namespace pollution
sam [Sun, 30 Nov 2008 21:59:44 +0000 (21:59 +0000)]
cover up sun4v namespace pollution

15 years agoIt's silly to claim recv(2) is to be removed in favour of recvfrom(2)
ivoras [Sun, 30 Nov 2008 21:40:01 +0000 (21:40 +0000)]
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)

15 years agoProperly wrap this giant block of duplicate code inside COMPAT_FREEBSD7
peter [Sun, 30 Nov 2008 21:04:53 +0000 (21:04 +0000)]
Properly wrap this giant block of duplicate code inside COMPAT_FREEBSD7

15 years agohookup mcast and promisc callbacks
sam [Sun, 30 Nov 2008 20:48:57 +0000 (20:48 +0000)]
hookup mcast and promisc callbacks

Submitted by: "Paul B. Mahol" <onemda@gmail.com>

15 years agoPartially roll back a revision which changed the error code being returned
csjp [Sun, 30 Nov 2008 19:58:03 +0000 (19:58 +0000)]
Partially roll back a revision which changed the error code being returned
by getaudit(2).  Some applications such has su, id will interpret E2BIG as
requiring the use of getaudit_addr(2) to pull extended audit state (ip6)
from the kernel.

This change un-breaks the ABI when auditing has been activated on a system
and the users are logged in via ip6.

This is a RELENG_7_1 candidate.

MFC after: 1 day
Discussed with: rwatson

15 years agoAdjust an assertion to handle the case where a lock is contested, but
jasone [Sun, 30 Nov 2008 19:30:31 +0000 (19:30 +0000)]
Adjust an assertion to handle the case where a lock is contested, but
spinning is avoided due to running on a single-CPU system.

Reported by: stefanf

15 years agoMajor overhaul:
sam [Sun, 30 Nov 2008 19:06:35 +0000 (19:06 +0000)]
Major overhaul:
o eliminate private state indexed by 802.11 rate codes; use the hal's
  rate tables directly to get the same info
o calculate a mask of operational rates to optimize lookups and checks
  (instead of using for loops and similar)
o optimize size bin operations
o ignore rates marked as "do not use" in the hal phy tables
o fix bug that caused upshifting to break in 11g once the rate dropped
  below 11Mb/s
o add more intelligent multi-rate tx schedules
o add support for 1/2 and 1/4 width channels
o add dev.ath.X.sample_stats sysctl to dump runtime statistics to the console
  (needs to go up to a user app)
o export more tuning knobs via sysctls (still a couple of magic constants)

15 years agosync w/ p4 branch
sam [Sun, 30 Nov 2008 18:56:41 +0000 (18:56 +0000)]
sync w/ p4 branch

15 years agosome of the 11n parts can hang under certain conditions without
sam [Sun, 30 Nov 2008 18:34:27 +0000 (18:34 +0000)]
some of the 11n parts can hang under certain conditions without
necessary workarounds, add code to detect these hangs and distinguish
them from other events; note this code is only invoked for anomalous
conditions and (at the moment) is a noop because the hang detection
code is in a new hal that's coming shortly

15 years agoadd frequency mapping for the Zcomax GZ-901
sam [Sun, 30 Nov 2008 18:27:10 +0000 (18:27 +0000)]
add frequency mapping for the Zcomax GZ-901

15 years agoenable use of modules but disable them by adding MODULES_OVERRIDE=""
sam [Sun, 30 Nov 2008 17:53:19 +0000 (17:53 +0000)]
enable use of modules but disable them by adding MODULES_OVERRIDE=""
in each config file until we can sort out issues in the modules tree

Reviewed by: imp
MFC after: 1 month

15 years agoopt_at91.h isn't needed here at all anymore, since the board init
imp [Sun, 30 Nov 2008 17:40:05 +0000 (17:40 +0000)]
opt_at91.h isn't needed here at all anymore, since the board init
routines have been split out.  Remove it.  This leaves only one
instance of it in the tree that will be going away soon.

15 years agoEnable getaudit_addr(2) for sshd again. This will un-break the subject
csjp [Sun, 30 Nov 2008 15:35:24 +0000 (15:35 +0000)]
Enable getaudit_addr(2) for sshd again.  This will un-break the subject
BSM audit tokens for IPv6.

15 years agoMake the linker.hints file have mode 644 instead of 600.
luigi [Sun, 30 Nov 2008 14:20:08 +0000 (14:20 +0000)]
Make the linker.hints file have mode 644 instead of 600.
There is nothing secret in the file, and the missing read
permission breaks diskless operation.

MFC after: 4 weeks

15 years agoClarify the reason to not use the volatile string as an argument to CTR
kib [Sun, 30 Nov 2008 13:18:35 +0000 (13:18 +0000)]
Clarify the reason to not use the volatile string as an argument to CTR
macros. Note the logging of file and line.

Reviewed by: dchagin
MFC after: 3 days

15 years agoDon't call ether_ioctl() with locks held. Loop in xn_rxeof() until the backend
dfr [Sun, 30 Nov 2008 12:21:46 +0000 (12:21 +0000)]
Don't call ether_ioctl() with locks held. Loop in xn_rxeof() until the backend
stops adding stuff to the ring otherwise we miss RX interrupts which kills
performance.

15 years agoAdd more obsolete files.
antoine [Sun, 30 Nov 2008 11:03:16 +0000 (11:03 +0000)]
Add more obsolete files.

15 years agoOn FreeBSD, printing the version is centralized, so no need to repeat
imp [Sun, 30 Nov 2008 08:40:04 +0000 (08:40 +0000)]
On FreeBSD, printing the version is centralized, so no need to repeat
it here.  I think that gonzo@ has also made this change to p4.

15 years agopurge useless code
sam [Sun, 30 Nov 2008 07:25:03 +0000 (07:25 +0000)]
purge useless code

15 years agomake code compile
sam [Sun, 30 Nov 2008 07:24:36 +0000 (07:24 +0000)]
make code compile

15 years agoDo not spin when trying to lock on a single-CPU system.
jasone [Sun, 30 Nov 2008 05:55:24 +0000 (05:55 +0000)]
Do not spin when trying to lock on a single-CPU system.

Reported by: davidxu

15 years agonot needed any more
sam [Sun, 30 Nov 2008 05:45:18 +0000 (05:45 +0000)]
not needed any more

15 years agomove bus+softc typedefs to ah_osdep.h so we can eliminate the opaque
sam [Sun, 30 Nov 2008 05:44:58 +0000 (05:44 +0000)]
move bus+softc typedefs to ah_osdep.h so we can eliminate the opaque
write-around; it doesn't work for some platforms (e.g. ia64) and is
now pointless

15 years agoImprove a comment.
jkoshy [Sun, 30 Nov 2008 05:10:14 +0000 (05:10 +0000)]
Improve a comment.

15 years agoImplement copyout packing more along the lines of what I had in mind.
peter [Sun, 30 Nov 2008 00:18:21 +0000 (00:18 +0000)]
Implement copyout packing more along the lines of what I had in mind.
Create a temporary duplicate implementation of old filedesc struct for
pre-7.1 libgtop package.
Todo: specific fd or addr request

15 years agoAccording to "Intel 64 and IA-32 Architectures Software Developer's Manual
mav [Sun, 30 Nov 2008 00:11:48 +0000 (00:11 +0000)]
According to "Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 3B: System Programming Guide, Part 2", CPUs with family 0x6 and model
above or 0xE and CPUs with family 0xF and model above or 0x3 have invariant
TSC.

15 years agoAccording to "Intel 64 and IA-32 Architectures Software Developer's Manual
mav [Sun, 30 Nov 2008 00:10:55 +0000 (00:10 +0000)]
According to "Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 3B: System Programming Guide, Part 2", CPUs with family 0x6 and model
above or 0xE and CPUs with family 0xF and model above or 0x3 have invariant
TSC.

15 years agoUnlock the malloc() locks in the child process after fork(). This gives
kib [Sat, 29 Nov 2008 21:46:28 +0000 (21:46 +0000)]
Unlock the malloc() locks in the child process after fork(). This gives
us working malloc in the fork child of the multithreaded process.

Although POSIX requires that only async-signal safe functions shall be
operable after fork in multithreaded process, not having malloc lower
the quality of our implementation.

Tested by: rink
Discussed with: kan, davidxu
Reviewed by: kan
MFC after: 1 month

15 years agoParse the error string returned by the kernel. The format is:
marcel [Sat, 29 Nov 2008 21:20:07 +0000 (21:20 +0000)]
Parse the error string returned by the kernel. The format is:
<errno> [<parameter> <value>]
So, rather than printing the error:
gpart: 22 scheme 'gpt'
gpart(8) now prints:
gpart: scheme 'gpt': invalid argument

15 years agoWIP kinfo_file/kinfo_vmmentry tweaks. The idea:
peter [Sat, 29 Nov 2008 20:55:11 +0000 (20:55 +0000)]
WIP kinfo_file/kinfo_vmmentry tweaks.  The idea:
1) to get the 32 and 64 bit versions in sync so that no shims are needed,
Valgrind in particular excercises this.  and:
2) reduce the size of the copyout.  On large processes this turns out to
be a huge problem.  Valgrind also suffers from this since it needs to do
this in a context that can't malloc. I want to pack the records.
3) Add new types..  'tell me about fd N' and 'tell me about addr N'.

15 years agoFormat the output of -itv for real. In particular:
kientzle [Sat, 29 Nov 2008 20:22:02 +0000 (20:22 +0000)]
Format the output of -itv for real.  In particular:
 * Lookup uname/gname if not provided by the archive (I copied the
   uname/gname lookup cache from bsdtar)
 * Format device number instead of size for device nodes
 * Format date.

There's still a few improvements that I could copy from
bsdtar, especially the locale-aware safe_fprintf() code
and the locale-aware setup for day_first date formatting.
(And, of course, I need to think through a clean way to
push this stuff down into libarchive.)

Thanks to Peter Wemm for reminding me of this overlooked TODO item.

15 years agoThird argument to the vi_mmap_t function is vm_paddr_t *.
kib [Sat, 29 Nov 2008 20:16:53 +0000 (20:16 +0000)]
Third argument to the vi_mmap_t function is vm_paddr_t *.

MFC after: 3 days

15 years agoWhen deciding which characters (of a filename, for instance)
kientzle [Sat, 29 Nov 2008 20:06:53 +0000 (20:06 +0000)]
When deciding which characters (of a filename, for instance)
are safe to print, try to take into account the current locale.
This iterates over output strings using mbtowc() to identify
multi-byte sequences.  If iswprint() claims the corresponding
wide character is printable, the original bytes are passed
through.  Otherwise, we expand characters into C-style
\-escape sequences.

Submitted by: Michihiro NAKAJIMA
MFC after: 30 days

15 years agoAdd standard MLINKs.
brueffer [Sat, 29 Nov 2008 19:01:44 +0000 (19:01 +0000)]
Add standard MLINKs.

15 years agoBring this a little closer to our manpage style.
brueffer [Sat, 29 Nov 2008 18:58:20 +0000 (18:58 +0000)]
Bring this a little closer to our manpage style.

15 years agoAdd several missing MLINKs.
brueffer [Sat, 29 Nov 2008 18:21:31 +0000 (18:21 +0000)]
Add several missing MLINKs.

15 years agoFix typo.
brueffer [Sat, 29 Nov 2008 18:09:50 +0000 (18:09 +0000)]
Fix typo.

15 years agoMake linux_sendmsg() and linux_recvmsg() work on linux32/amd64.
kib [Sat, 29 Nov 2008 17:14:06 +0000 (17:14 +0000)]
Make linux_sendmsg() and linux_recvmsg() work on linux32/amd64.
Change types used in the linux' struct msghdr and struct cmsghdr
definitions to the properly-sized architecture-specific types.
Move ancillary data handler from linux_sendit() to linux_sendmsg().

Submitted by: dchagin

15 years agoUnbreak the no-networks (no INET/6) build that I broke with
bz [Sat, 29 Nov 2008 16:17:39 +0000 (16:17 +0000)]
Unbreak the no-networks (no INET/6) build that I broke with
the commit in r185435.

Pointyhat: no, but I could need a ski cap for the winter

15 years agoRegenerate
kib [Sat, 29 Nov 2008 14:57:58 +0000 (14:57 +0000)]
Regenerate

15 years agoFix iovec32 for linux32/amd64.
kib [Sat, 29 Nov 2008 14:55:24 +0000 (14:55 +0000)]
Fix iovec32 for linux32/amd64.

Add a custom version of copyiniov() to deal with the 32-bit iovec
pointers from userland (to be used later).

Adjust prototypes for linux_readv() and linux_writev() to use new
l_iovec32 definition and to match actual linux code. In particular,
use ulong for fd (why ?).

Submitted by: dchagin

15 years agoRegen after jail support was added in r185435.
bz [Sat, 29 Nov 2008 14:34:30 +0000 (14:34 +0000)]
Regen after jail support was added in r185435.

15 years agoMFp4:
bz [Sat, 29 Nov 2008 14:32:14 +0000 (14:32 +0000)]
MFp4:
  Bring in updated jail support from bz_jail branch.

This enhances the current jail implementation to permit multiple
addresses per jail. In addtion to IPv4, IPv6 is supported as well.
Due to updated checks it is even possible to have jails without
an IP address at all, which basically gives one a chroot with
restricted process view, no networking,..

SCTP support was updated and supports IPv6 in jails as well.

Cpuset support permits jails to be bound to specific processor
sets after creation.

Jails can have an unrestricted (no duplicate protection, etc.) name
in addition to the hostname. The jail name cannot be changed from
within a jail and is considered to be used for management purposes
or as audit-token in the future.

DDB 'show jails' command was added to aid debugging.

Proper compat support permits 32bit jail binaries to be used on 64bit
systems to manage jails. Also backward compatibility was preserved where
possible: for jail v1 syscalls, as well as with user space management
utilities.

Both jail as well as prison version were updated for the new features.
A gap was intentionally left as the intermediate versions had been
used by various patches floating around the last years.

Bump __FreeBSD_version for the afore mentioned and in kernel changes.

Special thanks to:
- Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches
  and Olivier Houchard (cognet) for initial single-IPv6 patches.
- Jeff Roberson (jeff) and Randall Stewart (rrs) for their
  help, ideas and review on cpuset and SCTP support.
- Robert Watson (rwatson) for lots and lots of help, discussions,
  suggestions and review of most of the patch at various stages.
- John Baldwin (jhb) for his help.
- Simon L. Nielsen (simon) as early adopter testing changes
  on cluster machines as well as all the testers and people
  who provided feedback the last months on freebsd-jail and
  other channels.
- My employer, CK Software GmbH, for the support so I could work on this.

Reviewed by: (see above)
MFC after: 3 months (this is just so that I get the mail)
X-MFC Before:   7.2-RELEASE if possible