Sepherosa Ziehau [Fri, 3 Oct 2014 12:29:52 +0000 (20:29 +0800)]
udp: Use ncpus2 instead of ncpus, since udp uses ncpus2 netisrs
There is actually no functional change.
Sepherosa Ziehau [Fri, 3 Oct 2014 12:24:28 +0000 (20:24 +0800)]
inpcb: Factor out in_pcbresetroute()
François Tigeot [Fri, 3 Oct 2014 09:20:58 +0000 (11:20 +0200)]
drm/i915: Simplify the flush code
Reduce differences with Linux 3.8.13
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>
François Tigeot [Tue, 30 Sep 2014 06:50:45 +0000 (08:50 +0200)]
Bump __DragonFly_version for i915 hw context support
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).
Sepherosa Ziehau [Mon, 29 Sep 2014 12:16:56 +0000 (20:16 +0800)]
inpcb: Define INP_WASBOUND_NOTANY as protocol specific flag
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.
Sepherosa Ziehau [Mon, 29 Sep 2014 12:14:39 +0000 (20:14 +0800)]
tcp: Check multicast sopt name after sopt level is checked
Markus Pfeiffer [Sun, 28 Sep 2014 22:32:19 +0000 (22:32 +0000)]
net: add version numbers to lagg sourcefiles, adapt manpage
Markus Pfeiffer [Fri, 22 Nov 2013 22:19:07 +0000 (22:19 +0000)]
net: import FreeBSD's if_lagg
Sepherosa Ziehau [Sun, 28 Sep 2014 11:43:20 +0000 (19:43 +0800)]
tools/netrate: Get socket's cpu hint and bind cpu accordingly
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.
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).
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.
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.
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
Sepherosa Ziehau [Tue, 23 Sep 2014 12:51:14 +0000 (20:51 +0800)]
test/udp: Add SO_REUSEPORT test
Sascha Wildner [Tue, 23 Sep 2014 08:29:55 +0000 (10:29 +0200)]
kernel/lockf: Add include for LOCKF_DEBUG and fix printf warnings.
Sascha Wildner [Mon, 22 Sep 2014 11:33:25 +0000 (13:33 +0200)]
kernel/i915: Add missing opt_acpi.h to SRCS.
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.
Sepherosa Ziehau [Sun, 21 Sep 2014 14:00:40 +0000 (22:00 +0800)]
udp: Factor out function to reset inpcb route cache
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.
Sepherosa Ziehau [Sun, 21 Sep 2014 08:09:15 +0000 (16:09 +0800)]
netrate/pktgen: Unbreak building
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.
Sepherosa Ziehau [Sun, 21 Sep 2014 07:29:41 +0000 (15:29 +0800)]
udp: Prepare for re-redispatching for SO_REUSEPORT sockets
Sascha Wildner [Sat, 20 Sep 2014 15:05:26 +0000 (17:05 +0200)]
kernel/acpi: Use ACPI_FAILURE() and also remove unneeded variables.
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
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.
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.
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/
Sascha Wildner [Wed, 17 Sep 2014 18:46:04 +0000 (20:46 +0200)]
kernel/ale: Fix typo in a comment.
Sascha Wildner [Wed, 17 Sep 2014 17:11:25 +0000 (19:11 +0200)]
kernel/acpi: Add our copyright to two files.
Sascha Wildner [Tue, 16 Sep 2014 13:57:34 +0000 (15:57 +0200)]
kernel/acpi: Fix typo, i must be <count.
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
Antonio Huete Jimenez [Mon, 15 Sep 2014 22:00:40 +0000 (15:00 -0700)]
test - Testing the bot 1
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.
Markus Pfeiffer [Mon, 15 Sep 2014 21:19:56 +0000 (21:19 +0000)]
Revert "sys/dev/drm/i915: Activate ACPI"
This reverts commit
813bcdd292df9531f0d499d8cd9202238f51c961.
Antonio Huete Jimenez [Mon, 15 Sep 2014 21:38:29 +0000 (14:38 -0700)]
test - Testing the bot
Markus Pfeiffer [Mon, 8 Sep 2014 20:48:03 +0000 (21:48 +0100)]
sys/dev/drm/i915: Activate ACPI
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.
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
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.
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
Sascha Wildner [Fri, 12 Sep 2014 23:04:17 +0000 (01:04 +0200)]
acpiconf(8): Sync 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.
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.
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.
Sascha Wildner [Wed, 10 Sep 2014 19:35:32 +0000 (21:35 +0200)]
bmake(1): Add missing DPADD.
Sascha Wildner [Wed, 10 Sep 2014 19:34:57 +0000 (21:34 +0200)]
dfregress(8): Fix typos in DPADDs.
Sascha Wildner [Wed, 10 Sep 2014 19:27:48 +0000 (21:27 +0200)]
split(1): Remove wrong semicolon in the Makefile.
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.
Sascha Wildner [Wed, 10 Sep 2014 12:23:23 +0000 (14:23 +0200)]
icmp6.4: Fix typo.
Sepherosa Ziehau [Tue, 9 Sep 2014 14:40:39 +0000 (22:40 +0800)]
netrate/accept_connect: Switch to err(3)
Sepherosa Ziehau [Tue, 9 Sep 2014 13:38:42 +0000 (21:38 +0800)]
route/inet: Dispatch in_rtqdrain to netisrs to run
Sepherosa Ziehau [Tue, 9 Sep 2014 13:12:48 +0000 (21:12 +0800)]
syncache: Remove syncache_null_rport; use netisr_adone_rport instead
Markus Pfeiffer [Tue, 9 Sep 2014 22:03:09 +0000 (22:03 +0000)]
sys/dev/disk/sdhci: Adapt manpage
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
Markus Pfeiffer [Tue, 9 Sep 2014 19:08:42 +0000 (20:08 +0100)]
sys/dev/disk/sdhci: update to FreeBSD r270885
Joris Giovannangeli [Tue, 9 Sep 2014 13:15:20 +0000 (15:15 +0200)]
libc/nmalloc: fix a mistake in previous commit
Sepherosa Ziehau [Mon, 8 Sep 2014 12:36:55 +0000 (20:36 +0800)]
syncache: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:30:48 +0000 (20:30 +0800)]
arp: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:26:47 +0000 (20:26 +0800)]
route/inet: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:11:22 +0000 (20:11 +0800)]
igmp: Prioritize fast and slow timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:07:11 +0000 (20:07 +0800)]
ipflow: Prioritize timeout netmsgs
Sepherosa Ziehau [Mon, 8 Sep 2014 12:01:54 +0000 (20:01 +0800)]
ip: Prioritize drain and timeout netmsgs
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
Joris Giovannangeli [Sun, 7 Sep 2014 22:24:18 +0000 (00:24 +0200)]
libc/nmalloc: add an integer overflow check to calloc
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
Sascha Wildner [Sun, 7 Sep 2014 18:11:05 +0000 (20:11 +0200)]
kernel/i386: Add RAM driver for i386.
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
Sascha Wildner [Sun, 7 Sep 2014 18:00:20 +0000 (20:00 +0200)]
kernel/nexus: Tabify the RAM driver.
Sascha Wildner [Sun, 7 Sep 2014 18:47:36 +0000 (20:47 +0200)]
kernel/i386: Add SMAP type constants.
Sascha Wildner [Sun, 7 Sep 2014 17:52:58 +0000 (19:52 +0200)]
kernel/nexus: Use __func__.
Sascha Wildner [Sun, 7 Sep 2014 17:23:07 +0000 (19:23 +0200)]
kernel: Use NULL for pointers in DRIVER_MODULE().
Sascha Wildner [Sun, 7 Sep 2014 17:07:03 +0000 (19:07 +0200)]
kernel: Remove some lonely tabs.
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
François Tigeot [Sun, 7 Sep 2014 15:23:42 +0000 (17:23 +0200)]
drm: Add WARN_ON_ONCE()
Obtained-from: OpenBSD
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.
François Tigeot [Sat, 6 Sep 2014 16:53:00 +0000 (18:53 +0200)]
drm/i915: Add i915_gem_object_wait_rendering__nonblocking()
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.
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
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.
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.
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.
Sepherosa Ziehau [Thu, 4 Sep 2014 12:56:53 +0000 (20:56 +0800)]
tcp: Fix tcp_drain_oncpu()
Marker inpcb should always be moved.
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.
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.
Francis GUDIN [Wed, 3 Sep 2014 09:13:03 +0000 (11:13 +0200)]
localdaemons should care for scripts dependencies in $local_startup too
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
Sepherosa Ziehau [Wed, 3 Sep 2014 13:19:29 +0000 (21:19 +0800)]
tools/netrate/netperf: Switch to err(3)
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.
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.
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.
Sepherosa Ziehau [Wed, 3 Sep 2014 12:28:18 +0000 (20:28 +0800)]
tools/netrate: Use ncpus as # of instance by default
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.
Sascha Wildner [Tue, 2 Sep 2014 20:13:08 +0000 (22:13 +0200)]
Make uaudio(4) compilable into the kernel.
Sascha Wildner [Tue, 2 Sep 2014 20:12:30 +0000 (22:12 +0200)]
Create snd_blah.4 -> blah.4 MLINKS.
Suggested-by: profmakx
Sascha Wildner [Tue, 2 Sep 2014 20:07:11 +0000 (22:07 +0200)]
snd_uaudio.4: Sync with FreeBSD for a few changes.
Sascha Wildner [Tue, 2 Sep 2014 19:59:33 +0000 (21:59 +0200)]
Update devd(8)'s usb.conf for uaudio(4).