]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agodiff: eliminate space at end of line
Baptiste Daroussin [Wed, 27 Jan 2021 10:46:15 +0000 (11:46 +0100)]
diff: eliminate space at end of line

No functionnal changes

(cherry picked from commit 15abb23286541c17ff95bac056cd4979822c4288)

3 years agodiff: add a test case about the non regular file support
Baptiste Daroussin [Tue, 26 Jan 2021 10:38:36 +0000 (11:38 +0100)]
diff: add a test case about the non regular file support

(cherry picked from commit c440e7870a020546ad241848e2ff8e9cb27a3073)

3 years agocp: fix indentation
Baptiste Daroussin [Tue, 26 Jan 2021 09:52:22 +0000 (10:52 +0100)]
cp: fix indentation

No functional changes

(cherry picked from commit 45b252fc9182b96342b8a598f271e49c20cbfe40)

3 years agopci_vendors: update to 2021-05-04
Baptiste Daroussin [Tue, 4 May 2021 12:02:41 +0000 (14:02 +0200)]
pci_vendors: update to 2021-05-04

(cherry picked from commit 3657010266b235f6394aefbe755dc316bb2535b4)

3 years agopci_vendors: update to 2021.04.26
Baptiste Daroussin [Thu, 29 Apr 2021 04:46:26 +0000 (06:46 +0200)]
pci_vendors: update to 2021.04.26

(cherry picked from commit a4b5f7ba3e9bf8385b6e113c284d1559333048a0)

3 years agopci_vendors: update to 2021.02.20
Baptiste Daroussin [Sun, 21 Feb 2021 05:09:03 +0000 (06:09 +0100)]
pci_vendors: update to 2021.02.20

(cherry picked from commit e6bb49f12ca7a2dc103d69d4c70e1504195f70a6)

3 years agopci_vendors: update to 2021.01.11
Baptiste Daroussin [Thu, 28 Jan 2021 08:19:50 +0000 (09:19 +0100)]
pci_vendors: update to 2021.01.11

(cherry picked from commit f59810e34bae867059163cb9f651e074043fcec8)

3 years agopkg(7): replace usage of sbuf(9) with open_memstream(3)
Baptiste Daroussin [Tue, 27 Apr 2021 02:38:55 +0000 (04:38 +0200)]
pkg(7): replace usage of sbuf(9) with open_memstream(3)

open_memstream(3) is a standard way to obtain the same feature we do get
by using sbuf(9) (aka dynamic size buffer), switching to using it makes
pkg(7) more portable, and reduces its number of dependencies.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D30005

(cherry picked from commit cc9a8a116d19daf224222506441e91a3d329160e)

3 years agopkg(7): indentation fixes
Baptiste Daroussin [Tue, 27 Apr 2021 02:07:05 +0000 (04:07 +0200)]
pkg(7): indentation fixes

Non functional changes

(cherry picked from commit f648d757b76d70d58bbda7c3ed3ff79261d24d0f)

3 years agopkg(7): when bootstrapping first search for pkg.pkg file then pkg.txz
Baptiste Daroussin [Fri, 12 Mar 2021 17:36:30 +0000 (18:36 +0100)]
pkg(7): when bootstrapping first search for pkg.pkg file then pkg.txz

The package extension is going to be changed to .pkg to be among other
things resilient to the change of compression format used and reduce
the impact of all third party tool of that change.

Ensure the bootstrap knows about it

Reviewed by: manu
Differential revision: https://reviews.freebsd.org/D29232

(cherry picked from commit a2aac2f5e5642740507a3cadb98046f3dd434ce4)
(cherry picked from commit c244b1d8a38731041d0f3ff4191192a85dd8608b)

3 years agopw(8): use open_memstream(3) instead of sbuf(9)
Baptiste Daroussin [Tue, 27 Apr 2021 03:05:13 +0000 (05:05 +0200)]
pw(8): use open_memstream(3) instead of sbuf(9)

open_memstream(3) is a standard function that brings here the same
functionnality what we were doing with sbuf(9).

(cherry picked from commit 0cd4b781a6fa1ed4ca04a7b642f41652e25bbc9b)

3 years agolibedit: vendor import libedit 2021-03-28
Baptiste Daroussin [Mon, 22 Mar 2021 14:34:14 +0000 (15:34 +0100)]
libedit: vendor import libedit 2021-03-28

(cherry picked from commit f9a159da2a292968cd5c37b56a6c43b6af8c5eed)
(cherry picked from commit 19318a62d7f8cfe2f0f5c24178fa33e8844ae5d1)

3 years agolibucl: vendor import snapshort 20210314
Baptiste Daroussin [Mon, 22 Mar 2021 14:13:02 +0000 (15:13 +0100)]
libucl: vendor import snapshort 20210314

(cherry picked from commit a0409676120c1e558d0ade943019934e0f15118d)

3 years agoMake pkg(7) use environment variables specified in pkg.conf
Moritz Schmitt [Tue, 27 Apr 2021 01:59:12 +0000 (03:59 +0200)]
Make pkg(7) use environment variables specified in pkg.conf

Modify /usr/sbin/pkg to use environment variables specified in pkg.conf.
This allows control over underlying libraries like fetch(3), which can
be configured by setting HTTP_PROXY.

Differential Revision: https://reviews.freebsd.org/D29820

(cherry picked from commit e869d3c60147bbb226b5ad97d2ef73391aeebafa)

3 years agosh: improve emacs mode
Baptiste Daroussin [Tue, 30 Mar 2021 09:37:29 +0000 (11:37 +0200)]
sh: improve emacs mode

In emacs mode, force ^R to backware search the history
This behaviour is the default in emacs mode for most of the other shells

Note: Note that this can still be overridden via $EDITRC, ~/.editrc or a
bind command after set -o emacs.

Approved by: jilles
Reviewed by: jilles, arichardson, pstef
Differential Revision: https://reviews.freebsd.org/D29494

(cherry picked from commit 660045fb5360d328da199ae78c89d5cc15b6d1ca)

3 years agoarcmsr(4): Fix SCSI command timeout on ARC-1886.
Xin LI [Wed, 21 Apr 2021 08:03:54 +0000 (01:03 -0700)]
arcmsr(4): Fix SCSI command timeout on ARC-1886.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

(cherry picked from commit 438b5532070f7c52e88f514380ee8662de1f600b)

3 years agoSet PCIe device's Max_Payload_Size to match PCIe root's.
Alexander Motin [Mon, 5 Apr 2021 14:34:40 +0000 (10:34 -0400)]
Set PCIe device's Max_Payload_Size to match PCIe root's.

Usually on boot the MPS is already configured by BIOS.  But we've
found that on hot-plug it is not true at least for our Supermicro
X11 boards.  As result, mismatch between root's configuration of
256 bytes and device's default of 128 bytes cause problems for some
devices, while others seem to work fine.

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

(cherry picked from commit 5a898b2b78ce04d608bbaaa0813424b11f921ae7)

3 years ago[fib algo] Update fib_gen counter under FIB_MOD_LOCK.
Alexander V. Chernikov [Wed, 28 Apr 2021 20:21:58 +0000 (20:21 +0000)]
[fib algo] Update fib_gen counter under FIB_MOD_LOCK.

MFC after: 3 days

(cherry picked from commit 41ce0e34ea42a4f7113d1ba15d25b9b64d5921b8)

3 years agoFix drace CTF for the rib_head.
Alexander V. Chernikov [Tue, 27 Apr 2021 07:47:53 +0000 (07:47 +0000)]
Fix drace CTF for the rib_head.

33cb3cb2e321 introduced an `rib_head` structure field under the
FIB_ALGO define. This may be problematic for the CTF, as some
 of the files including `route_var.h` do not have `fib_algo`
 defined.

Make dtrace happy by making the field unconditional.

Suggested by: markj

(cherry picked from commit bc5ef45aec3fa8acf2dd3408cebd207317543a8b)

3 years agoAdd rib_walk_from() wrapper for selective rib tree traversal.
Alexander V. Chernikov [Sun, 25 Apr 2021 11:59:40 +0000 (11:59 +0000)]
Add rib_walk_from() wrapper for selective rib tree traversal.

Provide wrapper for the rnh_walktree_from() rib callback.
As currently `struct rib_head` is considered internal to the
 routing subsystem, this wrapper is necessary to maintain isolation
 from the external code.

Differential Revision: https://reviews.freebsd.org/D29971
MFC after: 1 week

(cherry picked from commit f9668e42b44f22c9ab213eb9a4792d5acfcf6903)

3 years ago[fib algo] Delay algo init at fib growth to to allow to reliably use rib KPI.
Alexander V. Chernikov [Sun, 25 Apr 2021 10:22:45 +0000 (10:22 +0000)]
[fib algo] Delay algo init at fib growth to to allow to reliably use rib KPI.

Currently, most of the rib(9) KPI does not use rnh pointers, using
 fibnum and family parameters to determine the rib pointer instead.
This works well except for the case when we initialize new rib pointers
 during fib growth.
In that case, there is no mapping between fib/family and the new rib,
 as an entirely new rib pointer array is populated.

Address this by delaying fib algo initialization till after switching
 to the new pointer array and updating the number of fibs.
Set datapath pointer to the dummy function, so the potential callers
 won't crash the kernel in the brief moment when the rib exists, but
 no fib algo is attached.

This change allows to avoid creating duplicates of existing rib functions,
 with altered signature.

Differential Revision: https://reviews.freebsd.org/D29969
MFC after: 1 week

(cherry picked from commit 8a0d57baecf70aa7f49b0b1468f6264c75d8e6df)

3 years ago[rtsock] Enforce netmask/RTF_HOST consistency.
Alexander V. Chernikov [Fri, 23 Apr 2021 21:53:47 +0000 (21:53 +0000)]
[rtsock] Enforce netmask/RTF_HOST consistency.

Traditionally we had 2 sources of information whether the
 added/delete route request targets network or a host route:
netmask (RTA_NETMASK) and RTF_HOST flag.

The former one is tricky: netmask can be empty or can explicitly
 specify the host netmask. Parsing netmask sockaddr requires per-family
 parsing and that's what rtsock code traditionally avoided. As a result,
 consistency was not enforced and it was possible to specify network with
 the RTF_HOST flag and vice versa.

Continue normalization efforts from D29826 and D29826 and ensure that
 RTF_HOST flag always reflects host/network data from netmask field.

Differential Revision: https://reviews.freebsd.org/D29958
MFC after: 2 days

(cherry picked from commit 5d1403a79a3e56403fb63c062252a23fce81e5f1)

3 years agopf tests: Test using '<ifgroup>:network' in tables
Kristof Provost [Sun, 25 Apr 2021 10:18:48 +0000 (12:18 +0200)]
pf tests: Test using '<ifgroup>:network' in tables

MFC after: 1 week

(cherry picked from commit daa5350d0e0c5fbe42c5a057dd37b9d22df91bb7)

3 years agopfctl: Revert "pfctl: Another set skip <group> fix"
Kristof Provost [Mon, 26 Apr 2021 08:07:07 +0000 (10:07 +0200)]
pfctl: Revert "pfctl: Another set skip <group> fix"

This reverts commit 0c156a3c32cd0d9168570da5686ddc96abcbbc5a.
This fix broke using '<ifgroup>:network' in tables.

MFC after: 1 week

(cherry picked from commit d5b08e13dd6beb3436e181ff1f3e034cc8186584)

3 years agonfscommon: fix function name in comment
Rick Macklem [Tue, 20 Apr 2021 03:09:46 +0000 (20:09 -0700)]
nfscommon: fix function name in comment

(cherry picked from commit 78ffcb86d98fc9c27ac7a723c65621667036c42d)

3 years agonfsd: fix stripe size reply for the File Layout pNFS server
Rick Macklem [Tue, 20 Apr 2021 00:51:07 +0000 (17:51 -0700)]
nfsd: fix stripe size reply for the File Layout pNFS server

At a recent testing event I found out that I had misinterpreted
RFC5661 where it describes the stripe size in the File Layout's
nfl_util field. This patch fixes the pNFS File Layout server
so that it returns the correct value to the NFSv4.1/4.2 pNFS
enabled client.

This affects almost no one, since pNFS server configurations
are rare and the extant pNFS aware NFS clients seemed to
function correctly despite the erroneous stripe size.
It *might* be needed for correct behaviour if a recent
Linux client mounts a FreeBSD pNFS server configuration
that is using File Layout (non-mirrored configuration).

(cherry picked from commit 5a89498d19863d0c4cb074f9b93862a70040bf1b)

3 years agogpioc_detach: fix freeing of wrong pointers
Andriy Gapon [Tue, 23 Mar 2021 10:45:18 +0000 (12:45 +0200)]
gpioc_detach: fix freeing of wrong pointers

MFC after: 1 week

(cherry picked from commit 3c6b59567f61277ed487320aa9ad130c6894ad7a)

3 years agoimgact_elf: Ensure that the return value in parse_notes is initialized
Mark Johnston [Mon, 26 Apr 2021 18:53:16 +0000 (14:53 -0400)]
imgact_elf: Ensure that the return value in parse_notes is initialized

parse_notes relies on the caller-supplied callback to initialize "res".
Two callbacks are used in practice, brandnote_cb and note_fctl_cb, and
the latter fails to initialize res.  Fix it.

In the worst case, the bug would cause the inner loop of check_note to
examine more program headers than necessary, and the note header usually
comes last anyway.

Reviewed by: kib
Reported by: KMSAN
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29986

(cherry picked from commit 409ab7e109c692014e3484a74af248dd7a4746e8)

3 years agogeom_uzip(4): fix a typo
Ceri Davies [Wed, 28 Apr 2021 04:55:32 +0000 (00:55 -0400)]
geom_uzip(4): fix a typo

While I was there, also fixed a whitespace issue reported by mandoc
-Tlint.

PR: 254338

(cherry picked from commit f33f2365eeefa38730e365bf6813cd0b90c9e9bc)

3 years agoarp(8): fixing the deletion failure of IEEE1394 associated addresses
Tai-hwa Liang [Mon, 12 Apr 2021 06:27:03 +0000 (06:27 +0000)]
arp(8): fixing the deletion failure of IEEE1394 associated addresses

Without this, 'arp -d ${IEEE1394_ADDRESS}' gives the following error:

arp: delete: cannot locate 10.0.0.71

Reviewed by: glebius
MFC after: 2 weeks

(cherry picked from commit a0d6d0d0b9aba6d4c025b2f2807e7c4b4c4b2415)

3 years agoif_firewire: fixing panic upon packet reception for VNET build
Tai-hwa Liang [Sat, 10 Apr 2021 15:32:27 +0000 (15:32 +0000)]
if_firewire: fixing panic upon packet reception for VNET build

netisr_dispatch_src() needs valid VNET pointer or firewire_input() will panic
when receiving a packet.

Reviewed by: glebius
MFC after: 2 weeks

(cherry picked from commit d9b61e7153c64b141436b4d9619b166c6d35a0a6)

3 years agoe1000: Fix register name in reg_dump sysctl
Kevin Bowling [Mon, 26 Apr 2021 16:30:54 +0000 (09:30 -0700)]
e1000: Fix register name in reg_dump sysctl

The correct name of this register is CTRL_EXT.

Approved by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29967

(cherry picked from commit ba7b31b3e967a57c0269330d4e5aacf541d1b479)

3 years agoe1000: Add support for [Tiger, Alder, Meteor] Lake
Kevin Bowling [Mon, 19 Apr 2021 02:11:27 +0000 (19:11 -0700)]
e1000: Add support for [Tiger, Alder, Meteor] Lake

Add support for current and future client platform PCI IDs. These are
all I219 variants and have no known driver changes versus previous
generation client platform I219 variants.

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D29801

(cherry picked from commit 59690eab572dde1176886bff7ed0c506df974e5e)

3 years agoamd64: disable LA57 by default for now
Konstantin Belousov [Wed, 28 Apr 2021 15:50:16 +0000 (18:50 +0300)]
amd64: disable LA57 by default for now

(cherry picked from commit 72a42ec63b4a98f812f5f6164415eeb9a55e1933)

3 years agoO_PATH: disable kqfilter for fifos
Konstantin Belousov [Wed, 28 Apr 2021 15:45:36 +0000 (18:45 +0300)]
O_PATH: disable kqfilter for fifos

(cherry picked from commit 2082565798041ceb9fb77137f00ea6b0ff50fe5e)

3 years agoconnectat(2): clarify that the s argument is socket
Konstantin Belousov [Wed, 28 Apr 2021 15:47:31 +0000 (18:47 +0300)]
connectat(2): clarify that the s argument is socket

(cherry picked from commit 07f229d20c0cd6285c5ddf1df45eb69bbea4445b)

3 years agotcp: stop spurious rescue retransmissions and potential asserts
Richard Scheffenegger [Wed, 28 Apr 2021 12:56:14 +0000 (14:56 +0200)]
tcp: stop spurious rescue retransmissions and potential asserts

Reported by: pho@
MFC after: 3 days
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29970

(cherry picked from commit 48be5b976e34022862da3be69350d60e969d39e5)

3 years agoparam.h: bump __FreeBSD_version for commits efe7f12cd37b and 9781105bea58
Neel Chauhan [Sat, 1 May 2021 00:56:57 +0000 (17:56 -0700)]
param.h: bump __FreeBSD_version for commits efe7f12cd37b and 9781105bea58

Both commits update the linuxkpi to accommodate the drm-kmod 5.5 update.

3 years agolinuxkpi: Introduce tasklet_disable_nosync()
Neel Chauhan [Wed, 28 Apr 2021 15:05:57 +0000 (08:05 -0700)]
linuxkpi: Introduce tasklet_disable_nosync()

This is needed for the drm-kmod 5.5 update.

Reviewed by: hselasky (src)
Differential Revision: https://reviews.freebsd.org/D30024

(cherry picked from commit 9781105bea58b8bce53ba766850c5f023b34c43c)

3 years agolinuxkpi: Implement rcu_replace_pointer() macro
Neel Chauhan [Wed, 28 Apr 2021 15:04:52 +0000 (08:04 -0700)]
linuxkpi: Implement rcu_replace_pointer() macro

This is needed for the drm-kmod 5.5 update.

Reviewed by: hselasky (src)
Differential Revision: https://reviews.freebsd.org/D30025

(cherry picked from commit efe7f12cd37bf8f2538df387d565e7849112a598)

3 years agohkbd: Fix typo which disables keyboard input in kdb
Vladimir Kondratyev [Sat, 24 Apr 2021 18:49:27 +0000 (21:49 +0300)]
hkbd: Fix typo which disables keyboard input in kdb

Reported by: Greg V

3 years agong_ubt: Block attachment of uninitialized Intel Wireless 7265
Vladimir Kondratyev [Thu, 15 Apr 2021 14:26:32 +0000 (17:26 +0300)]
ng_ubt: Block attachment of uninitialized Intel Wireless 7265

As this controller requires firmware patch downloading to operate.
"Intel Wireless 7265" support in iwmbtfw(8) is yet to be done.

Tested by: arrowd et al
PR: 228787

3 years agong_ubt: Use DEFINE_CLASS_1 macro for kobj inheritance.
Vladimir Kondratyev [Thu, 15 Apr 2021 14:25:50 +0000 (17:25 +0300)]
ng_ubt: Use DEFINE_CLASS_1 macro for kobj inheritance.

3 years agong_ubt: Do not clear stall before receiving of HCI command response.
Vladimir Kondratyev [Thu, 15 Apr 2021 14:25:00 +0000 (17:25 +0300)]
ng_ubt: Do not clear stall before receiving of HCI command response.

Unconditional execution of "clear feature" request at SETUP stage was
workaround for probe failures on ng_ubt.ko re-kldloading which is
unnecessary now.

Reviewed by: hselasky
Differential revision: https://reviews.freebsd.org/D29775

3 years agohidmap: add missing opt_hid.h to module Makefile
Vladimir Kondratyev [Wed, 14 Apr 2021 19:55:52 +0000 (22:55 +0300)]
hidmap: add missing opt_hid.h to module Makefile

Reported by: pstef

3 years agoichsmb: Add PCI ID for Intel Gemini Lake SMBus controller
Vladimir Kondratyev [Tue, 13 Apr 2021 22:10:13 +0000 (01:10 +0300)]
ichsmb: Add PCI ID for Intel Gemini Lake SMBus controller

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

3 years agopchtherm: Add IDs for CannonLake-H, CometLake and Lewisburg controllers
Vladimir Kondratyev [Wed, 14 Apr 2021 10:03:18 +0000 (13:03 +0300)]
pchtherm: Add IDs for CannonLake-H, CometLake and Lewisburg controllers

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

3 years agoUPDATING: dereference portupgrade(8)
Glen Barber [Fri, 9 Apr 2021 00:26:41 +0000 (20:26 -0400)]
UPDATING: dereference portupgrade(8)

Make the UPDATING file less tool-specific regarding upgrading
third-party software.

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 6dadf78f115cbdcb17dff8974a2044dd5129f7dc)

3 years agodtrace tests: Fix tst.system.d after ping/ping6 unification
Mark Johnston [Fri, 23 Apr 2021 14:28:09 +0000 (10:28 -0400)]
dtrace tests: Fix tst.system.d after ping/ping6 unification

Sponsored by: The FreeBSD Foundation

(cherry picked from commit d500a85e640d1cd270747c12e17c511b53864436)

3 years agoAdd an UPDATING entry for commit 5a45802b3c8c
Rick Macklem [Fri, 30 Apr 2021 01:40:04 +0000 (18:40 -0700)]
Add an UPDATING entry for commit 5a45802b3c8c

3 years agoparam.h: bump __FreeBSD_version for commit 5a45802b3c8c
Rick Macklem [Fri, 30 Apr 2021 01:29:25 +0000 (18:29 -0700)]
param.h: bump __FreeBSD_version for commit 5a45802b3c8c

Commit 5a45802b3c8c changed the internal KAPI between the krpc
and NFS.  As such, the krpc, nfscommon and nfscl modules must
all be rebuilt from sources.

3 years agonfsv4 client: do the BindConnectionToSession as required
Rick Macklem [Sun, 11 Apr 2021 21:34:57 +0000 (14:34 -0700)]
nfsv4 client: do the BindConnectionToSession as required

During a recent testing event, it was reported that the NFSv4.1/4.2
server erroneously bound the back channel to a new TCP connection.
RFC5661 specifies that the fore channel is implicitly bound to a
new TCP connection when an RPC with Sequence (almost any of them)
is done on it.  For the back channel to be bound to the new TCP
connection, an explicit BindConnectionToSession must be done as
the first RPC on the new connection.

Since new TCP connections are created by the "reconnect" layer
(sys/rpc/clnt_rc.c) of the krpc, this patch adds an optional
upcall done by the krpc whenever a new connection is created.
The patch also adds the specific upcall function that does a
BindConnectionToSession and configures the krpc to call it
when required.

This is necessary for correct interoperability with NFSv4.1/NFSv4.2
servers when the nfscbd daemon is running.

If doing NFSv4.1/NFSv4.2 mounts without this patch, it is
recommended that the nfscbd daemon not be running and that
the "pnfs" mount option not be specified.

PR: 254840

(cherry picked from commit 7763814fc9c27a98fefcbf582d7a936ea43af23a)

3 years agopass UNAME_r to fix building 14.x ports on 13.x
Glen Barber [Thu, 18 Feb 2021 23:52:39 +0000 (18:52 -0500)]
pass UNAME_r to fix building 14.x ports on 13.x

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 80ab50e1de19ca125f05a13937c796d48c4edd4a)

3 years agorelease: fix VMSIZE following 1ca8842f3ad9
Glen Barber [Thu, 4 Mar 2021 13:39:43 +0000 (08:39 -0500)]
release: fix VMSIZE following 1ca8842f3ad9

truncate(1) is not case-sensitive with regard to setting the size
of a file.  makefs(8), however, does not honor upper-case values.
Update release-specific files and the release(7) manual page to
reflect this.

Submitted by: ehem_freebsd_m5p.com (original)
Differential Review: https://reviews.freebsd.org/D28979
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fa04db476201c4cad5f6a5f67da8f2ef1e1cdad3)

3 years agorelease: do not set __MAKE_CONF and SRCCONF for the chroot build
Glen Barber [Tue, 16 Mar 2021 16:01:48 +0000 (12:01 -0400)]
release: do not set __MAKE_CONF and SRCCONF for the chroot build

PR: 254319
Submitted by: truckman
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 0af8a2db34cff008d4f48f357da48b7379b18893)

3 years agorelease: sync 'git count' logic with newvers.sh
Glen Barber [Wed, 17 Mar 2021 14:57:32 +0000 (10:57 -0400)]
release: sync 'git count' logic with newvers.sh

Sync determining the git count with newvers.sh by adding the
--first-parent argument.  This ensures uname(1) reflects the
file name for snapshots.

Reported by: Mark Millard
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit e5c6913a8d23ebe49c9e8f95c5236c7a0d8dbac5)

3 years agorelease.sh: Skip installing textproc/docproj when NODOC is set
Glen Barber [Wed, 3 Feb 2021 00:04:11 +0000 (19:04 -0500)]
release.sh: Skip installing textproc/docproj when NODOC is set

PR: 253192
Submitted by: Yasuhiro Kimura
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 805e2876ec20f89e45f0f9f4164f31b6711ff0ea)

3 years agoAdd some regression tests for O_PATH and AT_EMPTY_PATH
Mark Johnston [Thu, 15 Apr 2021 13:40:57 +0000 (09:40 -0400)]
Add some regression tests for O_PATH and AT_EMPTY_PATH

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29719

(cherry picked from commit 3a248c84419d4f7d6617d30744ab56d0b456fe03)

3 years agopmcstat: fix the usage message for -t
Mitchell Horne [Wed, 21 Apr 2021 20:44:52 +0000 (17:44 -0300)]
pmcstat: fix the usage message for -t

A slight mix-up of the flags means this case isn't triggered when it
should be. Now, `pmcstat -s event -t 1234` will print the correct
error message.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c4473add1d3d588d8747cab86796d2f2d4c8847c)

3 years agopmcstat: set initial counter value to zero
Mitchell Horne [Wed, 21 Apr 2021 20:28:12 +0000 (17:28 -0300)]
pmcstat: set initial counter value to zero

For an infrequent event, pmcstat may report (u_long)-1 for CPUs where
the counter was never incremented. Just set this to zero, instead.

ev->ev_count is passed as the 'count' argument to pmc_allocate(3), but
this wasn't always the case.

Reviewed by: gnn
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29887

(cherry picked from commit edcf9e59c356525632dd2546d72916aeca609a2b)

3 years agopmc_allocate(3): document the count argument
Mitchell Horne [Wed, 21 Apr 2021 20:27:49 +0000 (17:27 -0300)]
pmc_allocate(3): document the count argument

This was added in b2ca2e50b9aa, and serves to provide an initial value
to the PMC, eliminating the need for a second syscall via pmc_set(3).

Reviewed by: gnn, 0mp (manpages)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29885

(cherry picked from commit 50f6c139970084adeefec98c658645c34b72209e)

3 years ago[fib algo] always commit static routes synchronously.
Alexander V. Chernikov [Tue, 27 Apr 2021 08:23:29 +0000 (08:23 +0000)]
[fib algo] always commit static routes synchronously.

Modular fib lookup framework features logic that allows
 route update batching for the algorithms that cannot easily
 apply the routing change without rebuilding. As a result,
 dataplane lookups may return old data until the the sync
 takes place. With the default sync timeout of 50ms, it is
 possible that new binary like ping(8) executed exactly after
 route(8) will still use the old fib data.

To address some aspects of the problem, framework executes
 all rtable changes without RTF_GATEWAY synchronously.

To fix the aforementioned problem, this diff extends sync
 execution for all RTF_STATIC routes (e.g. ones maintained by
 route(8).
This fixes a bunch of tests in the networking space.

Reported by: ci, arichardson
MFC after: 2 weeks

(cherry picked from commit 439d087d0b55574db81f4a2799a411c1236d95e3)

3 years agoFix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC
Alexander V. Chernikov [Wed, 21 Apr 2021 04:52:38 +0000 (05:52 +0100)]
Fix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC

Reported by: jbeich
PR: 255390

(cherry picked from commit 7d222ce3c10bdc23c8dc92d6b13e376ede5840d5)

3 years agoFix NOINET[6] build after enabling FIB_ALGO in GENERIC.
Alexander V. Chernikov [Wed, 21 Apr 2021 01:45:49 +0000 (02:45 +0100)]
Fix NOINET[6] build after enabling FIB_ALGO in GENERIC.

Submitted by: jbeich
PR: 255389

(cherry picked from commit 67372fb3e06ebaccfe7c093aa78009d161fa58e6)

3 years agoFix rib generation count for fib algo.
Alexander V. Chernikov [Sat, 17 Apr 2021 18:58:12 +0000 (18:58 +0000)]
Fix rib generation count for fib algo.

Currently, PCB caching mechanism relies on the rib generation
 counter (rnh_gen) to invalidate cached nhops/LLE entries.

With certain fib algorithms, it is now possible that the
 datapath lookup state applies RIB changes with some delay.
In that scenario, PCB cache will invalidate on the RIB change,
 but the new lookup may result in the same nexthop being returned.
When fib algo finally gets in sync with the RIB changes, PCB cache
 will not receive any notification and will end up caching the stale data.

To fix this, introduce additional counter, rnh_gen_rib, which is used
 only when FIB_ALGO is enabled.
This counter is incremented by the control plane. Each time when fib algo
 synchronises with the RIB, it updates rnh_gen to the current rnh_gen_rib value.

Differential Revision: https://reviews.freebsd.org/D29812
Reviewed by: donner
MFC after: 2 weeks

(cherry picked from commit 33cb3cb2e3212705b10e7885b37f70a3c2987c9e)

3 years agoAdd batched update support for the fib algo.
Alexander V. Chernikov [Fri, 9 Apr 2021 21:30:10 +0000 (22:30 +0100)]
Add batched update support for the fib algo.

Initial fib algo implementation was build on a very simple set of
 principles w.r.t updates:

1) algorithm is ether able to apply the change synchronously (DIR24-8)
 or requires full rebuild (bsearch, lradix).
2) framework falls back to rebuild on every error (memory allocation,
 nhg limit, other internal algo errors, etc).

This changes brings the new "intermediate" concept - batched updates.
Algotirhm can indicate that the particular update has to be handled in
 batched fashion (FLM_BATCH).
The framework will write this update and other updates to the temporary
 buffer instead of pushing them to the algo callback.
Depending on the update rate, the framework will batch 50..1024 ms of updates
 and submit them to a different algo callback.

This functionality is handy for the slow-to-rebuild algorithms like DXR.

Differential Revision: https://reviews.freebsd.org/D29588
Reviewed by: zec
MFC after: 2 weeks

(cherry picked from commit 6b8ef0d428c93c970c1951a52c72f9e99c9e4279)

3 years agoFix build with gcc
Stefan Eßer [Sun, 25 Apr 2021 08:15:17 +0000 (10:15 +0200)]
Fix build with gcc

Correctly declare function without arguments as f(void) instead of f().

(cherry picked from commit 6409e594272f66ce3896706ac705bbd465ce233e)

3 years agofib algo: do not reallocate datapath index for datapath ptr update.
Alexander V. Chernikov [Sun, 18 Apr 2021 15:03:58 +0000 (16:03 +0100)]
fib algo: do not reallocate datapath index for datapath ptr update.

Fib algo uses a per-family array indexed by the fibnum to store
 lookup function pointers and per-fib data.

Each algorithm rebuild currently requires re-allocating this array
 to support atomic change of two pointers.

As in reality most of the changes actually involve changing only
 data pointer, add a shortcut performing in-flight pointer update.

MFC after: 2 weeks

(cherry picked from commit 0abb6ff590842114c74e5d52e1af65605bd9d960)

3 years agoImplement better rebuild-delay fib algo policy.
Alexander V. Chernikov [Fri, 9 Apr 2021 20:25:47 +0000 (21:25 +0100)]
Implement better rebuild-delay fib algo policy.

The intent is to better handle time intervals with large amount of RIB
updates (e.g. BGP peer going up or down), while still keeping low sync
delay for the rest scenarios.

The implementation is the following: updates are bucketed into the
buckets of size 50ms. If the number of updates within a current bucket
 exceeds the threshold of 500 routes/sec (e.g. 10 updates per bucket
interval), the update is delayed for another 50ms. This can be repeated
 until the maximum update delay (1 sec) is reached.

All 3 variables are runtime tunables:

* net.route.algo.fib_max_sync_delay_ms: 1000
* net.route.algo.bucket_change_threshold_rate: 500
* net.route.algo.bucket_time_ms: 50

Differential Review: https://reviews.freebsd.org/D29588
MFC after: 2 weeks

(cherry picked from commit ee2cf2b3609ee179f39080e0ebe8bf79dcb13461)

3 years agoAppease -Wsign-compare in radix.c
Alexander V. Chernikov [Sat, 10 Apr 2021 13:48:25 +0000 (13:48 +0000)]
Appease -Wsign-compare in radix.c

Differential Revision: https://reviews.freebsd.org/D29661
Submitted by: zec
MFC after 2 weeks

(cherry picked from commit 63dceebe68569c3a7ebd07d0a6123264da625149)

3 years agoAllow to specify debugnet fib in sysctl/tunable.
Alexander V. Chernikov [Mon, 5 Apr 2021 19:48:07 +0000 (19:48 +0000)]
Allow to specify debugnet fib in sysctl/tunable.

Differential Revision: https://reviews.freebsd.org/D29593
Reviewed by: donner
MFC after: 2 weeks

(cherry picked from commit caf2f62765f9087a6e0002b1c47c3c6f65a8ae0b)

3 years agoAlways use inp fib in the inp_lookup_mcast_ifp().
Alexander V. Chernikov [Mon, 5 Apr 2021 19:58:57 +0000 (19:58 +0000)]
Always use inp fib in the inp_lookup_mcast_ifp().

inp_lookup_mcast_ifp() is static and is only used in the inp_join_group().
The latter function is also static, and is only used in the inp_setmoptions(),
 which relies on inp being non-NULL.

As a result, in the current code, inp_lookup_mcast_ifp() is always called
 with non-NULL inp. Eliminate unused RT_DEFAULT_FIB condition and always
 use inp fib instead.

Differential Revision: https://reviews.freebsd.org/D29594
Reviewed by: kp
MFC after: 2 weeks

(cherry picked from commit c3a456defaf28df8d6f47704d606248f6c22146c)

3 years agoe1000: Restore VF interface random MAC
Kevin Bowling [Thu, 15 Apr 2021 18:45:02 +0000 (11:45 -0700)]
e1000: Restore VF interface random MAC

Restore 525e07418c77 after the iflib conversion of igb(4). This
reenables random MAC address generation when attaching to a VF with a
zeroed MAC.

PR: 253535
Reported by: Balaev PA <mail@void.so>
Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D29785

(cherry picked from commit 68a46f11eadab48a1da9e3d3900569a6a1ce142e)

3 years agolibfetch: Retry with proxy auth when server returns 407
Renato Botelho [Thu, 1 Apr 2021 21:02:57 +0000 (18:02 -0300)]
libfetch: Retry with proxy auth when server returns 407

PR: 220468
Submitted by: Egil Hasting <egil.hasting@higen.org> (based on)
Reviewed by: kevans, kp
Approved by: kp
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29533

(cherry picked from commit 345c30a94f6425954163f1e0b075a75f603d27cd)

3 years agopf tests: IPv6 test case for the 'kill state(s)' feature
Kristof Provost [Fri, 16 Apr 2021 15:47:47 +0000 (17:47 +0200)]
pf tests: IPv6 test case for the 'kill state(s)' feature

Reviewed by: donner
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29797

(cherry picked from commit 9af2317423f399b30ff028e078d01eef553efc7f)

3 years agopf tests: Test cases for the 'kill state(s)' feature
Kristof Provost [Fri, 16 Apr 2021 15:33:17 +0000 (17:33 +0200)]
pf tests: Test cases for the 'kill state(s)' feature

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29796

(cherry picked from commit 065b5c7fb26eb4239e9bd513dde5a55ef78e45c4)

3 years agopf: Refactor state killing
Kristof Provost [Fri, 16 Apr 2021 14:34:21 +0000 (16:34 +0200)]
pf: Refactor state killing

Extract the state killing code from pfioctl() and rephrase the filtering
conditions for readability.

No functional change intended.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29795

(cherry picked from commit 586aab9e0aa6c811758c19fb03831fc1e7305252)

3 years agouma: Introduce per-domain reclamation functions
Mark Johnston [Wed, 14 Apr 2021 16:57:24 +0000 (12:57 -0400)]
uma: Introduce per-domain reclamation functions

Make it possible to reclaim items from a specific NUMA domain.

- Add uma_zone_reclaim_domain() and uma_reclaim_domain().
- Permit parallel reclamations.  Use a counter instead of a flag to
  synchronize with zone_dtor().
- Use the zone lock to protect cache_shrink() now that parallel reclaims
  can happen.
- Add a sysctl that can be used to trigger reclamation from a specific
  domain.

Currently the new KPIs are unused, so there should be no functional
change.

Reviewed by: mav
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29685

(cherry picked from commit aabe13f1450bb4caba66ec2a7a41c0dfefff511d)

3 years agouma: Split bucket_cache_drain() to permit per-domain reclamation
Mark Johnston [Fri, 9 Apr 2021 13:47:09 +0000 (09:47 -0400)]
uma: Split bucket_cache_drain() to permit per-domain reclamation

Note that the per-domain variant does not shrink the target bucket size.

No functional change intended.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 54f421f9e84234c4313f2d636e4ebd74009a74d6)

3 years agodomainset: Define additional global policies
Mark Johnston [Wed, 14 Apr 2021 16:56:39 +0000 (12:56 -0400)]
domainset: Define additional global policies

Add global definitions for first-touch and interleave policies.  The
former may be useful for UMA, which implements a similar policy without
using domainset iterators.

No functional change intended.

Reviewed by: mav
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29104

(cherry picked from commit 29bb6c19f044274cc6693f0c2463ca22106cd3ab)

3 years agoAdd required checks for unmapped mbufs in ipdivert and ipfw
Mark Johnston [Wed, 21 Apr 2021 19:38:01 +0000 (15:38 -0400)]
Add required checks for unmapped mbufs in ipdivert and ipfw

Also add an M_ASSERTMAPPED() macro to verify that all mbufs in the chain
are mapped.  Use it in ipfw_nat, which operates on a chain returned by
m_megapullup().

PR: 255164
Reviewed by: ae, gallatin
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29838

(cherry picked from commit 652908599b6fa7285ee60cb567b97e70b648ac29)

3 years agoipfw: do not use sleepable malloc in callout context.
Andrey V. Elsukov [Fri, 16 Apr 2021 07:22:44 +0000 (10:22 +0300)]
ipfw: do not use sleepable malloc in callout context.

Use M_NOWAIT flag when hash growing is called from callout.

PR:             255041
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D29772

(cherry picked from commit 9bacbf1ae243de43d642c3ac0b7318ae0e5c5235)

3 years agoloader: do not output empty menu title
Toomas Soome [Wed, 21 Apr 2021 11:42:10 +0000 (14:42 +0300)]
loader: do not output empty menu title

As we output spaces around the menu title, we should also check,
if the title is actually empty string.

PR: 255299
Submitted by: Jose Luis Duran
Reported by: Jose Luis Duran

(cherry picked from 4ba91fa0736bb0672d475b6b56d9e7b06e78ff69)

3 years agolibkiconv: address memory leak in not-found cases
Ed Maste [Wed, 21 Apr 2021 17:45:27 +0000 (13:45 -0400)]
libkiconv: address memory leak in not-found cases

Found in "Understanding and Detecting Disordered Error Handling with
Precise Function Pairing" by Qiushi Wu et al.

Reviewed by: imp, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29896

(cherry picked from commit 3cfd08c1c74058451a02bac35307bf7fa509c617)

3 years agoFix rtsock sockaddr alignment.
Alexander V. Chernikov [Tue, 27 Apr 2021 08:04:19 +0000 (08:04 +0000)]
Fix rtsock sockaddr alignment.

b31fbebeb3 introduced alloc_sockaddr_aligned() which, in fact,
 failed to produce aligned addresses.

Reported by: Oskar Holmlund <oskar.holmlund at yahoo.com>
MFC after: immediately

(cherry picked from commit 25682e6a495fc6669d799bb64acdaf14d653173e)

3 years agowlanstats: fix build
Sofian Brabez [Tue, 20 Apr 2021 18:31:48 +0000 (18:31 +0000)]
wlanstats: fix build

Add -Wno-cast-align to the CFLAGS to fix the build of wlanstats

Approved by: adrian
MFC after: 1 week

(cherry picked from commit b8be8094958a01255f5430bd6a36ff936bdd53c3)

3 years agoiwnstats: fix build with clang and allow install under /usr/local/sbin
Sofian Brabez [Tue, 20 Apr 2021 17:58:46 +0000 (17:58 +0000)]
iwnstats: fix build with clang and allow install under /usr/local/sbin

iwnstats was not compiling because of some issues raised by the clang
compiler due to -Werror. As a tool it is not connected to world build.

Add missing field "barker_mrc" initialization in struct
iwn_sensitivity_limits for -Wmissing-field-initializers, remove unused
pointer *is on iwn_stats_*_print functions and unused variables for
-Wunused-parameter and -Wunused-variable.

The value for field "barker_mrc" of struct iwn2030_sensitivity_limits
was obtained from linux 3.2 wireless/iwlwifi driver code (iwl-2000.c:115
.barker_corr_th_min_mrc = 390).

Also set BINDIR in Makefile to make it possible to install under
/usr/local/sbin/iwnstats as it require super user.

Reviewed by: adrian
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29800

(cherry picked from commit 561d34d70596b455c6a513431f8ad007076f90c5)

3 years agoFix race in case of device destruction.
Alexander Motin [Tue, 13 Apr 2021 15:19:10 +0000 (11:19 -0400)]
Fix race in case of device destruction.

During device destruction it is possible that open() succeed, but
fdevname() return NULL, that can't be assigned to string variable.
Fix that by adding explicit NULL check.

Also while there switch from fdevname() to fdevname_r().

Sponsored by: iXsystems, Inc.
MFC after: 2 weeks

(cherry picked from commit e49d3eb40324eaffaa13b93f2c4173dfa04dfa34)

3 years ago__FreeBSD_version: update the references to the doc tree
Ka Ho Ng [Thu, 22 Apr 2021 09:36:22 +0000 (17:36 +0800)]
__FreeBSD_version: update the references to the doc tree

Update the reference of which file to update in the doc tree when
bumping __FreeBSD_version.

This change is to catch up with commit f8fed61b80 in the doc repository.

Approved by: lwhsu (mentor), philip (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29920

(cherry picked from commit 7c707c7c25ad361f911716c31d22f5722f4dffc9)

3 years agovnode_pager_setsize.9: Some clarifications on the manpage
Ka Ho Ng [Sun, 11 Apr 2021 06:45:37 +0000 (14:45 +0800)]
vnode_pager_setsize.9: Some clarifications on the manpage

A number of changes:
- Clarifies the locking rules when calling the routine.
- Correct the description regarding the content range to be purged.
- Document the effects on page fault handler.

MFC with: 86a52e262a6f
Sponsored by: The FreeBSD Foundation
Reviewed by: bcr, kib
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D29637

(cherry picked from commit b77f5f5553e8ac7868b4b234a36bda3cf2db0907)

3 years agoDocument vnode_pager_setsize(9)
Ka Ho Ng [Wed, 7 Apr 2021 11:00:31 +0000 (19:00 +0800)]
Document vnode_pager_setsize(9)

Sponsored by: The FreeBSD Foundation
Reviewed by: bcr
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D29408

(cherry picked from commit 86a52e262a6faf75ee34eaa801f6d8ddaad20733)

3 years agoUse makefs(8) in release VM-image generation instead of md(4) and newfs.
Nathan Whitehorn [Thu, 25 Feb 2021 02:16:56 +0000 (21:16 -0500)]
Use makefs(8) in release VM-image generation instead of md(4) and newfs.

Using makefs instead reduces the privileges needed to build VM images,
simplifies the script (no need to copy files to a fresh image at the end),
and improves portability by allowing generation of cross-endian images.
As a result of the last, this patch also adds support for generation of
powerpc64 and powerpc64le VM images.

No other changes to the output. Tested and working for both amd64 and
powerpc64 targets.

Reviewed by: gjb
Differential Revision: https://reviews.freebsd.org/D28912

(cherry picked from commit 1ca8842f3ad9725863c9affc044d1974a51818a9)

3 years agoAllocate extra inodes in makefs when leaving free space in UFS images.
Nathan Whitehorn [Tue, 6 Apr 2021 17:43:29 +0000 (13:43 -0400)]
Allocate extra inodes in makefs when leaving free space in UFS images.

By default, makefs(8) has very few spare inodes in its output images,
which is fine for static filesystems, but not so great for VM images
where many more files will be added. Make makefs(8) use the same
default settings as newfs(8) when creating images with free space --
there isn't much point to leaving free space on the image if you
can't put files there. If no free space is requested, use current
behavior of a minimal number of available inodes.

Reviewed by: manu
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D29492

(cherry picked from commit afb6a168f8ee08ac74769464726c396fbef83d0b)

3 years agocxgbe: Ignore doomed virtual interfaces when updating the clip table.
John Baldwin [Mon, 12 Apr 2021 21:36:40 +0000 (14:36 -0700)]
cxgbe: Ignore doomed virtual interfaces when updating the clip table.

A doomed VI does not have a valid ifnet.

Reported by: Jithesh Arakkan @ Chelsio
Sponsored by: Chelsio Communications

(cherry picked from commit 45d5c28439f2464dd5022abb0dd53f9da649686c)

3 years agoiscsi: Kick threads out of iscsi_ioctl() during unload.
John Baldwin [Mon, 12 Apr 2021 20:56:16 +0000 (13:56 -0700)]
iscsi: Kick threads out of iscsi_ioctl() during unload.

iscsid can be sleeping in iscsi_ioctl() causing the destroy_dev() to
sleep forever if iscsi.ko is unloaded while iscsid is running.

Reported by: Jithesh Arakkan @ Chelsio
Sponsored by: Chelsio Communications

(cherry picked from commit 89df484739efe93b52da467f35255ae538bb946b)

3 years agocxgbe: Add counters for iSCSI PDUs transmitted via TOE.
John Baldwin [Mon, 12 Apr 2021 20:56:04 +0000 (13:56 -0700)]
cxgbe: Add counters for iSCSI PDUs transmitted via TOE.

Sponsored by: Chelsio Communications

(cherry picked from commit 568e69e4eb0ad1a5c69d8ea4592a4314bd6b6679)

3 years agocxgbe: Make the TOE TLS stats per-queue instead of per-port.
John Baldwin [Fri, 26 Mar 2021 22:05:44 +0000 (15:05 -0700)]
cxgbe: Make the TOE TLS stats per-queue instead of per-port.

This avoids some atomics by using counter_u64 for TX and relying on
existing single-threading (single ithread per rxq) for RX.

Sponsored by: Chelsio Communications

(cherry picked from commit fe496dc02a9a276d940e72bbd155dc256a34076f)

3 years agocxgbe: Add a struct sge_ofld_txq type.
John Baldwin [Fri, 26 Mar 2021 22:05:31 +0000 (15:05 -0700)]
cxgbe: Add a struct sge_ofld_txq type.

This type mirrors struct sge_ofld_rxq and holds state for TCP offload
transmit queues.  Currently it only holds a work queue but will
include additional state in future changes.

Sponsored by: Chelsio Communications

(cherry picked from commit 077ba6a845fab8f1d3bd83e07f61730f202a46fc)

3 years agocxgbei: Enter network epoch and set vnet around t4_push_pdus().
John Baldwin [Mon, 22 Mar 2021 16:59:16 +0000 (09:59 -0700)]
cxgbei: Enter network epoch and set vnet around t4_push_pdus().

Sponsored by: Chelsio Communications

(cherry picked from commit 90c74b2b6004bc50f89378ac689fd179aa2d2ad6)

3 years agocxgbe ddp: Use CPL_COOKIE_DDP* instead of DDP_BUF*_INVALIDATED.
John Baldwin [Mon, 22 Mar 2021 16:59:09 +0000 (09:59 -0700)]
cxgbe ddp: Use CPL_COOKIE_DDP* instead of DDP_BUF*_INVALIDATED.

This avoids mixing the use of two different enums which modern C
compilers warn about.

Sponsored by: Chelsio Communications

(cherry picked from commit 017902fc5f07114e7baba94bb4720c8b41ddea0f)