Commit Graph

180922 Commits

Author SHA1 Message Date
Attilio Rao
7536331217 Generalize the bitset operations, present in cpuset and offer a KPI to
redefine such operations for different consumers.
This will be used when NUMA support will be finished and numaset
will need to be used.

Sponsored by:	EMC / Isilon storage division
Obtained from:	jeff
Reviewed by:	alc
2013-05-09 00:04:59 +00:00
Peter Wemm
35fdad8420 Unbreak build - this can only build on i386 as-is due to use of libl in
a .so file, and we currently (intentionally) only build libl.a.
2013-05-08 23:30:24 +00:00
Dimitry Andric
ffd564d5d9 When gcc 4.2.0 was imported, the 3DNow intrinsics header <mm3dnow.h> was
not added to the list of intrinsics headers to install, so belatedly (5
years :) add it.

MFC after:	1 week
2013-05-08 22:54:53 +00:00
Dimitry Andric
ca21efa1b5 For some reason, the gcc intrinsics header tmmintrin.h was imported with
two copies of itself pasted together.  Remove the extraneous copy.

MFC after:	3 days
2013-05-08 22:50:36 +00:00
Adrian Chadd
5e0185081d Fix the holding descriptor logic to actually be "right" (for values
of "right".)

Flip back on the "always continue TX DMA using the holding descriptor"
code - by always setting ATH_BUF_BUSY and never setting axq_link to NULL.

Since the holding descriptor is accessed via txq->axq_link and _that_
is done behind the TXQ lock rather than the TX path lock, the holding
descriptor stuff itself needs to be behind the TXQ lock.

So, do the mental gymnastics needed to do this.

I've not seen any of the hardware failures that I was seeing when
I last tried to do this.

Tested:

* AR5416, STA mode
2013-05-08 21:23:51 +00:00
Joel Dahl
5dd7f29ccd Minor improvements. 2013-05-08 21:07:11 +00:00
Attilio Rao
ab13ed1e45 Revert r250339 as apparently it is more clutter than help.
Sponsored by:	EMC / Isilon storage division
Requested by:	jhb
2013-05-08 21:06:47 +00:00
Joel Dahl
b266cbe17d Remove EOL whitespace. 2013-05-08 21:04:19 +00:00
Joel Dahl
8495c3d9a7 mdoc: new sentence, new line. 2013-05-08 21:02:48 +00:00
Adrian Chadd
248dd6039d Bring in a basic ethernet switch driver for the IP17x series of
switches.

These are notably found on some AR71xx based Mikrotik boards.

Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
Reviewed by:	ray
2013-05-08 20:58:41 +00:00
Adrian Chadd
a858494b9d Modify the routerstation config to use ukswitch for now.
Until an ADM6996 driver shows up, this allows for the two switch
ports to be used.

Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
Reviewed by:	ray
2013-05-08 20:57:37 +00:00
Adrian Chadd
1ead288f8d Fix the ukswitch code to work with the new vlan changes:
* Fix API changes;
* remove unused code;
* Allow some switches to be used that don't expose a set of PHY
  registers for the CPU facing port (eg the ADM6996 for the Ubiquiti
  Routerstation.)

Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
Reviewed by:	ray
2013-05-08 20:56:43 +00:00
Adrian Chadd
f47857dc3d Correctly mark the CPU port.
Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
Reviewed by:	ray
2013-05-08 20:54:59 +00:00
Adrian Chadd
e6e5db845a Add vlan configuration support to etherswitchcfg.
This adds the support to the config keyword (vlan operation mode), ports
flags, prints the vlan mode and vlan capabilities. It also adds some basic
information to usage() and support the keyword 'help' as a shortcut to
usage(). The manual page is also updated with the new options.

Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
Reviewed by:	ray
2013-05-08 20:52:22 +00:00
Adrian Chadd
a48a9355ef Add the ability to change the vlan operation mode.
This adds a vlan capability field to etherswitch_info structure and some
definitions of ports flags.

It adds the support to global config parameters which right now is used
only to switch between the vlan modes, but it is intended to be extended
to support the setup of others parameters (STP, mirror, etc.).

Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
Reviewed by:	ray
2013-05-08 20:46:54 +00:00
Mikolaj Golub
b96e78e02c Register OID for HAST module.
MFC after:	2 weeks
2013-05-08 20:04:32 +00:00
Mikolaj Golub
7297a2ff53 HAST module for bsnmpd(1).
Reviewed by:	harti, pjd
MFC after:	2 weeks
2013-05-08 20:03:37 +00:00
Mikolaj Golub
467112b4d1 Make errbuf optional, so if a caller is not interested in an error
message she can pass NULL (procstat(1) already does this).

MFC after:	2 weeks
2013-05-08 19:11:47 +00:00
Eitan Adler
63efd0a107 Allow the use of lowercase 'yes'
PR:		bin/178422
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
2013-05-08 18:55:38 +00:00
David C Somayajulu
e09b3321fa No need to set if_mtu since it automatically updated by ether_ifattach().
Use  if_initbaudrate() to set baudrate.
Add IFCAP_LINKSTATE to if_capabilities.

Submitted by:	David C Somayajulu <davidcs@freebsd.org>
Approved by:	George Neville-Neil <gnn@freebsd.org>
2013-05-08 18:25:46 +00:00
Xin LI
5ed3c8af83 According to the documentation, on Linux, cancel_delayed_work() does not
do drain (flush_workqueue() in Linux terms) but instead returns true if
the work was removed before it is run, or false otherwise.

Simulate this by removing the taskqueue_drain() and return the value
derived from taskqueue_cancel()'s return value.

This would solve a witness warning caused by calling taskqueue_drain()
with a non-sleepable lock held, like:

taskqueue_drain with the following non-sleepable locks held:
exclusive rw lle (lle) r = 0 (0xfffffe001450b410) locked @
/usr/src/sys/netinet/in.c:1484
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffff848d4f7690
kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffff848d4f7740
witness_warn() at witness_warn+0x4a8/frame 0xffffff848d4f7800
taskqueue_drain() at taskqueue_drain+0x3a/frame 0xffffff848d4f7840
set_timeout() at set_timeout+0x4a/frame 0xffffff848d4f7860
netevent_callback() at netevent_callback+0x16/frame 0xffffff848d4f7870
arpintr() at arpintr+0x9b5/frame 0xffffff848d4f7930

This do not affect kernel without OFED compiled in.

Reported by:	Garrett Cooper <yaneurabeya gmail com>
		(who also tested an earlier version of this patch,
		but bugs are mine)
MFC after:	2 weeks
2013-05-08 17:45:22 +00:00
Sean Bruno
d63e4d4e44 s/Numer/Number/
Submitted by:	Jeremy Chadwick <jdc@koitsu.org>
2013-05-08 16:29:12 +00:00
Andre Oppermann
6753da1356 When the accept queue is full print the number of already pending
new connections instead of by how many we're over the limit, which
is always 1.

Noticed by:	jmallet
MFC after:	1 week
2013-05-08 14:13:14 +00:00
Takanori Watanabe
9335f4eb24 Manual page for acpi_rapidstart(4) driver.
----
2013-05-08 13:26:17 +00:00
Takanori Watanabe
df07418447 A driver for Intel Rapid Start Technology ACPI device.
Note that it is just for 'Advanced' configuration for Rapid start technology.
2013-05-08 12:53:21 +00:00
Attilio Rao
d0b5855eb2 Fix-up r250338 by completing the removal of VM_NDOMAIN in favor of
MAXMEMDOM.
This unbreak builds.

Sponsored by:	EMC / Isilon storage division
Reported by:	adrian, jeli
2013-05-08 10:55:39 +00:00
Aleksandr Rybalko
94f8d6fdba Update copyright date. 2013-05-08 09:42:50 +00:00
Adrian Chadd
caa16e6960 This shouldn't have made it into this commit, sorry. 2013-05-08 08:53:55 +00:00
Adrian Chadd
d3731e4b21 Revert a previous commit - this is causing hardware errors.
I'm not sure why this is failing.  The holding descriptor should be being
re-read when starting DMA of the next frame.  Obviously something here
isn't totally correct.

I'll review the TX queue handling and see if I can figure out why this
is failing.  I'll then re-revert this patch out and use the holding
descriptor again.
2013-05-08 07:30:33 +00:00
Adrian Chadd
2c47932c88 Implement STBC receive frame statistics.
The AR9280 and later can receive STBC.  This adds some statistics
tracking to count these frames.

A patch to athstats will be forthcoming.
2013-05-08 01:11:25 +00:00
Ed Maste
5906bf4984 Add libusb_get_port_path wrapper
This follows the libusbx API reference at
http://libusbx.sourceforge.net/api-1.0/group__dev.html

Reviewed by: hselasky@
2013-05-08 00:55:29 +00:00
Jung-uk Kim
be4147dd7c MFV: r250336
Fix for _INI regression introduced in version 20130328.
2013-05-08 00:20:35 +00:00
David C Somayajulu
088fc97186 1. Updated Copyright Information
2. Added Flash Read/Update Support
3. Fixed TSO Handling

Submitted by: David C Somayajulu (davidcs@freebsd.org)
Reviewed by: George Neville-Neil (gnn@freebsd.org)
Approved by: George Neville-Neil (gnn@freebsd.org)
2013-05-07 22:58:42 +00:00
Attilio Rao
16e073e57a Add functions to do ACPI System Locality Information Table parsing
and printing at boot.
For reference on table informations and purposes please review ACPI specs.

Sponsored by:	EMC / Isilon storage division
Obtained from:	jeff
Reviewed by:	jhb (earlier version)
2013-05-07 22:49:56 +00:00
Attilio Rao
941646f5ec Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in
order to match the MAXCPU concept.  The change should also be useful
for consolidation and consistency.

Sponsored by:	EMC / Isilon storage division
Obtained from:	jeff
Reviewed by:	alc
2013-05-07 22:46:24 +00:00
Brooks Davis
168ba1089a Work around the implementation of LIBRARIES_ONLY. It causes drti.o to
not be installed in /usr/lib32 on systems with compat-32 support.

This fix has two parts.  First, the build is forced by linking drti.o
into a dummy internal library.  Second, the object file is installed
manually in the LIBRARIES_ONLY case.

MFC after:	3 days
2013-05-07 22:05:57 +00:00
Jung-uk Kim
b4a951799e Fix for _INI regression introduced in version 20130328.
This change fixes a problem introduced in 20130328 where _INI methods
are no longer executed properly because of a memory block that is not
initialized correctly.

637accd073
2013-05-07 22:05:15 +00:00
Ed Maste
22a962c9fe Constify libusb_get_pollfds return
The correct return type, per our libusb(3) man page and the libusb.org
and libusbx projects (whose interface we intend to follow for our libusb),
is const struct libusb_pollfd **.

Unfortunately the doxygen-generated libusbx API documentation[1] omits[2]
the const for some reason.

[1] http://libusbx.sourceforge.net/api-1.0/group__poll.html#gab1a72869a926552b27a6c667695df3a2

[2] http://sourceforge.net/mailarchive/forum.php?thread_name=497D10BE.8090007%40n-dimensional.de&forum_name=libusb-devel

Reviewed by: hselasky@
2013-05-07 20:35:47 +00:00
Alan Cox
bb0e1de4ab Remove a redundant call to panic() from vm_radix_keydiff(). The assertion
before the loop accomplishes the same thing.

Sponsored by:	EMC / Isilon Storage Division
2013-05-07 18:45:34 +00:00
John Baldwin
6c14193bd0 Don't pad disk partition sizes with leading zeros. This was already
fixed in a different way by the new disk code used for other
platforms.

MFC after:	1 week
2013-05-07 18:08:49 +00:00
Eitan Adler
d881730627 By request, add an arrow from NetBSD-0.8 to FreeBSD-1.0.
While here, add a few more NetBSD versions to the tree itself.

Submitted by:	Alan Barrett <apb@cequrux.com>
Submitted by:	Thomas Klausner <wiz@netbsd.org>
2013-05-07 12:39:14 +00:00
Scott Long
ab8f55b9fd Add a sysctl vfs.read_min to complement the exiting vfs.read_max. It
defaults to 1, meaning that it's off.

When read-ahead is enabled on a file, the vfs cluster code deliberately
breaks a read into 2 I/O transactions; one to satisfy the actual read,
and one to perform read-ahead.  This makes sense in low-latency
circumstances, but often produces unbalanced i/o transactions that
penalize disks.  By setting vfs.read_min, we can tell the algorithm to
fetch a larger transaction that what we asked for, achieving the same
effect as the read-ahead but without the doubled, unbalanced transaction
and the slightly lower latency.  This significantly helps our workloads
with video streaming.

Submitted by:	emax
Reviewed by:	kib
Obtained from:	Netflix
2013-05-07 08:16:21 +00:00
Adrian Chadd
7dcb2bea01 Re-work how transmit buffer limits are enforced - partly to fix the PR,
but partly to just tidy up things.

The problem here - there are too many TX buffers in the queue! By the
time one needs to transmit an EAPOL frame (for this PR, it's the response
to the group rekey notification from the AP) there are no ath_buf entries
free and the EAPOL frame doesn't go out.

Now, the problem!

* Enforcing the TX buffer limitation _before_ we dequeue the frame?
  Bad idea. Because..
* .. it means I can't check whether the mbuf has M_EAPOL set.

The solution(s):

* De-queue the frame first
* Don't bother doing the TX buffer minimum free check until after
  we know whether it's an EAPOL frame or not.
* If it's an EAPOL frame, allocate the buffer from the mgmt pool
  rather than the default pool.

Whilst I'm here:

* Add a tweak to limit how many buffers a single node can acquire.
* Don't enforce that for EAPOL frames.
* .. set that to default to 1/4 of the available buffers, or 32,
  whichever is more sane.

This doesn't fix issues due to a sleeping node or a very poor performing
node; but this doesn't make it worse.

Tested:

* AR5416 STA, TX'ing 100+ mbit UDP to an AP, but only 50mbit being received
  (thus the TX queue fills up.)
* .. with CCMP / WPA2 encryption configured
* .. and the group rekey time set to 10 seconds, just to elicit the
  behaviour very quickly.

PR:		kern/138379
2013-05-07 07:52:18 +00:00
Adrian Chadd
55cf0326a1 Simplify this bit of code! 2013-05-07 07:44:07 +00:00
Grzegorz Bernacki
7e13391d97 decode_win_sdram_fixup() function should be declared, defined and used
only by Armada XP

Obtained from:	Semihalf
2013-05-07 06:42:07 +00:00
Devin Teske
87c1627502 Commit first portion of package module -- this includes the ability to view
categories, view packages, mark packages for installation, de-installation,
or re-installation, calculate and track dependencies, as well as ability to
review selections.

Still to come is the actual processing of selections (performing the
various actions associated with the user's selections, such as installing
dependencies first, then selections, etc.).
2013-05-07 05:40:20 +00:00
Devin Teske
7f6380ef8d Explicitly track "script.subr" which wasn't showing up in the graph because
it's not used by anything within bsdconfig nor any modules (rather, the
script.subr include is designed to be used externally -- nonetheless we
want to track it in the modular graph outputs showing includes).
2013-05-07 04:47:56 +00:00
Devin Teske
8f1dd43b55 Recursively calculate includes. This solves the problem of some includes
missing from the graph, but it also unfortunately forces yet another bug
in graphviz dot(1) to appear. When edge labels are enabled (using '\T')
with this many edges, dot(1) will do bad things in init_rank() and often
crash. So while we're here, let's disable edge labels for the include-
relationship graph feature.
2013-05-07 04:46:08 +00:00
Devin Teske
7de72ac1f8 Remove unused variables. 2013-05-07 04:40:57 +00:00
Devin Teske
a185dd378c Alphabetize strings by variable names. 2013-05-07 04:23:50 +00:00