]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoRemove the sed hack for ABI tag notes.
jhb [Mon, 15 Jun 2020 19:38:48 +0000 (19:38 +0000)]
Remove the sed hack for ABI tag notes.

The ELF notes compiled in C were placed in a section with the wrong type
(SHT_PROGBITS instead of SHT_NOTE).  Previously, sed was used on the
generated assembly to rewrite the section type.  Instead, write the notes
in assembly which permits setting the correct section type directly.

While here, move inline assembly entry points out of C and into assembly
for aarch64, arm, and riscv.

Reviewed by: kib
Tested on: amd64 (cirrus-ci), riscv64
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25211

4 years agoSimplify MACHINE_ARCH to be a single string.
jhb [Mon, 15 Jun 2020 18:57:43 +0000 (18:57 +0000)]
Simplify MACHINE_ARCH to be a single string.

Big endian and armv4 mean that we are now down to only two supported
variants.  A future change will use MACHINE_ARCH in assembly which
does not support C-style string concatentation and thus needs
MACHINE_ARCH defined as a single string.

Reviewed by: imp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25211

4 years agoAvoid trying to toggle TSO twice
freqlabs [Mon, 15 Jun 2020 16:35:27 +0000 (16:35 +0000)]
Avoid trying to toggle TSO twice

Remove TSO from the toggle mask when automatically disabled by TXCKSUM* in
various NIC drivers.

Reviewed by: hselasky, np, gallatin, jpaetzel
Approved by: mav (mentor)
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D25120

4 years agoUpdate event masks constant to Bluetooth core spec V5.2
takawata [Mon, 15 Jun 2020 14:58:40 +0000 (14:58 +0000)]
Update event masks constant to Bluetooth core spec V5.2
and add LE Events.

PR: 247257
Submitted by: Marc Veldman

4 years agomd5(1): fix style in man page
fernape [Mon, 15 Jun 2020 10:08:02 +0000 (10:08 +0000)]
md5(1): fix style in man page

Fix a bunch of style problems reported by mandoc(1) and igor:

mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... rmd160,
mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ...  skein512,
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:35:2: STYLE: useless macro: Tn
mandoc: ./md5.1:42:2: STYLE: useless macro: Tn
mandoc: ./md5.1:45:2: STYLE: useless macro: Tn
mandoc: ./md5.1:47:2: STYLE: useless macro: Tn
mandoc: ./md5.1:56:2: STYLE: useless macro: Tn
mandoc: ./md5.1:58:2: STYLE: useless macro: Tn
mandoc: ./md5.1:61:2: STYLE: useless macro: Tn
mandoc: ./md5.1:66:2: STYLE: useless macro: Tn
mandoc: ./md5.1:68:2: STYLE: useless macro: Tn
mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm skein512,
mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3

igor:
md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input that produces a specific

Approved by: bcr@
Differential Revision: https://reviews.freebsd.org/D25277

4 years agovtnet: Fix regression introduced in r361944
jrtc27 [Sun, 14 Jun 2020 22:39:34 +0000 (22:39 +0000)]
vtnet: Fix regression introduced in r361944

For legacy devices that don't support MrgRxBuf (such as bhyve pre-r358180),
r361944 failed to update the receive handler to account for the additional
padding introduced by the unused num_buffers field that is now always present
in struct vtnet_rx_header. Thus, calculate the padding dynamically based on
vtnet_hdr_size.

PR: 247242
Reported by: thj
Tested by: thj

4 years agoiflib: netmap: enter/exit netmap mode after device stops
vmaffione [Sun, 14 Jun 2020 21:07:12 +0000 (21:07 +0000)]
iflib: netmap: enter/exit netmap mode after device stops

Avoid possible race conditions by calling nm_set_native_flags()
and nm_clear_native_flags() only after the device has been
stopped.

MFC after: 1 week

4 years agozfsboot: cstyle cleanup
tsoome [Sun, 14 Jun 2020 20:57:24 +0000 (20:57 +0000)]
zfsboot: cstyle cleanup

No functional changes intended.

Sponsored by: Netflix, Klara Inc.

4 years agonetmap: vtnet: fix races in vtnet_netmap_reg()
vmaffione [Sun, 14 Jun 2020 20:47:31 +0000 (20:47 +0000)]
netmap: vtnet: fix races in vtnet_netmap_reg()

The nm_register callback needs to call nm_set_native_flags()
or nm_clear_native_flags() once the device has been stopped.
However, in the current implementation this is not true,
as the device is stopped by vtnet_init_locked(). This causes
race conditions where the driver crashes as soon as it
dequeues netmap buffers assuming they are mbufs (or the other
way around).
To fix the issue, we extend vtnet_init_locked() with a second
argument that, if not zero, will set/clear the netmap flags.
This results in a huge simplification of the nm_register
callback itself.
Also, use netmap_reset() to check if a ring is going to be
re-initialized in netmap mode.

MFC after: 1 week

4 years agosh/tests: Add tests for SIGINT in non-jobc background commands
jilles [Sun, 14 Jun 2020 19:41:24 +0000 (19:41 +0000)]
sh/tests: Add tests for SIGINT in non-jobc background commands

If job control is not enabled, background commands shall ignore SIGINT and
SIGQUIT, and it shall be possible to override that ignore in the same shell.

MFC after: 1 week

4 years ago[PowerPC] Fix scc z8530 driver
bdragon [Sun, 14 Jun 2020 16:47:16 +0000 (16:47 +0000)]
[PowerPC] Fix scc z8530 driver

Parts of the z8530 driver were still using the SUN channel spacing.

This was invalid on PowerMac and QEMU, where the attachment was to escc,
not escc-legacy. This means the driver has apparently NEVER worked properly
on Macintosh hardware.

Add documentation for the channel spacing details, and change to using
driver-specific initialization instead of hardcoded spacing so either
spacing can be used.

Fixes boot hang in QEMU when using the serial console, and fixes use on
Xserve serial (and presumably PowerMacs that have a Stealth Serial port
or similar)

Reviewed by: jhibbits
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D24661

4 years agoAllocate the mbuf for the signature in the COOKIE or the correct size.
tuexen [Sun, 14 Jun 2020 16:05:08 +0000 (16:05 +0000)]
Allocate the mbuf for the signature in the COOKIE or the correct size.
While there, do also do some cleanups.

MFC after: 1 week

4 years agoMake linux(4) warn about unsupported CMSG level/type.
trasz [Sun, 14 Jun 2020 14:38:40 +0000 (14:38 +0000)]
Make linux(4) warn about unsupported CMSG level/type.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25255

4 years agoAdd support for the timecreate attribute
dfr [Sun, 14 Jun 2020 11:41:57 +0000 (11:41 +0000)]
Add support for the timecreate attribute

This maps to the va_birthtime VFS attribute.

4 years agoloader.efi: update console after gfx mode change
tsoome [Sun, 14 Jun 2020 10:13:40 +0000 (10:13 +0000)]
loader.efi: update console after gfx mode change

The gfx mode change should be coordinated with console setup.

4 years agoCleanups, no functional change.
tuexen [Sun, 14 Jun 2020 09:50:00 +0000 (09:50 +0000)]
Cleanups, no functional change.

MFC after: 1 week

4 years agoMove font related data structured to sys/font.c and update vtfontcvt
tsoome [Sun, 14 Jun 2020 06:58:58 +0000 (06:58 +0000)]
Move font related data structured to sys/font.c and update vtfontcvt

Prepare support to be able to handle font data in loader, consolidate
data structures to sys/font.h and update vtfontcvt.

vtfontcvt update is about to output set of glyphs in form of C source,
the implementation does allow to output compressed or uncompressed font
bitmaps.

Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D24189

4 years agolibc manpages: various improvements from NetBSD
gbe [Sun, 14 Jun 2020 05:59:30 +0000 (05:59 +0000)]
libc manpages: various improvements from NetBSD

- Add STANDARDS and HISTORY sections within the appropriate manpages
- Mention two USENIX papers within kqueue(2) and strlcpy(3)

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24650

4 years agoAdd HISTORY sections to ZFS and dtrace manpage
gbe [Sun, 14 Jun 2020 05:50:28 +0000 (05:50 +0000)]
Add HISTORY sections to ZFS and dtrace manpage

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D23833

4 years agolibutil: Document function HISTORY within the manpages
gbe [Sun, 14 Jun 2020 05:35:02 +0000 (05:35 +0000)]
libutil: Document function HISTORY within the manpages

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24795

4 years agoAdd a HISTORY section to ctime(3)
gbe [Sun, 14 Jun 2020 05:08:15 +0000 (05:08 +0000)]
Add a HISTORY section to ctime(3)

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
Obtained from: OpenBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24635

4 years agoOops, r362158 committed a duplicate definition of MAXSECFLAVORS.
rmacklem [Sun, 14 Jun 2020 01:22:19 +0000 (01:22 +0000)]
Oops, r362158 committed a duplicate definition of MAXSECFLAVORS.

This patch gets rid of the duplicate.

4 years agoModify mountd to use the new struct export_args committed by r362158.
rmacklem [Sun, 14 Jun 2020 00:40:00 +0000 (00:40 +0000)]
Modify mountd to use the new struct export_args committed by r362158.

r362158 modified struct export_args for make the ex_flags field 64bits
and also changed the anonymous credentials to allow more than 16 groups.
This patch fixes mountd.c to use the new structure.
It does allocate larger exportlist and grouplist structures now.
That will be fixed in a future commit.
The only visible change will be that the credentials provided for the
-maproot and -mapall exports options can now have more than 16 groups.

Reviewed by: kib, freqlabs
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D25088

4 years ago[net80211] Treat frames without an rx status as not a decap'ed A-MSDU.
adrian [Sun, 14 Jun 2020 00:23:06 +0000 (00:23 +0000)]
[net80211] Treat frames without an rx status as not a decap'ed A-MSDU.

Drivers for NICs which do A-MSDU decap in hardware / driver will need to
set the rx status, so if it's missing then treat it as not a decap'ed
A-MSDU.

4 years ago[net80211] Also convert the ddb path
adrian [Sun, 14 Jun 2020 00:21:48 +0000 (00:21 +0000)]
[net80211] Also convert the ddb path

Whoops - this belonged in my previous commit.

4 years agoAdd an entry to UPDATING for r362158.
rmacklem [Sun, 14 Jun 2020 00:15:44 +0000 (00:15 +0000)]
Add an entry to UPDATING for r362158.

4 years agoVersion bump for r362158, since the arguments for vfs_checkexp() changed.
rmacklem [Sun, 14 Jun 2020 00:12:29 +0000 (00:12 +0000)]
Version bump for r362158, since the arguments for vfs_checkexp() changed.

4 years agoFix export_args ex_flags field so that is 64bits, the same as mnt_flags.
rmacklem [Sun, 14 Jun 2020 00:10:18 +0000 (00:10 +0000)]
Fix export_args ex_flags field so that is 64bits, the same as mnt_flags.

Since mnt_flags was upgraded to 64bits there has been a quirk in
"struct export_args", since it hold a copy of mnt_flags
in ex_flags, which is an "int" (32bits).
This happens to currently work, since all the flag bits used in ex_flags are
defined in the low order 32bits. However, new export flags cannot be defined.
Also, ex_anon is a "struct xucred", which limits it to 16 additional groups.
This patch revises "struct export_args" to make ex_flags 64bits and replaces
ex_anon with ex_uid, ex_ngroups and ex_groups (which points to a
groups list, so it can be malloc'd up to NGROUPS in size.
This requires that the VFS_CHECKEXP() arguments change, so I also modified the
last "secflavors" argument to be an array pointer, so that the
secflavors could be copied in VFS_CHECKEXP() while the export entry is locked.
(Without this patch VFS_CHECKEXP() returns a pointer to the secflavors
array and then it is used after being unlocked, which is potentially
a problem if the exports entry is changed.
In practice this does not occur when mountd is run with "-S",
but I think it is worth fixing.)

This patch also deleted the vfs_oexport_conv() function, since
do_mount_update() does the conversion, as required by the old vfs_cmount()
calls.

Reviewed by: kib, freqlabs
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D25088

4 years ago[net80211] Handle offloaded AMSDU in AMPDU reordering.
adrian [Sat, 13 Jun 2020 23:35:22 +0000 (23:35 +0000)]
[net80211] Handle offloaded AMSDU in AMPDU reordering.

In the 11n world, most NICs did A-MPDU receive/transmit offloading but
not A-MSDU offloading.  So, the net80211 A-MPDU receive path would just
receive MPDUs, do the reordering bit, pass it up to the rest of
net80211 for crypto decap and then do A-MSDU decap before throwing ethernet
frames up to the rest of the system.

However 11ac and 11ax NICs are increasingly doing A-MSDU offload (and
newer 11ax stuff does socket offload, but hey I don't want to scare people
JUST yet) - so although A-MPDU reordering may be done in the OS, A-MSDUs
look like a normal MPDU.  This means that all the MSDUs are actually
faked into a set of MPDUs with matching 802.11 header - the sequence number,
QoS header and any encryption verification bits (like IV) are just copied.

This shows up as MASSIVE packet loss in net80211, cause after the first MPDU
we just toss the rest.

(And don't get me started about ethernet decap with A-MPDU host reordering;
we'll have to cross that bridge for later 11ac and 11ax bits too.)

Anyway, this work changes each A-MPDU reorder slot into an mbufq.
The mbufq is treated as a whole set of frames to pass up to the stack
and reordered/de-duped as a group.  The last frame in the reorder list
is checked to see if it's an A-MSDU final frame so any duplicates are
correctly tossed rather than double-received.  Other than that, the
rest of the logic is unchanged.

The previous commit did a small subset of this - if there wasn't any reordering
going on then it'd accept the A-MSDUs.  This is the rest of the needed work.

This is a no-op for 11n NICs doing A-MPDU reordering but needing software
A-MSDU decap - they aren't tagged as A-MSDU and so any subsequent
frames added to the reorder slot are tossed.

Tested:

* QCA9880 (ath10k/athp) - STA/AP mode;
* RT3593 (if_rsu) - 11n STA+DWDS mode (I'm committing through it rn);
* QCA9380 (if_ath) - STA/AP mode.

4 years ago[net80211] separate out node allocation and node initialisation.
adrian [Sat, 13 Jun 2020 22:20:02 +0000 (22:20 +0000)]
[net80211] separate out node allocation and node initialisation.

This is a new, optional (for now!) method that drivers can use to separate
node allocation and node initialisation.  Right now they're the same, and
drivers that need to do node allocation via firmware commands need to sleep
and thus they need to defer node allocation into an internal taskqueue.

Right now they're just separate but not deferred.  Later on if I get the time
we'll start deferring the node and key related operations but that requires
making a bunch of other stuff (notably things that generate frames!) also
async/deferred.

Tested:

* RT3593, STA/DWDS mode
* AR9380, STA/AP modes
* QCA9880 (athp) - STA/AP modes

4 years agoRemove usage of empty macro.
tuexen [Sat, 13 Jun 2020 21:23:26 +0000 (21:23 +0000)]
Remove usage of empty macro.

MFC after: 1 week

4 years agoSimpify a condition, no functional change.
tuexen [Sat, 13 Jun 2020 18:38:59 +0000 (18:38 +0000)]
Simpify a condition, no functional change.

MFC after: 1 week

4 years agoFix ldd for PIE binaries after rtld stopped accepting binaries for dlopen.
kib [Sat, 13 Jun 2020 18:21:31 +0000 (18:21 +0000)]
Fix ldd for PIE binaries after rtld stopped accepting binaries for dlopen.

ldd proclaims ET_DYN objects as shared libraries and tries to
dlopen(RTLD_TRACE) them to get dependencies. Since PIE binaries are
ET_DYN | DF_1_PIE, refusal to dlopen such binaries breaks ldd.

Fix it by reading and parsing dynamic segment looking for DF_FLAG_1
and taking DF_1_PIE into account when deciding between binary and
library.

Reported by: Dewayne Geraghty <dewayne@heuristicsystems.com.au>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25257

4 years agoprocctl(2): document PROC_KPTI
kib [Sat, 13 Jun 2020 18:19:42 +0000 (18:19 +0000)]
procctl(2): document PROC_KPTI

Reviewed by: bcr
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25258

4 years agoprocctl(2): consistently refer to the data pointer as 'data'.
kib [Sat, 13 Jun 2020 18:18:34 +0000 (18:18 +0000)]
procctl(2): consistently refer to the data pointer as 'data'.

Reviewed by: bcr
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25258

4 years agosockstat(1): Add EXAMPLES to man page
fernape [Sat, 13 Jun 2020 17:36:08 +0000 (17:36 +0000)]
sockstat(1): Add EXAMPLES to man page

Add three examples showing the use of -4, -6, -l, -L, -p and -P

Reviewed by: gbe@
Approved by: bcr@

4 years agonvi: fallback to ISO8859-1 as last resort
yuripv [Sat, 13 Jun 2020 14:11:02 +0000 (14:11 +0000)]
nvi: fallback to ISO8859-1 as last resort

Current logic of using user's locale encoding that is UTF-8 doesn't make
much sense if we already failed the looks_utf8() check and skipped
encoding set using "fileencoding" as being UTF-8 as well; fallback to
ISO8859-1 in that case.

Reviewed by: Zhihao Yuan <lichray@gmail.com>
Differential Revision: https://reviews.freebsd.org/D24919

4 years agoawk(1): use -version instead of -V
yuripv [Sat, 13 Jun 2020 09:16:07 +0000 (09:16 +0000)]
awk(1): use -version instead of -V

-V is OpenBSD specific, use -version instead.

While here, fix issue reported by mandoc lint and drop nonexistent
script(7) reference.

PR: 247004
Reviewed by: 0mp, markj
Differential Revision: https://reviews.freebsd.org/D25164

4 years agolocale: exit 1 if unknown keyword was specified
yuripv [Sat, 13 Jun 2020 08:37:24 +0000 (08:37 +0000)]
locale: exit 1 if unknown keyword was specified

PR: 241906
Submitted by: Akos Somfai <akos.somfai@gmail.com>

4 years agoMFV r362143:
cy [Sat, 13 Jun 2020 04:47:59 +0000 (04:47 +0000)]
MFV r362143:

Update sqlite3 to 3.32.2 (3320200).

CVE-2020-11655: SQLite through 3.31.1 allows attackers to cause a denial of
service (segmentation fault) via a malformed window-function query because
the AggInfo object's initialization is mishandled.

CVE-2020-13434: SQLite through 3.32.0 has an integer overflow in
sqlite3_str_vappendf in printf.c.

CVE-2020-13435: SQLite through 3.32.0 has a segmentation fault in
sqlite3ExprCodeTarget in expr.c.

CVE-2020-13630: ext/fts3/fts3.c in SQLite before 3.32.0 has a
use-after-free in fts3EvalNextRow, related to the snippet feature

CVE-2020-13631: SQLite before 3.32.0 allows a virtual table to be renamed
to the name of one of its shadow tables, related to alter.c and build.c.

CVE-2020-13632: ext/fts3/fts3_snippet.c in SQLite before 3.32.0 ha s a
NULL pointer dereference via a crafted matchinfo() query.

PR: 247149
Reported by: spam123@bitbert.com
MFC after: 3 days
Security: vuxml: c4ac9c79-ab37-11ea-8b5e-b42e99a1b9c3
https://nvd.nist.gov/vuln/detail/CVE-2020-11655
https://nvd.nist.gov/vuln/detail/CVE-2020-13434
https://nvd.nist.gov/vuln/detail/CVE-2020-13435
https://nvd.nist.gov/vuln/detail/CVE-2020-13630
https://nvd.nist.gov/vuln/detail/CVE-2020-13631
https://nvd.nist.gov/vuln/detail/CVE-2020-13632

4 years agoFix !DEBUGNET build after r362138
cem [Sat, 13 Jun 2020 03:16:09 +0000 (03:16 +0000)]
Fix !DEBUGNET build after r362138

X-MFC-With: r362138

4 years agoFlip kern.tty_info_kstacks on by default
cem [Sat, 13 Jun 2020 03:04:40 +0000 (03:04 +0000)]
Flip kern.tty_info_kstacks on by default

It's a useful debug aid for anyone using Ctrl-T today, and doesn't seem to be
widely known.  So, enable it out of the box to help people find it.

It's a tunable and sysctl, so if you don't like it, it's easy to disable
locally.

If people really hate it, we can always flip it back.

Reported by: Daniel O'Connor

4 years agoLinuxkpi uses the rb-tree structures without using their interfaces,
dougm [Sat, 13 Jun 2020 01:54:09 +0000 (01:54 +0000)]
Linuxkpi uses the rb-tree structures without using their interfaces,
making them break when the representation changes. Revert changes that
eliminated the color field from rb-trees, leaving everything as it was
before.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D25250

4 years agonet80211: Add framework for debugnet(4) support
cem [Sat, 13 Jun 2020 00:59:36 +0000 (00:59 +0000)]
net80211: Add framework for debugnet(4) support

Allow net80211 drivers to register a small vtable of debugnet-related
methods.

This is not a functional change.  Driver support is needed, similar to
debugnet(4) for wired NICs.

Reviewed by: adrian, markj (earlier version both)
Differential Revision: https://reviews.freebsd.org/D17308

4 years agoAllow <sys/elf_common.h> to be used in assembly.
jhb [Fri, 12 Jun 2020 23:43:44 +0000 (23:43 +0000)]
Allow <sys/elf_common.h> to be used in assembly.

Hide C-only declarations under #ifndef LOCORE.  This will be used by
future changes to define ELF notes in assembly.

Reviewed by: kib
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25211

4 years agoAllow <sys/param.h> to be included from userland assembly files.
jhb [Fri, 12 Jun 2020 23:42:36 +0000 (23:42 +0000)]
Allow <sys/param.h> to be included from userland assembly files.

This will be used by future changes to define ELF notes in assembly.

Reviewed by: kib
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25211

4 years agoVarious optimizations to software AES-CCM and AES-GCM.
jhb [Fri, 12 Jun 2020 23:10:30 +0000 (23:10 +0000)]
Various optimizations to software AES-CCM and AES-GCM.

- Make use of cursors to avoid data copies for AES-CCM and AES-GCM.

  Pass pointers into the request's input and/or output buffers
  directly to the Update, encrypt, and decrypt hooks rather than
  always copying all data into a temporary block buffer on the stack.

- Move handling for partial final blocks out of the main loop.

  This removes branches from the main loop and permits using
  encrypt/decrypt_last which avoids a memset to clear the rest of the
  block on the stack.

- Shrink the on-stack buffers to assume AES block sizes and CCM/GCM
  tag lengths.

- For AAD data, pass larger chunks to axf->Update.  CCM can take each
  AAD segment in a single call.  GMAC can take multiple blocks at a
  time.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D25058

4 years agoFix a regression in r361804 for TLS 1.3.
jhb [Fri, 12 Jun 2020 22:27:26 +0000 (22:27 +0000)]
Fix a regression in r361804 for TLS 1.3.

I was not including the record type stored in the first byte of the
trailer as part of the payload to be encrypted and hashed.

Sponsored by: Netflix

4 years agoControl for Special Register Buffer Data Sampling mitigation.
kib [Fri, 12 Jun 2020 22:14:45 +0000 (22:14 +0000)]
Control for Special Register Buffer Data Sampling mitigation.

New microcode update for Intel enables mitigation for SRBDS, which
slows down RDSEED and related instructions.  The update also provides
a control to limit the mitigation to SGX enclaves, which should
restore the speed of random generator by the cost of potential
cross-core bufer sampling.

See https://software.intel.com/security-software-guidance/insights/deep-dive-special-register-buffer-data-sampling

GIve the user control over it.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25221

4 years agox86: add bits definitions for SRBDS mitigation control.
kib [Fri, 12 Jun 2020 22:12:57 +0000 (22:12 +0000)]
x86: add bits definitions for SRBDS mitigation control.

See https://software.intel.com/security-software-guidance/insights/deep-dive-special-register-buffer-data-sampling

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25221

4 years agortld: set osrel when in the direct exec mode.
kib [Fri, 12 Jun 2020 22:10:03 +0000 (22:10 +0000)]
rtld: set osrel when in the direct exec mode.

Rtld itself is a shared object which does not have vendor note, so
after the direct exec of ld-elf.so.1 process has p_osrel set to zero.
This affects the ABI of syscalls.

Set osrel to the __FreeBSD_version value at compile time right after
rtld identified direct exec mode.  Then, switch to the osrel read from
the binary note or zero if no note, right before starting calling
ifunc resolvers, which is the first byte of the user code.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 years agoverify_pcr_export: bump kenv_mvallen if needed
sjg [Fri, 12 Jun 2020 21:55:30 +0000 (21:55 +0000)]
verify_pcr_export: bump kenv_mvallen if needed

The loader.ve.hashed list can easily exceed KENV_MVALLEN.
If so, bump kenv_mvallen to a multiple of KENV_MVALLEN to
accommodate the value.

Reviewed by: stevek
MFC after: 1 week

4 years agoHonor db_pager_quit in some vm_object ddb commands
vangyzen [Fri, 12 Jun 2020 21:53:08 +0000 (21:53 +0000)]
Honor db_pager_quit in some vm_object ddb commands

These can be rather verbose.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

4 years agomac_veriexec_fingerprint_check_vnode: v_writecount > 0 means active writers
sjg [Fri, 12 Jun 2020 21:51:20 +0000 (21:51 +0000)]
mac_veriexec_fingerprint_check_vnode: v_writecount > 0 means active writers

v_writecount can actually be < 0 for text,
so check for v_writecount > 0

Reviewed by: stevek
MFC after: 1 week

4 years agoMinor cleanup of initialized variables
sjg [Fri, 12 Jun 2020 21:48:46 +0000 (21:48 +0000)]
Minor cleanup of initialized variables

Sort the list and cleanup trailing white-space

Reviewed by: stevek
MFC after: 1 week

4 years agoFix AES-CCM requests with an AAD size smaller than a single block.
jhb [Fri, 12 Jun 2020 21:33:02 +0000 (21:33 +0000)]
Fix AES-CCM requests with an AAD size smaller than a single block.

The amount to copy for the first block is the minimum of the size of
the AAD region or the remaining space in the first block.

Reported by: cryptocheck -z
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D25140

4 years agoVarious fixes to TLS for MIPS.
jhb [Fri, 12 Jun 2020 21:21:18 +0000 (21:21 +0000)]
Various fixes to TLS for MIPS.

- Clear the current thread's TLS pointer on exec. Previously the TLS
  pointer (and register) remain unchanged.

- Explicitly clear the TLS pointer when new threads are created.

- Make md_tls_tcb_offset per-process instead of per-thread.

  The layout of the TLS and TCB are identical for all threads in a
  process, it is only the TLS pointer values themselves that vary by
  thread.  This also makes setting md_tls_tcb_offset in
  cpu_set_user_tls() redundant with the setting in exec_setregs(), so
  only set it in exec_setregs().

Submitted by: Alfredo Mazzinghi (1)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24957

4 years agoFPU init: allocate initial state from UMA to ensure alignment
vangyzen [Fri, 12 Jun 2020 21:17:56 +0000 (21:17 +0000)]
FPU init: allocate initial state from UMA to ensure alignment

The Intel Instruction Set Reference says this about the XSAVE instruction:

    Use of a destination operand not aligned to 64-byte boundary
    (in either 64-bit or 32-bit modes) results in a general-protection
    (#GP) exception.

This alignment happens naturally when all malloc buckets are powers
of two.  However, this change is necessary on some systems when
certain non-power-of-two (and non-multiple of 64) malloc buckets
are defined.

Reviewed by: cem; kib; earlier version by jhb
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D25098

4 years agoFPU: make xsave_area_desc static
vangyzen [Fri, 12 Jun 2020 21:12:26 +0000 (21:12 +0000)]
FPU: make xsave_area_desc static

...because it can be.

Reviewed by: cem kib
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D25098

4 years agoFPU init: Do potentially blocking operations before disabling interrupts
vangyzen [Fri, 12 Jun 2020 21:10:45 +0000 (21:10 +0000)]
FPU init: Do potentially blocking operations before disabling interrupts

In particular, uma_zcreate creates sysctl oids, which locks an sx lock,
which uses IPIs under contention.  IPIs tend not to work very well
when interrupts are disabled.  Who knew, right?

Reviewed by: cem kib
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D25098

4 years agoSo it turns out with the right window scaling you can get the code in all stacks to
rrs [Fri, 12 Jun 2020 19:56:19 +0000 (19:56 +0000)]
So it turns out with the right window scaling you can get the code in all stacks to
always want to do a window update, even when no data can be sent. Now in
cases where you are not pacing thats probably ok, you just send an extra
window update or two. However with bbr (and rack if its paced) every time
the pacer goes off its going to send a "window update".

Also in testing bbr I have found that if we are not responding to
data right away we end up staying in startup but incorrectly holding
a pacing gain of 192 (a loss). This is because the idle window code
does not restict itself to only work with PROBE_BW. In all other
states you dont want it doing a PROBE_BW state change.

Sponsored by: Netflix Inc.
Differential Revision:  https://reviews.freebsd.org/D25247

4 years agox86: Bump default msi/msix vector limit to 2048
gallatin [Fri, 12 Jun 2020 18:41:12 +0000 (18:41 +0000)]
x86: Bump default msi/msix vector limit to 2048

Given that 64c/128t CPUs are currently available, and that many
devices (nvme, many NICs) desire to map 1 MSI-X vector per core,
or even 1 per-thread, it is becoming far easier to see MSI-X interrupt
setup fail due to msi vector exhaustion, and devices fail to attach at
boot on large system.

This bump costs 12KB on amd64 (and 6KB on i386), which seems
worth the trade off for a better out of the box experience on
high end hardware.

Reviewed by: jhb
MFC after: 21 days
Sponsored by: Netflix

4 years agoposix_spawn: fix for some custom allocator setups
kevans [Fri, 12 Jun 2020 18:13:32 +0000 (18:13 +0000)]
posix_spawn: fix for some custom allocator setups

libc cannot assume that aligned_alloc and free come from jemalloc, or that
any application providing its own malloc and free is actually providing
aligned_alloc.

Switch back to malloc and just make sure we're passing a properly aligned
stack into rfork_thread, as an application perhaps can't reasonably replace
just malloc or just free without headaches.

This unbreaks ksh93 after r361996, which provides malloc/free but no
aligned_alloc.

Reported by: freqlabs
Diagnosed by: Andrew Gierth <andrew_tao173.riddles.org.uk>
X-MFC-With: r361996

4 years agoRevert r362108, as it breaks compilation.
dougm [Fri, 12 Jun 2020 17:48:12 +0000 (17:48 +0000)]
Revert r362108, as it breaks compilation.

4 years agoCoresight replicator:
br [Fri, 12 Jun 2020 17:31:38 +0000 (17:31 +0000)]
Coresight replicator:
o Add a header file;
o Split-out FDT attachment to a separate file;
o Add ACPI attachment.

Sponsored by: DARPA, AFRL

4 years agoThe linuxkpi code accesses left/right rb tree pointers without using
dougm [Fri, 12 Jun 2020 16:51:55 +0000 (16:51 +0000)]
The linuxkpi code accesses left/right rb tree pointers without using
RB_LEFT or RB_RIGHT, so they aren't stripping off the color bit
encoded there. Strip off that bit for linuxkpi.

Reported by: dch
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D25245

4 years agoWhitespace change due to upstream cleanup.
tuexen [Fri, 12 Jun 2020 16:40:10 +0000 (16:40 +0000)]
Whitespace change due to upstream cleanup.

MFC after: 1 week

4 years agoMore cleanups due to ifdef cleanup done upstream
tuexen [Fri, 12 Jun 2020 16:31:13 +0000 (16:31 +0000)]
More cleanups due to ifdef cleanup done upstream

MFC after: 1 week

4 years agoAdd compat.linux.debug sysctl, to make it possible to silence down
trasz [Fri, 12 Jun 2020 14:37:50 +0000 (14:37 +0000)]
Add compat.linux.debug sysctl, to make it possible to silence down
the debug messages. While here, clean up some variable naming.

Reviewed by: bcr (manpages), emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25230

4 years agoFix naming clash.
trasz [Fri, 12 Jun 2020 14:31:19 +0000 (14:31 +0000)]
Fix naming clash.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

4 years agoMake linux(4) warn about unsupported fcntls.
trasz [Fri, 12 Jun 2020 14:25:32 +0000 (14:25 +0000)]
Make linux(4) warn about unsupported fcntls.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25231

4 years agoMinor code cleanup; no functional changes.
trasz [Fri, 12 Jun 2020 14:23:10 +0000 (14:23 +0000)]
Minor code cleanup; no functional changes.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25232

4 years agoFix config_intrhook leak on initial reset failure.
mav [Fri, 12 Jun 2020 14:14:01 +0000 (14:14 +0000)]
Fix config_intrhook leak on initial reset failure.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

4 years agoARM Coresight Trace Memory Controller (TMC):
br [Fri, 12 Jun 2020 13:59:58 +0000 (13:59 +0000)]
ARM Coresight Trace Memory Controller (TMC):
o Split-out FDT attachment to a separate file;
o Add ACPI attachment.

Sponsored by: DARPA, AFRL

4 years agoMFV r362082:
cy [Fri, 12 Jun 2020 13:02:44 +0000 (13:02 +0000)]
MFV r362082:

Update sqlite3 3.31.1 --> 3.32.0.

PR: 247149
Reported by: spam123@bitbert.com
Reminded by: emaste
MFC after: 3 days
Security: CVE-2020-11655, CVE-2020-13434, CVE-2020-13435,
CVE-2020-13630, CVE-2020-13631, CVE-2020-13632

4 years agoTeach the arm64 vfp.h about struct thread.
andrew [Fri, 12 Jun 2020 10:43:21 +0000 (10:43 +0000)]
Teach the arm64 vfp.h about struct thread.

Ensure struct thread is defined in vfp.h. In some cases it is not and stops
the kernel from building.

Sponsored by: Innovate UK

4 years agoSmall cleanup due to upstream ifdef cleanups.
tuexen [Fri, 12 Jun 2020 10:13:23 +0000 (10:13 +0000)]
Small cleanup due to upstream ifdef cleanups.

MFC after: 1 week

4 years agoAdd myself (gbe) to committers-doc.dot and calendar.freebsd
gbe [Fri, 12 Jun 2020 09:34:10 +0000 (09:34 +0000)]
Add myself (gbe) to committers-doc.dot and calendar.freebsd

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D25241

4 years ago[wlanstats] Add the per-node amsdu hardware decap'ed receive stats.
adrian [Fri, 12 Jun 2020 06:10:27 +0000 (06:10 +0000)]
[wlanstats] Add the per-node amsdu hardware decap'ed receive stats.

This is useful for tracking hardware provided AMSDU frames to see
when we're (a) seeing them, and (b) seeing the split between
intermediary and final frames.

Tested:

* QCA9880 (athp) - AP mode

4 years ago[net80211] First part of A-MSDU offload handling - don't bump A-MPDU reordering seqno
adrian [Fri, 12 Jun 2020 04:19:03 +0000 (04:19 +0000)]
[net80211] First part of A-MSDU offload handling - don't bump A-MPDU reordering seqno

When doing A-MSDU offload handling the driver is required to mark
A-MSDUs from the same MPDU with the same sequence number.
It then tags them as AMSDU (if it's a decap'ed A-MSDU) and AMSDU_MORE
(saying there's more AMSDUs decapped in the same MSDU.)
This allows encryption and sequence number offload to work right.

In the A-MSDU path the sequence number check looks at the A-MSDU flags
in the frame to see whether it's part of the same seqno and will pass them
(ie, not increment rx_seq until the last A-MSDU is seen from the driver,
or a new seqno shows up.0

However, I did this work in the A-MSDU path but not the A-MSDU in A-MPDU path.
For the non A-MDSU offload case the A-MPDU receive reordering will do its
thing and then pass up the MPDU up for decap - which then will see it's
an A-MSDU and decap each sub-frame.  But this isn't done for offloaded
A-MSDU frames.

This requires two parts:

* Don't bump the RX sequence number, same as above; and
* If frames go into the reordering buffer, they need to be added into the slot
  as a set of frames rather than a single frame, so once a new seqno shows up
  this slot can be marked as "full" and we can move on.

This patch does the first.  The latter requires that I find and commit
work to change rxa_m from an mbuf to an mbufq and the nhandle A-MSDU
there.  But, the first is enough to allow the normal case (ie, no or not
a lot of A-MPDU RX reordering) to work.

This allows the athp driver (QCA9880) throughput to go from VERY low
(like 5mbit TCP, 1/3-1/4 expected UDP throughput) to ~ 250mbit TCP
and > 300mbit UDP on a VHT/40 channel.  TCP sucks because, well, it
shows up as MASSIVE packet loss when all but one frame in a decap'ed
A-MSDU stream is dropped. Le whoops.

Now, where'd I put that laptop with the patch for rxa_m mbufq that
I wrote like in 2017...

Tested:

* AR9380, STA/AP mode (a big no-op, no A-MSDU hardware decap);
* if_run (RT3593), STA DWDS mode (A-MPDU / A-MSDU receive, but again
  no A-MSDU hardware decap);
* QCA9880, STA/AP mode (which is doing hardware A-MPDU/A-MSDU decap,
  but no A-MPDU reordering in the firmware.)

4 years agoDecode the "LACP Fast Timeout" LAGG option flag
rpokala [Thu, 11 Jun 2020 22:46:08 +0000 (22:46 +0000)]
Decode the "LACP Fast Timeout" LAGG option flag

r286700 added the "lacp_fast_timeout" option to `ifconfig', but we forgot to
include the new option in the string used to decode the option bits. Add
"LACP_FAST_TIMO" to LAGG_OPT_BITS.

Also, s/LAGG_OPT_LACP_TIMEOUT/LAGG_OPT_LACP_FAST_TIMO/g , to be clearer that
the flag indicates "Fast Timeout" mode.

Reported by: Greg Foster <gfoster at panasas dot com>
Reviewed by: jpaetzel
MFC after: 1 week
Sponsored by: Panasas
Differential Revision: https://reviews.freebsd.org/D25239

4 years agoShorten the filename of the coresight replicator driver.
br [Thu, 11 Jun 2020 21:52:06 +0000 (21:52 +0000)]
Shorten the filename of the coresight replicator driver.

Sponsored by: DARPA, AFRL

4 years agonetmap: introduce netmap_kring_on()
vmaffione [Thu, 11 Jun 2020 20:35:28 +0000 (20:35 +0000)]
netmap: introduce netmap_kring_on()

This function returns NULL if the ring identified by
queue id and direction is in netmap mode. Otherwise
return the corresponding kring.
Use this function to replace vtnet_netmap_queue_on().

MFC after: 1 week

4 years agoCorrect comment (this should have been committed with r362065).
kib [Thu, 11 Jun 2020 20:26:39 +0000 (20:26 +0000)]
Correct comment (this should have been committed with r362065).

Sponsored by: The FreeBSD Foundation
MFC after: 13 days

4 years agoSkip sys.net.if_lagg_test.lacp_linkstate_destroy_stress in CI because of panic
lwhsu [Thu, 11 Jun 2020 18:59:57 +0000 (18:59 +0000)]
Skip sys.net.if_lagg_test.lacp_linkstate_destroy_stress in CI because of panic

PR: 244168
Sponsored by: The FreeBSD Foundation

4 years agoRemove some more duplicate test cases I accidentally committed
0mp [Thu, 11 Jun 2020 18:14:34 +0000 (18:14 +0000)]
Remove some more duplicate test cases I accidentally committed

Reported by: markj, yuripv
MFC after: 2 weeks
X-MFC-With: 362017

4 years agoRestore TLB invalidations done before smp started.
kib [Thu, 11 Jun 2020 17:25:20 +0000 (17:25 +0000)]
Restore TLB invalidations done before smp started.

In particular, invalidation of the preloaded modules text to allow
execution from it was broken after D25188/r362031.

Reviewed by: markj
Reported by: delphij, dhw
Sponsored by: The FreeBSD Foundation
MFC after: 13 days

4 years agoem(4): Always reinit interface when adding/removing VLAN
erj [Thu, 11 Jun 2020 15:59:49 +0000 (15:59 +0000)]
em(4): Always reinit interface when adding/removing VLAN

This partially reverts r361053 since there have been reports
by users that this breaks some functionality for em(4)
devices; it seems at first glance that some sort of interface
restart is required for those cards.

This isn't a proper fix; this unbreaks those users until a proper
fix is found for their issues.

PR: 240818
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 3 days

4 years agoxargs(1): Add EXAMPLES to man page
fernape [Thu, 11 Jun 2020 15:14:39 +0000 (15:14 +0000)]
xargs(1): Add EXAMPLES to man page

Add EXAMPLES covering options I, J, L, n, P.

While here, fix warning (STYLE: no blank before trailing delimiter: Fl P,)
Bumping .Dd

Approved by: bcr@
Differential Revision: https://reviews.freebsd.org/D25214

4 years agoDon't use newlines with linux_msg(). No functional changes.
trasz [Thu, 11 Jun 2020 14:57:30 +0000 (14:57 +0000)]
Don't use newlines with linux_msg().  No functional changes.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

4 years agoAdd missing range checks when receiving USB ethernet packets.
hselasky [Thu, 11 Jun 2020 14:31:51 +0000 (14:31 +0000)]
Add missing range checks when receiving USB ethernet packets.

Found by: Ilja Van Sprundel, IOActive
MFC after: 3 days
Sponsored by: Mellanox Technologies

4 years agoReplace LINUX_FASYNC with LINUX_O_ASYNC; no functional changes.
trasz [Thu, 11 Jun 2020 14:09:43 +0000 (14:09 +0000)]
Replace LINUX_FASYNC with LINUX_O_ASYNC; no functional changes.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25218

4 years agoNon-functional changes due to upstream cleanup.
tuexen [Thu, 11 Jun 2020 13:34:09 +0000 (13:34 +0000)]
Non-functional changes due to upstream cleanup.

MFC after: 1 week

4 years agoFix grabbing of tegra uart.
mmel [Thu, 11 Jun 2020 12:53:22 +0000 (12:53 +0000)]
Fix grabbing of tegra uart.
An attempt to write to FCR register may corrupt transmit FIFO,
so we should wait for the FIFO to be empty before we can modify it.

MFC after: 1 week

4 years agoImprove the warnings.
trasz [Thu, 11 Jun 2020 12:35:00 +0000 (12:35 +0000)]
Improve the warnings.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

4 years agoMake linux(4) handle SO_REUSEPORT.
trasz [Thu, 11 Jun 2020 12:25:49 +0000 (12:25 +0000)]
Make linux(4) handle SO_REUSEPORT.

Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25216

4 years agofix up r362047: a call to zvol_*_minors() was not hidden from userland
avg [Thu, 11 Jun 2020 11:35:30 +0000 (11:35 +0000)]
fix up r362047: a call to zvol_*_minors() was not hidden from userland

Reported by: CI/FreeBSD-head-powerpc64-build
MFC after: 5 weeks
X-MFC with: r362047

4 years agorework how ZVOLs are updated in response to DSL operations
avg [Thu, 11 Jun 2020 10:41:31 +0000 (10:41 +0000)]
rework how ZVOLs are updated in response to DSL operations

With this change all ZVOL updates are initiated from the SPA sync
context instead of a mix of the sync and open contexts.  The updates are
queued to be applied by a dedicated thread in the original order.  This
should ensure that ZVOLs always accurately reflect the corresponding
datasets.  ZFS ioctl operations wait on the mentioned thread to complete
its work.  Thus, the illusion of the synchronous ZVOL update is
preserved.  At the same time, the SPA sync thread never blocks on ZVOL
related operations avoiding problems like reported in bug 203864.

This change is based on earlier work in the same direction: D7179 and
D14669 by Anthoine Bourgeois.  D7179 tried to perform ZVOL operations
in the open context and that opened races between them.  D14669 uses a
design very similar to this change but with different implementation
details.

This change also heavily borrows from similar code in ZoL, but there are
many differences too.  See:
- https://github.com/zfsonlinux/zfs/commit/a0bd735adb1b1eb81fef10b4db102ee051c4d4ff
- https://github.com/zfsonlinux/zfs/issues/3681
- https://github.com/zfsonlinux/zfs/issues/2217

PR: 203864
MFC after: 5 weeks
Sponsored by: CyberSecure
Differential Revision: https://reviews.freebsd.org/D23478

4 years agoMake sure packets generated by raw IP code is let through by mlx5en(4).
hselasky [Thu, 11 Jun 2020 09:41:54 +0000 (09:41 +0000)]
Make sure packets generated by raw IP code is let through by mlx5en(4).

Allow the TCP header to reside in the mbuf following the IP header.
Else such packets will get dropped.

Backtrace:
mlx5e_sq_xmit()
mlx5e_xmit()
ether_output_frame()
ether_output()
ip_output_send()
ip_output()
rip_output()
sosend_generic()
sosend()
kern_sendit()
sendit()
sys_sendto()
amd64_syscall()
fast_syscall_common()

MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoExtend use of unlikely() in the fast path, in mlx5en(4).
hselasky [Thu, 11 Jun 2020 09:38:51 +0000 (09:38 +0000)]
Extend use of unlikely() in the fast path, in mlx5en(4).

Typically the TCP/IP headers fit within the first mbuf and should not
trigger any of the error cases. Use unlikely() for these cases.

No functional change.

MFC after: 1 week
Sponsored by: Mellanox Technologies