Commit Graph

238053 Commits

Author SHA1 Message Date
Andrew Rybchenko
9d5aae2705 sfxge(4): distinguish filters for encapsulated packets
Add filter match flag to distinguish filters applied only to
encapsulated packets.

Match flags set should allow to determine whether a filter
is supported or not. The problem is that if specification
has supported set outer match flags and specified
encapsulation without any inner flags, check says that it
is supported, and filter insertion is performed. However,
there is no filtering of the encapsulated traffic. A new
flag is added to solve this problem and separate the
filters for the encapsulated packets.

Submitted by:   Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18220
2018-11-29 06:42:38 +00:00
Andrew Rybchenko
aab1bcb438 sfxge(4): support VXLAN filter creation
Submitted by:   Vijay Srivastava <vijays at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18219
2018-11-29 06:42:26 +00:00
Andrew Rybchenko
de7acb0847 sfxge(4): support VNI/VSID and inner frame local MAC
This supports VNI/VSID and inner frame local MAC fields to
match in VXLAN, GENEVE, or NVGRE packets.

Submitted by:   Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18218
2018-11-29 06:42:15 +00:00
Andrew Rybchenko
13c11cb7aa sfxge(4): support filters for encapsulated packets
This adds filters for encapsulated packets to the list
returned by ef10_filter_supported_filters().

Submitted by:   Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18217
2018-11-29 06:42:04 +00:00
Andrew Rybchenko
80c4ed9696 sfxge(4): sync MCDI headers and TLV layout
Regenerate MCDI and TLV layout headers from firmwaresrc to
pick up DPDK firmware variant and related Rx queue and filtering
extensions.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18216
2018-11-29 06:41:53 +00:00
Andrew Rybchenko
02d7c0c395 sfxge(4): add signed image layout support
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18215
2018-11-29 06:41:41 +00:00
Andrew Rybchenko
391763d7b4 sfxge(4): add firmware image layout option
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18214
2018-11-29 06:29:24 +00:00
Mateusz Guzik
eec8d0a378 Convert racct_enable to bool and annotate as __read_frequently
Sponsored by:	The FreeBSD Foundation
2018-11-29 05:17:16 +00:00
Mateusz Guzik
64cf6a62d4 Deinline racct throttling out of syscall exit path.
racct is not enabled by default and even when it is enabled processes are
typically not throttled. The order of checks is left unchanged since
racct_enable will be annotated as __read_frequently, while checking for the
flag in the processes would probably require an extra fetch.

Sponsored by:	The FreeBSD Foundation
2018-11-29 05:08:46 +00:00
Mateusz Guzik
e272bf479b Annotate td_cowgen check as unlikely.
Sponsored by:	The FreeBSD Foundation
2018-11-29 04:48:22 +00:00
Justin Hibbits
59dc8c79c6 Allow truss to operate on ELFv2 processes.
Summary:
Currently, truss doesn't work on ELFv2 processes due to not recognizing the ABI.

Since there's no special handling needed here, just adding a PROCABI struct for
it is sufficient to get it working.

Submitted by:	git_bdragon.rtk0.net
Differential Revision: https://reviews.freebsd.org/D18352
2018-11-29 03:57:06 +00:00
Mateusz Guzik
3277792bde Tidy up hardclock.
- use fcmpset for updating ticks
- move (rarely used) itimer handling to a dedicated function

Sponsored by:	The FreeBSD Foundation
2018-11-29 03:44:02 +00:00
Justin Hibbits
f4a80449ce Fix thread creation in PowerPC64 ELFv2 processes.
Summary:
Currently, the upcall used to create threads assumes ELFv1.

Instead, we should check which sysentvec is in use on the process and act
accordingly.

This makes ELFv2 threaded processes work.

Submitted by:	git_bdragon.rtk0.net
Differential Revision: https://reviews.freebsd.org/D18330
2018-11-29 03:39:11 +00:00
Mateusz Guzik
1e9a1bf589 proc: create a dedicated lock for zombproc to ligthen the load on allproc_lock
waitpid always takes proctree to evaluate the list, but only takes allproc
if it can reap. With this patch allproc is no longer taken, which helps during
poudriere -j 128.

Discussed with: kib
Sponsored by:	The FreeBSD Foundation
2018-11-29 02:52:08 +00:00
John Baldwin
78afed1396 Move CLIP table handling out of TOM and into the base driver.
- Store the clip table in 'struct adapter' instead of in the TOM softc.
- Init the clip table during attach and teardown during detach.
- While here, add a dev.<nexus>.<unit>.misc.clip sysctl to dump the
  CLIP table.

This does mean that we update the clip table even if TOE is not enabled,
but non-TOE things need the CLIP table anyway.

Reviewed by:	np, Krishnamraju Eraparaju @ Chelsio
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D18010
2018-11-29 01:15:53 +00:00
Jilles Tjoelker
468ed39612 sh: Fix ${param?} default error message
If word in ${param?word} is missing, the shell shall write a default error
message. So expanding ${param?} when param is not set should write an error
message like

sh: param: parameter not set

This was broken by r316417.

PR:		233585
2018-11-28 20:03:53 +00:00
Gleb Smirnoff
0b2e3aead3 Fix yet another edge case in uma_startup_count(). If zone size fits into
several pages, but leaves no space for struct uma_slab at the end we
miscalculate number of pages by one. Totally mimic keg_large_init() math
here to cover that problem.

Reported by:	gallatin
2018-11-28 19:54:02 +00:00
Gleb Smirnoff
3d5e3df73f For not offpage zones the slab is placed at the end of page. Keg's uk_pgoff
is calculated to guarantee that struct uma_slab is placed at pointer size
alignment. Calculation of real struct uma_slab size is done in keg_ctor()
and yet again in keg_large_init(), to check if we need an extra page. This
calculation can actually be performed at compile time.

- Add SIZEOF_UMA_SLAB macro to calculate size of struct uma_slab placed at
  an end of a page with alignment requirement.
- Use SIZEOF_UMA_SLAB in keg_ctor() and in keg_large_init(). This is a not
  a functional change.
- Use SIZEOF_UMA_SLAB in UMA_SLAB_SPACE definition and in keg_small_init().
  This is a potential bugfix, but in reality I don't think there are any
  systems affected, since compiler aligns struct uma_slab anyway.
2018-11-28 19:17:27 +00:00
Ian Lepore
b92c2c907e Add comments describing the bootargs handoff between loader(8) and gptboot
or zfsboot, when loader(8) is the BTX loader.  No functional changes.
2018-11-28 18:09:42 +00:00
Stephen Hurd
e8e0ecb969 Fix first-packet completion
The first packet after the ring is initialized was never
completed as isc_txd_credits_update() would not include it in the
count of completed packets. This caused netmap to never complete
a batch. See PR 233022 for more details.

This is the same fix as the r340310 for e1000

PR:		233607
Reported by:	lev
Reviewed by:	lev
MFC after:	3 days
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D18368
2018-11-28 17:37:17 +00:00
Justin Hibbits
8f69e36d87 powerpc: Don't include KERNBASE in genassym, it's unnecessary
A related future change, which changes KERNBASE for Book-E for some reason
causes a "KERNBASE redefined" error with assym.inc, even though it only changed
the value of KERNBASE and nothing else.  Since machine/vmparam.h is already
included in booke/locore.S, and the requisite guards are already in place for
properly handling KERNBASE in vmparam.h, just remove it from genassym, and
include vmparam.h in the AIM locore files.
2018-11-28 16:00:52 +00:00
Vincenzo Maffione
43cf589ced cxgbe: revert r309725
After the fix contained in r341144, cxgbe does not need anymore
to set the IFCAP_NETMAP flag manually.

Reviewed by:	np
Approved by:	gnn (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D17987
2018-11-28 15:29:58 +00:00
Vincenzo Maffione
d55913f555 netmap: set IFCAP_NETMAP in if_capabilities
Revision r307394 removed (by mistake) the code that sets IFCAP_NETMAP
in if_capabilities on netmap_attach. This patch reverts this change.

Reviewed by:	np
Approved by:	gnn (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D17987
2018-11-28 14:07:34 +00:00
Emmanuel Vadot
006f540e44 arm64: Add rk_i2c and rk805 to GENERIC
MFC after:	1 month
2018-11-28 13:54:39 +00:00
Emmanuel Vadot
cee1927ea2 Add RK805 PMIC Support
RK805 is the companion PMIC for RK3328 SoC.
Add a driver for it with most of it's regulators supported.

MFC after:	1 month
2018-11-28 13:53:43 +00:00
Emmanuel Vadot
da3d2dce91 rk_clk_composite: Fix set_mux
Pointy Hat:	  manu
2018-11-28 13:25:22 +00:00
Sean Bruno
1a8177b128 Add CAPABILITIES to the ERL kernel config so that tools that have been
modified with Capsicum work on this target platform.

This came up after the conversion of wc(8).
2018-11-28 13:25:10 +00:00
Andrew Rybchenko
4142e8cfbb sfxge(4): add outer IP ID parameter to TSOv2 descriptor
Set outer_ip_id in the TX option descriptor for encapsulated packets.

Submitted by:   Vijay Srivastava <vijays at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18213
2018-11-28 09:25:43 +00:00
Andrew Rybchenko
357c2ebbb4 sfxge(4): add encapsulated TSOv2 capability
Submitted by:   Vijay Srivastava <vijays at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18212
2018-11-28 09:25:31 +00:00
Andrew Rybchenko
74d36c847b sfxge(4): support CTPIO stats
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18211
2018-11-28 09:25:21 +00:00
Andrew Rybchenko
2fdc432ccd sfxge(4): regenerate headers to pick up CTPIO stats
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18210
2018-11-28 09:25:09 +00:00
Andrew Rybchenko
1845c6b478 sfxge(4): add bit to indicate CTPIO availability
Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18209
2018-11-28 09:24:58 +00:00
Andrew Rybchenko
a905810049 sfxge(4): add CTPIO statistics
Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18208
2018-11-28 09:24:47 +00:00
Andrew Rybchenko
6d522ee0fc sfxge(4): run genfwdef to update headers
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18207
2018-11-28 09:24:36 +00:00
Andrew Rybchenko
a9abe8d9e9 sfxge(4): document the event type for CTPIO sends
Document the TX_EV_TYPE used for TX completion events corresponding
to CTPIO sends.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18206
2018-11-28 09:24:25 +00:00
Andrew Rybchenko
4db0da6420 sfxge(4): add 1.3V voltage and current sensors
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18205
2018-11-28 09:24:14 +00:00
Andrew Rybchenko
9a9a7fab24 sfxge(4): provide a flag for controlling CTPIO mode
Either cut-through or store-and-forward mode.

Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18204
2018-11-28 09:24:03 +00:00
Andrew Rybchenko
edaff290d6 sfxge(4): add Medford2 support for tunnel encapsulations
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18203
2018-11-28 09:23:52 +00:00
Andrew Rybchenko
ef3b3edeb6 sfxge(4): add Medford2 support for licensing
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18202
2018-11-28 09:23:41 +00:00
Andrew Rybchenko
f83ec5160d sfxge(4): add Medford2 support for external port numbers
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18201
2018-11-28 09:23:30 +00:00
Andrew Rybchenko
259a7b375b sfxge(4): group Medford external port mapping entries
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18200
2018-11-28 09:23:19 +00:00
Andrew Rybchenko
b14569a458 sfxge(4): clarify port mode names and masks
New port mode names are defined for Medford2 and later, and
the existing names are aliased to them. Add comments with the
numeric port mode to clarify the external port modes table.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18199
2018-11-28 09:23:05 +00:00
Andrew Rybchenko
2222409ba1 sfxge(4): support Medford2 event timer semantics
The event timer interface has changed for Medford2 - for
details see bug66418 comment 9. Update the common code to
use the new timer semantics for Medford2.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18198
2018-11-28 09:22:53 +00:00
Andrew Rybchenko
ffde74241a sfxge(4): support FEC mode settings
Medford2 controllers support control and reporting of
FEC modes for 25G and higher links. See SF-109306-TC
for suggested usage in client code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18197
2018-11-28 09:22:42 +00:00
Andrew Rybchenko
e4c4abb28f sfxge(4): remove obsolete comments
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18196
2018-11-28 06:56:34 +00:00
Andrew Rybchenko
76ecd4a37b sfxge(4): move VI window size config to ef10 NIC board
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18195
2018-11-28 06:56:22 +00:00
Andrew Rybchenko
26fcca572d sfxge(4): move privilege config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18194
2018-11-28 06:56:11 +00:00
Andrew Rybchenko
61e0c16d1c sfxge(4): move vector config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18193
2018-11-28 06:55:59 +00:00
Andrew Rybchenko
ff8ff86654 sfxge(4): move limits config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18192
2018-11-28 06:55:47 +00:00
Andrew Rybchenko
40f5e54c62 sfxge(4): move Tx config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18191
2018-11-28 06:55:36 +00:00