]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoDo not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.
jkim [Fri, 4 Feb 2011 19:49:02 +0000 (19:49 +0000)]
Do not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.
When the basehome does not exist, it creates all intermediate directories as
required, which is logically equivalent to mkdir(1) with -m and -p options.
However, it modifies all intermediate directories, not just the final home
directory unlike mkdir.  This problem was introduced in two revisions, i.e.,
r1.59 (SVN r167919) and r1.60 (SVN r168044).

MFC after: 1 month

13 years agoCorrect include path.
jhb [Fri, 4 Feb 2011 18:36:09 +0000 (18:36 +0000)]
Correct include path.

Submitted by: arundel
MFC after: 1 week

13 years agoDisable TX IP checksum offloading for RTL8168C controllers. The
yongari [Fri, 4 Feb 2011 17:49:55 +0000 (17:49 +0000)]
Disable TX IP checksum offloading for RTL8168C controllers.  The
controller in question generates frames with bad IP checksum value
if packets contain IP options.  For instance, packets generated by
ping(8) with record route option have wrong IP checksum value. The
controller correctly computes checksum for normal TCP/UDP packets
though.
There are two known RTL8168/8111C variants in market and the issue
I observed happened on RL_HWREV_8168C_SPIN2. I'm not sure
RL_HWREV_8168C also has the same issue but it would be better to
assume it has the same issue since they shall share same core.
RTL8102E which is supposed to be released at the time of
RTL8168/8111C announcement does not have the issue.

Tested by: Konstantin V. Krotov ( kkv <> insysnet dot ru )

13 years agoMake sys_signame upper case.
jilles [Fri, 4 Feb 2011 16:40:50 +0000 (16:40 +0000)]
Make sys_signame upper case.

This matches the constants from <signal.h> with 'SIG' removed, which POSIX
requires kill and trap to accept and 'kill -l' to write.

'kill -l', 'trap', 'trap -l' output is now upper case.

In Turkish locales, signal names with an upper case 'I' are now accepted,
while signal names with a lower case 'i' are no longer accepted, and the
output of 'killall -l' now contains proper capital 'I' without dot instead
of a dotted capital 'I'.

13 years agoWe can pass a format string and args to panic(), so instead of using
emaste [Fri, 4 Feb 2011 15:45:48 +0000 (15:45 +0000)]
We can pass a format string and args to panic(), so instead of using
printf() to output some information before a panic, just include that
information in the panic.

Submitted by: bde
Reviewed by: bde

13 years agovdev's sectorsize should not be greater than 8 Kbytes and also
ae [Fri, 4 Feb 2011 15:22:56 +0000 (15:22 +0000)]
vdev's sectorsize should not be greater than 8 Kbytes and also
it should be power of 2. This prevents non-aligned access while
probing vdev's labels.

PR: kern/147852
Reviewed by: pjd
MFC after: 1 week

13 years agoCollapse duplicate definitions of EXT2_SB().
jhb [Fri, 4 Feb 2011 14:20:27 +0000 (14:20 +0000)]
Collapse duplicate definitions of EXT2_SB().

Submitted by: Pedro F. Giffuni  giffunip at yahoo

13 years agoAlways assert that the turnstile chain lock is held in turnstile_wait()
jhb [Fri, 4 Feb 2011 14:16:41 +0000 (14:16 +0000)]
Always assert that the turnstile chain lock is held in turnstile_wait()
and remove a duplicate hash lookup.

MFC after: 1 week

13 years agoWhen turning off TCP_NOPUSH, only call tcp_output() to immediately flush
jhb [Fri, 4 Feb 2011 14:13:15 +0000 (14:13 +0000)]
When turning off TCP_NOPUSH, only call tcp_output() to immediately flush
any pending data if the connection is established.

Submitted by: csjp
Reviewed by: lstewart
MFC after: 1 week

13 years agoUse M_WAITOK rather than M_NOWAIT when creating taskqueues via the
jhb [Fri, 4 Feb 2011 14:06:57 +0000 (14:06 +0000)]
Use M_WAITOK rather than M_NOWAIT when creating taskqueues via the
TASKQUEUE_DEFINE macros.  All the places that use these macros to create
taskqueues assume that the operation succeeds.

MFC after: 1 week

13 years ago1) Fix cpu mapping per JB's suggestions
rrs [Fri, 4 Feb 2011 13:50:30 +0000 (13:50 +0000)]
1) Fix cpu mapping per JB's suggestions
2) Fix it so INIT's don't always end up on CPU0

MFC after: 3 months

13 years agoReplace __LP64__ with __mips_n64. This partly reverts r217147.
tijl [Fri, 4 Feb 2011 13:09:46 +0000 (13:09 +0000)]
Replace __LP64__ with __mips_n64. This partly reverts r217147.

Requested by: jmallett, imp
Approved by: kib (mentor)

13 years agoFix typo (Tuneable -> Tunable).
brucec [Fri, 4 Feb 2011 12:03:48 +0000 (12:03 +0000)]
Fix typo (Tuneable -> Tunable).

13 years agoAdd PEX0 and select the first serial port as console.
marcel [Fri, 4 Feb 2011 01:09:02 +0000 (01:09 +0000)]
Add PEX0 and select the first serial port as console.

13 years agoOops, fix newbie mistake that breaks the normal build.
adrian [Fri, 4 Feb 2011 00:25:18 +0000 (00:25 +0000)]
Oops, fix newbie mistake that breaks the normal build.

13 years agosh: Return only 126 or 127 for execve() failures.
jilles [Thu, 3 Feb 2011 23:38:11 +0000 (23:38 +0000)]
sh: Return only 126 or 127 for execve() failures.

Do not return 2 for errors other than [EACCES] or [ENOENT].

13 years agoFix several bugs in the stream schedulers.
tuexen [Thu, 3 Feb 2011 20:44:49 +0000 (20:44 +0000)]
Fix several bugs in the stream schedulers.
From Robin Seggelmann.

MFC after: 3 months.

13 years agoModify the TX path to set and use the 11n rate scenario bits.
adrian [Thu, 3 Feb 2011 20:30:17 +0000 (20:30 +0000)]
Modify the TX path to set and use the 11n rate scenario bits.

This isn't strictly required to TX (at least non-agg and non-HT40,
non-short-GI) frames; but as it needs to be done anyway, just get
it done.

Linux ath9k uses the rate scenario style path for -all- packets,
legacy or otherwise. This code does much the same.

Beacon TX still uses the legacy, non-rate-scenario TX descriptor
setup. Ath9k also does this.

This 11n rate scenario path is only called for chips in the AR5416
HAL; legacy chips use the previous interface for TX'ing.

13 years agoDisable the code I previously added from Rui's 802.11n branch.
adrian [Thu, 3 Feb 2011 20:26:26 +0000 (20:26 +0000)]
Disable the code I previously added from Rui's 802.11n branch.

A-MPDU RX interferes with packet retransmission/reordering.
In local testing, I was seeing A-MPDU being negotiated and then
not used by the AP sending frames to the STA; the STA would then
treat non A-MPDU frames that are retransmits as out of the window
and get plain confused.

The hardware RX status descriptor has a "I'm part of an aggregate"
bit; so this should eventually be tested and then punted to the
A-MPDU reorder handling only if it has this bit set.

13 years agoMake sure that changing the ECN sysctl does not affect
tuexen [Thu, 3 Feb 2011 19:59:00 +0000 (19:59 +0000)]
Make sure that changing the ECN sysctl does not affect
exisiting associations and endpoints.

MFC after: 3 months.

13 years ago1) Move per John Baldwin to mp_maxid
rrs [Thu, 3 Feb 2011 19:22:21 +0000 (19:22 +0000)]
1) Move per John Baldwin to mp_maxid
2) Some signed/unsigned errors found by Mac OS compiler (from Michael)
3) a couple of copyright updates on the effected files.

MFC after: 3 months

13 years agoFix for detection of MTK 3329 GPS USB devices.
hselasky [Thu, 3 Feb 2011 18:25:55 +0000 (18:25 +0000)]
Fix for detection of MTK 3329 GPS USB devices.

Submitted by: Mykhaylo Yehorov
PR: usb/153929
Approved by: thompsa (mentor)

13 years agoThe FDT describes the host controller directly. There's no need to
marcel [Thu, 3 Feb 2011 18:07:05 +0000 (18:07 +0000)]
The FDT describes the host controller directly. There's no need to
get properties from the parent. The parent is in fact the FDT bus
itself and will therefore not have the properties we're looking
for.

Sponsored by: Juniper Networks

13 years agoAccept r1 as having the metadata pointer argument if r0 is 0.
marcel [Thu, 3 Feb 2011 17:35:16 +0000 (17:35 +0000)]
Accept r1 as having the metadata pointer argument if r0 is 0.
This provides backward compatibility with Juniper loaders.

Sponsored by: Juniper Networks

13 years agoBring the list of OIDs up-to-date to prevent conflicts.
harti [Thu, 3 Feb 2011 15:19:18 +0000 (15:19 +0000)]
Bring the list of OIDs up-to-date to prevent conflicts.

13 years agoEliminate unnecessary page hold_count checks. These checks predate
alc [Thu, 3 Feb 2011 14:42:46 +0000 (14:42 +0000)]
Eliminate unnecessary page hold_count checks.  These checks predate
r90944, which introduced a general mechanism for handling the freeing
of held pages.

Reviewed by: kib@

13 years agoUse a dedicated taskqueue with a thread that runs at a software-interrupt
jhb [Thu, 3 Feb 2011 13:09:22 +0000 (13:09 +0000)]
Use a dedicated taskqueue with a thread that runs at a software-interrupt
priority for the periodic polling of the machine check registers.

13 years agoFix the per CPU stats so that:
rrs [Thu, 3 Feb 2011 11:52:22 +0000 (11:52 +0000)]
Fix the per CPU stats so that:
1) They don't use the giant "MAX_CPU" define and instead
   are allocated dynamically based on mp_ncpus
2) Will zero with the netstat -z -s -p sctp
3) Will be properly handled by both the sctp_init and finish
   (the multi-net stuff was incorrectly bzero'ing in sctp_init
    the wrong size.. the bzero is now moved to the right places).
    And of course the free is put in at the very end.

MFC after: 3 Months

13 years agoSetup another socketpair between parent and child, so that primary sandboxed
pjd [Thu, 3 Feb 2011 11:39:49 +0000 (11:39 +0000)]
Setup another socketpair between parent and child, so that primary sandboxed
worker can ask the main privileged process to connect in worker's behalf
and then we can migrate descriptor using this socketpair to worker.
This is not really needed now, but will be needed once we start to use
capsicum for sandboxing.

MFC after: 1 week

13 years agoAdd missing locking after moving keepalive_send() to remote send thread
pjd [Thu, 3 Feb 2011 11:33:32 +0000 (11:33 +0000)]
Add missing locking after moving keepalive_send() to remote send thread
in r214692.

MFC after: 1 week

13 years agoDrop privileges after connecting to hastd, but before sending or receiving
pjd [Thu, 3 Feb 2011 10:44:40 +0000 (10:44 +0000)]
Drop privileges after connecting to hastd, but before sending or receiving
anything.

MFC after: 1 week

13 years agoLet the caller log info about successful privilege drop.
pjd [Thu, 3 Feb 2011 10:37:44 +0000 (10:37 +0000)]
Let the caller log info about successful privilege drop.
We don't want to log this in hastctl.

MFC after: 1 week

13 years agoAdds an experimental option to create a pool of
rrs [Thu, 3 Feb 2011 10:05:30 +0000 (10:05 +0000)]
Adds an experimental option to create a pool of
threads. These serve as input threads and are queued
packets based on the V-tag number. This is similar to
what a modern card can do with queue's for TCP... but
alas modern cards know nothing about SCTP.

MFC after: 3 months (maybe)

13 years agoInclude driver name in panic string, to make it easier to find these should
emaste [Thu, 3 Feb 2011 03:07:11 +0000 (03:07 +0000)]
Include driver name in panic string, to make it easier to find these should
the panic ever occur.

13 years agoRevert part of r173264. Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb
emaste [Thu, 3 Feb 2011 02:14:53 +0000 (02:14 +0000)]
Revert part of r173264.  Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb
make use of the aac_ioctl_event callback, if aac_alloc_command fails.  This
can end up in an infinite loop in the while loop in aac_release_command.

Further investigation into the issue mentioned by Scott Long [1] will be
necessary.

[1] http://lists.freebsd.org/pipermail/freebsd-current/2007-October/078740.html

13 years agoSetting TARGET and TARGET_ARCH needs to be done in _MAKE, not in the
imp [Wed, 2 Feb 2011 23:59:24 +0000 (23:59 +0000)]
Setting TARGET and TARGET_ARCH needs to be done in _MAKE, not in the
TGTS rule as _MAKE is used elsewhere.  This should fix make world.

13 years agosh: Add test for shell script without '#!'.
jilles [Wed, 2 Feb 2011 22:03:18 +0000 (22:03 +0000)]
sh: Add test for shell script without '#!'.

13 years agosh: Remove comment mentioning herefd, which is gone.
jilles [Wed, 2 Feb 2011 21:48:53 +0000 (21:48 +0000)]
sh: Remove comment mentioning herefd, which is gone.

13 years agoAdd some obsolete manpages.
uqs [Wed, 2 Feb 2011 21:09:30 +0000 (21:09 +0000)]
Add some obsolete manpages.

13 years agoAdd missing argument after r218192.
bz [Wed, 2 Feb 2011 20:00:35 +0000 (20:00 +0000)]
Add missing argument after r218192.

13 years agolibkvm: fix logic inversion introduced with last commit
uqs [Wed, 2 Feb 2011 17:01:26 +0000 (17:01 +0000)]
libkvm: fix logic inversion introduced with last commit

Reported by: Brandon Gooch <jamesbrandongooch@gmail.com>
Pointy hat to: uqs

13 years agoPut the general logic for being a CPU hog into a new function
mdf [Wed, 2 Feb 2011 16:35:10 +0000 (16:35 +0000)]
Put the general logic for being a CPU hog into a new function
should_yield().  Use this in various places.  Encapsulate the common
case of check-and-yield into a new function maybe_yield().

Change several checks for a magic number of iterations to use
should_yield() instead.

MFC after: 1 week

13 years ago- Rename proto_descriptor_{send,recv}() functions to
pjd [Wed, 2 Feb 2011 15:53:09 +0000 (15:53 +0000)]
- Rename proto_descriptor_{send,recv}() functions to
  proto_connection_{send,recv} and change them to return proto_conn
  structure. We don't operate directly on descriptors, but on
  proto_conns.
- Add wrap method to wrap descriptor with proto_conn.
- Remove methods to send and receive descriptors and implement this
  functionality as additional argument to send and receive methods.

MFC after: 1 week

13 years agoAdd proto_connect_wait() to wait for connection to finish.
pjd [Wed, 2 Feb 2011 15:46:28 +0000 (15:46 +0000)]
Add proto_connect_wait() to wait for connection to finish.
If timeout argument to proto_connect() is -1, then the caller needs to use
this new function to wait for connection.

This change is in preparation for capsicum, where sandboxed worker wants
to ask main process to connect in worker's behalf and pass descriptor
to the worker. Because we don't want the main process to wait for the
connection, it will start async connection and pass descriptor to the
worker who will be responsible for waiting for the connection to finish.

MFC after: 1 week

13 years agoAllow to specify connection timeout by the caller.
pjd [Wed, 2 Feb 2011 15:42:00 +0000 (15:42 +0000)]
Allow to specify connection timeout by the caller.

MFC after: 1 week

13 years agoMove protocol allocation and deallocation to separate functions.
pjd [Wed, 2 Feb 2011 15:23:07 +0000 (15:23 +0000)]
Move protocol allocation and deallocation to separate functions.

MFC after: 1 week

13 years agoFix build with DIAGNOSTIC enabled.
jhb [Wed, 2 Feb 2011 14:59:05 +0000 (14:59 +0000)]
Fix build with DIAGNOSTIC enabled.

Pointy hat to: jhb

13 years agoRemove OpenSolaris include path referring to a non-existing directory
pluknet [Wed, 2 Feb 2011 14:41:32 +0000 (14:41 +0000)]
Remove OpenSolaris include path referring to a non-existing directory
never committed from p4 dtrace branch.
[The correct include path is referenced from every opensolaris compat
consumer's module Makefile, so it doesn't serve any purpose anyway.]

Reported by: arundel on freebsd-hackers@ via clang
Approved by: kib (mentor)
MFC after: 1 week

13 years ago1) Allow a chunk to track the cwnd it was at when sent.
rrs [Wed, 2 Feb 2011 11:13:23 +0000 (11:13 +0000)]
1) Allow a chunk to track the cwnd it was at when sent.
2) Add separate max-bursts for retransmit and hb. These
   are set to sysctlable values but not settable via the
   socket api. This makes sure we don't blast out HB's or
   fast-retransmits.
3) Determine on the first data transmission on a net if
   its local-lan (by being under or over a RTT). This
   can later be used to think about different algorithms
   based on locallan vs big-i (experimental)
4) The cwnd should NOT be allowed to grow when an ECNEcho
   is seen (TCP has this same bug). We fix this in SCTP
   so an ECNe being seen prevents an advance of cwnd.
5) CWR's should not be sent multiple times to the
   same network, instead just updating the TSN being
   transmitted if needed.

MFC after: 1 Month

13 years agoBe prepared that hp_client or hp_server might be NULL now.
pjd [Wed, 2 Feb 2011 08:24:26 +0000 (08:24 +0000)]
Be prepared that hp_client or hp_server might be NULL now.

MFC after: 1 week

13 years agoRename INTR_VEC to MAP_IRQ. From the OFW or FDT we obtain a
marcel [Wed, 2 Feb 2011 05:58:51 +0000 (05:58 +0000)]
Rename INTR_VEC to MAP_IRQ. From the OFW or FDT we obtain a
PIC handle with interrupt pin. This we map to the resource
called SYS_RES_IRQ.

13 years agoCall the correct ANI Attach routine.
adrian [Wed, 2 Feb 2011 03:55:34 +0000 (03:55 +0000)]
Call the correct ANI Attach routine.

13 years agoMake the generated files depend on the Makefile so new platforms are easier
imp [Wed, 2 Feb 2011 03:27:31 +0000 (03:27 +0000)]
Make the generated files depend on the Makefile so new platforms are easier
to add than mipsn32 was when I was working on it...

13 years agoRevert last change now that the reason for it is no more...
imp [Wed, 2 Feb 2011 03:24:52 +0000 (03:24 +0000)]
Revert last change now that the reason for it is no more...
MACHINE_ARCH is now always mipsel when building mips/mips.

13 years agoRecommit r218169, enclosing with #ifdef _KERNEL
mm [Tue, 1 Feb 2011 23:12:13 +0000 (23:12 +0000)]
Recommit r218169, enclosing with #ifdef _KERNEL
This change is sufficient for the ZFS kernel module.

Discussed with: pjd
MFC after: 1 week

13 years agoWhitespace nit
imp [Tue, 1 Feb 2011 22:50:23 +0000 (22:50 +0000)]
Whitespace nit

13 years agoNew ID for the Novatel MC547
n_hibma [Tue, 1 Feb 2011 22:26:06 +0000 (22:26 +0000)]
New ID for the Novatel MC547

PR: 154127
Submitted by: Mike Tancsa
MFC after: 1 day

13 years agoRevert r218169 until it can be tested and fixed properly.
kan [Tue, 1 Feb 2011 21:15:35 +0000 (21:15 +0000)]
Revert r218169 until it can be tested and fixed properly.

13 years agoSome cosmetic fixes and remove a duplicate constant.
jhb [Tue, 1 Feb 2011 18:30:52 +0000 (18:30 +0000)]
Some cosmetic fixes and remove a duplicate constant.

Submitted by: Pedro F. Giffuni  giffunip at yahoo

13 years ago- Set the next_alloc fields for an i-node after allocating a new block
jhb [Tue, 1 Feb 2011 18:21:45 +0000 (18:21 +0000)]
- Set the next_alloc fields for an i-node after allocating a new block
  so that future allocations start with most recently allocated block
  rather than the beginning of the filesystem.
- Fix ext2_alloccg() to properly scan for 8 block chunks that are not
  aligned on 8-bit boundaries.  Previously this was causing new blocks
  to be allocated in a highly fragmented fashion (block 0 of a file at
  lbn N, block 1 at lbn N + 8, block 2 at lbn N + 16, etc.).
- Cosmetic tweaks to the currently-disabled fancy realloc sysctls.

PR: kern/153584
Discussed with: bde
Tested by: Pedro F. Giffuni  giffunip at yahoo, Zheng Liu (lz)

13 years agoOutput an appropriate amount of padding to line up per-CPU state columns
jhb [Tue, 1 Feb 2011 15:48:27 +0000 (15:48 +0000)]
Output an appropriate amount of padding to line up per-CPU state columns
rather than using a terminal sequence to move the cursor when drawing the
initial screen.

Requested by: arundel
MFC after: 3 days

13 years agoJust to be sure, make sure the MCS rates are allowed for TX.
adrian [Tue, 1 Feb 2011 15:26:30 +0000 (15:26 +0000)]
Just to be sure, make sure the MCS rates are allowed for TX.

Approved by: rpaulo@

13 years agoFor ZFS, change the type of clock_t to int64_t.
mm [Tue, 1 Feb 2011 14:28:50 +0000 (14:28 +0000)]
For ZFS, change the type of clock_t to int64_t.

The clock_t type in OpenSolaris is long (int64_t on amd64).
On FreeBSD clock_t is int32_t. The clock_t type is used in several places
in the ZFS code to store system uptime in milliseconds ("seconds * hz").

With hz=1000 we have a 32-bit integer overflow in 24 days, 20 hours,
31 minutes and 23.648 seconds. This has a user reported negative impact
on l2arc_feed_thread() and may cause unexpected results from other functions
using clock_t.

Reported by: Artem Belevich <fbsdlist@src.cx> on freebsd-fs@
MFC after: 1 week

13 years agoThe unp_gc() function drops and reaquires lock between scan and
kib [Tue, 1 Feb 2011 13:33:49 +0000 (13:33 +0000)]
The unp_gc() function drops and reaquires lock between scan and
collect phases.  The unp_discard() function executes
unp_externalize_fp(), which might make the socket eligible for gc-ing,
and then, later, taskqueue will close the socket.  Since unp_gc()
dropped the list lock to do the malloc, close might happen after the
mark step but before the collection step, causing collection to not
find the socket and miss one array element.

I believe that the race was there before r216158, but the stated
revision made the window much wider by postponing the close to
taskqueue sometimes.

Only process as much array elements as we find the sockets during
second phase of gc [1].  Take linkage lock and recheck the eligibility
of the socket for gc, as well as call fhold() under the linkage lock.

Reported and tested by: jmallett
Submitted by:   jmallett [1]
Reviewed by: rwatson, jeff (possibly)
MFC after: 1 week

13 years agoAlgorithm modules can define their own private congestion signal types in the
lstewart [Tue, 1 Feb 2011 13:32:27 +0000 (13:32 +0000)]
Algorithm modules can define their own private congestion signal types in the
top 8 bits of the 32 bit signal bit field space for internal use. These private
signals should not be leaked outside of a module.

Given that many algorithm modules use the NewReno hook functions to simplify
their implementation, the obvious place such a leak would show up is in the
NewReno cong_signal hook function.

- Show the full number of significant bits in the signal type definitions in
  <netinet/cc.h>.

- Add a bitmask to simplify figuring out if a given signal is in the private or
  public bit range.

- Add a sanity check in newreno_cong_signal() to ensure private signals are not
  being leaked into the hook function.

Sponsored by: FreeBSD Foundation
Discussed with: David Hayes <dahayes at swin edu au>
MFC after: 1 week
X-MFC with: r215166

13 years agoReintroduce bugfix from r210103 and fix xz on strong-aligned architectures.
mm [Tue, 1 Feb 2011 10:28:05 +0000 (10:28 +0000)]
Reintroduce bugfix from r210103 and fix xz on strong-aligned architectures.
This fix was accidentially reverted with the 5.0.0 update in r215187.

PR: bin/154310
Submitted by: Michael Moll <kvedulv@kvedulv.de>
MFC after: 3 days

13 years agoUse correct kernel types for all fields in USB PF code and headers.
hselasky [Tue, 1 Feb 2011 10:25:48 +0000 (10:25 +0000)]
Use correct kernel types for all fields in USB PF code and headers.

Approved by: thompsa (mentor)

13 years agoAdd a new method to the rate control modules which extract out the
adrian [Tue, 1 Feb 2011 08:10:18 +0000 (08:10 +0000)]
Add a new method to the rate control modules which extract out the
three other rates and try counts.

The 11n rate scenario path wants to take a list of rate and tries,
rather than calling setupxtxdesc().

13 years agoInclude some preliminary TX HT rate scenario setup code.
adrian [Tue, 1 Feb 2011 08:03:01 +0000 (08:03 +0000)]
Include some preliminary TX HT rate scenario setup code.

The AR5416 and later TX descriptors have new fields for supporting
11n bits (eg 20/40mhz mode, short/long GI) and enabling/disabling
RTS/CTS protection per rate.

These functions will be responsible for initialising the TX descriptors
for the AR5416 and later chips for both HT and legacy frames.

Beacon frames will remain using the non-11n TX descriptor setup for now;
Linux ath9k does much the same.

Note that these functions aren't yet used anywhere; a few more framework
changes are needed before all of the right rate information is available
for TX.

13 years agoDo not set socket send and receive buffer. It will be auto-tuned.
pjd [Tue, 1 Feb 2011 07:58:43 +0000 (07:58 +0000)]
Do not set socket send and receive buffer. It will be auto-tuned.

Confirmed by: rwatson
MFC after: 1 week

13 years agoRefator the common code which calculates the 802.11g protection duration.
adrian [Tue, 1 Feb 2011 07:50:26 +0000 (07:50 +0000)]
Refator the common code which calculates the 802.11g protection duration.

13 years agoFix typo in comment: "course" -> "coarse"
lstewart [Tue, 1 Feb 2011 07:10:13 +0000 (07:10 +0000)]
Fix typo in comment: "course" -> "coarse"

Sponsored by: FreeBSD Foundation
Submitted by: jmallett
MFC after: 3 months
X-MFC with: r218152

13 years agoImport an implementation of the CAIA-Hamilton-Delay (CHD) congestion control
lstewart [Tue, 1 Feb 2011 07:05:14 +0000 (07:05 +0000)]
Import an implementation of the CAIA-Hamilton-Delay (CHD) congestion control
algorithm described in the paper "Improved coexistence and loss tolerance for
delay based TCP congestion control" by Hayes and Armitage. It is implemented as
a kernel module compatible with the recently committed modular congestion
control framework.

CHD enhances the approach taken by the Hamilton-Delay (HD) algorithm to provide
tolerance to non-congestion related packet loss and improvements to coexistence
with loss-based congestion control algorithms. A key idea in improving
coexistence with loss-based congestion control algorithms is the use of a shadow
window, which attempts to track how NewReno's congestion window (cwnd) would
evolve. At the next packet loss congestion event, CHD uses the shadow window to
correct cwnd in a way that reduces the amount of unfairness CHD experiences when
competing with loss-based algorithms.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way
MFC after: 3 months

13 years ago* Add a rather hacky "does this speak the 11n TX descriptor format"
adrian [Tue, 1 Feb 2011 06:59:44 +0000 (06:59 +0000)]
* Add a rather hacky "does this speak the 11n TX descriptor format"
  function; which will be later used by the TX path to determine
  whether to use the extended features or not.

* Break out the descriptor chaining logic into a separate function;
  again so it can be switched out later on for the 11n version when
  needed.

* Refactor out the encryption-swizzling code that's common in the
  raw and normal TX path.

13 years agoImport a clean-room implementation of the Hamilton-Delay (HD) congestion control
lstewart [Tue, 1 Feb 2011 06:42:46 +0000 (06:42 +0000)]
Import a clean-room implementation of the Hamilton-Delay (HD) congestion control
algorithm based on the paper "A strategy for fair coexistence of loss and
delay-based congestion control algorithms" by Budzisz, Stanojevic, Shorten and
Baker. It is implemented as a kernel module compatible with the recently
committed modular congestion control framework.

HD uses a probabilistic approach to reacting to delay-based congestion. The
probability of reducing cwnd is zero when the queuing delay is very small,
increasing to a maximum at a set threshold, then back down to zero again when
the queuing delay is high. Normal operation keeps the queuing delay below the
set threshold. However, since loss-based congestion control algorithms push the
queuing delay high when probing for bandwidth, having the probability of
reducing cwnd drop back to zero for high delays allows HD to compete with
loss-based algorithms.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way
MFC after: 3 months

13 years agoImport a clean-room implementation of the VEGAS congestion control algorithm
lstewart [Tue, 1 Feb 2011 06:17:00 +0000 (06:17 +0000)]
Import a clean-room implementation of the VEGAS congestion control algorithm
based on the paper "TCP Vegas: end to end congestion avoidance on a global
internet" by Brakmo and Peterson. It is implemented as a kernel module
compatible with the recently committed modular congestion control framework.

VEGAS uses network delay as a congestion indicator and unlike regular loss-based
algorithms, attempts to keep the network operating with stable queuing delays
and no congestion losses. By keeping network buffers used along the path within
a set range, queuing delays are kept low while maintaining high throughput.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way
MFC after: 3 months

13 years agoAdd TX/RX chainmask info to if_ath - this is needed for the 11n TX rate series.
adrian [Tue, 1 Feb 2011 04:39:15 +0000 (04:39 +0000)]
Add TX/RX chainmask info to if_ath - this is needed for the 11n TX rate series.

13 years agoAdd a new capability which reports the number of spatial streams a device supports.
adrian [Tue, 1 Feb 2011 03:51:35 +0000 (03:51 +0000)]
Add a new capability which reports the number of spatial streams a device supports.

The higher levels (net80211, if_ath, ath_rate) need this to make correct
choices about what MCS capabilities to advertise and what MCS rates are
able to be TXed.

In summary:

* AR5416 - 2/3 antennas, 2x2 streams
* AR9160 - 2/3 antennas, 2x2 streams
* AR9220 - 2 antennas, 2x2 sstraems
* AR9280 - 2 antennas, 2x2 streams
* AR9285 - 2 antennas but with antenna diversity, 1x1 stream

13 years agoSupport for the new Patsburg PCH chipset:
jfv [Tue, 1 Feb 2011 01:05:11 +0000 (01:05 +0000)]
Support for the new Patsburg PCH chipset:
     - SMBus Controller
     - SATA Controller
     - HD Audio Controller
     - Watchdog Controller

Thanks to Seth Heasley (seth.heasley@intel.com) for providing us code.

MFC after 3 days

13 years agoFix build on ia64.
pjd [Mon, 31 Jan 2011 23:46:36 +0000 (23:46 +0000)]
Fix build on ia64.

I found no way how to use CMSG_NXTHDR() macro on ia64 without alignment
warnings.

MFC after: 1 week

13 years agoUntil I fix the build on ia64 comment out problematic lines.
pjd [Mon, 31 Jan 2011 23:08:26 +0000 (23:08 +0000)]
Until I fix the build on ia64 comment out problematic lines.
Those lines are part of the (for now) unused functions.

13 years agoRemove the now unneeded XXX.
adrian [Mon, 31 Jan 2011 22:45:14 +0000 (22:45 +0000)]
Remove the now unneeded XXX.

13 years agoEnable AMPDU reorder processing and receiving BAR frames when doing 802.11n.
adrian [Mon, 31 Jan 2011 22:44:28 +0000 (22:44 +0000)]
Enable AMPDU reorder processing and receiving BAR frames when doing 802.11n.

Obtained from: rpaulo@

13 years agoLet rpcbind clean up after itself
dougb [Mon, 31 Jan 2011 21:03:08 +0000 (21:03 +0000)]
Let rpcbind clean up after itself

13 years agoalc_rev was used without initialization such that it failed to
yongari [Mon, 31 Jan 2011 20:00:43 +0000 (20:00 +0000)]
alc_rev was used without initialization such that it failed to
apply AR8152 v1.0 specific initialization code. Fix this bug by
explicitly reading PCI device revision id via PCI accessor.

Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )

13 years agoSupport for the new DH89xxCC PCH chipset including:
jfv [Mon, 31 Jan 2011 18:41:52 +0000 (18:41 +0000)]
Support for the new DH89xxCC PCH chipset including:
      - SATA controller
      - Watchdog timer
      - SMBus controller

13 years agoImplement two new functions for sending descriptor and receving descriptor
pjd [Mon, 31 Jan 2011 18:35:17 +0000 (18:35 +0000)]
Implement two new functions for sending descriptor and receving descriptor
over UNIX domain sockets and socket pairs.
This is in preparation for capsicum.

MFC after: 1 week

13 years ago- Use pjdlog for assertions and aborts as this will log assert/abort message
pjd [Mon, 31 Jan 2011 18:32:17 +0000 (18:32 +0000)]
- Use pjdlog for assertions and aborts as this will log assert/abort message
  to syslog if we run in background.
- Asserts in proto.c that method we want to call is implemented and remove
  dummy methods from protocols implementation that are only there to abort
  the program with nice message.

MFC after: 1 week

13 years agoRename pjdlog_verify() to pjdlog_abort() as it better describes what the
pjd [Mon, 31 Jan 2011 15:52:00 +0000 (15:52 +0000)]
Rename pjdlog_verify() to pjdlog_abort() as it better describes what the
the function does and mark it with __dead2.

MFC after: 1 week

13 years agoDon't incorrectly set the burst duration setting in the TX descriptor.
adrian [Mon, 31 Jan 2011 15:42:42 +0000 (15:42 +0000)]
Don't incorrectly set the burst duration setting in the TX descriptor.

After inspecting the ath9k source, it seems the AR5416 and later MACs
don't take an explicit RTS/CTS duration. A per-scenario (ie, what multi-
rate retry became) rts/cts control flag and packet duration is provided;
the hardware then apparently fills in whatever details are required.
The per-rate sp/lpack duration calculation just isn't used anywhere
in the ath9k TX packet length calculations.

The burst duration register controls something different; it seems to
be involved with RTS/CTS protection of 11n aggregate frames and is set
via a call to ar5416Set11nBurstDuration().

I've done some light testing with rts/cts protected frames and nothing
seems to break; but this may break said RTS/CTS and CTS-to-self protection.

13 years agoMove the architecture guessing from Makefile.inc1 to Makefile. We
imp [Mon, 31 Jan 2011 15:17:47 +0000 (15:17 +0000)]
Move the architecture guessing from Makefile.inc1 to Makefile.  We
need to do this because variables specified on the command line
override those specified in the Makefile.  This is why we also moved
from TARGET to _TARGET in Makefile, and then set TARGET on the command
line when we fork a submake with Makefile.inc1.

This makes mips/mips work again, even without the workaround committed to
lib/libc/Makefile.

13 years agoMore ECN fixes:
rrs [Mon, 31 Jan 2011 11:50:11 +0000 (11:50 +0000)]
More ECN fixes:
1) We now remove ECN-Nonce since it will no longer continue as a I-D
2) Eliminate last_tsn_echo, this tied us to an assoc not the net
   and thus we were not doing m-homing on the ECN-Echo senders side right.
3) Increment the count going out even if the TSN in lower in the pending
   ECN-Echo, this way the receiver knows exactly how many packets were
   marked even with network re-ordering
4) Fix so we DO NOT stop doing delayed sack if a ECN Echo is in queue
MFC after: 1 month

13 years agoUse correct alphabetical order for xz(1) in SEE ALSO section
mm [Mon, 31 Jan 2011 11:30:26 +0000 (11:30 +0000)]
Use correct alphabetical order for xz(1) in SEE ALSO section
of newsyslog manpages.

Reported by: maxim
MFC after: 3 weeks

13 years agoAdd xz(1) support to newsyslog.
mm [Mon, 31 Jan 2011 10:57:54 +0000 (10:57 +0000)]
Add xz(1) support to newsyslog.
Rewrite and simplify logfile compression code.

Approved by: gad
MFC after: 3 weeks

13 years agoMFV of tzdata2011a, r218120
edwin [Mon, 31 Jan 2011 09:22:49 +0000 (09:22 +0000)]
MFV of tzdata2011a, r218120

- Cleanup rules for Australia/South_Australia (nothing changed)
- Add historical information for Honolulu.

13 years agoo Add user 'hast'.
maxim [Mon, 31 Jan 2011 07:47:28 +0000 (07:47 +0000)]
o Add user 'hast'.

13 years agoYet another unimplemented futex operation, print out about.
dchagin [Mon, 31 Jan 2011 06:06:23 +0000 (06:06 +0000)]
Yet another unimplemented futex operation, print out about.

Submitted by: arundel
MFC after: 1 month.

13 years agoImplement a futex BITSET op.
dchagin [Mon, 31 Jan 2011 05:59:05 +0000 (05:59 +0000)]
Implement a futex BITSET op.

Submitted by: arundel
MFC after: 1 month.

13 years agoUpdate interface stats counters to match the current format in linux and
bz [Mon, 31 Jan 2011 00:09:52 +0000 (00:09 +0000)]
Update interface stats counters to match the current format in linux and
try to export as much information as we can match.

Requested on: Debian GNU/kFreeBSD list (debian-bsd lists.debian.org) 2010-12
Tested by: Mats Erik Andersson (mats.andersson gisladisker.se)
MFC after: 10 days

13 years agoRelease the free page queues lock earlier in vm_page_alloc().
alc [Sun, 30 Jan 2011 23:55:48 +0000 (23:55 +0000)]
Release the free page queues lock earlier in vm_page_alloc().

Discussed with: kib@