]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMinor typo, fix 2 attributions
Doug Barton [Thu, 9 Jun 2011 06:10:39 +0000 (06:10 +0000)]
Minor typo, fix 2 attributions

13 years agoTidy up r222866.
Jung-uk Kim [Wed, 8 Jun 2011 23:44:59 +0000 (23:44 +0000)]
Tidy up r222866.

- Re-add accidentally removed atomic op. for sysctl(9) handler.
- Remove a period(`.') at the end of a debugging message.
- Consistently spell "low" for "TSC-low" timecounter throughout.

Pointed out by: bde

13 years agoAdd dump.c to the rtsol build. It is needed now that sec2str is non-static
Kenneth D. Merry [Wed, 8 Jun 2011 21:59:07 +0000 (21:59 +0000)]
Add dump.c to the rtsol build.  It is needed now that sec2str is non-static
and used in rtsold.c.

13 years agosh: Add simple tests for set -x and PS4.
Jilles Tjoelker [Wed, 8 Jun 2011 21:58:19 +0000 (21:58 +0000)]
sh: Add simple tests for set -x and PS4.

13 years agoSimply post r222273.
David E. O'Brien [Wed, 8 Jun 2011 21:29:33 +0000 (21:29 +0000)]
Simply post r222273.

13 years ago- Major reorganization of mbuf handling throughout the driver to
David Christensen [Wed, 8 Jun 2011 21:18:14 +0000 (21:18 +0000)]
- Major reorganization of mbuf handling throughout the driver to
  increase robustness (no more calls to panic(9)) and simplify
  code.
- Allocate RX/TX data structures as a single buffer rather than
  an array of 4KB pages to simplify code.
- Fixed LRO (aka TPA) code.  Removed kernel module parameter and
  support enabling disabling LRO through ifconfig(8) command line.
  LRO is still disabled by default but should be enabled for best
  performance on an endpoint device.
- Fixed statistcs code and removed kernel module parameter (stats
  should just work).
- Added many software counters to help identify the cause of some
  performance issues.
- Streamlined adapter internal init/stop code paths.
- Fiddled with debug code (adding some here, removing some there).
- Continued style(9) adjustments.

13 years agoIncrease quality of TSC (or TSC-low) timecounter to 1000 if it is P-state
Jung-uk Kim [Wed, 8 Jun 2011 20:08:06 +0000 (20:08 +0000)]
Increase quality of TSC (or TSC-low) timecounter to 1000 if it is P-state
invariant.  For SMP case (TSC-low), it also has to pass SMP synchronization
test and the CPU vendor/model has to be white-listed explicitly.  Currently,
all Intel CPUs and single-socket AMD Family 15h processors are listed here.

Discussed with: hackers

13 years agoIntroduce low-resolution TSC timecounter "TSC-low". It replaces the normal
Jung-uk Kim [Wed, 8 Jun 2011 19:38:31 +0000 (19:38 +0000)]
Introduce low-resolution TSC timecounter "TSC-low".  It replaces the normal
TSC timecounter if TSC frequency is higher than ~4.29 MHz (or 2^32-1 Hz) or
multiple CPUs are present.  The "TSC-low" frequency is always lower than a
preset maximum value and derived from TSC frequency (by being halved until
it becomes lower than the maximum).  Note the maximum value for SMP case is
significantly lower than UP case because we want to reduce (rare but known)
"temporal anomalies" caused by non-serialized RDTSC instruction.  Normally,
it is still higher than "ACPI-fast" timecounter frequency (which was default
timecounter hardware for long time until r222222) to be useful.

13 years agoIn the current code, a double panic condition may lead to dumps
Attilio Rao [Wed, 8 Jun 2011 19:28:59 +0000 (19:28 +0000)]
In the current code, a double panic condition may lead to dumps
interleaving.
Signal dumping to happen only for the first panic which should be the
most important.

Sponsored by: Sandvine Incorporated
Submitted by: Nima Misaghian (nmisaghian AT sandvine DOT com)
MFC after: 2 weeks

13 years agoRemove a redundant assignment since r221703.
Jung-uk Kim [Wed, 8 Jun 2011 18:52:42 +0000 (18:52 +0000)]
Remove a redundant assignment since r221703.

13 years ago- Accumulate RA options instead of replacing old ones when a new RA arrived.
Hiroki Sato [Wed, 8 Jun 2011 16:03:29 +0000 (16:03 +0000)]
- Accumulate RA options instead of replacing old ones when a new RA arrived.
  RFC 4861 6.3.4 clearly defines handling multiple RAs in this way.

- RDNSS/DNSSL options from multiple RAs on a single link will be
  gathered and sent to resolvconf(8).

- Call "resolvconf -d" only after at least one RDNSS or DNSSL option is
  received and then all of them are expired.

- The rtsold.dump output now supports displaying a list of the RA options.

- Use more human-readable expression for logging values of struct timeval.

Discussed with: ume

13 years ago- Improve error handling.
Andreas Tobler [Wed, 8 Jun 2011 16:00:30 +0000 (16:00 +0000)]
- Improve error handling.
- Add retry loops in the i2c read/write functions.
- Combied the ADC channel selection and readout of the value into
  one iicbus_transfer to avoid possible races.

Reviewed by: nwhitehorn

13 years agoCompile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
Nathan Whitehorn [Wed, 8 Jun 2011 13:23:35 +0000 (13:23 +0000)]
Compile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
GDB's ability to locate r_debug_state (which is actually the only function
that need be compiled this way).

13 years agoAdd the missing call to ip6_ipsec_filtertunnel() to be able to control
Bjoern A. Zeeb [Wed, 8 Jun 2011 10:59:36 +0000 (10:59 +0000)]
Add the missing call to ip6_ipsec_filtertunnel() to be able to control
whether decapsulated IPsec packets will be passed to pfil again depending
on the setting of the net.ip6.ipsec6.filtertunnel sysctl.

PR: kern/157670
Submitted by: Manuel Kasper (mk neon1.net)
MFC after: 2 weeks

13 years agoAdded FreeBSD 8.3.
Ruslan Ermilov [Wed, 8 Jun 2011 08:16:32 +0000 (08:16 +0000)]
Added FreeBSD 8.3.

13 years agoremove code for dynamic offlining/onlining of CPUs on x86
Andriy Gapon [Wed, 8 Jun 2011 08:12:15 +0000 (08:12 +0000)]
remove code for dynamic offlining/onlining of CPUs on x86

The code has definitely been broken for SCHED_ULE, which is a default
scheduler.  It may have been broken for SCHED_4BSD in more subtle ways,
e.g. with manually configured CPU affinities and for interrupt devilery
purposes.
We still provide a way to disable individual CPUs or all hyperthreading
"twin" CPUs before SMP startup.  See the UPDATING entry for details.

Interaction between building CPU topology and disabling CPUs still
remains fuzzy: topology is first built using all availble CPUs and then
the disabled CPUs should be "subtracted" from it.  That doesn't work
well if the resulting topology becomes non-uniform.

This work is done in cooperation with Attilio Rao who in addition to
reviewing also provided parts of code.

PR: kern/145385
Discussed with: gcooper, ambrisko, mdf, sbruno
Reviewed by: attilio
Tested by: pho, pluknet
X-MFC after: never

13 years agoPull up all vendor changes to mdoc(7).
Ruslan Ermilov [Wed, 8 Jun 2011 08:08:42 +0000 (08:08 +0000)]
Pull up all vendor changes to mdoc(7).

This also replaces the local fix in r219209 that made .Ac emit
ASCII angle quotes with an official fix.  In the official fix,
ASCII quotes are output when using the .Aq, .Ao and .Ac calls,
but only when nested into the .An macro.

PR: gnu/154822

13 years ago- Disable "resolvconf -d" temporarily to avoid extra invocations of the script
Hiroki Sato [Wed, 8 Jun 2011 04:06:56 +0000 (04:06 +0000)]
- Disable "resolvconf -d" temporarily to avoid extra invocations of the script
  under a certain condition.
- Fix argv handling.

Spotted by: ume

13 years agoCorrect comments and debug logging in ipsec to better match reality.
Bjoern A. Zeeb [Wed, 8 Jun 2011 03:02:11 +0000 (03:02 +0000)]
Correct comments and debug logging in ipsec to better match reality.

MFC after: 3 days

13 years agoUse .Dq instead of hardcoding `` and ''.
Xin LI [Wed, 8 Jun 2011 00:31:10 +0000 (00:31 +0000)]
Use .Dq instead of hardcoding `` and ''.

Suggested by: gjb

13 years ago- For the case when tl1_align(_trap) is used to call rsf_fatal via
Marius Strobl [Tue, 7 Jun 2011 23:15:21 +0000 (23:15 +0000)]
- For the case when tl1_align(_trap) is used to call rsf_fatal via
  RSF_FATAL we need to switch to alternate globals for KSTACK_CHECK just
  like tl1_data_excptn(_trap) does. This is more or less cosmetic because
  in case RSF_FATAL is called we're already heading south.
- Correct an END().
- Read the window state from the correct register for a CATR().

13 years agoSilence notice on pool creation, import and access.
Martin Matuska [Tue, 7 Jun 2011 20:46:31 +0000 (20:46 +0000)]
Silence notice on pool creation, import and access.

Suggested by: Jeremy Chadwick (freebsd-stable@)
Discussed with: pjd
MFC after: 1 week

13 years agoSet curvnet context in a callout-trigerred code path.
Marko Zec [Tue, 7 Jun 2011 20:46:03 +0000 (20:46 +0000)]
Set curvnet context in a callout-trigerred code path.

MFC after: 3 days

13 years agoFor the moment document the possible problem introduced with dynamic address
Bjoern A. Zeeb [Tue, 7 Jun 2011 19:39:34 +0000 (19:39 +0000)]
For the moment document the possible problem introduced with dynamic address
family detection in world, mostly noticed by ifconfig(8), when running with
an old kernel.

Reported by: Andrzej Tobola (ato iem.pw.edu.pl)
Reported by: gcooper

13 years agoAdd a special mount option "failok" to indicate that the administrator wants
Xin LI [Tue, 7 Jun 2011 18:48:49 +0000 (18:48 +0000)]
Add a special mount option "failok" to indicate that the administrator wants
the system to proceed to boot without bailing out into single user mode,
even when the file system can not be successfully mounted.

This option is implemented in mount(8) and not passed into kernel.

MFC after: 1 month

13 years agoLog the socket address passed as the destination to sendto() and sendmsg()
John Baldwin [Tue, 7 Jun 2011 17:40:33 +0000 (17:40 +0000)]
Log the socket address passed as the destination to sendto() and sendmsg()
via ktrace.

MFC after: 1 week

13 years agoAdapt CATR() to r222813. This is somewhat tricky as we can't afford using
Marius Strobl [Tue, 7 Jun 2011 17:33:39 +0000 (17:33 +0000)]
Adapt CATR() to r222813. This is somewhat tricky as we can't afford using
more than three temporary register in several places CATR() is used so
this code trades instructions in for registers. Actually, this still isn't
sufficient and CATR() has the side-effect of clobbering %y. Luckily, with
the current uses of CATR() this either doesn't matter or we are able to
(save and) restore it.
Now that there's only one use of AND() and TEST() left inline these.

13 years agoFix a problem with r222813; given that we may only operate on interrupt
Marius Strobl [Tue, 7 Jun 2011 17:19:14 +0000 (17:19 +0000)]
Fix a problem with r222813; given that we may only operate on interrupt
globals here but clobber %y save and restore the latter.

13 years agoMake automatic hw.snd.default_unit choice a bit more intelligent. Instead
Alexander Motin [Tue, 7 Jun 2011 17:01:52 +0000 (17:01 +0000)]
Make automatic hw.snd.default_unit choice a bit more intelligent. Instead
of just setting it to the first registered device, reevaluate it for each
device registered, trying to choose best candidate, unless one was forced.
For now use such preference order: play&rec, play, rec.

As side effect, this should workaround the situation when HDMI audio output
of the video card, usually not connected to anything, becomes default, that
requires manual user intervention to make sound working. If at some point
this won't be enough, we can try to fetch some additional priority flags
from the device driver.

13 years agoRemove a gratuitous newline. This should be a non-functional change.
Jaakko Heinonen [Tue, 7 Jun 2011 16:23:27 +0000 (16:23 +0000)]
Remove a gratuitous newline. This should be a non-functional change.

PR: bin/153667
Submitted by: Craig Leres
MFC after: 1 week

13 years agoFix a bug that prevents tc=xxx from working.
Hiroki Sato [Tue, 7 Jun 2011 15:40:17 +0000 (15:40 +0000)]
Fix a bug that prevents tc=xxx from working.

13 years agoSince HAL_PHYERR_* is used in the radar code, always include ah_desc.h.
Adrian Chadd [Tue, 7 Jun 2011 14:00:47 +0000 (14:00 +0000)]
Since HAL_PHYERR_* is used in the radar code, always include ah_desc.h.

13 years ago- Use ELM_MALLOC() for struct rainfo.
Hiroki Sato [Tue, 7 Jun 2011 12:00:29 +0000 (12:00 +0000)]
- Use ELM_MALLOC() for struct rainfo.

- Fix a missing back pointer assignment in struct prefix to struct rainfo
  when addr="" is specified.  This caused SIGSEGV.

- Insert a prefix element to a tail queue after setting parameters.

13 years agoDo not use LCM from stripesize and user specified alignment value.
Andrey V. Elsukov [Tue, 7 Jun 2011 11:11:11 +0000 (11:11 +0000)]
Do not use LCM from stripesize and user specified alignment value.
When user wants have specific alignment - do what user wants.
Use stripesize as alignment value in case, when some of gpart's
arguments are ommitted for automatic calculation.

Suggested by: mav

13 years ago- Add myself to calendar.freebsd
Julien Laffaye [Tue, 7 Jun 2011 09:06:15 +0000 (09:06 +0000)]
- Add myself to calendar.freebsd
- Add the forgotten relation to mentors in committers-ports.dot

Approved by: bapt@ (mentor)

13 years agoFlesh out a new HAL method to fetch the radar PHY error frame information.
Adrian Chadd [Tue, 7 Jun 2011 09:03:28 +0000 (09:03 +0000)]
Flesh out a new HAL method to fetch the radar PHY error frame information.

For the AR5211/AR5212, this is apparently a one byte pulse duration
counter value. It is only coded up here for the AR5212 as I don't have
any AR5211-series hardware to test it on.

This information was extracted from the Madwifi DFS branch along with
some local additions.

Please note - all this does is extract out the radar event duration,
it in no way reflects the presence of a radar. Further code is needed
to take a set of radar events and filter them to extract out correct
radar pulse trains (and ignore other events.)

For further information, please see:

http://wiki.freebsd.org/dev/ath_hal%284%29/RadarDetection

This includes references to the relevant patents which describe what
is going on.

Obtained from: Madwifi

13 years agoetire the cpumask_t type and replace it with cpuset_t usage.
Attilio Rao [Tue, 7 Jun 2011 08:46:13 +0000 (08:46 +0000)]
etire the cpumask_t type and replace it with cpuset_t usage.

This is intended to fix the bug where cpu mask objects are
capped to 32.  MAXCPU, then, can now arbitrarely bumped to whatever
value.  Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
  The most notable are cpusetobj_ffs() (which calculates a ffs(3)
  for a cpuset_t object), cpusetobj_strprint() (which prepares a string
  representing a cpuset_t object) and cpusetobj_strscan() (which
  creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
  With the moving from cpumask_t to cpuset_t they are now inefficient
  and not really useful.  Anyway, for the time being, please note that
  access to pcpu datas is protected by sched_pin() in order to avoid
  migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
  and userland.  While this is not directly related to the patch itself,
  it is good to understand that concept and possibly use the patch
  as a reference on how to deal with cpuset_t objects in userland, when
  accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
  set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes.  However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
  several revision of the patches and really helped in improving
  stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
  patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
  patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
  the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
  implementations of the patch.
- Other people have made contributions on other patches that have been
  already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
  count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
  which has been instrumental.
- Sandvine for having offered offices and infrastructure during
  development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).

13 years agoMFC
Attilio Rao [Tue, 7 Jun 2011 08:24:29 +0000 (08:24 +0000)]
MFC

13 years agoAdd an UPDATE entry.
Attilio Rao [Tue, 7 Jun 2011 08:07:41 +0000 (08:07 +0000)]
Add an UPDATE entry.

13 years agoBring back the number of CPU to 32.
Attilio Rao [Tue, 7 Jun 2011 08:05:23 +0000 (08:05 +0000)]
Bring back the number of CPU to 32.

13 years agoFix indentation.
Andrey V. Elsukov [Tue, 7 Jun 2011 06:57:22 +0000 (06:57 +0000)]
Fix indentation.

13 years agoSync ng_nat with recent (r222806) ipfw_nat changes:
Andrey V. Elsukov [Tue, 7 Jun 2011 06:48:42 +0000 (06:48 +0000)]
Sync ng_nat with recent (r222806) ipfw_nat changes:

  Make a behaviour of the libalias based in-kernel NAT a bit closer to
  how natd(8) does work. natd(8) drops packets only when libalias returns
  PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
  always did drop packets that were not aliased, even if they should
  not be aliased and just are going through.

Also add SCTP support: mark response packets to skip firewall processing.

MFC after: 1 month

13 years agoMake a behaviour of the libalias based in-kernel NAT a bit closer to
Andrey V. Elsukov [Tue, 7 Jun 2011 06:42:29 +0000 (06:42 +0000)]
Make a behaviour of the libalias based in-kernel NAT a bit closer to
how natd(8) does work. natd(8) drops packets only when libalias returns
PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
always did drop packets that were not aliased, even if they should
not be aliased and just are going through.

PR: kern/122109, kern/129093, kern/157379
Submitted by: Alexander V. Chernikov (previous version)
MFC after: 1 month

13 years agoamdsbwd: update to support SB8xx southbridges
Andriy Gapon [Tue, 7 Jun 2011 06:18:02 +0000 (06:18 +0000)]
amdsbwd: update to support SB8xx southbridges

Many thanks to Tino <tinotom@gmail.com> for drawing my attention to
this, for doing a lot of testing and providing great feedback.
Many thanks to AMD for continuing to release public specifications for
their chipsets.

PR: kern/157568
Tested by: Tino <tinotom@gmail.com>
MFC after: 1 week

13 years agoSet pca.p_bufr to NULL when we haven't allocated a buffer.
Kenneth D. Merry [Tue, 7 Jun 2011 05:04:37 +0000 (05:04 +0000)]
Set pca.p_bufr to NULL when we haven't allocated a buffer.

Otherwise, p_bufr is set to garbage on the stack, and if that garbage
happens to be non-NULL, and the TOLOG or TOCONS flag is set, putbuf()
will get called and attempt to fill the non-existent buffer.

This is really only relevant for tprintf() (and only when the priority is
not -1), but set it in uprintf() and ttyprintf() for completeness.

The next step, to avoid log buffer scrambling, would be to add the
PRINTF_BUFR_SIZE code to tprintf(), but this should prevent panics.

Submitted by: rmacklem
Found by: pho

13 years agoLower WARNS level to 3 to eliminate alignment warnings related to
Marcel Moolenaar [Tue, 7 Jun 2011 04:38:33 +0000 (04:38 +0000)]
Lower WARNS level to 3 to eliminate alignment warnings related to
casting inherent in CMSG_DATA().

13 years agoUse p4prio_to_tsprio to calculate TS priority instead of using
David Xu [Tue, 7 Jun 2011 02:50:14 +0000 (02:50 +0000)]
Use p4prio_to_tsprio to calculate TS priority instead of using
p4prio_to_rtpprio which is for RT priority.

PR: kern/157657
Submitted by: krivenok.dmitry at gmail dot com
MFC after: 3 days

13 years agoFix making kernel dumps from the debugger by creating a command
Marcel Moolenaar [Tue, 7 Jun 2011 01:28:12 +0000 (01:28 +0000)]
Fix making kernel dumps from the debugger by creating a command
for it. Do not not expect a developer to call doadump(). Calling
doadump does not necessarily work when it's declared static. Nor
does it necessarily do what was intended in the context of text
dumps. The dump command always creates a core dump.

Move printing of error messages from doadump to the dump command,
now that we don't have to worry about being called from DDB.

13 years agoCall set_cputicker() to have the time counter use the ITC register.
Marcel Moolenaar [Tue, 7 Jun 2011 01:06:49 +0000 (01:06 +0000)]
Call set_cputicker() to have the time counter use the ITC register.
Note that the ITC frequency is fixed.

13 years agoo Bump the EFI loader version to 3.1.
Marcel Moolenaar [Tue, 7 Jun 2011 00:59:31 +0000 (00:59 +0000)]
o   Bump the EFI loader version to 3.1.
o   Add the about, pbvm and reboot commands.
o   Trim the banner (suppress maker and date).

13 years agoAdd ia64_sync_icache() and use it to make the I-cache coherent
Marcel Moolenaar [Tue, 7 Jun 2011 00:39:15 +0000 (00:39 +0000)]
Add ia64_sync_icache() and use it to make the I-cache coherent
after loading the kernel's text segment. The kernel will do the
same for loaded modules, so don't worry about that.

13 years agoAdd myself to committers-ports.dot
Julien Laffaye [Mon, 6 Jun 2011 23:48:48 +0000 (23:48 +0000)]
Add myself to committers-ports.dot

Approved by: tabthorpe@ (mentor)

13 years agoValidate INT 15h and 16h vectors more strictly. Traditionally these entry
Jung-uk Kim [Mon, 6 Jun 2011 23:03:37 +0000 (23:03 +0000)]
Validate INT 15h and 16h vectors more strictly.  Traditionally these entry
points are fixed addresses and (U)EFI CSM specification also mandated that.
Unfortunately, (U)EFI CSM specification does not specifically mention this
is to call service routine via interrupt vector table or to jump directly
to the entry point.  As a result, some CSM seems to install two routines
and acts differently, depending on how it was executed, unfortunately.
When INT 15h is used, it calls a function pointer (which is probably a UEFI
service function).  When it jumps directly to the entry point, it executes
a simple and traditional INT 15h service routine.  Therefore, actually there
are two possible fixes, i. e., this fix or jumping directly to the fixed
entry point.  However, we chose this fix because a) keyboard typematic
support via BIOS is becoming extremely rarer and b) we cannot support random
service routine installed by a firmware or a boot loader.  This should fix
Lenovo X220 laptop, specifically.

Reviewed by: delphij
MFC after: 3 days

13 years agoRevert r222152. The root cause was analysed and better fix is upcoming.
Jung-uk Kim [Mon, 6 Jun 2011 22:18:40 +0000 (22:18 +0000)]
Revert r222152.  The root cause was analysed and better fix is upcoming.

Discussed with: delphij

13 years agoMFC
Attilio Rao [Mon, 6 Jun 2011 22:06:42 +0000 (22:06 +0000)]
MFC

13 years agoReset clear-stall error counter before setting up the USB control transfers.
Hans Petter Selasky [Mon, 6 Jun 2011 22:03:09 +0000 (22:03 +0000)]
Reset clear-stall error counter before setting up the USB control transfers.

MFC after: 14 days

13 years agoUnbreak kernels with non-default PCBGROUP included but no WITNESS.
Bjoern A. Zeeb [Mon, 6 Jun 2011 21:45:32 +0000 (21:45 +0000)]
Unbreak kernels with non-default PCBGROUP included but no WITNESS.
Rather than including lock.h in in_pcbgroup.c in right order, fix it
for all consumers of in_pcb.h by further header file pollution under
#ifdef KERNEL.

Reported by: Pan Tsu (inyaoo gmail.com)

13 years agoImprove enumeration of Low- and Full-speed devices connected through a
Hans Petter Selasky [Mon, 6 Jun 2011 21:45:09 +0000 (21:45 +0000)]
Improve enumeration of Low- and Full-speed devices connected through a
High-speed USB HUB by resetting the transaction translator (TT)
before trying re-enumeration. Also when clear-stall fails multiple times
try a re-enumeration.

Suggested by: Trevor Blackwell
MFC after: 14 days

13 years agoMFC
Attilio Rao [Mon, 6 Jun 2011 21:38:39 +0000 (21:38 +0000)]
MFC

13 years agoRework parts of this man page to improve grammar.
Gavin Atkinson [Mon, 6 Jun 2011 21:02:26 +0000 (21:02 +0000)]
Rework parts of this man page to improve grammar.

Inspired by, and parts submitted by...
PR: docs/157467
Submitted by: Ben Kaduk <kaduk mit.edu>
MFC after: 2 weeks

13 years agoRemove redundant assignments to WARNS.
Ed Schouten [Mon, 6 Jun 2011 20:24:17 +0000 (20:24 +0000)]
Remove redundant assignments to WARNS.

For these directories, WARNS is already implied to be 6.

13 years agoSet WARNS=1 temporarily to unbreak universe.
Hiroki Sato [Mon, 6 Jun 2011 20:14:50 +0000 (20:14 +0000)]
Set WARNS=1 temporarily to unbreak universe.

13 years agoAttempt to clear up some confusion in the following example, by stating
Glen Barber [Mon, 6 Jun 2011 19:33:19 +0000 (19:33 +0000)]
Attempt to clear up some confusion in the following example, by stating
the '-c' argument is passed to the shell, not to su(1), which would
indicate the login class.

'su -m <user> -c <command>'

Submitted by: Warren Block <wblock@wonkity.com> (followup to 157078)
MFC after: 5 days

13 years agoImprove cpu_idle():
Marcel Moolenaar [Mon, 6 Jun 2011 19:06:15 +0000 (19:06 +0000)]
Improve cpu_idle():
o   cpu_idle_hook is expected to be called with interrupts
    disabled and re-enables interrupts on return.
o   sync with x86: don't idle when the CPU has runnable tasks
o   have callers of ia64_call_pal_static() disable interrupts
    and re-enable interrupts.
o   add, but compile-out, support for idle mode. This will be
    enabled at some later time, after proper testing.

13 years agoFix regex for ptraceopname().
Dmitry Chagin [Mon, 6 Jun 2011 19:00:38 +0000 (19:00 +0000)]
Fix regex for ptraceopname().

PR: bin/157663
Submitted by: jason wright <jason@thought.net>
MFC after: 10 days

13 years agoAllow custom files to be opened and allow sorting by timestamp.
Ed Schouten [Mon, 6 Jun 2011 18:40:01 +0000 (18:40 +0000)]
Allow custom files to be opened and allow sorting by timestamp.

While implementing a tool to import lastlog entries into utmpx, I
noticed lastlogin doesn't allow custom database files to be opened. Add
a -f switch to support this. Also, add -r and -t similar to ls(1),
ruptime(1), etc. where you can sort entries by timestamp and reverse
them. This allows you to spot active/idle users more easily.

13 years agoDon't clobber the hosts /etc/fstab. $1 is empty at this point.
Marcel Moolenaar [Mon, 6 Jun 2011 18:25:11 +0000 (18:25 +0000)]
Don't clobber the hosts /etc/fstab. $1 is empty at this point.

13 years agoInclude param.h for CACHE_LINE_SIZE to unbreak the build.
Bjoern A. Zeeb [Mon, 6 Jun 2011 17:07:38 +0000 (17:07 +0000)]
Include param.h for CACHE_LINE_SIZE to unbreak the build.

13 years agoMake a couple of debug printfs DEVPRINTF.
Warner Losh [Mon, 6 Jun 2011 16:27:38 +0000 (16:27 +0000)]
Make a couple of debug printfs DEVPRINTF.

13 years agoSome style fixes.
John Baldwin [Mon, 6 Jun 2011 15:33:15 +0000 (15:33 +0000)]
Some style fixes.

Submitted by: bde

13 years agoBump date from previous commit. :(
Glen Barber [Mon, 6 Jun 2011 15:21:53 +0000 (15:21 +0000)]
Bump date from previous commit. :(

MFC after: 5 days

13 years agoDocument that when running 'su -m <user> -c <command>', <command> is run
Glen Barber [Mon, 6 Jun 2011 15:17:55 +0000 (15:17 +0000)]
Document that when running 'su -m <user> -c <command>', <command> is run
within a shell as <user>.

PR: 157078
Submitted by: Warren Block <wblock@wonkity.com>
MFC after: 5 days

13 years agoRemove empty #ifndef
Martin Matuska [Mon, 6 Jun 2011 14:46:43 +0000 (14:46 +0000)]
Remove empty #ifndef

MFC after: 3 days

13 years agodon't use cpuid level 4 in x86 cpu topology detection if it's not supported
Andriy Gapon [Mon, 6 Jun 2011 14:23:13 +0000 (14:23 +0000)]
don't use cpuid level 4 in x86 cpu topology detection if it's not supported

This regression was introduced in r213323.
There are probably no Intel cpus that support amd64 mode, but do not
support cpuid level 4, but it's better to keep i386 and amd64 versions
of this code in sync.

Discovered by: pho
Tested by: pho
MFC after: 2 weeks

13 years agoPass correct size to write(2).
Jaakko Heinonen [Mon, 6 Jun 2011 13:50:29 +0000 (13:50 +0000)]
Pass correct size to write(2).

PR: bin/155915
Submitted by: John Levine
MFC after: 2 weeks

13 years agoAdd another example to mount(8) on using the "-o" argument.
Gavin Atkinson [Mon, 6 Jun 2011 13:24:54 +0000 (13:24 +0000)]
Add another example to mount(8) on using the "-o" argument.

PR: docs/157389
Submitted by: Warren Block <wblock wonkity.com>
MFC after: 1 week

13 years agoMore properly handle Cardbus cards that that store their CIS in a BAR after
John Baldwin [Mon, 6 Jun 2011 13:21:11 +0000 (13:21 +0000)]
More properly handle Cardbus cards that that store their CIS in a BAR after
the recent changes to track BAR state explicitly.  The code would now
attempt to add the same BAR twice in this case.  Instead, change this so
that it recognizes this case and only adds it once and do not delete the
BAR outright after parsing the CIS.

Tested by: bschmidt

13 years agoBump .Dd
Gavin Atkinson [Mon, 6 Jun 2011 13:18:29 +0000 (13:18 +0000)]
Bump .Dd

Forgotten by: gavin
MFC after: 1 week

13 years agoDocument that REQUIRES, PROVIDES and KEYWORDS are alos accepted. This
Gavin Atkinson [Mon, 6 Jun 2011 13:13:48 +0000 (13:13 +0000)]
Document that REQUIRES, PROVIDES and KEYWORDS are alos accepted.  This
chnage is different to the one suggested in the PR to try to avoid
cluttering the man page too much.

PR: docs/154494
Submitted by: kilian <kilian.klimek googlemail.com>
MFC after: 1 week

13 years agoClear the device_t pointer in 'struct resource' when releasing a device
John Baldwin [Mon, 6 Jun 2011 13:12:56 +0000 (13:12 +0000)]
Clear the device_t pointer in 'struct resource' when releasing a device
as otherwise the sysctl to export rman info can dereference a stale
pointer.

PR: kern/115371
Submitted by: Arthur Hartwig
MFC after: 1 week

13 years agoImplement a CPU-affine TCP and UDP connection lookup data structure,
Robert Watson [Mon, 6 Jun 2011 12:55:02 +0000 (12:55 +0000)]
Implement a CPU-affine TCP and UDP connection lookup data structure,
struct inpcbgroup.  pcbgroups, or "connection groups", supplement the
existing inpcbinfo connection hash table, which when pcbgroups are
enabled, might now be thought of more usefully as a per-protocol
4-tuple reservation table.

Connections are assigned to connection groups base on a hash of their
4-tuple; wildcard sockets require special handling, and are members
of all connection groups.  During a connection lookup, a
per-connection group lock is employed rather than the global pcbinfo
lock.  By aligning connection groups with input path processing,
connection groups take on an effective CPU affinity, especially when
aligned with RSS work placement (see a forthcoming commit for
details).  This eliminates cache line migration associated with
global, protocol-layer data structures in steady state TCP and UDP
processing (with the exception of protocol-layer statistics; further
commit to follow).

Elements of this approach were inspired by Willman, Rixner, and Cox's
2006 USENIX paper, "An Evaluation of Network Stack Parallelization
Strategies in Modern Operating Systems".  However, there are also
significant differences: we maintain the inpcb lock, rather than using
the connection group lock for per-connection state.

Likewise, the focus of this implementation is alignment with NIC
packet distribution strategies such as RSS, rather than pure software
strategies.  Despite that focus, software distribution is supported
through the parallel netisr implementation, and works well in
configurations where the number of hardware threads is greater than
the number of NIC input queues, such as in the RMI XLR threaded MIPS
architecture.

Another important difference is the continued maintenance of existing
hash tables as "reservation tables" -- these are useful both to
distinguish the resource allocation aspect of protocol name management
and the more common-case lookup aspect.  In configurations where
connection tables are aligned with hardware hashes, it is desirable to
use the traditional lookup tables for loopback or encapsulated traffic
rather than take the expense of hardware hashes that are hard to
implement efficiently in software (such as RSS Toeplitz).

Connection group support is enabled by compiling "options PCBGROUP"
into your kernel configuration; for the time being, this is an
experimental feature, and hence is not enabled by default.

Subject to the limited MFCability of change dependencies in inpcb,
and its change to the inpcbinfo init function signature, this change
in principle could be merged to FreeBSD 8.x.

Reviewed by:    bz
Sponsored by:   Juniper Networks, Inc.

13 years agoRemove TODO which is not longer needed and the default.
Bjoern A. Zeeb [Mon, 6 Jun 2011 12:21:42 +0000 (12:21 +0000)]
Remove TODO which is not longer needed and the default.

13 years agoDo not mark lo0 as IFDISABLED even if there is no $ifconfig_lo0_ipv6 line.
Hiroki Sato [Mon, 6 Jun 2011 11:36:10 +0000 (11:36 +0000)]
Do not mark lo0 as IFDISABLED even if there is no $ifconfig_lo0_ipv6 line.

13 years agoInitialize co.use_set variable before parsing each new rule.
Andrey V. Elsukov [Mon, 6 Jun 2011 11:10:38 +0000 (11:10 +0000)]
Initialize co.use_set variable before parsing each new rule.

PR: bin/134975
MFC after: 2 weeks

13 years agoIncrease buffer size for the command line.
Andrey V. Elsukov [Mon, 6 Jun 2011 10:52:26 +0000 (10:52 +0000)]
Increase buffer size for the command line.

PR: bin/125370
Submitted by: sem
MFC after: 2 weeks

13 years agoFix build on 64-bit arch.
Hiroki Sato [Mon, 6 Jun 2011 10:51:00 +0000 (10:51 +0000)]
Fix build on 64-bit arch.

Submitted by: dim
Pointy hat to: hrs

13 years agoDo not return EINVAL when user does `ipfw set N flush` on an empty set.
Andrey V. Elsukov [Mon, 6 Jun 2011 10:39:38 +0000 (10:39 +0000)]
Do not return EINVAL when user does `ipfw set N flush` on an empty set.

MFC after: 2 weeks

13 years agoDo not activate automatic LL addr configuration when 0/1->1 transition of
Hiroki Sato [Mon, 6 Jun 2011 04:12:57 +0000 (04:12 +0000)]
Do not activate automatic LL addr configuration when 0/1->1 transition of
ND6_IFF_IFDISABLED flag.

13 years agoRemove "ifconfig IF inet6 -accept_rtadv" when ipv6_gateway_enable=YES because
Hiroki Sato [Mon, 6 Jun 2011 03:37:33 +0000 (03:37 +0000)]
Remove "ifconfig IF inet6 -accept_rtadv" when ipv6_gateway_enable=YES because
this is no longer needed.

13 years ago- Implement RDNSS and DNSSL options (RFC 6106, IPv6 Router Advertisement
Hiroki Sato [Mon, 6 Jun 2011 03:06:43 +0000 (03:06 +0000)]
- Implement RDNSS and DNSSL options (RFC 6106, IPv6 Router Advertisement
  Options for DNS Configuration) into rtadvd(8) and rtsold(8).  DNS
  information received by rtsold(8) will go to resolv.conf(5) by
  resolvconf(8) script.  This is based on work by J.R. Oldroyd (kern/156259)
  but revised extensively[1].

- rtadvd(8) now supports "noifprefix" to disable gathering on-link prefixes
  from interfaces when no "addr" is specified[2].  An entry in rtadvd.conf
  with "noifprefix" + no "addr" generates an RA message with no prefix
  information option.

- rtadvd(8) now supports RTM_IFANNOUNCE message to fix crashes when an
  interface is added or removed.

- Correct bogus ND_OPT_ROUTE_INFO value to one in RFC 4191.

Reviewed by: bz[1]
PR: kern/156259 [1]
PR: bin/152458 [2]

13 years ago- Make the code more proactively clear an ND6_IFF_IFDISABLED flag when
Hiroki Sato [Mon, 6 Jun 2011 02:37:38 +0000 (02:37 +0000)]
- Make the code more proactively clear an ND6_IFF_IFDISABLED flag when
  an explicit action for INET6 configuration happens.  The changes are:

  1. When an ND6 flag is changed via SIOCSIFINFO_FLAGS ioctl,
     setting ND6_IFF_ACCEPT_RTADV and/or ND6_IFF_AUTO_LINKLOCAL now triggers
     an attempt to clear the ND6_IFF_IFDISABLED flag.

  2. When an AF_INET6 address is added successfully to an interface and
     it is marked as ND6_IFF_IFDISABLED, an attempt to clear the
     ND6_IFF_IFDISABLED happens.

  This simplifies ND6_IFF_IFDISABLED flag manipulation by users via ifconfig(8);
  in most cases manual configuration is no longer needed.

- When ND6_IFF_AUTO_LINKLOCAL is set and no link-local address is assigned to
  an interface, SIOCSIFINFO_FLAGS ioctl now calls in6_ifattach() to configure
  a link-local address.

  This change ensures link-local address configuration when "ifconfig IF inet6"
  command is invoked.  For example, "ifconfig IF inet6 auto_linklocal" now
  always try to configure an LL addr even if ND6_IFF_AUTO_LINKLOCAL is already
  set to 1 (i.e. down/up cycle is no longer needed).

Reviewed by: bz

13 years ago- Accept Router Advertisement messages even when net.inet6.ip6.forwarding=1.
Hiroki Sato [Mon, 6 Jun 2011 02:14:23 +0000 (02:14 +0000)]
- Accept Router Advertisement messages even when net.inet6.ip6.forwarding=1.

- A new per-interface knob IFF_ND6_NO_RADR and sysctl IPV6CTL_NO_RADR.
  This controls if accepting a route in an RA message as the default route.
  The default value for each interface can be set by net.inet6.ip6.no_radr.
  The system wide default value is 0.

- A new sysctl: net.inet6.ip6.norbit_raif.  This controls if setting R-bit in
  NA on RA accepting interfaces.  The default is 0 (R-bit is set based on
  net.inet6.ip6.forwarding).

Background:

 IPv6 host/router model suggests a router sends an RA and a host accepts it for
 router discovery.  Because of that, KAME implementation does not allow
 accepting RAs when net.inet6.ip6.forwarding=1.  Accepting RAs on a router can
 make the routing table confused since it can change the default router
 unintentionally.

 However, in practice there are cases where we cannot distinguish a host from
 a router clearly.  For example, a customer edge router often works as a host
 against the ISP, and as a router against the LAN at the same time.  Another
 example is a complex network configurations like an L2TP tunnel for IPv6
 connection to Internet over an Ethernet link with another native IPv6 subnet.
 In this case, the physical interface for the native IPv6 subnet works as a
 host, and the pseudo-interface for L2TP works as the default IP forwarding
 route.

Problem:

 Disabling processing RA messages when net.inet6.ip6.forwarding=1 and
 accepting them when net.inet6.ip6.forward=0 cause the following practical
 issues:

 - A router cannot perform SLAAC.  It becomes a problem if a box has
   multiple interfaces and you want to use SLAAC on some of them, for
   example.  A customer edge router for IPv6 Internet access service
   using an IPv6-over-IPv6 tunnel sometimes needs SLAAC on the
   physical interface for administration purpose; updating firmware
   and so on (link-local addresses can be used there, but GUAs by
   SLAAC are often used for scalability).

 - When a host has multiple IPv6 interfaces and it receives multiple RAs on
   them, controlling the default route is difficult.  Router preferences
   defined in RFC 4191 works only when the routers on the links are
   under your control.

Details of Implementation Changes:

 Router Advertisement messages will be accepted even when
 net.inet6.ip6.forwarding=1.  More precisely, the conditions are as
 follow:

 (ACCEPT_RTADV && !NO_RADR && !ip6.forwarding)
=> Normal RA processing on that interface. (as IPv6 host)

 (ACCEPT_RTADV && (NO_RADR || ip6.forwarding))
=> Accept RA but add the router to the defroute list with
   rtlifetime=0 unconditionally.  This effectively prevents
   from setting the received router address as the box's
   default route.

 (!ACCEPT_RTADV)
=> No RA processing on that interface.

 ACCEPT_RTADV and NO_RADR are per-interface knob.  In short, all interface
 are classified as "RA-accepting" or not.  An RA-accepting interface always
 processes RA messages regardless of ip6.forwarding.  The difference caused by
 NO_RADR or ip6.forwarding is whether the RA source address is considered as
 the default router or not.

 R-bit in NA on the RA accepting interfaces is set based on
 net.inet6.ip6.forwarding.  While RFC 6204 W-1 rule (for CPE case) suggests
 a router should disable the R-bit completely even when the box has
 net.inet6.ip6.forwarding=1, I believe there is no technical reason with
 doing so.  This behavior can be set by a new sysctl net.inet6.ip6.norbit_raif
 (the default is 0).

Usage:

 # ifconfig fxp0 inet6 accept_rtadv
=> accept RA on fxp0
 # ifconfig fxp0 inet6 accept_rtadv no_radr
=> accept RA on fxp0 but ignore default route information in it.
 # sysctl net.inet6.ip6.norbit_no_radr=1
=> R-bit in NAs on RA accepting interfaces will always be set to 0.

13 years agoFix ia64 ISO creation:
Marcel Moolenaar [Mon, 6 Jun 2011 01:52:15 +0000 (01:52 +0000)]
Fix ia64 ISO creation:
o   boot/mfsroot.gz is no more. Copy it only when it exists so as still
    to be compatible with Makefile.sysinstall.
o   while here, make ispfw.ko optional as well.
o   '-b bootimage' is not a valid argument for makefs. What was meant
    was '-o bootimage'.
o   create the boot image in the current directory so that makefs can
    find the file. Previously it had to be created under $BASE because
    that's how mkisofs wanted it.

13 years agoGrammer fix in comment.
Kirk McKusick [Sun, 5 Jun 2011 22:36:30 +0000 (22:36 +0000)]
Grammer fix in comment.

Eliminate one (of several) possible conflicting buffer locks when
trying to reclaim blocks. Rest of fix to be incorporated as part
of SUJ update by jeff.

Pointed out by: Kostik Belousov

13 years agoadd SNDCTL_DSP_HALT specified by OSS
Andriy Gapon [Sun, 5 Jun 2011 21:01:41 +0000 (21:01 +0000)]
add SNDCTL_DSP_HALT specified by OSS

This is really a new name for SNDCTL_DSP_RESET.

PR: kern/156874
Submitted by: gerald
MFC after: 1 week

13 years agoAdd support for flock(2) locks to the new NFSv4 client. I think this
Rick Macklem [Sun, 5 Jun 2011 20:22:56 +0000 (20:22 +0000)]
Add support for flock(2) locks to the new NFSv4 client. I think this
should be ok, since the client now delays NFSv4 Close operations
until VOP_INACTIVE()/VOP_RECLAIM(). As such, there should be no
risk that the NFSv4 Open is closed while an associated byte range lock
still exists.

Tested by: avg
MFC after: 2 weeks

13 years agoamdsbwd.4: fix history to reflect correct releases
Andriy Gapon [Sun, 5 Jun 2011 19:25:30 +0000 (19:25 +0000)]
amdsbwd.4: fix history to reflect correct releases

Pointed out by: ru
MFC after: 4 days

13 years agoamdsbwd.4: fix spelling of my name
Andriy Gapon [Sun, 5 Jun 2011 19:20:39 +0000 (19:20 +0000)]
amdsbwd.4: fix spelling of my name

Pointed out by: ru
MFC after: 3 days

13 years agoThe new NFSv4 client was erroneously using "p" instead of
Rick Macklem [Sun, 5 Jun 2011 18:17:37 +0000 (18:17 +0000)]
The new NFSv4 client was erroneously using "p" instead of
"p_leader" for the "id" for POSIX byte range locking. I think
this would only have affected processes created by rfork(2)
with the RFTHREAD flag specified. This patch fixes that by
passing the "id" down through the various functions from
nfs_advlock().

MFC after: 2 weeks

13 years agoFix the new NFSv4 client so that it doesn't crash when
Rick Macklem [Sun, 5 Jun 2011 17:31:44 +0000 (17:31 +0000)]
Fix the new NFSv4 client so that it doesn't crash when
a mount is done for a VIMAGE kernel.

Tested by: glz at hidden-powers dot com
Reviewed by: bz
MFC after: 2 weeks