FreeBSD/src 47f9e66usr.sbin/pkg pkg.c

pkg(7): Preserve const qualifier on strrchr(3) results

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59777
DeltaFile
+2-2usr.sbin/pkg/pkg.c
+2-21 files

FreeBSD/src cc61cc7bin/ls print.c

ls(1): Preserve const qualifier on strstr(3) result

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59774
DeltaFile
+2-2bin/ls/print.c
+2-21 files

FreeBSD/src 066fad8bin/ed io.c

ed(1): Preserve const qualifier on strchr(3) result

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59773
DeltaFile
+1-1bin/ed/io.c
+1-11 files

FreeBSD/src 225612cbin/dd args.c

dd(1): Preserve const qualifier on bsearch(3) results

Reviewed by:    fuz, dteske
Approved by:    fuz (mentor), dteske (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59754
DeltaFile
+9-5bin/dd/args.c
+9-51 files

FreeBSD/src 4680109sys/arm/mv mv_cp110_icu.c

ARMADA 8040: Adapt ICU driver to updated device tree.
DeltaFile
+2-2sys/arm/mv/mv_cp110_icu.c
+2-21 files

FreeBSD/src 8c20260usr.sbin/bhyveload bhyveload.c

bhyveload: do not hang on EOF from console input

Currently, when bhyveload(8) fails to boot the guest,
it drops into the loader prompt waiting for user input.

This behaviour is inconvenient when using bhyveload(8) from
scripts.

Make it exit when it receives EOF from console input.

PR:             286289
Reviewed by:    markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59226
DeltaFile
+5-1usr.sbin/bhyveload/bhyveload.c
+5-11 files

FreeBSD/src 11df1d9. UPDATING, usr.sbin/bhyve pci_nvme.c

bhyve: fix byte order for manually set NVMe eui64

Manually specified eui64 value gets converted to big endian twice:
first using htobe64() and then using be64enc(). On little-endian hosts
that results in a little-endian value instead of a big-endian.

Fix by removing htobe64() for a user submitted value.

Fixes:          409a80e5a434 ("bhyve: Create EUI64 for NVMe namespaces")
Reviewed by:    chuck
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
MFC after:      3 weeks
Differential Revision:  https://reviews.freebsd.org/D59080

(cherry picked from commit 8bd30a72e7012126a1c8d52b3ba32f844a88f8dc)
DeltaFile
+10-0UPDATING
+1-1usr.sbin/bhyve/pci_nvme.c
+11-12 files

FreeBSD/src b4a465eusr.sbin/sysconf sysconf.8 sysconf-targets.8

sysconf: Remove visual line-break after .Dd in man-pages (ziaee)

Reviewed by:    ziaee, kfv
Differential Revision:  https://reviews.freebsd.org/D59746
DeltaFile
+0-1usr.sbin/sysconf/sysconf.8
+0-1usr.sbin/sysconf/sysconf-targets.8
+0-1usr.sbin/sysconf/sysconf-sysctl.8
+0-1usr.sbin/sysconf/sysconf-src.8
+0-1usr.sbin/sysconf/sysconf-rc.8
+0-1usr.sbin/sysconf/sysconf-make.8
+0-62 files not shown
+0-88 files

FreeBSD/src a53aee1. RELNOTES

RELNOTES: Add an entry for sysconf(8) and libbsdconf(3)

Reviewed by:    ziaee, kfv
Differential Revision:  https://reviews.freebsd.org/D59747
DeltaFile
+6-0RELNOTES
+6-01 files

FreeBSD/src b87b15dsys/rpc clntrdma.h

clntrdma.h: Add a field to rpcrdma_xprt

Add a maxsegs field to rpcrdma_xprt, which is used to set
the number of segments allowed for a chunk based on device
attributes.

This commit should not affect non-RDMA behaviour.

MFC after:      3 months
Fixes:  884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
DeltaFile
+1-0sys/rpc/clntrdma.h
+1-01 files

FreeBSD/src ef98d08sys/rpc clnt_bck.c

clnt_bck.c: Fix the "glue" for the nfsrdma.ko module

Without this patch, the code failed to acquire the error
return for clnt_bck_rdma_send() and could use "error" uninitialized.

No semantics change for non-RDMA NFS service.

MFC after:      3 months
Fixes:  7144a1d58c5c ("nfsd: Add glue for the nfsrdma.ko module")
DeltaFile
+2-1sys/rpc/clnt_bck.c
+2-11 files

FreeBSD/src 62c80d7sys/dev/bnxt/bnxt_en if_bnxt.c

bnxt: Initialize RSS with the common key

Use rss_getkey() for the initial VNIC key instead of generating a
per-attachment private key.  Preserve the writable rss_key sysctl,
its override lifetime, the hardware DMA representation, and all hash
and indirection settings.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59795
DeltaFile
+4-1sys/dev/bnxt/bnxt_en/if_bnxt.c
+4-11 files

FreeBSD/src 9d48fd4sys/dev/qlnx/qlnxe ecore_vf.h ecore_vf.c

qlnx: Report the programmed RSS key and hash types

Implement SIOCGIFRSSKEY and SIOCGIFRSSHASH for qlnxe and qlnxev using
the cached vport RSS configuration.  This lets hn(4) synchronize its
synthetic RSS configuration with the VF without assuming that every
driver programs all of the common RSS hash selections.

Serialize the queries with the device lock and reject them while the
interface is not running.  Convert the firmware request's key words back
into network byte order and translate the six representable IPv4/IPv6
TCP/UDP hash selections.  Report no hashing when RSS is disabled, including
the driver's single-queue configuration.

For VFs, require a successful RSS extension response from every hardware
function.  The overall vport-update reply can succeed while its RSS TLV
is missing or rejected; recording that result prevents reporting an
unconfirmed configuration.  Invalidate the confirmation before each RSS
request.  Leave existing vport-update return semantics, queue setup, and
the receive datapath unchanged.

    [5 lines not shown]
DeltaFile
+84-0sys/dev/qlnx/qlnxe/qlnx_os.c
+5-0sys/dev/qlnx/qlnxe/ecore_vf.c
+3-0sys/dev/qlnx/qlnxe/ecore_vf.h
+92-03 files

FreeBSD/src 8c25b70sys/dev/vnic nicvf_main.c

vnic nicvf: Program the common RSS key in network word order

Replace the repeated hardware-reset key with rss_getkey().  Decode each
eight-byte chunk with be64dec() into the register-word array before
programming the five key registers.

This matches the key serialization in DPDK's nicvf_rss_set_key(), added
by commit 7694fab264ac666d62a4cae04f2979991ce64259
("net/thunderx/base: add RSS and RETA configuration").  A raw copy into
the word array on little-endian hosts would reverse bytes within each
register relative to that convention.

Preserve the CPI-algorithm gate, enabled hash fields, and round-robin
indirection table.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59806
DeltaFile
+8-6sys/dev/vnic/nicvf_main.c
+8-61 files

FreeBSD/src 449fc84sys/dev/enetc if_enetc.c

enetc: Use the common RSS key

Replace the random register words with rss_getkey() and decode each
four-byte chunk with le32dec() before writing the port's key registers.

Keep the RSS capability check and existing queue-count and indirection
table programming unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59805
DeltaFile
+6-1sys/dev/enetc/if_enetc.c
+6-11 files

FreeBSD/src fbe4eefsys/dev/al_eth al_eth.c

al_eth: Use the common RSS key

Fetch the common Toeplitz key instead of filling it with random bytes
during receive-forwarding setup.  Check the key size at compile time and
retain the existing host-to-network conversion for each hardware word.

Leave forwarding, hash selection, and queue mapping unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59804
DeltaFile
+4-2sys/dev/al_eth/al_eth.c
+4-21 files

FreeBSD/src 4ad740asys/dev/qlxgb qla_hw.c

qlxgb: Derive the firmware RSS key from the common key

Replace the embedded key with rss_getkey().  Retain the reversed 64-bit
word-pair order and low-word-first layout used by the existing firmware
request, matching the qlxgbe conversion.

The common default produces the same five firmware words as the old
constants.  Leave hash selections, RSS enablement, and the indirection
mask unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59803
DeltaFile
+13-6sys/dev/qlxgb/qla_hw.c
+13-61 files

FreeBSD/src a5e3c38sys/dev/qlxge qls_hw.c

qlxge: Derive both RSS keys from the common key

Replace the embedded default with rss_getkey().  Preserve the ICB's
little-endian representation of each big-endian key word, then copy
the initial 16 bytes of the serialized IPv6 key into the IPv4 key.

This retains the old default-key bytes and allows a configured common
key to take effect.  Leave RSS flags and queue mapping unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59802
DeltaFile
+13-14sys/dev/qlxge/qls_hw.c
+13-141 files

FreeBSD/src 30fdef2sys/dev/qlxgbe ql_hw.c

qlxgbe: Derive the mailbox RSS key from the common key

Replace the embedded key with rss_getkey(), retaining the firmware's
reversed 64-bit word-pair order and low-word-first layout within each
pair.  The common default produces the same mailbox key as the existing
constants, while configured common keys no longer get ignored.

Leave the RSS enable flags, hash types, and indirection policy unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59801
DeltaFile
+12-7sys/dev/qlxgbe/ql_hw.c
+12-71 files

FreeBSD/src ce68b58sys/dev/qlnx/qlnxe qlnx_os.c

qlnx: Derive the hardware RSS key from the common key

Replace the embedded default key with rss_getkey().  Decode each group
of four key bytes as a big-endian word; the shared code then serializes
those host-order words as little-endian firmware fields.  This preserves
the existing hardware representation for the common default and allows
a configured common key to take effect.

Keep the existing multi-queue gate, RSS hash selections, and indirection
policy unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59800
DeltaFile
+8-13sys/dev/qlnx/qlnxe/qlnx_os.c
+8-131 files

FreeBSD/src aef4c3esys/dev/mana mana_en.c

mana: Initialize ports with the common RSS key

Use rss_getkey() for each port's initial key instead of a lazily generated
driver-global random key.  Remove the obsolete helper and its unsynchronized
initialization flag.  Make the common-key declaration available without
options RSS.

The port still retains the key used for hardware programming and the
existing SIOCGIFRSSKEY response.  Leave hash types and queue placement
unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59799
DeltaFile
+3-19sys/dev/mana/mana_en.c
+3-191 files

FreeBSD/src 1ad999asys/dev/mlx4/mlx4_en en.h mlx4_en_netdev.c

mlx4en: Use the common RSS key for programming and queries

Replace the private fixed key with rss_getkey().  Copy the common byte
stream directly into the RSS queue-pair context and use the same helper
for SIOCGIFRSSKEY, so hardware programming and hn's query agree.

Change the helper to fill caller-owned storage instead of returning a
pointer to a static key.  Check the fixed hardware and ioctl buffer sizes
at compile time.  Leave RSS masks and queue steering unchanged.

MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59798
DeltaFile
+7-23sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
+4-6sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
+1-1sys/dev/mlx4/mlx4_en/en.h
+12-303 files

FreeBSD/src fd74d1esys/dev/oce oce_mbox.c

oce: Use the common RSS key

Fill the RSS configuration request with the common 40-byte key instead
of fresh random bytes.  Preserve the mailbox representation, hash
selection, and indirection table.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59797
DeltaFile
+4-1sys/dev/oce/oce_mbox.c
+4-11 files

FreeBSD/src 9b374adsys/dev/bxe bxe.c

bxe: Program the common RSS key in searcher byte order

Use the common RSS key instead of generating private random words.
Reverse the bytes before passing the key to the shared code, which copies
the supplied bytes directly into the firmware request.  The searcher
consumes this array in reverse order; a raw copy of the common key would
not produce matching Toeplitz hashes.

The hardware ordering is documented by Linux commit
d682d2bdc30650a5c7ce9908ab83ab674b658744 ("bnx2x: byte swap rss_key to
comply to Toeplitz specs").  Keep the conversion in the FreeBSD caller
rather than changing the shared-code interface.

Preserve the config_hash gate, including the PMF-only key programming
on 57710/57711, and leave hash types and indirection policy unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59796
DeltaFile
+10-5sys/dev/bxe/bxe.c
+10-51 files

FreeBSD/src e94de94sys/dev/axgbe if_axgbe_pci.c

axgbe: Use the common RSS key without options RSS

Fetch the common key in the PCI iflib frontend regardless of options RSS
and make the key API declaration available in both configurations.
Retain the existing hash-field selection and queue-placement branches.
The independent ARM frontend is unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59794
DeltaFile
+6-4sys/dev/axgbe/if_axgbe_pci.c
+6-41 files

FreeBSD/src 772994dsys/dev/aq aq_main.c

aq: Use the common RSS key without options RSS

Fetch the common RSS key independently of options RSS instead of
generating a private key in non-RSS kernels.  Keep the existing
software-RSS or round-robin indirection policy and hardware key
serialization unchanged.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59793
DeltaFile
+3-2sys/dev/aq/aq_main.c
+3-21 files

FreeBSD/src a666f15sys/dev/e1000 if_em.h if_em.c

e1000: Use the common RSS key for 82574

Use rss_getkey() in the older em multi-queue RSS path, which is reached
by 82574 with two receive queues.  This replaces a private key generated
on each initialization and matches the common-key policy already used
by the igb path.

Decode each register word with le32dec() and remove the private assembly
macro, avoiding signed integer shifts while preserving the register byte
order.  Leave the redirection table and hash fields unchanged.  This does
not change single-queue em devices or PF-owned igb VF RSS settings.

Reviewed by:    erj, gallatin
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59792
DeltaFile
+4-2sys/dev/e1000/if_em.c
+0-5sys/dev/e1000/if_em.h
+4-72 files

FreeBSD/src 58031cbsys/netpfil/ipfw ip_fw_log.c dn_sched_qfq.c

ipfw: cleanup !FreeBSD and !_KERNEL code

These are leftovers from last import from Luigi Rizzo in 2013, that were
never compiled checked since and lots of changes have had happened since
and more changes to come.  Let's not pretend ipfw is buildable on
something else than FreeBSD nor it can be compiled for userland.

Reviewed by:            lytboris_gmail.com
Differential Revision:  https://reviews.freebsd.org/D59427
DeltaFile
+0-39sys/netpfil/ipfw/ip_fw2.c
+0-28sys/netpfil/ipfw/ip_dn_private.h
+0-28sys/netpfil/ipfw/ip_dn_io.c
+0-20sys/netpfil/ipfw/dn_sched_qfq.c
+0-5sys/netpfil/ipfw/ip_fw_log.c
+0-1205 files

FreeBSD/src 08f0a1bsys/netpfil/ipfw ip_fw2.c

ipfw: use typed pointers to access network protocols headers where possible

The 'void *ulp' is still in action, but where possible prefer a typed
pointer.  Get rid of associated pre-processor macros.

Differential Revision:  https://reviews.freebsd.org/D59435
DeltaFile
+128-107sys/netpfil/ipfw/ip_fw2.c
+128-1071 files

FreeBSD/src 5f81426sys/netpfil/ipfw ip_fw2.c

ipfw: refactor macros around m_pullup()

In the prologue, where we check if the argument is a memory or an mbuf
chain, do not set 'struct ip *ip' pointer.  However, set the 'struct
ether_header *eh' pointer there and set Etherner header length in 'ehlen'.
Side effect of this refactor is that now Layer 2 hooks may send mbufs with
ETHERTYPE_VLAN frames.  However, current network stack doesn't do that.

Write a new PULLUP() macro that would take type of the argument to
determine how much to pull.  Unlike PULLUP_TO() this macro can take typed
pointer.  This will allow to get rid of 'void *ulp' and bunch of casting
macros in the next change.  Use local bool variable to see if we need to
unlock upon jump to pullup_failed.  Embed pointer update into the branch
of the macro, where pointers indeed need an update.

Use new PULLUP() macro to pullup initial 'struct ip *ip' and 'struct
ip6_hdr *ip6'.  This removes max_protohdr sized pullup, that previously
tried to pull more than an unmapped mbuf could yield, fixing a bug covered
by the testcase sys/netpfil/ipfw/unmapped.

    [3 lines not shown]
DeltaFile
+77-103sys/netpfil/ipfw/ip_fw2.c
+77-1031 files