dragonfly.git
18 hours agonet: some LINTing after if_lagg import master
Markus Pfeiffer [Tue, 30 Sep 2014 09:17:14 +0000 (09:17 +0000)]
net: some LINTing after if_lagg import

* remove duplicate from include/Makefile
* sort mtree alphabetically
* update ifmedia(4) manpage to reflect updates to if_media.h

Reported-By: Sascha Wildner <swildner@online.de>
25 hours agoBump __DragonFly_version for i915 hw context support
François Tigeot [Tue, 30 Sep 2014 06:50:45 +0000 (08:50 +0200)]
Bump __DragonFly_version for i915 hw context support

44 hours agoudp: Optimize detach path
Sepherosa Ziehau [Mon, 29 Sep 2014 12:18:46 +0000 (20:18 +0800)]
udp: Optimize detach path

If the inpcb was never put onto wildcard hash and the multicast options
were never accessed nor modified, we could directly dispose the inpcb
on detach path instead of going through all netisrs to make sure that
it is no longer being accessed.

After this commit 'kq_connect_client -u' gives ~180Kconns/s instead of
~160Kconns/s (~12% improvement).

44 hours agoinpcb: Define INP_WASBOUND_NOTANY as protocol specific flag
Sepherosa Ziehau [Mon, 29 Sep 2014 12:16:56 +0000 (20:16 +0800)]
inpcb: Define INP_WASBOUND_NOTANY as protocol specific flag

44 hours agoinpcb: Revoke INP_WILDCARD_MP, which serves no purpose now
Sepherosa Ziehau [Mon, 29 Sep 2014 12:15:50 +0000 (20:15 +0800)]
inpcb: Revoke INP_WILDCARD_MP, which serves no purpose now

While I'm here, use ncpus2 instead of ncpus for TCP, which only uses
ncpus2 netisrs.

44 hours agotcp: Check multicast sopt name after sopt level is checked
Sepherosa Ziehau [Mon, 29 Sep 2014 12:14:39 +0000 (20:14 +0800)]
tcp: Check multicast sopt name after sopt level is checked

2 days agonet: add version numbers to lagg sourcefiles, adapt manpage
Markus Pfeiffer [Sun, 28 Sep 2014 22:32:19 +0000 (22:32 +0000)]
net: add version numbers to lagg sourcefiles, adapt manpage

2 days agonet: import FreeBSD's if_lagg
Markus Pfeiffer [Fri, 22 Nov 2013 22:19:07 +0000 (22:19 +0000)]
net: import FreeBSD's if_lagg

2 days agotools/netrate: Get socket's cpu hint and bind cpu accordingly
Sepherosa Ziehau [Sun, 28 Sep 2014 11:43:20 +0000 (19:43 +0800)]
tools/netrate: Get socket's cpu hint and bind cpu accordingly

2 days agosocket: Provide socket owner cpuid hint
Sepherosa Ziehau [Thu, 25 Sep 2014 13:51:14 +0000 (21:51 +0800)]
socket: Provide socket owner cpuid hint

If the cpuid hint could not be provided or the cpuid hint does not make
sense, -1 will be returned as cpuid hint, e.g. TCP listen sockets w/o
SO_REUSEPORT.

This helps avoiding unnecessary IPIs and contention on receiving sockbuf
token.

2 days agoudp: Redistribute SO_REUSEPORT socket based on local group index
Sepherosa Ziehau [Mon, 22 Sep 2014 14:26:40 +0000 (22:26 +0800)]
udp: Redistribute SO_REUSEPORT socket based on local group index

This improves the request/response transation rate a lot for UDP sockets
which set SO_REUSEPORT, by cpu localizing the request and response
processing.

tools/netrate/udpecho 64B request/response transation rate is raised from
1.24Mtrans/s to 1.39Mtrans/s (~12% improvement).

2 days agoinpcb: Add in_pcb{link,unlink}_flags() to bypass INP_WILDCARD check
Sepherosa Ziehau [Mon, 22 Sep 2014 11:27:07 +0000 (19:27 +0800)]
inpcb: Add in_pcb{link,unlink}_flags() to bypass INP_WILDCARD check

It is safe to change the inpcb's pcblist while the it is still referenced
by the wildcard hash.

2 days agoinpcb: Save local group index
Sepherosa Ziehau [Sun, 21 Sep 2014 13:00:32 +0000 (21:00 +0800)]
inpcb: Save local group index

So that the caller, e.g. UDP protocol, could redistribute the inpcb
accordingly.

We keep the local group sorted by the inpcb local group index in
ascending order.  This eases the multi-process userland application
which uses SO_REUSEPORT sockets and binds process to the owner cpu
of the SO_REUSEPORT socket:
If we didn't sort the local group by the inpcb local group index and
one of the process owning an inpcb in this local group restarted, e.g.
crashed and restarted by watchdog, other processes owning a inpcb in
this local group would have to detect that event, refetch its socket's
owner cpu, and re-bind.

4 days agohammer - Disallow creation of a file/subdir/etc in a deleted directory
Matthew Dillon [Sat, 27 Sep 2014 04:41:23 +0000 (21:41 -0700)]
hammer - Disallow creation of a file/subdir/etc in a deleted directory

* Disallow the creation of inodes within deleted directories.  This
  possibility occurs if a program is CD'd into an empty directory which
  is then rmdir'd, and the program then tries to create something
  in the now-destroyed directory.

Reported-by: varialus
7 days agotest/udp: Add SO_REUSEPORT test
Sepherosa Ziehau [Tue, 23 Sep 2014 12:51:14 +0000 (20:51 +0800)]
test/udp: Add SO_REUSEPORT test

7 days agokernel/lockf: Add include for LOCKF_DEBUG and fix printf warnings.
Sascha Wildner [Tue, 23 Sep 2014 08:29:55 +0000 (10:29 +0200)]
kernel/lockf: Add include for LOCKF_DEBUG and fix printf warnings.

8 days agokernel/i915: Add missing opt_acpi.h to SRCS.
Sascha Wildner [Mon, 22 Sep 2014 11:33:25 +0000 (13:33 +0200)]
kernel/i915: Add missing opt_acpi.h to SRCS.

8 days agokernel/drm: Add back #include "opt_drm.h" to drmP.h so that DRM_DEBUG works.
Sascha Wildner [Mon, 22 Sep 2014 11:14:01 +0000 (13:14 +0200)]
kernel/drm: Add back #include "opt_drm.h" to drmP.h so that DRM_DEBUG works.

9 days agoudp: Factor out function to reset inpcb route cache
Sepherosa Ziehau [Sun, 21 Sep 2014 14:00:40 +0000 (22:00 +0800)]
udp: Factor out function to reset inpcb route cache

9 days agokernel/acpi: Sync acpi_resource with FreeBSD.
Sascha Wildner [Sun, 21 Sep 2014 09:21:27 +0000 (11:21 +0200)]
kernel/acpi: Sync acpi_resource with FreeBSD.

* Use AcpiWalkResources() for parsing _CRS result.

* Add support for 64-bit address range resources.

* Add workaround for BIOSes that specify edge-sensitive but active low
  settings for ACPI-enumerated serial ports (such as the one found on
  an Intel D2500CCE mobo).

* Minor fixes/cleanup.

10 days agonetrate/pktgen: Unbreak building
Sepherosa Ziehau [Sun, 21 Sep 2014 08:09:15 +0000 (16:09 +0800)]
netrate/pktgen: Unbreak building

10 days agoinpcb: Remove the code that does hash-threshold wildcard sockets selection
Sepherosa Ziehau [Sun, 21 Sep 2014 08:03:11 +0000 (16:03 +0800)]
inpcb: Remove the code that does hash-threshold wildcard sockets selection

We always use modulo-N here.

10 days agoudp: Prepare for re-redispatching for SO_REUSEPORT sockets
Sepherosa Ziehau [Sun, 21 Sep 2014 07:29:41 +0000 (15:29 +0800)]
udp: Prepare for re-redispatching for SO_REUSEPORT sockets

10 days agokernel/acpi: Use ACPI_FAILURE() and also remove unneeded variables.
Sascha Wildner [Sat, 20 Sep 2014 15:05:26 +0000 (17:05 +0200)]
kernel/acpi: Use ACPI_FAILURE() and also remove unneeded variables.

12 days agodrm: Fix a randr bug
François Tigeot [Thu, 18 Sep 2014 18:15:24 +0000 (20:15 +0200)]
drm: Fix a randr bug

* Sync drm_linux_list_sort.c with FreeBSD, fixing a qsort_r() bug

* Array elements were not properly sorted, resulting in infinite
  loops in KDE

* FreeBSD revision: 258549

Pointed-out-by: dumbbell
12 days agorip: All processing should only happens in netisr0
Sepherosa Ziehau [Thu, 18 Sep 2014 12:31:57 +0000 (20:31 +0800)]
rip: All processing should only happens in netisr0

Add assertions about it and remove unnecessary token.

12 days agodivert: Don't call abort method in disconnect method
Sepherosa Ziehau [Thu, 18 Sep 2014 12:29:49 +0000 (20:29 +0800)]
divert: Don't call abort method in disconnect method

Use soisdisconnected() is enough; divert's abort method should never
be called.

13 days agoUpdate the pciconf(8) database.
Sascha Wildner [Wed, 17 Sep 2014 19:21:14 +0000 (21:21 +0200)]
Update the pciconf(8) database.

September 13, 2014 snapshot from http://pciids.sourceforge.net/

13 days agokernel/ale: Fix typo in a comment.
Sascha Wildner [Wed, 17 Sep 2014 18:46:04 +0000 (20:46 +0200)]
kernel/ale: Fix typo in a comment.

13 days agokernel/acpi: Add our copyright to two files.
Sascha Wildner [Wed, 17 Sep 2014 17:11:25 +0000 (19:11 +0200)]
kernel/acpi: Add our copyright to two files.

2 weeks agokernel/acpi: Fix typo, i must be <count.
Sascha Wildner [Tue, 16 Sep 2014 13:57:34 +0000 (15:57 +0200)]
kernel/acpi: Fix typo, i must be <count.

2 weeks agokernel/acpi: Add acpi_eval_osc() as a general function for running _OSCs.
Sascha Wildner [Tue, 16 Sep 2014 13:20:37 +0000 (15:20 +0200)]
kernel/acpi: Add acpi_eval_osc() as a general function for running _OSCs.

This is a hopefully true-to-the-spec implementation, as described in
chapter "6.2.11 _OSC (Operating System Capabilities)" of the 5.1 spec.
Handling of the query support flag could be better (i.e., we could
pass the returned buffer back to the caller), but we don't need that
yet.

This also fixes bugs in the the error handling which in our acpi_cpu
specific previous implementation didn't work at all, due to my mistakes.

In-discussion-with: sephe

2 weeks agotest - Testing the bot 1
Antonio Huete Jimenez [Mon, 15 Sep 2014 22:00:40 +0000 (15:00 -0700)]
test - Testing the bot 1

2 weeks agosys/dev/drm/i915: Activate ACPI
Markus Pfeiffer [Mon, 8 Sep 2014 20:48:03 +0000 (21:48 +0100)]
sys/dev/drm/i915: Activate ACPI

While I am here, do some whitespace cleanup as well.

2 weeks agoRevert "sys/dev/drm/i915: Activate ACPI"
Markus Pfeiffer [Mon, 15 Sep 2014 21:19:56 +0000 (21:19 +0000)]
Revert "sys/dev/drm/i915: Activate ACPI"

This reverts commit 813bcdd292df9531f0d499d8cd9202238f51c961.

2 weeks agotest - Testing the bot
Antonio Huete Jimenez [Mon, 15 Sep 2014 21:38:29 +0000 (14:38 -0700)]
test - Testing the bot

2 weeks agosys/dev/drm/i915: Activate ACPI
Markus Pfeiffer [Mon, 8 Sep 2014 20:48:03 +0000 (21:48 +0100)]
sys/dev/drm/i915: Activate ACPI

2 weeks agousb4bsd: Fix race condition in usb_dev
Markus Pfeiffer [Sun, 14 Sep 2014 21:34:00 +0000 (21:34 +0000)]
usb4bsd: Fix race condition in usb_dev

The usb_filter_detach was racing the read fifo wakeup notification.

2 weeks agousb4bsd: fix ehci_device_resume panic
Markus Pfeiffer [Sun, 14 Sep 2014 21:05:27 +0000 (21:05 +0000)]
usb4bsd: fix ehci_device_resume panic

The onhwqueue flag wasn't reset on suspend which lead to a panic
on resume

2 weeks agokernel/acpi_battery: Add quirk for DSDTs which report a negative 16-bit rate.
Sascha Wildner [Sat, 13 Sep 2014 23:13:00 +0000 (01:13 +0200)]
kernel/acpi_battery: Add quirk for DSDTs which report a negative 16-bit rate.

Discovered on a Packard Bell ENTF71BM laptop.

Fix found in Linux.

2 weeks agodrm/i915: i915_gem_object_pin() takes 4 arguments
François Tigeot [Sat, 13 Sep 2014 07:13:09 +0000 (09:13 +0200)]
drm/i915: i915_gem_object_pin() takes 4 arguments

Obtained-from: Linux 3.8.13

2 weeks agoacpiconf(8): Sync with FreeBSD.
Sascha Wildner [Fri, 12 Sep 2014 23:04:17 +0000 (01:04 +0200)]
acpiconf(8): Sync with FreeBSD.

2 weeks agokernel/acpi: Sync acpi_battery and acpi_cmbat with FreeBSD.
Sascha Wildner [Fri, 12 Sep 2014 22:42:14 +0000 (00:42 +0200)]
kernel/acpi: Sync acpi_battery and acpi_cmbat with FreeBSD.

2 weeks agorc.d/localdaemons: Redirect rcorder's stderr output rather than tr's.
Sascha Wildner [Fri, 12 Sep 2014 22:18:17 +0000 (00:18 +0200)]
rc.d/localdaemons: Redirect rcorder's stderr output rather than tr's.

This silences the warnings it outputs about unknown BEFOREs and
REQUIREs.

2 weeks agodivert: All processing should only happens in netisr0
Sepherosa Ziehau [Thu, 11 Sep 2014 13:29:26 +0000 (21:29 +0800)]
divert: All processing should only happens in netisr0

Add assertions about it and remove unnecessary token.

2 weeks agobmake(1): Add missing DPADD.
Sascha Wildner [Wed, 10 Sep 2014 19:35:32 +0000 (21:35 +0200)]
bmake(1): Add missing DPADD.

2 weeks agodfregress(8): Fix typos in DPADDs.
Sascha Wildner [Wed, 10 Sep 2014 19:34:57 +0000 (21:34 +0200)]
dfregress(8): Fix typos in DPADDs.

2 weeks agosplit(1): Remove wrong semicolon in the Makefile.
Sascha Wildner [Wed, 10 Sep 2014 19:27:48 +0000 (21:27 +0200)]
split(1): Remove wrong semicolon in the Makefile.

2 weeks agodrm/i915: Add the I915_REG_READ IOCTL
François Tigeot [Tue, 9 Sep 2014 13:45:37 +0000 (15:45 +0200)]
drm/i915: Add the I915_REG_READ IOCTL

This driver now supports the same set of ioctls as its Linux 3.8.13
version.

2 weeks agoicmp6.4: Fix typo.
Sascha Wildner [Wed, 10 Sep 2014 12:23:23 +0000 (14:23 +0200)]
icmp6.4: Fix typo.

3 weeks agonetrate/accept_connect: Switch to err(3)
Sepherosa Ziehau [Tue, 9 Sep 2014 14:40:39 +0000 (22:40 +0800)]
netrate/accept_connect: Switch to err(3)

3 weeks agoroute/inet: Dispatch in_rtqdrain to netisrs to run
Sepherosa Ziehau [Tue, 9 Sep 2014 13:38:42 +0000 (21:38 +0800)]
route/inet: Dispatch in_rtqdrain to netisrs to run

3 weeks agosyncache: Remove syncache_null_rport; use netisr_adone_rport instead
Sepherosa Ziehau [Tue, 9 Sep 2014 13:12:48 +0000 (21:12 +0800)]
syncache: Remove syncache_null_rport; use netisr_adone_rport instead

3 weeks agosys/dev/disk/sdhci: Adapt manpage
Markus Pfeiffer [Tue, 9 Sep 2014 22:03:09 +0000 (22:03 +0000)]
sys/dev/disk/sdhci: Adapt manpage

3 weeks agosys/dev/disk/sdhci: Make it possible to build as a module
Markus Pfeiffer [Tue, 9 Sep 2014 19:55:10 +0000 (19:55 +0000)]
sys/dev/disk/sdhci: Make it possible to build as a module

3 weeks agosys/dev/disk/sdhci: update to FreeBSD r270885
Markus Pfeiffer [Tue, 9 Sep 2014 19:08:42 +0000 (20:08 +0100)]
sys/dev/disk/sdhci: update to FreeBSD r270885

3 weeks agolibc/nmalloc: fix a mistake in previous commit
Joris Giovannangeli [Tue, 9 Sep 2014 13:15:20 +0000 (15:15 +0200)]
libc/nmalloc: fix a mistake in previous commit

3 weeks agosyncache: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:36:55 +0000 (20:36 +0800)]
syncache: Prioritize timeout netmsgs

3 weeks agoarp: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:30:48 +0000 (20:30 +0800)]
arp: Prioritize timeout netmsgs

3 weeks agoroute/inet: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:26:47 +0000 (20:26 +0800)]
route/inet: Prioritize timeout netmsgs

3 weeks agoigmp: Prioritize fast and slow timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:11:22 +0000 (20:11 +0800)]
igmp: Prioritize fast and slow timeout netmsgs

3 weeks agoipflow: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:07:11 +0000 (20:07 +0800)]
ipflow: Prioritize timeout netmsgs

3 weeks agoip: Prioritize drain and timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:01:54 +0000 (20:01 +0800)]
ip: Prioritize drain and timeout netmsgs

3 weeks agotcp: Dispatch tcp_drain to netisrs to run
Sepherosa Ziehau [Mon, 8 Sep 2014 11:46:28 +0000 (19:46 +0800)]
tcp: Dispatch tcp_drain to netisrs to run

- Avoid two extra M_WAITOK mallocs
- Simplify drain logic, since inpcb marker is no longer needed

3 weeks agolibc/nmalloc: add an integer overflow check to calloc
Joris Giovannangeli [Sun, 7 Sep 2014 22:24:18 +0000 (00:24 +0200)]
libc/nmalloc: add an integer overflow check to calloc

3 weeks agokernel/i386: In the RAM driver, don't include regions above 4GB.
Sascha Wildner [Sun, 7 Sep 2014 21:46:49 +0000 (23:46 +0200)]
kernel/i386: In the RAM driver, don't include regions above 4GB.

Taken-from: FreeBSD

3 weeks agokernel/i386: Add RAM driver for i386.
Sascha Wildner [Sun, 7 Sep 2014 18:11:05 +0000 (20:11 +0200)]
kernel/i386: Add RAM driver for i386.

3 weeks agonexus/x86_64: Add a description to the RAM driver but quiet it.
Sascha Wildner [Sun, 7 Sep 2014 18:09:45 +0000 (20:09 +0200)]
nexus/x86_64: Add a description to the RAM driver but quiet it.

Also, some more whitespace cleanup.

Patch-by: profmakx
3 weeks agokernel/nexus: Tabify the RAM driver.
Sascha Wildner [Sun, 7 Sep 2014 18:00:20 +0000 (20:00 +0200)]
kernel/nexus: Tabify the RAM driver.

3 weeks agokernel/i386: Add SMAP type constants.
Sascha Wildner [Sun, 7 Sep 2014 18:47:36 +0000 (20:47 +0200)]
kernel/i386: Add SMAP type constants.

3 weeks agokernel/nexus: Use __func__.
Sascha Wildner [Sun, 7 Sep 2014 17:52:58 +0000 (19:52 +0200)]
kernel/nexus: Use __func__.

3 weeks agokernel: Use NULL for pointers in DRIVER_MODULE().
Sascha Wildner [Sun, 7 Sep 2014 17:23:07 +0000 (19:23 +0200)]
kernel: Use NULL for pointers in DRIVER_MODULE().

3 weeks agokernel: Remove some lonely tabs.
Sascha Wildner [Sun, 7 Sep 2014 17:07:03 +0000 (19:07 +0200)]
kernel: Remove some lonely tabs.

3 weeks agodrm/i915: Add hardware context support
François Tigeot [Sun, 7 Sep 2014 15:52:40 +0000 (17:52 +0200)]
drm/i915: Add hardware context support

This feature is required by Mesa 9.2+

Inspired-by: Jean-Sébastien Pédron's FreeBSD HW context patch
3 weeks agodrm: Add WARN_ON_ONCE()
François Tigeot [Sun, 7 Sep 2014 15:23:42 +0000 (17:23 +0200)]
drm: Add WARN_ON_ONCE()

Obtained-from: OpenBSD

3 weeks agoinstaller: Fix unknown REQUIRE in rc.d/pfi which is on the install media.
Sascha Wildner [Sat, 6 Sep 2014 20:22:42 +0000 (22:22 +0200)]
installer: Fix unknown REQUIRE in rc.d/pfi which is on the install media.

Take mountcritremote (no change in rcorder position).

I thought I had done this already but seems not.

3 weeks agodrm/i915: Add i915_gem_object_wait_rendering__nonblocking()
François Tigeot [Sat, 6 Sep 2014 16:53:00 +0000 (18:53 +0200)]
drm/i915: Add i915_gem_object_wait_rendering__nonblocking()

3 weeks agodrm/i915: Reduce differences with Linux 3.8.13
François Tigeot [Sat, 6 Sep 2014 09:20:58 +0000 (11:20 +0200)]
drm/i915: Reduce differences with Linux 3.8.13

No functional changes except small bugfixes.

3 weeks agopf - assign hash even if no queue is specified (2)
Matthew Dillon [Thu, 4 Sep 2014 22:18:20 +0000 (15:18 -0700)]
pf - assign hash even if no queue is specified (2)

* missing file last commit

3 weeks agosystat - Add -altq display, bug fixes (2)
Matthew Dillon [Thu, 4 Sep 2014 22:11:35 +0000 (15:11 -0700)]
systat - Add -altq display, bug fixes (2)

* Improve formatting of the output.

* Include altq queue length statistics.

* Adjust manual page.

3 weeks agopf - assign hash even if no queue is specified
Matthew Dillon [Thu, 4 Sep 2014 22:09:52 +0000 (15:09 -0700)]
pf - assign hash even if no queue is specified

* If no queue is specified ALTQ will use the default-flagged queue.
  We must still generate a hash for this case, otherwise FAIRQ won't
  be able to distinguish connection state.

* Fixes fairq latency issues with PF rule sets which do not specify a
  queue in all PASS rules.

3 weeks agosystat - Add -altq display, bug fixes
Matthew Dillon [Thu, 4 Sep 2014 17:53:28 +0000 (10:53 -0700)]
systat - Add -altq display, bug fixes

* Add systat -altq.  This displays altq packet statistics in a nice
  [ifname x altqname] matrix.  Packets, bytes, and drops are displayed.

  Previously the only way to do this was to use 'pfctl -s queue -vvv'
  which is formatted so horribly that picking information out of it
  at a glance is impossible.

  Example usage:  systat -altq 1

* Correct a bug in -ifstat that caused the statistics to not display
  when switching out and then back into the ifstat display.

3 weeks agotcp: Fix tcp_drain_oncpu()
Sepherosa Ziehau [Thu, 4 Sep 2014 12:56:53 +0000 (20:56 +0800)]
tcp: Fix tcp_drain_oncpu()

Marker inpcb should always be moved.

3 weeks agonfsd, mountd - daemonize earlier
Matthew Dillon [Thu, 4 Sep 2014 02:31:13 +0000 (19:31 -0700)]
nfsd, mountd - daemonize earlier

* Daemonize these services earlier so name lookup stalls do
  not stall the system startup.  This is particularly important
  if the server itself is responsible for a local network, we
  don't want the server to fail to boot if the internet is not
  available.

3 weeks agobuild - Remove csa.4 remainders
Matthew Dillon [Thu, 4 Sep 2014 00:33:11 +0000 (17:33 -0700)]
build - Remove csa.4 remainders

* Remove csa.4 from the MAN variable.  Fixes a buildworld error.

3 weeks agolocaldaemons should care for scripts dependencies in $local_startup too
Francis GUDIN [Wed, 3 Sep 2014 09:13:03 +0000 (11:13 +0200)]
localdaemons should care for scripts dependencies in $local_startup too

3 weeks agobpf: Use uint32_t for scratch memory.
Sepherosa Ziehau [Wed, 3 Sep 2014 13:29:43 +0000 (21:29 +0800)]
bpf: Use uint32_t for scratch memory.

It is never used as signed array.

Dragonfly-issue: http://bugs.dragonflybsd.org/issues/2722
Submitted-by: guy
3 weeks agotools/netrate/netperf: Switch to err(3)
Sepherosa Ziehau [Wed, 3 Sep 2014 13:19:29 +0000 (21:19 +0800)]
tools/netrate/netperf: Switch to err(3)

3 weeks agoRemove csa.4. It is really snd_csa.4 and a csa.4 MLINK will be created.
Sascha Wildner [Wed, 3 Sep 2014 13:13:20 +0000 (15:13 +0200)]
Remove csa.4. It is really snd_csa.4 and a csa.4 MLINK will be created.

3 weeks agoudp: Simplify getcred
Sepherosa Ziehau [Wed, 3 Sep 2014 13:01:56 +0000 (21:01 +0800)]
udp: Simplify getcred

- No need to compare cpuid before calling lwkt_migratecpu(), which
  does necessary check itself.
- Streamline the code path a little bit.

3 weeks agotcp: Fix getcred
Sepherosa Ziehau [Wed, 3 Sep 2014 12:56:59 +0000 (20:56 +0800)]
tcp: Fix getcred

- Migrate to the target cpu before looking up tcp inpcb.
- Save a copy of the ucred then do SYSCTL_OUT, which could block.
  It is not MPSAFE to do the SYSCTL_OUT even on the target CPU;
  the socket might be ripped when SYSCTL_OUT blocked.

3 weeks agotools/netrate: Use ncpus as # of instance by default
Sepherosa Ziehau [Wed, 3 Sep 2014 12:28:18 +0000 (20:28 +0800)]
tools/netrate: Use ncpus as # of instance by default

4 weeks agoPF - Force 'sloppy' when establishing conflicting state
Matthew Dillon [Wed, 3 Sep 2014 04:19:15 +0000 (21:19 -0700)]
PF - Force 'sloppy' when establishing conflicting state

* Check whether a PASS IN or PASS OUT conflicts with established translation
  state in the opposite direction.  When this situation is detected, one
  of the PASS rules can establish state (and with recent SMP work, both
  PASS rules will establish state).  This causes problems because the PASS
  rules may only see one direction of the connection due to the RDR or NAT.
  If strict TCP sequence space checking occurs the PASS state can generate
  RSTs.

  To fix this we force the SLOPPY flag to be set for any PASS state being
  established in the face of a conflict against a translation rule.  This
  allows packet flow to short-cut through the state table and is preferable
  to disallowing establishment of the state because that would force a
  full rules scan (and repeated conflict/failure) for every packet.

History

* PASS IN and PASS OUT rules can interfere with a RDR rule when strict
  sequence space tests are made for established TCP state.

  In pre-SMP PF, including in FreeBSD and probably also in other BSDs,
  two active states are generally established, one for RDR and one for the
  PASS IN.  PF attempts to establish state for the PASS OUT but hits a
  conflict against the established RDR state and fails.

  However, in this situation no short-cut state is established in one
  direction and ALL packets that would have matched the failed PASS OUT
  will cause a full rules scan.

* With the SMP work, the PASS OUT conflict was no longer detected because
  the RDR state is on a different RBTREE than the PASS OUT state.  This
  allowed conflicting state for both PASS IN and PASS OUT to be established.

* Conflicting state in either direction is capable of generating spurious
  RSTs against the RDR rule.  One direction for sure, the other will generate
  RSTs but possibly be obscured by the translation rule (that is, the RST
  ends up going somewhere unexpected), so the RDR rule still works.  But
  the problem remains.

4 weeks agoMake uaudio(4) compilable into the kernel.
Sascha Wildner [Tue, 2 Sep 2014 20:13:08 +0000 (22:13 +0200)]
Make uaudio(4) compilable into the kernel.

4 weeks agoCreate snd_blah.4 -> blah.4 MLINKS.
Sascha Wildner [Tue, 2 Sep 2014 20:12:30 +0000 (22:12 +0200)]
Create snd_blah.4 -> blah.4 MLINKS.

Suggested-by: profmakx
4 weeks agosnd_uaudio.4: Sync with FreeBSD for a few changes.
Sascha Wildner [Tue, 2 Sep 2014 20:07:11 +0000 (22:07 +0200)]
snd_uaudio.4: Sync with FreeBSD for a few changes.

4 weeks agoUpdate devd(8)'s usb.conf for uaudio(4).
Sascha Wildner [Tue, 2 Sep 2014 19:59:33 +0000 (21:59 +0200)]
Update devd(8)'s usb.conf for uaudio(4).

4 weeks agousb4bsd: make uaudio work
Markus Pfeiffer [Tue, 2 Sep 2014 18:38:05 +0000 (18:38 +0000)]
usb4bsd: make uaudio work

Submitted-By: Vasily Postnicov <shamaz.mazum@gmail.com>
4 weeks agoFix buildkernel without INVARIANTS.
Sascha Wildner [Tue, 2 Sep 2014 11:05:31 +0000 (13:05 +0200)]
Fix buildkernel without INVARIANTS.

Reported-by: Andrey Oktyabrskiy <ano@bestmx.net>
4 weeks agoudp: For connected socket, don't rehash sending datagram
Sepherosa Ziehau [Mon, 1 Sep 2014 12:50:24 +0000 (20:50 +0800)]
udp: For connected socket, don't rehash sending datagram

Since it has already been in the correct netisr.