Commit Graph

160899 Commits

Author SHA1 Message Date
Lawrence Stewart
03f0843bdb 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
2011-02-01 13:32:27 +00:00
Martin Matuska
4a81e416d6 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
2011-02-01 10:28:05 +00:00
Hans Petter Selasky
0c8f4683ec Use correct kernel types for all fields in USB PF code and headers.
Approved by:	thompsa (mentor)
2011-02-01 10:25:48 +00:00
Adrian Chadd
710c377821 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().
2011-02-01 08:10:18 +00:00
Adrian Chadd
4b44f6f275 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.
2011-02-01 08:03:01 +00:00
Pawel Jakub Dawidek
292c424d6e Do not set socket send and receive buffer. It will be auto-tuned.
Confirmed by:	rwatson
MFC after:	1 week
2011-02-01 07:58:43 +00:00
Adrian Chadd
79f02dbfed Refator the common code which calculates the 802.11g protection duration. 2011-02-01 07:50:26 +00:00
Lawrence Stewart
ec943febbb Fix typo in comment: "course" -> "coarse"
Sponsored by:	FreeBSD Foundation
Submitted by:	jmallett
MFC after:	3 months
X-MFC with:	r218152
2011-02-01 07:10:13 +00:00
Lawrence Stewart
0927e1a18b 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
2011-02-01 07:05:14 +00:00
Adrian Chadd
81a826882a * 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.
2011-02-01 06:59:44 +00:00
Lawrence Stewart
ac230a79e1 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
2011-02-01 06:42:46 +00:00
Lawrence Stewart
1d4ed791d0 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
2011-02-01 06:17:00 +00:00
Adrian Chadd
29e9b81e77 Add TX/RX chainmask info to if_ath - this is needed for the 11n TX rate series. 2011-02-01 04:39:15 +00:00
Adrian Chadd
94d748d2a9 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
2011-02-01 03:51:35 +00:00
Jack F Vogel
bf0477b215 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
2011-02-01 01:05:11 +00:00
Pawel Jakub Dawidek
94486ae22d Fix build on ia64.
I found no way how to use CMSG_NXTHDR() macro on ia64 without alignment
warnings.

MFC after:	1 week
2011-01-31 23:46:36 +00:00
Pawel Jakub Dawidek
2c450cb873 Until I fix the build on ia64 comment out problematic lines.
Those lines are part of the (for now) unused functions.
2011-01-31 23:08:26 +00:00
Adrian Chadd
59d7849bbd Remove the now unneeded XXX. 2011-01-31 22:45:14 +00:00
Adrian Chadd
a83df4d35d Enable AMPDU reorder processing and receiving BAR frames when doing 802.11n.
Obtained from:	rpaulo@
2011-01-31 22:44:28 +00:00
Doug Barton
606fffda66 Let rpcbind clean up after itself 2011-01-31 21:03:08 +00:00
Pyun YongHyeon
a280fae7c3 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 )
2011-01-31 20:00:43 +00:00
Jack F Vogel
d5267ede37 Support for the new DH89xxCC PCH chipset including:
- SATA controller
      - Watchdog timer
      - SMBus controller
2011-01-31 18:41:52 +00:00
Pawel Jakub Dawidek
8046c499ab 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
2011-01-31 18:35:17 +00:00
Pawel Jakub Dawidek
2ec483c58e - 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
2011-01-31 18:32:17 +00:00
Pawel Jakub Dawidek
05a6b8de87 Rename pjdlog_verify() to pjdlog_abort() as it better describes what the
the function does and mark it with __dead2.

MFC after:	1 week
2011-01-31 15:52:00 +00:00
Adrian Chadd
d39a3a978b 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.
2011-01-31 15:42:42 +00:00
Warner Losh
fda074e41d 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.
2011-01-31 15:17:47 +00:00
Randall Stewart
493d8e5a83 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
2011-01-31 11:50:11 +00:00
Martin Matuska
c61aa7e8b3 Use correct alphabetical order for xz(1) in SEE ALSO section
of newsyslog manpages.

Reported by:	maxim
MFC after:	3 weeks
2011-01-31 11:30:26 +00:00
Martin Matuska
d90914ca73 Add xz(1) support to newsyslog.
Rewrite and simplify logfile compression code.

Approved by:	gad
MFC after:	3 weeks
2011-01-31 10:57:54 +00:00
Edwin Groothuis
80338add4f MFV of tzdata2011a, r218120
- Cleanup rules for Australia/South_Australia (nothing changed)
- Add historical information for Honolulu.
2011-01-31 09:22:49 +00:00
Edwin Groothuis
ed6b0585c7 Vendor import of tzdata2011a:
- Cleanup rules for Australia/South_Australia (nothing changed)
- Add historical information for Honolulu.

Obtained from:	 ftp://elsie.nci.nih.gov/pub/
2011-01-31 09:17:30 +00:00
Maxim Konovalov
0f27aaf940 o Add user 'hast'. 2011-01-31 07:47:28 +00:00
Dmitry Chagin
78ec1867a2 Yet another unimplemented futex operation, print out about.
Submitted by:	arundel
MFC after:	1 month.
2011-01-31 06:06:23 +00:00
Dmitry Chagin
5163762354 Implement a futex BITSET op.
Submitted by:	arundel
MFC after:	1 month.
2011-01-31 05:59:05 +00:00
Bjoern A. Zeeb
63827f255c 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
2011-01-31 00:09:52 +00:00
Alan Cox
3d05198e23 Release the free page queues lock earlier in vm_page_alloc().
Discussed with:	kib@
2011-01-30 23:55:48 +00:00
Jilles Tjoelker
b9f696953d sh: Send messages about signals to stderr.
This is required by POSIX and seems to make more sense.

See also r217557.
2011-01-30 22:57:52 +00:00
Dmitry Chagin
77192fddeb Regen for r218101.
MFC after:	1 Month.
2011-01-30 20:38:26 +00:00
Dmitry Chagin
8d73c2bfd1 Change linux futex syscall definition to match actual linux one.
MFC after:	1 Month.
2011-01-30 20:31:43 +00:00
Dmitry Chagin
9adaae9403 The kern_wait() code already removes the SIGCHLD signal for the waited
process. Removing other SIGCHLD signals is not needed and may cause
problems.

Pointed out by:	jilles

MFC after:	1 Month.
2011-01-30 18:17:38 +00:00
Konstantin Belousov
54a6cb4e7b Fix grammar in comment.
Pointy hat to:	kib
MFC after:	1 week
2011-01-30 16:21:25 +00:00
Konstantin Belousov
2c95328822 Make ldd(1) work when versioned dependency file is cannot be loaded.
Instead of aborting in locate_dependency(), propagate the error to
caller. The rtld startup function does the right thing with an error
from rtld_verify_versions(), depending on the mode of operation.

Reported by:	maho
In collaboration with:	kan
MFC after:	1 week
2011-01-30 16:14:09 +00:00
Bernhard Schmidt
90e0ec14c1 Fix the 'scan hang' issue.
When requesting a scan and one is already in progess, e.g. while in scan
state, we happily wait for a scan done notification. Though, this
notification might never be sent, e.g. if we are trying to find a network
to associate to and there is none. Instead of always waiting for a
notification just do so if a new scan has been started. For both cases the
scan cache is used to report available networks even if the content might
not be fresh.

MFC after:	1 month
2011-01-30 14:22:45 +00:00
Bernhard Schmidt
7ca7a42ce6 Instead of always returning 0 to a scan request, indicate if there is
one running already.

MFC after:	1 month
2011-01-30 14:05:21 +00:00
Bernhard Schmidt
27612ff8c9 Change return code semantics of start_scan_locked(). Instead of reporting
if a scan is running, report if a scan has been started. The return value
itself is not (yet) used anywhere in the tree and it is also not exported
to userspace.

MFC after:	1 month
2011-01-30 14:00:50 +00:00
Bernhard Schmidt
a272741053 When doing a scan while being associated it is possible that the scan
is deferred for the time it takes to flush the TX queue. This work being
done the scan then is continued, but only if it is marked to do so. As
the 'ifconfig scan' request is meant to be used after the interface is
brought up, request a background scan by default. This behaviour is
already documented in manual page.

This fixes on possible case where 'ifconfig scan' hangs infinitely.

MFC after:	1 month
2011-01-30 13:17:45 +00:00
Ulrich Spörlein
04a47f762d syscons: install all available kbdmaps
eee_nordic.kbd, us.dvorakl.kbd, and us.dvorakr.kbd were not installed.

Found by:	Neil Short <neshort@yahoo.com>
MFC after:	3 weeks
2011-01-30 12:57:10 +00:00
Adrian Chadd
a565668bc5 Add support for the m25p64; lifted straight from Linux.
This flash chip is found on the Ubiquiti LS-SR71 board.
I've successfully tested reading; I've not tried writing to it yet.
2011-01-30 12:14:06 +00:00
Bernhard Schmidt
abf0f91e13 Honor the IEEE80211_SCAN_BGSCAN flag, which makes it possible to actually
request a background scan using IEEE80211_IOC_SCAN_BGSCAN.

MFC after:	1 month
2011-01-30 11:23:59 +00:00