]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoRemove auth.conf and related files.
Dag-Erling Smørgrav [Wed, 13 Jun 2012 11:59:03 +0000 (11:59 +0000)]
Remove auth.conf and related files.

Submitted by: trhodes@
MFC after: 3 weeks

12 years agoFix ZFS boot with pre-features pools (version <= 28) broken in r236884
Martin Matuska [Wed, 13 Jun 2012 08:00:32 +0000 (08:00 +0000)]
Fix ZFS boot with pre-features pools (version <= 28) broken in r236884

Reported by: mav
MFC after: 1 month

12 years agoImplement a separate, smaller pool of ath_buf entries for use by management
Adrian Chadd [Wed, 13 Jun 2012 06:57:55 +0000 (06:57 +0000)]
Implement a separate, smaller pool of ath_buf entries for use by management
traffic.

* Create sc_mgmt_txbuf and sc_mgmt_txdesc, initialise/free them appropriately.
* Create an enum to represent buffer types in the API.
* Extend ath_getbuf() and _ath_getbuf_locked() to take the above enum.
* Right now anything sent via ic_raw_xmit() allocates via ATH_BUFTYPE_MGMT.
  This may not be very useful.
* Add ATH_BUF_MGMT flag (ath_buf.bf_flags) which indicates the current buffer
  is a mgmt buffer and should go back onto the mgmt free list.
* Extend 'txagg' to include debugging output for both normal and mgmt txbufs.
* When checking/clearing ATH_BUF_BUSY, do it on both TX pools.

Tested:

* STA mode, with heavy UDP injection via iperf.  This filled the TX queue
  however BARs were still going out successfully.

TODO:

* Initialise the mgmt buffers with ATH_BUF_MGMT and then ensure the right
  type is being allocated and freed on the appropriate list.  That'd save
  a write operation (to bf->bf_flags) on each buffer alloc/free.

* Test on AP mode, ensure that BAR TX and probe responses go out nicely
  when the main TX queue is filled (eg with paused traffic to a TID,
  awaiting a BAR to complete.)

PR: kern/168170

12 years agoInclude a warning when using the example code as it may not
Eitan Adler [Wed, 13 Jun 2012 06:46:00 +0000 (06:46 +0000)]
Include a warning when using the example code as it may not
work in unusual situations.
Also slightly optimize the command.

Submitted by: Jeremy Chadwick jdc@koitsu.org
Approved by: cperciva (implicit)
MFC after: 1 week

12 years agoAdd ARM callchain support for hwpmc.
Fabien Thomas [Wed, 13 Jun 2012 06:38:25 +0000 (06:38 +0000)]
Add ARM callchain support for hwpmc.

Sponsored by: NETASQ
MFC after: 3 days

12 years agoRemove a duplicate definition.
Adrian Chadd [Wed, 13 Jun 2012 05:47:24 +0000 (05:47 +0000)]
Remove a duplicate definition.

12 years agoOops, return the newly allocated buffer to the queue, not the completed
Adrian Chadd [Wed, 13 Jun 2012 05:41:00 +0000 (05:41 +0000)]
Oops, return the newly allocated buffer to the queue, not the completed
buffer.

PR: kern/168170

12 years agoReplace the direct sc_txbuf manipulation with a pair of functions.
Adrian Chadd [Wed, 13 Jun 2012 05:39:16 +0000 (05:39 +0000)]
Replace the direct sc_txbuf manipulation with a pair of functions.

This is preparation work for having a separate ath_buf queue for
management traffic.

PR: kern/168170

12 years agotrim trailing whitespace
Warner Losh [Wed, 13 Jun 2012 05:02:51 +0000 (05:02 +0000)]
trim trailing whitespace

12 years agoFinal whitespace trim.
Warner Losh [Wed, 13 Jun 2012 04:59:55 +0000 (04:59 +0000)]
Final whitespace trim.

12 years agoTrim trailing whitespace...
Warner Losh [Wed, 13 Jun 2012 04:59:00 +0000 (04:59 +0000)]
Trim trailing whitespace...

12 years agoStrip trailing whitespace before other changes.
Warner Losh [Wed, 13 Jun 2012 04:52:19 +0000 (04:52 +0000)]
Strip trailing whitespace before other changes.

12 years agoStrip trailing whitespace.
Warner Losh [Wed, 13 Jun 2012 04:40:29 +0000 (04:40 +0000)]
Strip trailing whitespace.

12 years agotrim trailing spaces that have accumulated over the years (these files
Warner Losh [Wed, 13 Jun 2012 04:38:09 +0000 (04:38 +0000)]
trim trailing spaces that have accumulated over the years (these files
served as the basis for too many other platforms).

12 years agoAdd a test for the :tl & :tu modifiers.
David E. O'Brien [Tue, 12 Jun 2012 23:16:00 +0000 (23:16 +0000)]
Add a test for the :tl & :tu modifiers.

12 years agoFor incompleted block allocations or frees, the inode block count usage
Konstantin Belousov [Tue, 12 Jun 2012 21:37:27 +0000 (21:37 +0000)]
For incompleted block allocations or frees, the inode block count usage
must be recalculated. The blk_check pass of suj checker explicitely marks
inodes which owned such blocks as needing block count adjustment. But
ino_adjblks() is only called by cg_trunc pass, which is performed before
blk_check. As result, the block use count for such inodes is left wrong.
This causes full fsck run after journaled run to still find inconsistencies
like 'INCORRECT BLOCK COUNT I=14557 (328 should be 0)' in phase 1.

Fix this issue by running additional adj_blk pass after blk_check, which
updates the field.

Reviewed by: jeff, mckusick
MFC after: 1 week

12 years agoAdd pfg@ as one of my mentees.
John Baldwin [Tue, 12 Jun 2012 20:55:57 +0000 (20:55 +0000)]
Add pfg@ as one of my mentees.

12 years agoMake sure libkiconv.so.4 is installed into /lib, not into /usr/lib,
Dimitry Andric [Tue, 12 Jun 2012 20:24:57 +0000 (20:24 +0000)]
Make sure libkiconv.so.4 is installed into /lib, not into /usr/lib,
which was inadvertently caused by r236185: if SHLIBDIR is set using the
?= operator, it must be done *before* bsd.own.mk is included, otherwise
the default value is still used.

Note, bsd.lib.mk will take care of removing the copy in /usr/lib upon
installation, so no addition to ObsoleteFiles.inc is needed.

X-MFC-With: r236185

12 years agoReplace a reference to the non-existent SI_ORDER_LAST in a comment with
John Baldwin [Tue, 12 Jun 2012 18:19:46 +0000 (18:19 +0000)]
Replace a reference to the non-existent SI_ORDER_LAST in a comment with
SI_ORDER_ANY.

Submitted by: Brandon Gooch  brandongooch yahoo com

12 years agoStop using auth_getval() now that it always returns NULL. Instead,
Dag-Erling Smørgrav [Tue, 12 Jun 2012 17:14:19 +0000 (17:14 +0000)]
Stop using auth_getval() now that it always returns NULL.  Instead,
hardcode the default to what it would be if we didn't hardcode it,
i.e. DES if supported and MD5 otherwise.

MFC after: 3 weeks

12 years agoauth.conf is dead.
Dag-Erling Smørgrav [Tue, 12 Jun 2012 17:04:56 +0000 (17:04 +0000)]
auth.conf is dead.

12 years agoFinally nuke auth.conf, nine years after it was deprecated. The only
Dag-Erling Smørgrav [Tue, 12 Jun 2012 17:02:53 +0000 (17:02 +0000)]
Finally nuke auth.conf, nine years after it was deprecated.  The only
thing it was still used for was to set the "global default" password
hash.  Since the stock auth.conf contained nothing but comments, the
global default was actually the first algorithm in crypt(3)'s list,
which happens to be DES; I take the fact that nobody noticed as proof
that it was not used outside of crypt(3).

The only other use in our tree was in the Kerberos support code in
in tinyware's passwd(1).  I removed that code in an earlier commit;
it would not have compiled anyway, as it only supported Kerberos IV.

The auth_getval() function is now a stub that always returns NULL,
which has the same effect as a functional auth_getval() with an
empty auth.conf.

MFC after: 3 weeks

12 years agoSpace mismatch - typo in r236962.
Pedro F. Giffuni [Tue, 12 Jun 2012 16:07:03 +0000 (16:07 +0000)]
Space mismatch - typo in  r236962.

Found by: Dima Panov
Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoRemove dead code.
Dag-Erling Smørgrav [Tue, 12 Jun 2012 15:32:14 +0000 (15:32 +0000)]
Remove dead code.

12 years agoAdd experimental support for amdfam10/barcelona from the GCC 4.3 branch.
Pedro F. Giffuni [Tue, 12 Jun 2012 15:04:18 +0000 (15:04 +0000)]
Add experimental support for amdfam10/barcelona from the GCC 4.3 branch.

Initial support for the AMD barcelona chipsets has been available in the
gcc43 branch under GPLv2 but was not included when the Core 2 support
was brought to the system gcc.

AMD and some linux distributions (OpenSUSE) did a backport of the amdfam10
support and made them available. Unfortunately this is still experimental
and while it can improve performance, enabling the CPUTYPE may break some
C++ ports (like clang).

Special care was taken to make sure that the patches predate the GPLv3
switch upstream.

Tested by: Vladimir Kushnir
Reviewed by: mm
Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoAdd a cmsg of type IP_TOS for UDP/IPv4 sockets to specify the TOS byte.
Michael Tuexen [Tue, 12 Jun 2012 14:56:08 +0000 (14:56 +0000)]
Add a cmsg of type IP_TOS for UDP/IPv4 sockets to specify the TOS byte.

MFC after: 3 days

12 years agoDocument the -v flag for zpool list.
Martin Matuska [Tue, 12 Jun 2012 14:40:19 +0000 (14:40 +0000)]
Document the -v flag for zpool list.

PR: 168970
Suggested by: Marcelo Araujo <araujo@FreeBSD.org>
MFC after: 3 days

12 years agoAdd a IP_RECVTOS socket option to receive for received UDP/IPv4
Michael Tuexen [Tue, 12 Jun 2012 14:02:38 +0000 (14:02 +0000)]
Add a IP_RECVTOS socket option to receive for received UDP/IPv4
packets a cmsg of type IP_RECVTOS which contains the TOS byte.
Much like IP_RECVTTL does for TTL. This allows to implement a
protocol on top of UDP and implementing ECN.

MFC after: 3 days

12 years agoDeliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if
Michael Tuexen [Tue, 12 Jun 2012 13:57:56 +0000 (13:57 +0000)]
Deliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if
requested) on IPV6 sockets, which have been marked to be not IPV6_V6ONLY,
for each received IPV4 packet.

MFC after: 3 days

12 years agoFix comment to better reflect how we are
Randall Stewart [Tue, 12 Jun 2012 13:31:32 +0000 (13:31 +0000)]
Fix comment to better reflect how we are
cheating and using the csum_data. Also fix
style issues with the comments.

12 years agoUnify the sending of ABORT, SHUTDOWN-COMPLETE and ERROR chunks.
Michael Tuexen [Tue, 12 Jun 2012 13:15:27 +0000 (13:15 +0000)]
Unify the sending of ABORT, SHUTDOWN-COMPLETE and ERROR chunks.
While there: Fix also some minor bugs and prepare for SCTP/DTLS.

MFC after: 3 days

12 years agoNote to self. Have morning coffee *before* committing things.
Randall Stewart [Tue, 12 Jun 2012 12:44:17 +0000 (12:44 +0000)]
Note to self. Have morning coffee *before* committing things.
There is no mac_addr in the mbuf for BSD.. cheat like
we are supposed to and use the csum field since our friend
the gif tunnel itself will never use offload.

12 years agoOpps forgot to commit the flag.
Randall Stewart [Tue, 12 Jun 2012 12:40:15 +0000 (12:40 +0000)]
Opps forgot to commit the flag.

12 years agoFix a problem where zero-length RDATA fields can cause named(8) to crash.
Bjoern A. Zeeb [Tue, 12 Jun 2012 12:10:10 +0000 (12:10 +0000)]
Fix a problem where zero-length RDATA fields can cause named(8) to crash.
[12:03]

Correct a privilege escalation when returning from kernel if
running FreeBSD/amd64 on non-AMD processors. [12:04]

Fix reference count errors in IPv6 code. [EN-12:02]

Security: CVE-2012-1667
Security: FreeBSD-SA-12:03.bind
Security: CVE-2012-0217
Security: FreeBSD-SA-12:04.sysret
Security: FreeBSD-EN-12:02.ipv6refcount
Approved by: so (simon, bz)

12 years ago - Limit r214102 workaround to only x86. On arm it causes more problems
Alexander Motin [Tue, 12 Jun 2012 11:08:51 +0000 (11:08 +0000)]
 - Limit r214102 workaround to only x86. On arm it causes more problems
then solves because of cache coherency issues. This fixes periodic error
messages on console and command timeouts.
 - Patch SATA PHY configuration for 65nm SoCs to improve SNR same as
Linux does.

MFC after: 2 weeks

12 years agoAllow a gif tunnel to be used with ALTq.
Randall Stewart [Tue, 12 Jun 2012 10:44:09 +0000 (10:44 +0000)]
Allow a gif tunnel to be used with ALTq.

Reviewed by: gnn

12 years agoRevert part of the r236935 for now, until I figure out why it doesn't
Pawel Jakub Dawidek [Tue, 12 Jun 2012 10:25:11 +0000 (10:25 +0000)]
Revert part of the r236935 for now, until I figure out why it doesn't
work properly.

Reported by: davidxu

12 years agoSmall cleanup.
Michael Tuexen [Tue, 12 Jun 2012 09:18:28 +0000 (09:18 +0000)]
Small cleanup.

MFC after: 3 days

12 years agoLibUSB v1.0 API compiliance and bugfixes.
Hans Petter Selasky [Tue, 12 Jun 2012 07:28:25 +0000 (07:28 +0000)]
LibUSB v1.0 API compiliance and bugfixes.

- Use CLOCK_MONOTONIC instead of CLOCK_REALTIME, because CLOCK_MONOTONIC
does not wrap into negative in near future. This fixes any potential
problems using "pthread_cond_timedwait()".

- Fix a bug where the "libusb_wait_for_event()" function computes an
absolute timeout instead of a relative timeout. USB transfers do
not depend on this timeout value.

- Add dependency towards LibPthread to Makefile, because LibUSB v1.0
needs this library to function correctly.

MFC after: 1 week

12 years agoShare IPI init and startup code of mp_machdep.c with acpi_wakeup.c
Mitsuru IWASAKI [Tue, 12 Jun 2012 00:14:54 +0000 (00:14 +0000)]
Share IPI init and startup code of mp_machdep.c with acpi_wakeup.c
as ipi_startup().

12 years agoIn softdep_setup_inomapdep() we may have to allocate both inodedep
Kirk McKusick [Mon, 11 Jun 2012 23:07:21 +0000 (23:07 +0000)]
In softdep_setup_inomapdep() we may have to allocate both inodedep
and bmsafemap dependency structures in inodedep_lookup() and
bmsafemap_lookup() respectively. The setup of these structures must
be done while holding the soft-dependency mutex. If the inodedep is
allocated first, it may be freed in the I/O completion callback when
the mutex is released to allocate the bmsafemap. If the bmsafemap is
allocated first, it may be freed in the I/O completion callback when
the mutex is released to allocate the inodedep.

To resolve this problem, bmsafemap_lookup has had a parameter added
that allows a pre-malloc'ed bmsafemap to be passed in so that it does
not need to release the mutex to create a new bmsafemap. The
softdep_setup_inomapdep() routine pre-malloc's a bmsafemap dependency
before acquiring the mutex and starting to build the inodedep with a
call to inodedep_lookup(). The subsequent call to bmsafemap_lookup()
is passed this pre-allocated bmsafemap entry so that it need not
release the mutex if it needs to create a new one.

Reported by: Peter Holm
Tested by:   Peter Holm
MFC after:   1 week

12 years agoSwitch from 4-clause to 2-clause BSD license. (OpenBSD r1.22)
Xin LI [Mon, 11 Jun 2012 22:25:20 +0000 (22:25 +0000)]
Switch from 4-clause to 2-clause BSD license. (OpenBSD r1.22)
No functional change.

Obtained from: NetBSD via OpenBSD

12 years agofdgrowtable() no longer drops the filedesc lock so it is enough to
Pawel Jakub Dawidek [Mon, 11 Jun 2012 22:05:26 +0000 (22:05 +0000)]
fdgrowtable() no longer drops the filedesc lock so it is enough to
retry finding free file descriptor only once after fdgrowtable().

Spotted by: pluknet
MFC after: 1 month

12 years agoAvoid unnecessary atomic operations for clearing PGA_WRITEABLE in
Alan Cox [Mon, 11 Jun 2012 21:41:16 +0000 (21:41 +0000)]
Avoid unnecessary atomic operations for clearing PGA_WRITEABLE in
pmap_remove_pages().  This reduces pmap_remove_pages()'s running time by
4 to 11% in my tests.

MFC after: 1 week

12 years agoRevert: r236909
Hans Petter Selasky [Mon, 11 Jun 2012 20:27:52 +0000 (20:27 +0000)]
Revert: r236909

Pointyhat: me

12 years agoUse consistent way of checking if descriptor number is valid.
Pawel Jakub Dawidek [Mon, 11 Jun 2012 20:19:24 +0000 (20:19 +0000)]
Use consistent way of checking if descriptor number is valid.

MFC after: 1 month

12 years agoUse consistent way of checking if descriptor number is valid.
Pawel Jakub Dawidek [Mon, 11 Jun 2012 20:17:20 +0000 (20:17 +0000)]
Use consistent way of checking if descriptor number is valid.

MFC after: 1 month

12 years agoFix a panic I introduced in r234487, the bridge softc pointer is set to null
Andrew Thompson [Mon, 11 Jun 2012 20:12:13 +0000 (20:12 +0000)]
Fix a panic I introduced in r234487, the bridge softc pointer is set to null
early in the detach so rearrange things not to explode.

Reported by: David Roffiaen, Gustau Perez Querol
Tested by: David Roffiaen
MFC after: 3 days

12 years agoBe consistent with white spaces.
Pawel Jakub Dawidek [Mon, 11 Jun 2012 20:01:50 +0000 (20:01 +0000)]
Be consistent with white spaces.

MFC after: 1 month

12 years agoRemove code duplicated in kern_close() and do_dup() and use closefp() function
Pawel Jakub Dawidek [Mon, 11 Jun 2012 20:00:44 +0000 (20:00 +0000)]
Remove code duplicated in kern_close() and do_dup() and use closefp() function
introduced a minute ago.

This code duplication was responsible for the bug fixed in r236853.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoIntroduce closefp() function that we will be able to use to eliminate
Pawel Jakub Dawidek [Mon, 11 Jun 2012 19:57:31 +0000 (19:57 +0000)]
Introduce closefp() function that we will be able to use to eliminate
code duplication in kern_close() and do_dup().

This is committed separately from the actual removal of the duplicated
code, as the combined diff was very hard to read.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoMerge two ifs into one to make the code almost identical to the code in
Pawel Jakub Dawidek [Mon, 11 Jun 2012 19:53:41 +0000 (19:53 +0000)]
Merge two ifs into one to make the code almost identical to the code in
kern_close().

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoMove the code around a bit to move two parts of code duplicated from
Pawel Jakub Dawidek [Mon, 11 Jun 2012 19:51:27 +0000 (19:51 +0000)]
Move the code around a bit to move two parts of code duplicated from
kern_close() close together.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoNow that fdgrowtable() doesn't drop the filedesc lock we don't need to
Pawel Jakub Dawidek [Mon, 11 Jun 2012 19:48:55 +0000 (19:48 +0000)]
Now that fdgrowtable() doesn't drop the filedesc lock we don't need to
check if descriptor changed from under us. Replace the check with an
assert.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoUse the correct clock source when computing timeouts.
Hans Petter Selasky [Mon, 11 Jun 2012 19:20:59 +0000 (19:20 +0000)]
Use the correct clock source when computing timeouts.

MFC after: 1 week

12 years agoAnother fixe for r236772.
Mitsuru IWASAKI [Mon, 11 Jun 2012 18:47:26 +0000 (18:47 +0000)]
Another fixe for r236772.

- Adjust correct cpuset (stopped_cpus/suspended_cpus) for
  cpu_spinwait() in generic_stop_cpus().

12 years agoFix unloading of libiconv module.
Mateusz Guzik [Mon, 11 Jun 2012 17:42:39 +0000 (17:42 +0000)]
Fix unloading of libiconv module.

Previously it would either loop infinitely or exit with error leaking a lock.

Reported by: Will DeVries
Approved by: trasz (mentor)
MFC after: 1 week

12 years agoNone of these programs actually use auth.conf.
Dag-Erling Smørgrav [Mon, 11 Jun 2012 16:18:39 +0000 (16:18 +0000)]
None of these programs actually use auth.conf.

MFC after: 1 week

12 years agoStyle fixes and simplifications.
Pawel Jakub Dawidek [Mon, 11 Jun 2012 16:08:03 +0000 (16:08 +0000)]
Style fixes and simplifications.

MFC after: 1 month

12 years agoClean up some symbol versions for libsupc++ / libcxxrt.
David Chisnall [Mon, 11 Jun 2012 15:40:57 +0000 (15:40 +0000)]
Clean up some symbol versions for libsupc++ / libcxxrt.

MFC after: 1 week
Reviewed by: kan

12 years agoFix a leak when setting the global character locale to "C" from something else.
David Chisnall [Mon, 11 Jun 2012 14:02:02 +0000 (14:02 +0000)]
Fix a leak when setting the global character locale to "C" from something else.

Reported by: mm

12 years agoFix uninitialised reference.
Adrian Chadd [Mon, 11 Jun 2012 12:26:23 +0000 (12:26 +0000)]
Fix uninitialised reference.

Noticed by: John Hay <jhay@meraka.org.za>

12 years agoIntroduce "feature flags" for ZFS pools (bump SPA version to 5000).
Martin Matuska [Mon, 11 Jun 2012 11:35:22 +0000 (11:35 +0000)]
Introduce "feature flags" for ZFS pools (bump SPA version to 5000).
Add first feature "com.delphix:async_destroy" (asynchronous destroy
of ZFS datasets).
Implement features support in ZFS boot code.

Illumos revisions merged:
13700:2889e2596bd6
13701:1949b688d5fb
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags

References:
https://www.illumos.org/issues/2619
https://www.illumos.org/issues/2747

Obtained from: illumos (issue #2619, #2747)
MFC after: 1 month

12 years agoWrap the whole (software) TX path from ifnet dequeue to software queue
Adrian Chadd [Mon, 11 Jun 2012 07:44:16 +0000 (07:44 +0000)]
Wrap the whole (software) TX path from ifnet dequeue to software queue
(or direct dispatch) behind the TXQ lock (which, remember, is doubling
as the TID lock too for now.)

This ensures that:

 (a) the sequence number and the CCMP PN allocation is done together;
 (b) overlapping transmit paths don't interleave frames, so we don't
     end up with the original issue that triggered kern/166190.

     Ie, that we don't end up with seqno A, B in thread 1, C, D in
     thread 2, and they being queued to the software queue as "A C D B"
     or similar, leading to the BAW stalls.

This has been tested:

* both STA and AP modes with INVARIANTS and WITNESS;
* TCP and UDP TX;
* both STA->AP and AP->STA.

STA is a Routerstation Pro (single CPU MIPS) and the AP is a dual-core
Centrino.

PR: kern/166190

12 years agoAdd another TID lock.
Adrian Chadd [Mon, 11 Jun 2012 07:35:24 +0000 (07:35 +0000)]
Add another TID lock.

12 years agoMake sure the frames are queued to the head of the list, not the tail.
Adrian Chadd [Mon, 11 Jun 2012 07:31:50 +0000 (07:31 +0000)]
Make sure the frames are queued to the head of the list, not the tail.
See previous commit.

PR: kern/166190

12 years agoWhen scheduling frames in an aggregate session, the frames should be
Adrian Chadd [Mon, 11 Jun 2012 07:29:25 +0000 (07:29 +0000)]
When scheduling frames in an aggregate session, the frames should be
scheduled from the head of the software queue rather than trying to
queue the newly given frame.

This leads to some rather unfortunate out of order (but still valid
as it's inside the BAW) frame TX.

This now:

* Always queues the frame at the end of the software queue;
* Tries to direct dispatch the frame at the head of the software queue,
  to try and fill up the hardware queue.

TODO:

* I should likely try to queue as many frames to the hardware as I can
  at this point, rather than doing one at a time;
* ath_tx_xmit_aggr() may fail and this code assumes that it'll schedule
  the TID.  Otherwise TX may stall.

PR: kern/166190

12 years agoRetried frames need to be inserted in the head of the list, not the tail.
Adrian Chadd [Mon, 11 Jun 2012 07:15:48 +0000 (07:15 +0000)]
Retried frames need to be inserted in the head of the list, not the tail.

This is an unfortunate byproduct of how the routine is used - it's called
with the head frame on the queue, but if the frame is failed, it's inserted
into the tail of the queue.

Because of this, the sequence numbers would get all shuffled around and
the BAW would be bumped past this sequence number, that's now at the
end of the software queue.  Then, whenever it's time for that frame
to be transmitted, it'll be immediately outside of the BAW and TX will
stall until the BAW catches up.

It can also result in all kinds of weird duplicate BAW frames, leading
to hilarious panics.

PR: kern/166190

12 years agoFinish undoing the previous commit - this part of the code is no longer
Adrian Chadd [Mon, 11 Jun 2012 07:08:40 +0000 (07:08 +0000)]
Finish undoing the previous commit - this part of the code is no longer
required.

PR: kern/166190

12 years agoIntroduce a new lock debug which is specifically for making sure the
Adrian Chadd [Mon, 11 Jun 2012 07:06:49 +0000 (07:06 +0000)]
Introduce a new lock debug which is specifically for making sure the
_TID_ lock is held.

For now the TID lock is also the TXQ lock. This is just to make sure
that the right TXQ lock is held for the given TID.

12 years agoRevert r233227 and followup commits as it breaks CCMP PN replay detection.
Adrian Chadd [Mon, 11 Jun 2012 06:59:28 +0000 (06:59 +0000)]
Revert r233227 and followup commits as it breaks CCMP PN replay detection.

This showed up when doing heavy UDP throughput on SMP machines.

The problem with this is because the 802.11 sequence number is being
allocated separately to the CCMP PN replay number (which is assigned
during ieee80211_crypto_encap()).

Under significant throughput (200+ MBps) the TX path would be stressed
enough that frame TX/retry would force sequence number and PN allocation
to be out of order.  So once the frames were reordered via 802.11 seqnos,
the CCMP PN would be far out of order, causing most frames to be discarded
by the receiver.

I've fixed this in some local work by being forced to:

  (a) deal with the issues that lead to the parallel TX causing out of
      order sequence numbers in the first place;
  (b) fix all the packet queuing issues which lead to strange (but mostly
      valid) TX.

I'll begin fixing these in a subsequent commit or five.

PR: kern/166190

12 years agoFix typo
Kevin Lo [Mon, 11 Jun 2012 03:10:15 +0000 (03:10 +0000)]
Fix typo

12 years ago- Consistenly mention columns and fields
Kevin Lo [Mon, 11 Jun 2012 03:02:40 +0000 (03:02 +0000)]
- Consistenly mention columns and fields
- Add -b to short error messages

Obtained from: NetBSD

12 years agoAdd more description and clarification about the -depth and -d options in
Isabell Long [Sun, 10 Jun 2012 22:14:52 +0000 (22:14 +0000)]
Add more description and clarification about the -depth and -d options in
both places where they are mentioned in find(1).

Discussed with: dougb
PR: docs/168885
Reported by: Ronald F. Guilmette (rfg at tristatelogic dot com)
Approved by: gabor (mentor)
MFC after: 3 days

12 years agoRemove redundant include.
Pawel Jakub Dawidek [Sun, 10 Jun 2012 20:24:01 +0000 (20:24 +0000)]
Remove redundant include.

MFC after: 1 month

12 years agoStyle: move opt_*.h includes in the proper place.
Pawel Jakub Dawidek [Sun, 10 Jun 2012 20:22:10 +0000 (20:22 +0000)]
Style: move opt_*.h includes in the proper place.

MFC after: 1 month

12 years ago"on the their types." -> "on their types."
Tom Rhodes [Sun, 10 Jun 2012 15:56:49 +0000 (15:56 +0000)]
"on the their types." -> "on their types."

12 years agoWhen we are closing capability during dup2(), we want to call mq_fdclose()
Pawel Jakub Dawidek [Sun, 10 Jun 2012 14:57:18 +0000 (14:57 +0000)]
When we are closing capability during dup2(), we want to call mq_fdclose()
on the underlying object and not on the capability itself.

Discussed with: rwatson
Sponsored by: FreeBSD Foundation
MFC after: 1 month

12 years agotouch: Add the -d option from POSIX.1-2008.
Jilles Tjoelker [Sun, 10 Jun 2012 14:26:51 +0000 (14:26 +0000)]
touch: Add the -d option from POSIX.1-2008.

This is much like -t but with a different format which is ISO8601-like and
allows fractions of a second.

The precision is limited to microseconds because of utimes() and friends,
even though stat() returns nanoseconds.

MFC after: 10 days

12 years agoMerge two ifs into one. Other minor style fixes.
Pawel Jakub Dawidek [Sun, 10 Jun 2012 13:10:21 +0000 (13:10 +0000)]
Merge two ifs into one. Other minor style fixes.

MFC after: 1 month

12 years agoUse the previous stack entry protection and max protection to correctly
Konstantin Belousov [Sun, 10 Jun 2012 11:31:50 +0000 (11:31 +0000)]
Use the previous stack entry protection and max protection to correctly
propagate the stack execution permissions when stack is grown down.

First, curproc->p_sysent->sv_stackprot specifies maximum allowed stack
protection for current ABI, so the new stack entry was typically marked
executable always. Second, for non-main stack MAP_STACK mapping,
the PROT_ flags should be used which were specified at the mmap(2) call
time, and not sv_stackprot.

MFC after: 1 week

12 years agoPartially revert r236666:
Alexander Motin [Sun, 10 Jun 2012 11:17:14 +0000 (11:17 +0000)]
Partially revert r236666:
Return PROTO_ATA protocol in response to XPT_PATH_INQ.

smartmontools uses it to identify ATA devices and I don't know any other
place now where it is important. It could probably use XPT_GDEV_TYPE
instead for more accurate protocol information, but let it live for now.

Reported by: matthew
MFC after: 3 days

12 years agoRemove an unneeded increment from initarm. The variable is uninitialised,
Andrew Turner [Sun, 10 Jun 2012 10:40:22 +0000 (10:40 +0000)]
Remove an unneeded increment from initarm. The variable is uninitialised,
is not used in this part of the function and correctly initialised later
when it is used.

12 years agoThe GUMSTIX-QEMU config file is almost identical to the GUMSTIX config,
Andrew Turner [Sun, 10 Jun 2012 10:37:21 +0000 (10:37 +0000)]
The GUMSTIX-QEMU config file is almost identical to the GUMSTIX config,
include the latter file from the former rather than duplicating it.

12 years agoAdd athaggrstats to the ath(4) tools build.
Adrian Chadd [Sun, 10 Jun 2012 06:44:19 +0000 (06:44 +0000)]
Add athaggrstats to the ath(4) tools build.

12 years agoFlesh out 'athaggrstats', a utility which will display the aggregation
Adrian Chadd [Sun, 10 Jun 2012 06:44:04 +0000 (06:44 +0000)]
Flesh out 'athaggrstats', a utility which will display the aggregation
specific statistics for ath(4).

12 years agoAdd a new ioctl for ath(4) which returns the aggregate statistics.
Adrian Chadd [Sun, 10 Jun 2012 06:42:18 +0000 (06:42 +0000)]
Add a new ioctl for ath(4) which returns the aggregate statistics.

12 years agoSimplify fdtofp().
Pawel Jakub Dawidek [Sun, 10 Jun 2012 06:31:54 +0000 (06:31 +0000)]
Simplify fdtofp().

MFC after: 1 month

12 years agoSome fixes for r236772.
Mitsuru IWASAKI [Sun, 10 Jun 2012 02:38:51 +0000 (02:38 +0000)]
Some fixes for r236772.

- Remove cpuset stopped_cpus which is no longer used.
- Add a short comment for cpuset suspended_cpus clearing.
- Fix the un-ordered x86/acpica/acpi_wakeup.c in conf/files.amd64 and i386.

Pointed-out by: attilio@

12 years agoBring a couple of libstdc++ patches from Apple's llvm-gcc project.
Pedro F. Giffuni [Sun, 10 Jun 2012 02:04:11 +0000 (02:04 +0000)]
Bring a couple of libstdc++ patches from Apple's llvm-gcc project.

Modified Fri Jul 10 07:44:34 2009 CDT by rafael
backport part of
http://gcc.gnu.org/ml/gcc-cvs/2007-10/msg00118.html

The patch is for libstdc++ and it was GPL2 at the time.

Modified Tue Apr 29 01:20:19 2008 CDT by asl
Backport from mainline (pre-GPLv3).
Fix for sizeof(const void*) > sizeof(unsigned long).

Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoPull out the common code to initialise proc0 & thread0 from initarm to a
Andrew Turner [Sun, 10 Jun 2012 01:13:04 +0000 (01:13 +0000)]
Pull out the common code to initialise proc0 & thread0 from initarm to a
common function.

Reviewed by: imp

12 years agoWhen synchronously syncing a device (MNT_WAIT), wait for buffers
Kirk McKusick [Sat, 9 Jun 2012 22:26:53 +0000 (22:26 +0000)]
When synchronously syncing a device (MNT_WAIT), wait for buffers
to become available. Otherwise we may excessively spin and fail
with ``fsync: giving up on dirty''.

Reviewed by: kib
Tested by:   Peter Holm
MFC after:   1 week

12 years agoUpdate maximum number of tables available in ipfw to reflect
Alexander V. Chernikov [Sat, 9 Jun 2012 20:47:58 +0000 (20:47 +0000)]
Update maximum number of tables available in ipfw to reflect
changes done in r233478.

Approved by:      kib(mentor)
MFC after:        3 days

12 years agods_guid of 0 is special, as it is used by snapshot receive code to
Pawel Jakub Dawidek [Sat, 9 Jun 2012 20:16:19 +0000 (20:16 +0000)]
ds_guid of 0 is special, as it is used by snapshot receive code to
differentiate between an incremental and full stream.
Be sure not to generate guid equal to 0.

Reported by: someone who saw 0 being generated as 64bit random guid
MFC after: 3 days

12 years agoThere is no need to drop the FILEDESC lock around malloc(M_WAITOK) anymore, as
Pawel Jakub Dawidek [Sat, 9 Jun 2012 18:50:32 +0000 (18:50 +0000)]
There is no need to drop the FILEDESC lock around malloc(M_WAITOK) anymore, as
we now use sx lock for filedesc structure protection.

Reviewed by: kib
MFC after: 1 month

12 years agoRemove now unused variable.
Pawel Jakub Dawidek [Sat, 9 Jun 2012 18:48:06 +0000 (18:48 +0000)]
Remove now unused variable.

MFC after: 1 month
MFC with: r236820

12 years agoMake some of the loops more readable.
Pawel Jakub Dawidek [Sat, 9 Jun 2012 18:03:23 +0000 (18:03 +0000)]
Make some of the loops more readable.

Reviewed by: tegge
MFC after: 1 month

12 years agoValidate IPv4 network mask being passed to ipfw kernel interface.
Alexander V. Chernikov [Sat, 9 Jun 2012 17:39:05 +0000 (17:39 +0000)]
Validate IPv4 network mask being passed to ipfw kernel interface.
Incorrect mask can possibly be one of the reasons for kern/127209 existance.

Approved by:        kib(mentor)
MFC after:          3 days

12 years ago__flt_rounds was omitted from the exported symbols here.
Tim Kientzle [Sat, 9 Jun 2012 16:09:53 +0000 (16:09 +0000)]
__flt_rounds was omitted from the exported symbols here.

Submitted by: Jan Sieka
Reviewed by: arm@
MFC after: 1 week

12 years agoOne more major cam_periph_error() rewrite to improve error handling and
Alexander Motin [Sat, 9 Jun 2012 13:07:44 +0000 (13:07 +0000)]
One more major cam_periph_error() rewrite to improve error handling and
reporting. It includes:
 - removing of error messages controlled by bootverbose, replacing them
with more universal and informative debugging on CAM_DEBUG_INFO level,
that is now built into the kernel by default;
 - more close following to the arguments submitted by caller, such as
SF_PRINT_ALWAYS, SF_QUIET_IR and SF_NO_PRINT; consumer knows better which
errors are usual/expected at this point and which are really informative;
 - adding two new flags SF_NO_RECOVERY and SF_NO_RETRY to allow caller
specify how much assistance it needs at this point; previously consumers
controlled that by not calling cam_periph_error() at all, but that made
behavior inconsistent and debugging complicated;
 - tuning debug messages and taken actions order to make debugging output
more readable and cause-effect relationships visible;
 - making camperiphdone() (common device recovery completion handler) to
also use cam_periph_error() in most cases, instead of own dumb code;
 - removing manual sense fetching code from cam_periph_error(); I was told
by number of people that it is SIM obligation to fetch sense data, so this
code is useless and only significantly complicates recovery logic;
 - making ada, da and pass driver to use cam_periph_error() with new limited
recovery options to handle error recovery and debugging in common way;
as one of results, CAM_REQUEUE_REQ and other retrying statuses are now
working fine with pass driver, that caused many problems before.
 - reverting r186891 by raj@ to avoid burning few seconds in tight DELAY()
loops on device probe, while device simply loads media; I think that problem
may already be fixed in other way, and even if it is not, solution must be
different.

Sponsored by: iXsystems, Inc.
MFC after: 2 weeks