Commit Graph

171788 Commits

Author SHA1 Message Date
Adrian Chadd
2d20d6559d Add a per-node rate control routine for each rate control module.
For now, the only module implement is 'sample', and that's only partially
implemented.  The main issue here with reusing this structure in userland
is that it uses 'rix' everywhere, which requires the userland code to
have access to the current HAL rate table.

For now, this is a very large work in progress.

Specific details:

* The rate control information is per-node at the moment and wrapped
  in a TLV, to ease parsing and backwards compatibility.
* .. but so I can be slack for now, the userland statistics are just
  a copy of the kernel-land sample node state.
* However, for now use a temporary copy and change the rix entries
  to dot11rate entries to make it slightly easier to eyeball.

Problems:

* The actual rate information table is unfortunately indexed by rix
  and it doesn't contain a rate code.  So the userland side of this
  currently has no way to extract out a mapping.

TODO:

* Add a TLV payload to dump out the rate control table mapping so
  'rix' can be turned into a dot11 / MCS rate.
* .. then remove the temporary copy.
2012-07-20 01:36:02 +00:00
Adrian Chadd
9e38f70840 Create an ioctl API for fetching the current rate control information. 2012-07-20 01:27:20 +00:00
Xin LI
37e28b8516 Import an updated version of moduli(5) manual page from OpenBSD.
MFC after:	1 month
2012-07-20 01:11:53 +00:00
Adrian Chadd
dd9f5bba52 Prepare for (re)using this header file in userland.
Remove the inlined code from the header file if it's compiled in userland.
It's not required and it shouldn't be there in the first place.
2012-07-20 00:47:23 +00:00
Devin Teske
41e0047a15 Revert SVN r238628 (mistake). 2012-07-19 22:41:00 +00:00
Devin Teske
f316f2c30c Fix syntax errors (s/:=/:-/).
Reviewed by:	emaste (mentor)
Approved by:	emaste (mentor)
MFC after:	3 days
2012-07-19 22:33:13 +00:00
Konstantin Belousov
eb3d975443 Remove line which was accidentally kept in r238614.
Submitted by:	pjd
Pointy hat to:	kib
MFC after:	1 week
2012-07-19 20:38:03 +00:00
Pedro F. Giffuni
8df73d0824 Merge more cosmetical changes from NetBSD's libedit.
makelist:
change tr '[a-z]' '[A-Z]' to tr '[:lower:]' '[:upper:]' so that POSIX
systems work proerly regardsless of environment variable settings.

tokenizer.c:
pass lint on _LP64

Obtained from:	NetBSD
MFC after:	2 weeks
2012-07-19 19:15:47 +00:00
Konstantin Belousov
83b22b05e6 Introduce curpcb magic variable, similar to curthread, which is MD
amd64.  It is implemented as __pure2 inline with non-volatile asm read
from pcpu, which allows a compiler to cache its results.

Convert most PCPU_GET(pcb) and curthread->td_pcb accesses into curpcb.

Note that __curthread() uses magic value 0 as an offsetof(struct pcpu,
pc_curthread). It seems to be done this way due to machine/pcpu.h
needs to be processed before sys/pcpu.h, because machine/pcpu.h
contributes machine-depended fields to the struct pcpu definition. As
result, machine/pcpu.h cannot use struct pcpu yet.

The __curpcb() also uses a magic constant instead of offsetof(struct
pcpu, pc_curpcb) for the same reason. The constants are now defined as
symbols and CTASSERTs are added to ensure that future KBI changes do
not break the code.

Requested and reviewed by: bde
MFC after:    3 weeks
2012-07-19 19:09:12 +00:00
Maksim Yevmenkin
78cf63fc10 Allow to specify no source-address-selection policy
MFC after:	1 week
2012-07-19 15:36:36 +00:00
Marius Strobl
6d36859855 Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user
data introduced in r236061. Using that flag doesn't make that much
sense on this case as the DMA maps using it are also created during
sym_pci_attach(). Moreover, due to the maxsegsz parameter used, doing
so may exhaust the bounce pages pool on architectures requiring
bounce pages. [1]
While at it, use a slightly more appropriate maxsegsz parameter.

PR:		169526
Submitted by:	Mike Watters [1]
MFC after:	3 days
2012-07-19 14:43:46 +00:00
Joerg Wunsch
5cb470c830 Add share/examples/libusb20 to the list of directories. 2012-07-19 11:18:41 +00:00
Konstantin Belousov
d1ae5c8337 Fix several reads beyond the mapped first page of the binary in the
ELF parser. Specifically, do not allow note reader and interpreter
path comparision in the brandelf code to read past end of the page.
This may happen if specially crafter ELF image is activated.

Submitted by:	Lukasz Wojcik <lukasz.wojcik zoho com>
MFC after:	3 days
2012-07-19 11:15:53 +00:00
Konstantin Belousov
39c5964c5a Document F_DUPFD_CLOEXEC. Also provide some wording changes for
F_DUPFD to make it less confusing, at least for me.

MFC after:	1 week
2012-07-19 10:23:59 +00:00
Konstantin Belousov
49d02b13bc Implement F_DUPFD_CLOEXEC command for fcntl(2), specified by SUSv4.
PR:	  standards/169962
Submitted by:	Jukka A. Ukkonen <jau iki fi>
MFC after:	1 week
2012-07-19 10:22:54 +00:00
Niclas Zeising
eb35bc035c Update my e-mail to my FreeBSD one.
Approved by:	joel (mentor)
2012-07-19 08:56:30 +00:00
Alan Cox
3088e08c4b Don't unnecessarily set PGA_REFERENCED in pmap_enter(). 2012-07-19 05:34:19 +00:00
Adrian Chadd
bb06995571 Convert the TX path to use the new HAL methods for accessing the
TX descriptor link pointers.

This is required for the AR93xx and later chipsets.

The RX path is slightly different - the legacy RX path directly
accesses ath_desc->ds_link for now, however this isn't at all done
for EDMA (FIFO) RX.

Now, for those performing a little software archeology here:

This is all a bit sub-optimal. "struct ath_desc" is only really relevant
for the pre-AR93xx NICs - where ds_link and ds_data is always in the
same location.

The AR93xx and later NICs have different descriptor layouts altogether.

Now, for AR93xx and later NICs, you should never directly reference
ds_link and ds_data, as:

* the RX descriptors don't have either - the data is _after_ the RX
  descriptor.  They're just one large buffer.  There's also no need for
  a per-descriptor RX buffer size as they're all fixed sizes.

* the TX descriptors have 4 buffer and 4 length fields _and_ a link
  pointer.  Each frame takes up one TX FIFO pointer, but it can contain
  multiple subframes (either multiple frames in a buffer, and/or
  multiple frames in an aggregate/RIFS burst.)

* .. so, when TX frames are queued to a hardware queue, the link
  pointer is ONLY for buffers in that frame/aggregate.  The next frame
  starts in a new FIFO pointer.

* Finally, descriptor completion status is in a different ring.
  I'll write something up about that when its time to do so.

This was inspired by Linux ath9k and the reference driver but is a
reimplementation.

Obtained from:	Linux ath9k, Qualcomm Atheros
2012-07-19 03:51:16 +00:00
Adrian Chadd
661deb68d5 Use HAL_NUM_RX_QUEUES rather than a magic constant. 2012-07-19 03:18:15 +00:00
Adrian Chadd
ad3e6dcd37 Break out the TX descriptor link field into HAL methods.
The DMA FIFO chips (AR93xx and later) differ slightly to th elegacy
chips:

* The RX DMA descriptors don't have a ds_link field;
* The TX DMA descriptors have a ds_link field however at a different
  offset.

This is a reimplementation based on what the reference driver and ath9k
does.

A subsequent commit will enable it in the TX and beacon paths.

Obtained from:	Linux ath9k, Qualcomm Atheros
2012-07-19 02:25:14 +00:00
Glen Barber
abded2bcf2 Xref mwl(4) and rum(4) in hostapd(8).
MFC after:	3 days
2012-07-18 23:32:12 +00:00
Dag-Erling Smørgrav
d256f21a9a Move -n ${_jail} before ${_flags} so that any -n options in ${_flags}
will override ours instead of the other way around.
2012-07-18 23:01:23 +00:00
Konstantin Belousov
d4961bcb3a Do not restart scan of the inactive queue when non-inactive page is
found. Rather, we shall not find such pages on inactive queue at all.

Requested and reviewed by:	alc
MFC after:    2 weeks
2012-07-18 21:47:50 +00:00
Joerg Wunsch
3b9676efb5 Add some examples about how to use FreeBSD's libusb20 in your own
code.
2012-07-18 21:30:17 +00:00
Dag-Erling Smørgrav
69739e8da5 Add -g (gigabyte) flag to complement -k (kilobyte) and -m (megabyte).
MFC after:	1 week
2012-07-18 19:28:22 +00:00
Sean Bruno
ce61627a2d On BIO_ERROR, set bio_resid to stop losing data in the error case.
Submitted by:	Mark Johnston <markjdb@gmail.com>
Reviewed by:	scottl@freebsd.org
MFC after:	2 weeks
2012-07-18 18:10:27 +00:00
Maksim Yevmenkin
0c19b5de29 Return zero from get_addrselectpolicy() when no source-address-selection
policy is installed.

MFC after:	1 week
2012-07-18 15:52:09 +00:00
Konstantin Belousov
bc84db6267 On AMD64, provide siginfo.si_code for floating point errors when error
occurs using the SSE math processor.  Update comments describing the
handling of the exception status bits in coprocessors control words.

Remove GET_FPU_CW and GET_FPU_SW macros which were used only once.
Prefer to use curpcb to access pcb_save over the longer path of
referencing pcb through the thread structure.

Based on the submission by:	Ed Alley <wea llnl gov>
PR:	  amd64/169927
Reviewed by:	bde
MFC after:	3 weeks
2012-07-18 15:43:47 +00:00
Konstantin Belousov
a81f9fed5d Add stmxcsr.
Submitted by:	Ed Alley <wea llnl gov>
PR:	  amd64/169927
MFC after:	3 weeks
2012-07-18 15:36:03 +00:00
Alexander Motin
9eb97fed6b Fix some typos in r238595.
Reported by:	brueffer
2012-07-18 12:41:09 +00:00
Alexander Motin
cdcb782817 Add bunch of new ASC/ASCQ values from T10 site. 2012-07-18 12:23:45 +00:00
Christian Brueffer
1d50dd1f08 Fix a small memory leak in mpssas_get_sata_identify(). The change has been
submitted upstream as well.

Reviewed by:	ken, scottl
Obtained from:	DragonFly BSD (change df8658e030226dd015cff9749452666d8fe1e87b)
MFC after:	5 days
2012-07-18 09:06:07 +00:00
Gleb Smirnoff
3c73180f55 Plug a reference leak: before doing 'goto again' we need to unref
ia->ia_ifa if there is any.

Submitted by:	Andrey Zonov <andrey zonov.org>
2012-07-18 08:58:30 +00:00
Gleb Smirnoff
b9abeb9d99 When traversing global in_ifaddr list in the IFP_TO_IA() macro, we need
to obtain IN_IFADDR_RLOCK().
2012-07-18 08:41:00 +00:00
Edward Tomasz Napierala
3a3ef28e15 Add missing free. 2012-07-18 07:26:20 +00:00
David E. O'Brien
bd51eebf04 Sort per the comment. 2012-07-18 07:07:54 +00:00
David E. O'Brien
d6844ac5b3 a ";" tells make we want the shell to be used
Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-07-18 05:57:42 +00:00
Tai-hwa Liang
490850c19c Removing bsd{ar,ranlib} found on my ancient installation.
MFC after:	3 weeks
2012-07-18 05:50:40 +00:00
Alan Cox
85eeca35b9 Move what remains of vm/vm_contig.c into vm/vm_pageout.c, where similar
code resides.  Rename vm_contig_grow_cache() to vm_pageout_grow_cache().

Reviewed by:	kib
2012-07-18 05:21:34 +00:00
Kenneth D. Merry
edad9799e8 Add back spare fields consumed in r237545. It seems that these should only
be consumed to maintain backward compatibility in stable, but should not be
consumed in head.

Submitted by:	trasz, attilio (indirectly)
2012-07-17 22:16:10 +00:00
Pedro F. Giffuni
694a0093a7 Dtrace: improve handling of library paths.
Merge changes from illumos

906 dtrace depends_on pragma should search all library paths, not just the
current one

949 dtrace should only include the first instance of a library found on
its library path

Illumos Revisions:	13353:936a1e45726c
			13354:2b2c36a81512

Reference:
https://www.illumos.org/issues/906
https://www.illumos.org/issues/949

Tested by:	Fabian Keil
Obtained from:	Illumos
MFC after:	3 weeks
2012-07-17 19:57:34 +00:00
George V. Neville-Neil
d638e8dcde Change UL to ULL since time is 32 bits.
Pointed out by: avg@
MFC after:	2 weeks
2012-07-17 14:36:40 +00:00
Alexander Motin
f4f6d5e0ab For Intel Panther/Lynx Point USB 3.0 xHCI controllers enable SuperSpeed USB
capability and reroute USB 2.0 ports to the xHCI controller.

Reviewed by:	hselasky
2012-07-17 14:03:04 +00:00
Michael Tuexen
d07b2ac6c6 Fix a refcount bug when freeing an association.
While there: Change code to be consistent.
Discussed with rrs@.
MFC after: 3 days
2012-07-17 13:03:47 +00:00
Jaakko Heinonen
e0d20e6615 Make sure that arraysz is initialized to a value larger than zero.
arraysz could get initialized to zero on ZFS because ZFS reports
directory sizes differently compared to UFS.

PR:		bin/169493
Tested by:	swills
MFC after:	2 weeks
2012-07-17 09:34:52 +00:00
Jaakko Heinonen
f9fbbdf95b Remove trailing whitespace.
MFC after:	2 weeks
2012-07-17 09:31:05 +00:00
Oleksandr Tymoshenko
86bce74937 Move unmask IRQ function call up to nexus device level.
FDT-enabled targets were broken after r238043 that relies
on device up the hierarchy to properly setup interrupt.
nexus device for ARM platforms did job only partially:
setting handler but not unmasking interrupt. Unmasking
was performed by platform code.

Reviewed by:	andrew@
2012-07-17 03:18:12 +00:00
Alan Cox
da1ab8a4a0 Correct vm_page_alloc_contig()'s implementation of VM_ALLOC_NODUMP. 2012-07-17 02:36:59 +00:00
Kevin Lo
d14fdb79fe Put parenthesis around sizeof args. 2012-07-17 02:05:39 +00:00
Isabell Long
8e68324104 In ipfw(8), make the text about dynamic rules consistent.
PR:		docs/120539
Approved by:	gabor (mentor)
MFC after:	5 days
2012-07-16 22:15:30 +00:00