Commit Graph

96960 Commits

Author SHA1 Message Date
Adrian Chadd
0e778c88c9 Don't insert a flowtable entry if the lle isn't yet valid.
Some of the collisions that are occuring are due to flowtable lookups
that succeed but have an invalid lle - typically because the L2 adjacency
lookup hasn't completed.  This would lead to a follow-up insert which
would then fail (ie, collision) and the code would fall through to doing
a slow-path L2/L3 lookup in the netinet/netinet6 code.

This patch simply aborts storing a new flowtable entry if the lle isn't
yet valid.

Whilst I'm here, add a new pcpu counter for the item so the number of
failures can be tracked separately from generic "collisions."

Reviewed by:	glebius
MFC after:	10 days
Sponsored by:	Netflix, Inc.
2014-02-14 00:05:09 +00:00
Christian Brueffer
53c4471833 Fix a bug in be_uuid_dec(); it called le16dec() instead of be16dec(),
probably due to copy+pasting le_uuid_dec().

PR:		146588
Submitted by:	Erwin Rol <erwin at erwinrol.com>
Reviewed by:	marcel
MFC after:	1 week
2014-02-13 22:24:36 +00:00
Andrew Turner
7cbd3dd68b Allow the kernel to be loaded at any 1MiB address. This requirement is
because we use the 1MiB section maps as they only need a single pagetable.

To allow this we only use pc relative loads to ensure we only load from
physical addresses until we are running from a known virtual address.

As a side effect any data from before or 64MiB after the kernel needs to
be mapped in to be used. This should not be an issue for kernels loaded
with ubldr as it places this data just after the kernel. It will be a
problem when loading directly from anything using the Linux ABI that
places the ATAG data outside this range, for example U-Boot.
2014-02-13 21:30:54 +00:00
Ian Lepore
f688503cc4 Remove a couple obsolete function declarations. 2014-02-13 19:14:23 +00:00
Alexander V. Chernikov
f6990c4e3e Further simplify nd6_output_lle.
Currently we have 3 usage patterns:
1) nd6_output (most traffic flow, no lle supplied, lle RLOCK sufficient)
2) corner cases for output (no lle, STALE lle, so on). lle WLOCK needed.
3) nd* iunternal machinery (WLOCK'ed lle provided, perform packet queing).

We separate case 1 and implement it inside its only customer - nd6_output.
This leads to some code duplication (especialy SEND stuff, which should be
hooked to output in a different way), but simplifies locking and control
flow logic fir nd6_output_lle.

Reviewed by:	ae
MFC after:	3 weeks
Sponsored by:	Yandex LLC
2014-02-13 19:09:04 +00:00
Luiz Otavio O Souza
62564a0858 Make the gpioled(4) work out of the box on BBB.
Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.

Approved by:	adrian (mentor, implicit)
2014-02-13 18:51:37 +00:00
Luiz Otavio O Souza
8c705c2c30 Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this
change the gpio children can be described as directly connected to the GPIO
controller without the need of describing the OFW GPIO bus itself on the
DTS file.

With this commit the OFW GPIO bus is fully functional on BBB and RPi.

GPIO controllers which want to use the OFW GPIO bus will need similar
changes.

Approved by:	adrian (mentor, implicit)
2014-02-13 18:42:23 +00:00
Luiz Otavio O Souza
bf17755477 Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.
This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

Approved by:	adrian (mentor, implicit)
2014-02-13 18:22:49 +00:00
Luiz Otavio O Souza
9a2a079a51 Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).

Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests).  It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.

Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.

Some compatibility details pointed out by imp@ will follow in subsequent
commits.

Approved by:	adrian (mentor, implicit)
2014-02-13 17:58:52 +00:00
Luiz Otavio O Souza
6d866ed35b Add an OFW GPIO compatible bus. This allows the use of the DTS files to
describe GPIO bindings in the system.

Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.

Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.

Approved by:	adrian (mentor, implicit)
2014-02-13 17:08:29 +00:00
Warner Losh
fd420f84dd Honor the disabled status by only grabbing resources and returning
when running under FDT.
2014-02-13 16:50:08 +00:00
Warner Losh
88bc24ff35 Fix board ID too... 2014-02-13 15:47:41 +00:00
Warner Losh
2956b2b069 Fix board name. 2014-02-13 15:46:08 +00:00
Andrey V. Elsukov
e4c77ca0c0 Drop packets to multicast address whose scop field contains the
reserved value 0.

MFC after:	1 week
Sponsored by:	Yandex LLC
2014-02-13 14:10:44 +00:00
Hans Petter Selasky
4e7b9cba60 - Remove not needed definitions from driver.
- Get USB input report length from HID descriptor.
- Use 1 finger TAP for devices which has no integrated button.
- Move data buffer to softc instead of allocating it.

MFC after:	1 week
2014-02-13 09:09:14 +00:00
Ruslan Bukin
896fc918b1 Add function for configuring PLL4 (Audio) clock frequency output. 2014-02-13 06:38:01 +00:00
Gleb Smirnoff
25c03b9100 Remove unused FL_NOAUTO. 2014-02-13 05:19:09 +00:00
Gleb Smirnoff
4343b5fa49 o Axe non-pcpu flowtable implementation. It wasn't enabled or used,
and probably is a leftover from first prototyping by Kip. The
  non-pcpu implementation used mutexes, so it doubtfully worked
  better than simple routing lookup.
o Use UMA_ZONE_PCPU zone for pointers instead of [MAXCPU] arrays,
  use zpcpu_get() to access data in there.
o Substitute own single list implementation with SLIST(). This
  has two functional side effects:
  - new flows go into head of a list, before they went to tail.
  - a bug when incorrect flow was deleted in flow cleaner is
    fixed.
o Due to cache line alignment, there is no reason to keep
  different zones for IPv4 and IPv6 flows. Both consume one
  cache line, real size of allocation is equal.
o Rely on that f_hash, f_rt, f_lle are stable during fle
  lifetime, remove useless volatile quilifiers.
o More INET/INET6 splitting.

Reviewed by:	adrian
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-02-13 04:59:18 +00:00
Ian Lepore
1332dc8827 Validate the header of a new dtb before using it. Remove the comment
that says that should be done.
2014-02-13 04:13:50 +00:00
Ian Lepore
50618a328f Enable both sdcard slots, but not the sdio-based wifi that we don't yet
have a driver for.
2014-02-13 04:10:27 +00:00
Ian Lepore
1d650ff3a8 Add handling of standard "non-removable" property, and also some workaround
code so that if card detect is wired to a gpio pin, for now we just treat
it the same as non-removable (because there isn't a gpio driver yet).
2014-02-13 03:45:33 +00:00
Ian Lepore
e4366cae40 Add standard non-removable and cd-gpios properties to the usdhc devices.
That generates references to gpio devices, so uncomment them even though
there isn't a gpio driver to do anything with them yet.
2014-02-13 03:41:00 +00:00
Ian Lepore
1744bacc7b Write translation code for the SDHCI_PRESENT_STATE register. Freescale
moved some bits around in their version of the register, adjust things
so that the sdhci code sees the standard layout.
2014-02-13 02:38:16 +00:00
Ian Lepore
4c155ae194 Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields, and
add SDHCI_RETUNE_REQUEST.  None of these are actually used in the code yet.
2014-02-12 22:25:08 +00:00
Gleb Smirnoff
5f3563b0a5 Fix function name in KASSERT().
Submitted by:	hiren
2014-02-12 20:11:20 +00:00
Ian Lepore
28ea625437 Use the same logic as the x86 platforms to avoid trying perform fault fixup
while in a critical section or while holding a non-sleepable lock.

Reviewed by:	cognet
2014-02-12 20:09:27 +00:00
Ian Lepore
255a0cc653 Use the right symbols for determining arm architecture. Include the
necessary header file which has the new FAULT_WNR symbol defined in it.
2014-02-12 19:59:30 +00:00
Navdeep Parhar
2c566b9c4e Provide additional information in some panic strings.
MFC after:	1 week
2014-02-12 19:07:59 +00:00
Ian Lepore
bcaa399985 On armv6 and later, use the WriteNotRead bit of the fault status register
to decide what protections are required by the faulting access.  The old
code disassembled the faulting instruction, and there are a lot of new
instructions that aren't handled.  The old code is still used for armv4/5
which doesn't have the WNR bit)
2014-02-12 18:55:26 +00:00
Hans Petter Selasky
4a6af12570 Issue doorbell twice before finally freeing the DMA descriptors. This
should fix DMA descriptor caching issues seen with the EHCI controller
found in Google Chromebook C720 during removal and insertion of USB
devices.

MFC after:	1 week
Reported by:	Matthew Dillon at DragonFlyBSD
2014-02-12 08:04:38 +00:00
Warner Losh
cca7539760 Better nomatch messages: include compat string. Also, flag devices as
disabled in the successful probe message, but leave what that means to
the actual driver (no semantic changes).
2014-02-12 04:56:34 +00:00
John Baldwin
4edef187b8 Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge
I/O windows, the default is to preserve the firmware-assigned resources.
PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture
defines a PCI_RES_BUS resource type.
- Add a helper API to create top-level PCI bus resource managers for each
  PCI domain/segment.  Host-PCI bridge drivers use this API to allocate
  bus numbers from their associated domain.
- Change the PCI bus and CardBus drivers to allocate a bus resource for
  their bus number from the parent PCI bridge device.
- Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the
  full range of bus numbers from secbus to subbus from their parent bridge.
  The drivers also always program their primary bus register.  The bridge
  drivers also support growing their bus range by extending the bus resource
  and updating subbus to match the larger range.
- Add support for managing PCI bus resources to the Host-PCI bridge drivers
  used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib).
- Define a PCI_RES_BUS resource type for amd64 and i386.

Reviewed by:	imp
MFC after:	1 month
2014-02-12 04:30:37 +00:00
Warner Losh
ff9a07fa97 Convert two while(1); statements into proper panics. Soon, kernels
with early printf support will print this info... For kernels without,
the observed behavior will be the same as it is now...
2014-02-12 03:19:35 +00:00
Ian Lepore
42c8459bed Rework the EARLY_PRINTF mechanism. Instead of defining a special eprintf()
routine, now a platform can provide a pointer to an early_putc() routine
which is used instead of cn_putc().  Control can be handed off from early
printf support to standard console support by NULLing out the pointer
during standard console init.

This leverages all the existing error reporting that uses printf calls,
such as panic() which can now be usefully employed even in early
platform init code (useful at least to those who maintain that code and
build kernels with EARLY_PRINTF defined).

Reviewed by:	imp, eadler
2014-02-12 00:53:38 +00:00
Warner Losh
360bd8ad2b Swap PA and VA so they are in the right registers... 2014-02-11 22:09:03 +00:00
John Baldwin
8add0ced70 Correct assertion to assert that the existing device VM object uses the
same type rather than asserting in the case where we just created a new
VM object.

Reviewed by:	kib
2014-02-11 22:05:21 +00:00
John Baldwin
4f67a8c5e9 Don't waste a page of KVA for the boot-time memory test on x86. For amd64,
reuse the first page of the crashdumpmap as CMAP1/CADDR1.  For i386,
remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test.

Reviewed by:	alc, peter
MFC after:	2 weeks
2014-02-11 22:02:40 +00:00
John Baldwin
2db08c03f0 Expose OBJT_MGTDEVICE VM objects used for GEM/TTM with drm2 as an
explicit object type.

Reviewed by:	kib
MFC after:	1 week
2014-02-11 21:57:37 +00:00
Ian Lepore
7233ddb0cb Check in the "real" board_tsc4370 file in place of the stubbed out one.
Real means the one TSC / Symmetricom / Microsemi actually uses on their 4370
and other rm9200 boards.  This code demonstrates a variety of useful things
board init code can do, including adjusting the master clock frequency.
2014-02-11 21:13:37 +00:00
Ruslan Bukin
ebc7703641 Disable debugging by default. 2014-02-11 20:14:54 +00:00
Marcel Moolenaar
b5cade2916 Fix spelling of eight (was spelled eigth) in struct pkthdr. 2014-02-11 04:16:32 +00:00
Gleb Smirnoff
49fef6a202 Create two public UMA_ZONE_PCPU zones: 64 bit sized and pointer sized.
Sponsored by:	Nginx, Inc.
2014-02-10 19:59:46 +00:00
Gleb Smirnoff
f947570e35 Style. 2014-02-10 19:51:15 +00:00
Gleb Smirnoff
48343a2f34 Make M_ZERO flag work correctly on UMA_ZONE_PCPU zones.
Sponsored by:	Nginx, Inc.
2014-02-10 19:48:26 +00:00
Gleb Smirnoff
9188e408cc Add zpcpu_get_cpu() that converts base pointer of UMA_ZPCPU_ZONE
to a pointer private to a given cpuid.

Sponsored by:	Nginx, Inc.
2014-02-10 19:47:14 +00:00
Christian Brueffer
d37872314f Only count table lookups when we're actually processing packets.
PR:		183462
Submitted by:	Sven-Thorsten Dietrich <thebigcorporation at gmail.com>
Reviewed by:	bms
MFC after:	1 month
2014-02-10 14:47:51 +00:00
Christian Brueffer
1b55364ed9 For IPv6, return the same error code as IPv4 when mrouter is not initialized.
PR:		178472
Submitted by:	Sven-Thorsten Dietrich <sven at vyatta.com>
Reviewed by:	bms
2014-02-10 14:36:51 +00:00
Alexander V. Chernikov
9dffa6a3f3 Simplify nd6_output_lle:
* Check ND6_IFF_IFDISABLED before acquiring any locks
* Assume m is always non-NULL
* remove 'bad' case not used anymore
* Simply if_output conditional

MFC after:	2 weeks
Sponsored by:	Yandex LLC
2014-02-10 12:52:33 +00:00
Christian Brueffer
cf042e4324 Allow iwn2000 and iwn2030 firmware to be linked into the kernel.
PR:		184631
Submitted by:	Oliver Pinter
MFC after:	1 week
2014-02-09 22:42:14 +00:00
Ian Lepore
65f04a3da5 Update legacy platforms to use new arm_physmem helper routines. 2014-02-09 22:10:14 +00:00
Ian Lepore
46aa33b2ac If someone tries to boot a generic ATMEL kernel that has no board_init()
routine compiled in, print a friendly error message about it rather than
mysteriously hanging while trying to init 4GB of nonexistant ram.
2014-02-09 21:21:10 +00:00
Warner Losh
1ef5f6a006 Add FDT attachment. 2014-02-09 21:02:46 +00:00
Warner Losh
c6053263cc FDT attachment... 2014-02-09 21:01:53 +00:00
Warner Losh
3526a97bba Add TWI attachment for FDT. We're only matching the SAMG20 device for
now, others to follow.
2014-02-09 21:01:10 +00:00
Warner Losh
bf5c70c929 Add FDT attachment. 2014-02-09 21:00:22 +00:00
Warner Losh
22a484c9d5 Add FDT attachment. Flag lost functionality with FDT_HACKS so we can
find it later.
2014-02-09 20:59:46 +00:00
Warner Losh
bc259c9157 Add FDT attachment. 2014-02-09 20:58:03 +00:00
Warner Losh
4da9131d2a Add FDT attachment, plus minor code shuffle. 2014-02-09 20:57:26 +00:00
Warner Losh
210c0e4c87 Add FDT attachment. 2014-02-09 20:56:39 +00:00
Warner Losh
bad391b21c Add FDT matching code. 2014-02-09 20:55:49 +00:00
Ian Lepore
342322bb36 Add some extra debugging output when DEBUG is defined. 2014-02-09 20:20:49 +00:00
Ian Lepore
c884902d1f Fix the exclude-region clipping logic for the edge-trim case. 2014-02-09 20:19:41 +00:00
Andrew Turner
b2478843a9 Pass the pagetable used from locore.S to initarm to allow it to map data
in as required.
2014-02-09 15:54:31 +00:00
Ian Lepore
73ab448c43 No need to set physmem in each initarm() instance anymore, it's handled
in common code now.
2014-02-09 14:46:50 +00:00
Ian Lepore
d215d5c662 Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses.
Pointed out by:	alc
2014-02-09 14:35:44 +00:00
Andrew Turner
321d79fdca Remove the now unused MMU_INIT macro. 2014-02-09 12:52:39 +00:00
Mikolaj Golub
db2f5a2461 Fixup for r261590 (vnet sysctl handlers cleanup).
Reviewed by:	glebius
2014-02-09 08:13:17 +00:00
Ian Lepore
0c27b1d4fd It turns out a global variable is the only straightforward way to
communicate the kernel's physical load address from where it's known in
initarm() into cpu_mp_start() which is called from non-arm code and
takes no parameters.

This adds the global variable and ensures that all the various copies
of initarm() set it.  It uses the variable in cpu_mp_start(), eliminating
the last uses of KERNPHYSADDR outside of locore.S (where we can now
calculate it instead of relying on the constant).
2014-02-09 02:39:00 +00:00
Ian Lepore
88fdb318f0 Calculate the kernel's load address from the PC in the elf / gzip
trampoline instead of relying on KERNPHYSADDR as a compile-time constant.
2014-02-09 02:06:12 +00:00
Alan Cox
7b9b301c6b Don't call vm_fault_prefault() on zero-fill faults. It's a waste of time.
Successful prefaults after a zero-fill fault are extremely rare.
2014-02-09 01:59:52 +00:00
Ian Lepore
ca3eec15c0 Replace compile-time constant KERNPHYSADDR with abp_physaddr (determined
at runtime) where it's trivial to do so.  Another breadcrumb on the trail
to a kernel that can be loaded at any 1MB boundary.
2014-02-09 01:21:30 +00:00
Ian Lepore
5698bf8c86 Consolidate code related to setting up physical memory configuration into
a new physmem.c file.  The new code provides helper routines that can be
used by legacy SoCs and newer FDT-based systems.  There are routines to
add one or more regions of physically contiguous ram, and exclude one or
more physically contiguous regions of ram.  Ram can be excluded from crash
dumps, from being given over to the vm system for allocation management,
or both.  After all the included and excluded regions have been added,
arm_physmem_init_kernel_globals() processes the regions into the global
dump_avail and phys_avail arrays and realmem and physmem variables that
communicate memory configuration to the rest of the kernel.

Convert all existing SoCs to use the new helper code.
2014-02-08 23:54:16 +00:00
Ian Lepore
007aeeced6 Remove the ARM_USE_SMALL_ALLOC option and code related to it.
This was an optimization used only by a few xscale platforms.  Part of
the optimization was to create a direct map for all physical pages, and
that resulted in making multiple mappings of pages in a way that bypassed
the logic in pmap.c to handle VIVT cache aliasing.  It also just generally
made the code more complex and hard to maintain for all SoCs.

Reviewed by:	cognet
2014-02-08 22:21:38 +00:00
Gleb Smirnoff
0d3009b37c Remove ft_rtalloc and choose rtalloc function at compile time. 2014-02-08 22:12:00 +00:00
Gleb Smirnoff
2333893af3 Spacing. 2014-02-08 22:10:53 +00:00
Ruslan Bukin
f3a72e40b5 Add drivers for:
- Enhanced Direct Memory Access Controller (eDMA)
- Direct Memory Access Multiplexer (DMAMUX)
2014-02-08 19:47:59 +00:00
John Baldwin
abb023fb95 Add virtualized XSAVE support to bhyve which permits guests to use XSAVE and
XSAVE-enabled features like AVX.
- Store a per-cpu guest xcr0 register.  When switching to the guest FPU
  state, switch to the guest xcr0 value.  Note that the guest FPU state is
  saved and restored using the host's xcr0 value and xcr0 is saved/restored
  "inside" of saving/restoring the guest FPU state.
- Handle VM exits for the xsetbv instruction by updating the guest xcr0.
- Expose the XSAVE feature to the guest only if the host has enabled XSAVE,
  and only advertise XSAVE features enabled by the host to the guest.
  This ensures that the guest will only adjust FPU state that is a subset
  of the guest FPU state saved and restored by the host.

Reviewed by:	grehan
2014-02-08 16:37:54 +00:00
Gleb Smirnoff
07d9bc0740 Revert accidentially leaked changes in r261627. 2014-02-08 09:57:52 +00:00
Gleb Smirnoff
603819bc74 Remove never set flag FL_OVERWRITE. The only place where
it was checked led to lock/critnest leak.
2014-02-08 09:56:26 +00:00
Neel Natu
bf73979dd9 Add a counter to differentiate between VM-exits due to nested paging faults
and instruction emulation faults.
2014-02-08 06:22:09 +00:00
Xin LI
5f62f8cdcb MFV r261619:
4574 get_clones_stat does not call zap_count in non-debug kernel

zap_count(...) is never called in non-DEBUG kernel.
As result "count" variable is always 0, and "goto fail" is always
reached.  This means get_clones_stat function never makes up list
of clones for "clones" properties.

MFC after:	2 weeks
2014-02-08 05:35:36 +00:00
Xin LI
c35ddb346f In g_eli_crypto_hmac_init(), zero out after using the ipad buffer,
k_ipad.

Note that the two consumers in geli(4) are not affected by this
issue because the way the code is constructed and as such, we
believe there is no security impact with or without this change
with geli(4)'s usage.

Reported by:	Serge van den Boom <serge vdboom.org>
Reviewed by:	pjd
MFC after:	2 weeks
2014-02-08 05:17:49 +00:00
Neel Natu
62fbd7c27a Fix a bug in the handling of VM-exits caused by non-maskable interrupts (NMI).
If a VM-exit is caused by an NMI then "blocking by NMI" is in effect on the
CPU when the VM-exit is completed. No more NMIs will be recognized until
the execution of an "iret".

Prior to this change the NMI handler was dispatched via a software interrupt
with interrupts enabled. This meant that an interrupt could be recognized
by the processor before the NMI handler completed its execution. The "iret"
issued by the interrupt handler would then cause the "blocking by NMI" to
be cleared prematurely.

This is now fixed by handling the NMI with interrupts disabled in addition
to "blocking by NMI" already established by the VM-exit.
2014-02-08 05:04:34 +00:00
Warner Losh
6efc5b1db6 Remove FreeBSD 6 support 2014-02-08 04:29:36 +00:00
Ed Maste
90990e3bc1 Build a 32-bit libstand under sys/boot/ for ppc64
This change is equivalent to r261567 for i386/amd64.

Sponsored by:	The FreeBSD Foundation
2014-02-07 22:49:42 +00:00
Gleb Smirnoff
d60a1d1ef4 Fix comment. 2014-02-07 22:30:42 +00:00
Gleb Smirnoff
f83f97fcbc Remove unused defines. 2014-02-07 21:56:16 +00:00
Andrew Turner
bc6c10477d Dynamically generate the page table. This will allow us to detect the
physical address we are loaded at to change the mapping.
2014-02-07 19:15:25 +00:00
John Baldwin
c97492d0e0 Now that FreeBSD/i386 works as a bhyve guest, allow i386 kernels to
include bvmconsole and bvmdebug.
2014-02-07 18:46:27 +00:00
Ed Maste
b0b98e9752 Don't force efi to a 32-bit build on amd64
Sponsored by:	The FreeBSD Foundation
2014-02-07 16:28:40 +00:00
Gleb Smirnoff
5d6d7e756b o Revamp API between flowtable and netinet, netinet6.
- ip_output() and ip_output6() simply call flowtable_lookup(),
    passing mbuf and address family. That's the only code under
    #ifdef FLOWTABLE in the protocols code now.
o Revamp statistics gathering and export.
  - Remove hand made pcpu stats, and utilize counter(9).
  - Snapshot of statistics is available via 'netstat -rs'.
  - All sysctls are moved into net.flowtable namespace, since
    spreading them over net.inet isn't correct.
o Properly separate at compile time INET and INET6 parts.
o General cleanup.
  - Remove chain of multiple flowtables. We simply have one for
    IPv4 and one for IPv6.
  - Flowtables are allocated in flowtable.c, symbols are static.
  - With proper argument to SYSINIT() we no longer need flowtable_ready.
  - Hash salt doesn't need to be per-VNET.
  - Removed rudimentary debugging, which use quite useless in dtrace era.

The runtime behavior of flowtable shouldn't be changed by this commit.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-02-07 15:18:23 +00:00
John Baldwin
8044460976 - Use a callout instead of the deprecated timeout_handle.
- Set the console name always so that the bvm console device can be used
  via conscontrol even if it isn't chosen as the default console.
2014-02-07 15:10:24 +00:00
Ian Lepore
667a1295b3 Remove references to PHYSADDR where it's used only in debugging output,
and where the code that references it can safely be elided if it's not
defined (meaning the code is used for legacy arm platforms that still
define the compile-time PHYSADDR but not on newer systems that calculate
the value at runtime).
2014-02-07 14:38:51 +00:00
Gleb Smirnoff
369f5bceaa sysctl_handle_counter_u64() doesn't use arg2 argument, thus simplify
the SYSCTL_COUNTER_U64() macro.

Sponsored by:	Nginx, Inc.
2014-02-07 14:34:31 +00:00
Gleb Smirnoff
92f8975ff4 Utilize SYSCTL_UMA_CUR() to export usage of syncache and
tcp reassembly zones.

Sponsored by:	Nginx, Inc.
2014-02-07 14:31:51 +00:00
Gleb Smirnoff
0a5a3ccb81 Provide macros that allow easily export uma(9) zone limits and
current usage via sysctl(9):

  SYSCTL_UMA_MAX()
  SYSCTL_ADD_UMA_MAX()
  SYSCTL_UMA_CUR()
  SYSCTL_ADD_UMA_CUR()

Sponsored by:	Nginx, Inc.
2014-02-07 14:29:03 +00:00
Gleb Smirnoff
96d111245f Catch up on r261590. 2014-02-07 14:26:33 +00:00
Gleb Smirnoff
b5c32cf481 Remove identical vnet sysctl handlers, and handle CTLFLAG_VNET
in the sysctl_root().

Note: SYSCTL_VNET_* macros can be removed as well. All is
  needed to virtualize a sysctl oid is set CTLFLAG_VNET on it.
  But for now keep macros in place to avoid large code churn.

Sponsored by:	Nginx, Inc.
2014-02-07 13:47:33 +00:00
Luiz Otavio O Souza
d9ffbff9f0 Fix the build with DEBUG enabled. Where possible, fix style(9) issues.
Reviewed by:	bde
Approved by:	adrian (mentor)
2014-02-07 13:06:48 +00:00
Aleksandr Rybalko
06716ffd17 Implement vd_drawrect and vd_setpixel for vt(9)'s VGA driver.
Sponsored by:	The FreeBSD Foundation
2014-02-07 12:39:58 +00:00