arybchik [Sun, 22 Feb 2015 19:24:08 +0000 (19:24 +0000)]
sfxge: add common code support for changing TX queue pace
To delay packets from a particular TX queue by a particular time, write a value
into the TX Pace table s.t. pace time <= TX Pace Clock Period * (2 ^ pace value)
- the TX pace clock is 1/13 of the system clock, so its period should be 104 or
52 ns depending on whether turbo mode is active.
EFX_TX_PACE_CLOCK_BASE added by me.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
arybchik [Sun, 22 Feb 2015 18:54:16 +0000 (18:54 +0000)]
sfxge: do no allow EFSYS_MEM_ALLOC sleep
It solves locking problem when EFSYS_MEM_ALLOC is called in
the context holding a mutex (not allowed to sleep).
E.g. on interface bring up or multicast addresses addition.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
arybchik [Sun, 22 Feb 2015 18:50:59 +0000 (18:50 +0000)]
sfxge: pass correct address to free allocated memory in the case of load error
It is one more place missed in the previous fix.
Most likely is was just memory leak on the error handling path since
typically efsys_mem_t is filled in by zeros on allocation.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
dim [Sun, 22 Feb 2015 15:51:49 +0000 (15:51 +0000)]
Pull in r230058 from upstream llvm trunk (by Benjamin Kramer):
LoopRotate: When reconstructing loop simplify form don't split edges
from indirectbrs.
Yet another chapter in the endless story. While this looks like we
leave the loop in a non-canonical state this replicates the logic in
LoopSimplify so it doesn't diverge from the canonical form in any way.
http://llvm.org/PR21968
This fixes a "Cannot split critical edge from IndirectBrInst" assertion
failure when building the devel/radare2 port.
andrew [Sun, 22 Feb 2015 11:11:05 +0000 (11:11 +0000)]
Add support to the bcm2835 mailbox driver to work before interrupts are
enabled. This will be needed to enable the power on devices early on in the
boot process.
cperciva [Sun, 22 Feb 2015 08:50:05 +0000 (08:50 +0000)]
Step 2 of eliminating the "games" distribution: Remove punch card
utilities.
I was originally planning on removing the phase-of-moon (pom), clock
(grdc), and caesar cipher (caesar, rot13) utilities as well, but after
I committed r278616 I received an astonishing volume of email informing
me that those are still being widely used. Much to my relief, nobody
reported continuing to use the punch card utilities in production.
The final step will be to merge src/games into src/usr.bin.
arybchik [Sun, 22 Feb 2015 07:08:57 +0000 (07:08 +0000)]
sfxge: style fixes and cleanup
Sync endif comment with conditional.
BOOTROM and SIENA_BOOTROM are the same, but highlight that it is Siena.
Restore commented out assertion.
Sync comments with out-of-tree driver.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
marcel [Sun, 22 Feb 2015 04:50:47 +0000 (04:50 +0000)]
Add the -c option for specifying the capacity of the disk image. When
a capcity is given, no partitions are required. When no partitions are
given, no scheme needs to be specified either. This makes it possible
to create an entirely empty disk image. To add an empty partitioning
table, specify the scheme.
marcel [Sun, 22 Feb 2015 01:20:49 +0000 (01:20 +0000)]
Don't require a scheme if no partitions are given. Change the code
to handle that case. Note that we still require partitions, so the
change is effectively a no-op.
marcel [Sun, 22 Feb 2015 01:01:02 +0000 (01:01 +0000)]
In scheme_write(), don't overwrite the end parameter with the
return value of image_get_size(). As it so happens, the only
caller of scheme_write() passes exactly that.
marcel [Sat, 21 Feb 2015 23:47:20 +0000 (23:47 +0000)]
Convert netstat to use libxo.
Obtained from: Phil Shafer <phil@juniper.net>
Ported to -current by: alfred@ (mostly), Kim Shrier
Formatting: marcel@
Sponsored by: Juniper Networks, Inc.
kib [Sat, 21 Feb 2015 22:38:32 +0000 (22:38 +0000)]
Revert r276949 and redo the fix for PCIe/PCI bridges, which do not
follow specification and do not provide PCIe capability.
Verify if the port above such bridge is downstream PCIe (or root port)
and treat the bridge as PCIe/PCI then. This allows to avoid
maintaining the table of device ids for bridges without capability,
while still calculate correct request originator for devices behind
the bridge.
Submitted by: Jason Harmening <jason.harmening@gmail.com>
MFC after: 1 week
arybchik [Sat, 21 Feb 2015 06:28:31 +0000 (06:28 +0000)]
sfxge: allow TX and RX queue limits to be changed
Before the common code had hard coded limits on the IDs RXQs and TXQs could
be created with which were suited for the Windows driver with VMQ, and so
would prevent queues with IDs greater than or equal to 259 (for TXQs) or 768
(for RXQs) from being created. This change allows the limits to be set in
efsys.h, so that all 1024 queues can be created during new manftest tests.
Also, the descriptor cache sizes were also hard coded to values suited to
the smaller queue counts, and so it was necessary to make them configurable
as well.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
arybchik [Sat, 21 Feb 2015 06:26:10 +0000 (06:26 +0000)]
sfxge: never set RX_DESCQ_EN during self-test
We must not enable RX queues with random parameters when they are
mapped into a VF with an untrusted driver. It's probably not a good
idea to do this anyway, so take this bit out of the table test masks.
Submitted by: Ben Hutchings
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
np [Fri, 20 Feb 2015 22:57:54 +0000 (22:57 +0000)]
cxgbe(4): there is no need to force an "unimplemented" panic needlessly.
The calls to free_nm_txq and free_nm_rxq are made just a few lines prior
to the panic.
jamie [Fri, 20 Feb 2015 20:12:05 +0000 (20:12 +0000)]
Fix the logic for skipping parameters (with -s) that have "jailsys"
parents (such as host.hostname); these were being skipped all the time.
That it went this long without anyone noticing is a sign that this feature
isn't actually used by anyone, but it's there so it might as well work.
arybchik [Fri, 20 Feb 2015 19:42:05 +0000 (19:42 +0000)]
sfxge: add assertions that required event handlers are implemented
efx_ev_mcdi() does not assert or check that all event handlers it
calls are non-null. Add assertions at the top for all required
event handlers, as some events (in the case of this bug, monitor
events) are rare.
Submitted by: Ben Hutchings
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
gjb [Fri, 20 Feb 2015 17:46:15 +0000 (17:46 +0000)]
Document r278433, xz(1) update to 5.2.0.
Separately document multi-threaded support to keep the
version update separate, so it remains correct if xz(1)
is updated again.
jhibbits [Fri, 20 Feb 2015 06:19:23 +0000 (06:19 +0000)]
Make the PowerMac fan control nonlinear
Summary:
Currently, fan control is linear between the target temperature and max
temperature, which is far from ideal. This changes it to be proportional to the
distance between the current temperature and the two endpoints (target and max
temp). This also adds a hysteresis, so that fans keep going when the
temperature drops, for about 10 seconds, before slowing down.
imp [Fri, 20 Feb 2015 01:40:55 +0000 (01:40 +0000)]
Allow EFI and ACPI to be included together. When ACPI is included
first, EFI will use its definitions for {,U}INT{8,16,32,64} and
BOOLEAN. When EFI is included first, define ACPI_USE_SYSTEM_INTTYPES
to tell ACPI that these are already defined.
glebius [Thu, 19 Feb 2015 23:14:35 +0000 (23:14 +0000)]
The ipftest(1) is a program that emulates ipf(4) operation and tests packets
against rules. It definitely doesn't need to know about kernel internals,
such as 'struct ifaddr'. What it does with ifaddr, is that it only takes
ifa_addr member of it, and treats it as sockaddr, while it is only a pointer
to sockaddr. Fortunately, sizeof(struct ifaddr) > sizeof(struct sockaddr_in6),
so no problems arise.
Fix that declaring a private struct ifaddr in ipftest(1) and stop including
if_var.h.
glebius [Thu, 19 Feb 2015 22:42:33 +0000 (22:42 +0000)]
Now that IGMP and MLD sysctls provide a clean API structures that do not
leak kernel internal stuff, reconnect ifmcstat(1) back to build. However,
disable kvm(3) support in it, since it requires uncovering tons of _KERNEL
defined declarations, which can be achieved either uncovering them globally
or providing dirty hacks such as _WANT_IFADDR. If anyone demands an
ifmcstat-like kvm-based tool, please take the code out of usr.sbin/ifmstat
and create a tool in src/tools/tools.
glebius [Thu, 19 Feb 2015 22:37:01 +0000 (22:37 +0000)]
- Rename 'struct mld_ifinfo' into 'struct mld_ifsoftc', since it really
represents a context.
- Preserve name 'struct mld_ifinfo' for a new structure, that will be stable
API between userland and kernel.
- Make sysctl_mld_ifinfo() return the new 'struct mld_ifinfo', instead of
old one, which had a bunch of internal kernel structures in it.
glebius [Thu, 19 Feb 2015 22:35:23 +0000 (22:35 +0000)]
- Rename 'struct igmp_ifinfo' into 'struct igmp_ifsoftc', since it really
represents a context.
- Preserve name 'struct igmp_ifinfo' for a new structure, that will be stable
API between userland and kernel.
- Make sysctl_igmp_ifinfo() return the new 'struct igmp_ifinfo', instead of
old one, which had a bunch of internal kernel structures in it.
- Move all above declarations from in_var.h to igmp_var.h, since they are
private to IGMP code.