Merge branch 'freebsd/current/main' into hardened/current/master

This commit is contained in:
HardenedBSD Sync Services 2024-10-14 12:01:33 -06:00
commit e4b7d5c4c7
No known key found for this signature in database
150 changed files with 1728 additions and 765 deletions

14
bin/nproc/Makefile.depend Normal file
View File

@ -0,0 +1,14 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,6 +1,9 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>

View File

@ -8,7 +8,6 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/libedit \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -8,6 +8,7 @@ DIRDEPS = \
lib/libcapsicum \
lib/libcasper/libcasper \
lib/libcompiler_rt \
lib/msun \
.include <dirdeps.mk>

View File

@ -2,8 +2,6 @@
DIRDEPS = \
bin/sh.host \
usr.bin/awk.host \
usr.bin/xinstall.host \
.include <dirdeps.mk>

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,7 +1,6 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \

View File

@ -1,7 +1,6 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \

View File

@ -1,14 +1,12 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libgeom \
sbin/geom/core \
.include <dirdeps.mk>

View File

@ -0,0 +1,17 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libnvpair \
cddl/lib/libspl \
cddl/lib/libzfs \
lib/${CSU_DIR} \
lib/libbe \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -6,7 +6,6 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/ncurses/form \
lib/ncurses/ncurses \
lib/ncurses/tinfo \

View File

@ -1,9 +1,6 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/msun \
.include <dirdeps.mk>

View File

@ -7,7 +7,6 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libcompiler_rt \
lib/libsys \
usr.bin/awk.host \
usr.bin/yacc.host \

View File

@ -0,0 +1,16 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -6,6 +6,7 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libsys \
.include <dirdeps.mk>

View File

@ -8,7 +8,6 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/ncurses/tinfo \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -0,0 +1,17 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libz \
secure/lib/libcrypto \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -5,7 +5,6 @@ DIRDEPS = \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -0,0 +1,15 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -8,7 +8,6 @@ DIRDEPS = \
lib/libcompiler_rt \
lib/libmd \
lib/libthr \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -8,6 +8,7 @@ DIRDEPS = \
lib/libcompiler_rt \
lib/libmagic.host \
lib/libz \
lib/msun \
.include <dirdeps.mk>

View File

@ -0,0 +1,15 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,12 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -6,7 +6,6 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -6,6 +6,7 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libsys \
lib/libthr \

View File

@ -4,6 +4,7 @@ DIRDEPS = \
include \
include/arpa \
include/xlocale \
secure/lib/libcrypto \
.include <dirdeps.mk>

View File

@ -2,10 +2,12 @@
DIRDEPS = \
include \
include/ssp \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libsys \
.include <dirdeps.mk>

View File

@ -5,7 +5,6 @@ DIRDEPS = \
include/xlocale \
lib/${CSU_DIR} \
lib/libcompiler_rt \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -7,7 +7,6 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/libsys \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -6,6 +6,8 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libutil \
lib/libxo/libxo \
.include <dirdeps.mk>

View File

@ -1,14 +1,11 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libutil \
lib/libxo \
lib/libxo/libxo \
.include <dirdeps.mk>

View File

@ -1,12 +1,12 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libxo \
lib/libxo/libxo \
.include <dirdeps.mk>

View File

@ -6,7 +6,6 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -6,7 +6,6 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -1,6 +1,7 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
bin/sh.host \
include \
include/xlocale \
lib/${CSU_DIR} \

View File

@ -8,7 +8,6 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/ncurses/tinfo \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -9,7 +9,6 @@ DIRDEPS = \
lib/libcompiler_rt \
lib/ncurses/ncurses \
lib/ncurses/tinfo \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -8,7 +8,6 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/ncurses/tinfo.host \
usr.bin/awk.host \
.include <dirdeps.mk>

View File

@ -0,0 +1,18 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libthr \
lib/ofed/include \
lib/ofed/libibverbs \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libc++ \
lib/libcompiler_rt \
lib/libcxxrt \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -2,6 +2,7 @@
DIRDEPS = \
include \
include/ssp \
include/xlocale \
lib/libc \
lib/libcompiler_rt \

View File

@ -1,28 +1,17 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libspl \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzfsbootenv \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libbe \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libjail \
lib/libmd \
lib/libsbuf \
lib/libthr \
lib/libutil \
lib/libz \
lib/msun \
.include <dirdeps.mk>

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -7,6 +7,7 @@ DIRDEPS = \
lib/libc \
lib/libcam \
lib/libcompiler_rt \
lib/libnvmf \
lib/libsbuf \
lib/libutil \

View File

@ -6,9 +6,7 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libsbuf \
lib/libutil \

View File

@ -7,6 +7,7 @@ DIRDEPS = \
lib/libc \
lib/libcapsicum \
lib/libcasper/libcasper \
lib/libcasper/services/cap_fileargs \
lib/libcompiler_rt \
lib/libmd \

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -6,6 +6,7 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libnvmf \
lib/libutil \

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,8 +1,6 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/atf/libatf-c \
lib/libc \

View File

@ -0,0 +1,15 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,15 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
lib/${CSU_DIR} \
lib/atf/libatf-c \
lib/libc \
lib/libcompiler_rt \
sbin/ping \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -7,6 +7,7 @@ DIRDEPS = \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libjail \
.include <dirdeps.mk>

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -7,7 +7,6 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
secure/lib/libcrypto \
secure/lib/libcrypto/openssl.amd64 \
.include <dirdeps.mk>

View File

@ -17152,7 +17152,6 @@ alpha <FEMININE_ORDINAL_INDICATOR>;/
<CJK_UNIFIED_IDEOGRAPH-2B740>;...;<CJK_UNIFIED_IDEOGRAPH-2B81D>;/
<CJK_UNIFIED_IDEOGRAPH-2B820>;...;<CJK_UNIFIED_IDEOGRAPH-2CEA1>;/
<CJK_UNIFIED_IDEOGRAPH-2CEB0>;...;<CJK_UNIFIED_IDEOGRAPH-2EBE0>;/
<CJK_UNIFIED_IDEOGRAPH-2EBF0>;...;<CJK_UNIFIED_IDEOGRAPH-2EE5D>;/
<CJK_COMPATIBILITY_IDEOGRAPH-2F800>;/
<CJK_COMPATIBILITY_IDEOGRAPH-2F801>;/
<CJK_COMPATIBILITY_IDEOGRAPH-2F802>;/
@ -23134,10 +23133,6 @@ graph <DOLLAR_SIGN>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_SURROUND_FROM_UPPER_RIGHT>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_SURROUND_FROM_LOWER_LEFT>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_OVERLAID>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_SURROUND_FROM_RIGHT>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_SURROUND_FROM_LOWER_RIGHT>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_HORIZONTAL_REFLECTION>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_ROTATION>;/
<JAPANESE_INDUSTRIAL_STANDARD_SYMBOL>;/
<IDEOGRAPHIC_NUMBER_ZERO>;/
<POSTAL_MARK>;/
@ -23221,7 +23216,6 @@ graph <DOLLAR_SIGN>;/
<CJK_STROKE_HZZZG>;/
<CJK_STROKE_PG>;/
<CJK_STROKE_Q>;/
<IDEOGRAPHIC_DESCRIPTION_CHARACTER_SUBTRACTION>;/
<PARENTHESIZED_HANGUL_KIYEOK>;/
<PARENTHESIZED_HANGUL_NIEUN>;/
<PARENTHESIZED_HANGUL_TIKEUT>;/
@ -34643,7 +34637,6 @@ toupper (<a>,<A>);/
(<LATIN_SMALL_LETTER_HV>,<LATIN_CAPITAL_LETTER_HWAIR>);/
(<LATIN_SMALL_LETTER_K_WITH_HOOK>,<LATIN_CAPITAL_LETTER_K_WITH_HOOK>);/
(<LATIN_SMALL_LETTER_L_WITH_BAR>,<LATIN_CAPITAL_LETTER_L_WITH_BAR>);/
(<LATIN_SMALL_LETTER_LAMBDA_WITH_STROKE>,);/
(<LATIN_SMALL_LETTER_N_WITH_LONG_RIGHT_LEG>,<LATIN_CAPITAL_LETTER_N_WITH_LONG_RIGHT_LEG>);/
(<LATIN_SMALL_LETTER_O_WITH_HORN>,<LATIN_CAPITAL_LETTER_O_WITH_HORN>);/
(<LATIN_SMALL_LETTER_OI>,<LATIN_CAPITAL_LETTER_OI>);/
@ -34734,7 +34727,6 @@ toupper (<a>,<A>);/
(<LATIN_SMALL_LETTER_G_WITH_HOOK>,<LATIN_CAPITAL_LETTER_G_WITH_HOOK>);/
(<LATIN_SMALL_LETTER_SCRIPT_G>,<LATIN_CAPITAL_LETTER_SCRIPT_G>);/
(<LATIN_SMALL_LETTER_GAMMA>,<LATIN_CAPITAL_LETTER_GAMMA>);/
(<LATIN_SMALL_LETTER_RAMS_HORN>,);/
(<LATIN_SMALL_LETTER_TURNED_H>,<LATIN_CAPITAL_LETTER_TURNED_H>);/
(<LATIN_SMALL_LETTER_H_WITH_HOOK>,<LATIN_CAPITAL_LETTER_H_WITH_HOOK>);/
(<LATIN_SMALL_LETTER_I_WITH_STROKE>,<LATIN_CAPITAL_LETTER_I_WITH_STROKE>);/

View File

@ -25,7 +25,7 @@
.\" This document is derived in part from the enet man page (enet.4)
.\" distributed with 4.3BSD Unix.
.\"
.Dd March 6, 2022
.Dd October 10, 2024
.Dt NETMAP 4
.Os
.Sh NAME
@ -938,6 +938,16 @@ switches that can be created. This tunable can be specified
at loader time.
.It Va dev.netmap.ptnet_vnet_hdr: 1
Allow ptnet devices to use virtio-net headers
.It Va dev.netmap.port_numa_affinity: 0
On
.Xr numa 4
systems, allocate memory for netmap ports from the local NUMA domain when
possible.
This can improve performance by reducing the number of remote memory accesses.
However, when forwarding packets between ports attached to different NUMA
domains, this will prevent zero-copy forwarding optimizations and thus may hurt
performance.
Note that this setting must be specified as a loader tunable at boot time.
.El
.Sh SYSTEM CALLS
.Nm

View File

@ -1,4 +1,4 @@
# $Id: dirdeps.mk,v 1.170 2024/06/24 02:21:00 sjg Exp $
# $Id: dirdeps.mk,v 1.171 2024/09/30 21:21:25 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
@ -887,16 +887,13 @@ _m := ${.MAKE.DEPENDFILE_PREFERENCE:T:S;${TARGET_SPEC}$;${d:E};:C;${MACHINE}((,.
.if !empty(_m)
# M_dep_qual_fixes isn't geared to Makefile.depend
_qm := ${_m:C;(\.depend)$;\1.${d:E};:${M_dep_qual_fixes.${d:E}:U${M_dep_qual_fixes}:ts:}}
.if ${_debug_search}
.info Looking for ${_qm}
.endif
# set this "just in case"
# we can skip :tA since we computed the path above
DEP_RELDIR := ${_m:H:S,^${SRCTOP}/,,}
# and reset this
DIRDEPS =
.if ${_debug_reldir} && ${_qm} != ${_m}
.info loading ${_m:S,${SRCTOP}/,,} for ${_dr}
.if ${_debug_search} || ${_debug_reldir}
.info Loading ${_m:S,${SRCTOP}/,,} for ${_dr}
.endif
.include <${_m}>
.else

View File

@ -0,0 +1,46 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024 The FreeBSD Foundation
*
* This software was developed by Björn Zeeb under sponsorship from
* the FreeBSD Foundation.
*/
#ifndef _LINUXKPI_LINUX_CLEANUP_H
#define _LINUXKPI_LINUX_CLEANUP_H
#define __cleanup(_f) __attribute__((__cleanup__(_f)))
/*
* Note: "_T" are special as they are exposed into common code for
* statements. Extra care should be taken when changing the code.
*/
#define DEFINE_GUARD(_n, _dt, _lock, _unlock) \
\
typedef _dt guard_ ## _n ## _t; \
\
static inline _dt \
guard_ ## _n ## _create( _dt _T) \
{ \
_dt c; \
\
c = ({ _lock; _T; }); \
return (c); \
} \
\
static inline void \
guard_ ## _n ## _destroy(_dt *t) \
{ \
_dt _T; \
\
_T = *t; \
if (_T) { _unlock; }; \
}
/* We need to keep these calls unique. */
#define guard(_n) \
guard_ ## _n ## _t guard_ ## _n ## _ ## __COUNTER__ \
__cleanup(guard_ ## _n ## _destroy) = guard_ ## _n ## _create
#endif /* _LINUXKPI_LINUX_CLEANUP_H */

View File

@ -2936,6 +2936,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch,
KASSERT(btx->fq->chan == ch, ("%s: unexpected channel", __func__));
#endif /* INVARIANTS */
BPF_MTAP(sc->ifp, m);
error = bus_dmamap_load_mbuf_sg(buf->dmat, buf->dmap, m, segs, &nsegs,
BUS_DMA_NOWAIT);
if (__predict_false(error != 0)) {

View File

@ -43,29 +43,26 @@
/*********************************************************************
* Local Function prototypes
*********************************************************************/
static int em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi,
uint32_t *txd_upper, uint32_t *txd_lower);
static int em_transmit_checksum_setup(struct e1000_softc *sc,
if_pkt_info_t pi, uint32_t *txd_upper, uint32_t *txd_lower);
static int em_isc_txd_encap(void *arg, if_pkt_info_t pi);
static void em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx);
static int em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear);
static void em_isc_rxd_refill(void *arg, if_rxd_update_t iru);
static void em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused,
qidx_t pidx);
static int em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx,
qidx_t budget);
static int em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri);
static int em_tso_setup(struct e1000_softc *, if_pkt_info_t, uint32_t *,
uint32_t *);
static int em_transmit_checksum_setup(struct e1000_softc *, if_pkt_info_t,
uint32_t *, uint32_t *);
static int em_isc_txd_encap(void *, if_pkt_info_t);
static void em_isc_txd_flush(void *, uint16_t, qidx_t);
static int em_isc_txd_credits_update(void *, uint16_t, bool);
static void em_isc_rxd_refill(void *, if_rxd_update_t);
static void em_isc_rxd_flush(void *, uint16_t, uint8_t, qidx_t);
static int em_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t);
static int em_isc_rxd_pkt_get(void *, if_rxd_info_t);
static void lem_isc_rxd_refill(void *arg, if_rxd_update_t iru);
static void lem_isc_rxd_refill(void *, if_rxd_update_t);
static int lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx,
qidx_t budget);
static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri);
static int lem_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t);
static int lem_isc_rxd_pkt_get(void *, if_rxd_info_t);
static void em_receive_checksum(uint16_t, uint8_t, if_rxd_info_t);
static int em_determine_rsstype(uint32_t pkt_info);
extern int em_intr(void *arg);
static int em_determine_rsstype(uint32_t);
extern int em_intr(void *);
struct if_txrx em_txrx = {
.ift_txd_encap = em_isc_txd_encap,

View File

@ -42,29 +42,27 @@
/*********************************************************************
* Local Function prototypes
*********************************************************************/
static int igb_isc_txd_encap(void *arg, if_pkt_info_t pi);
static void igb_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx);
static int igb_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear);
static int igb_isc_txd_encap(void *, if_pkt_info_t);
static void igb_isc_txd_flush(void *, uint16_t, qidx_t);
static int igb_isc_txd_credits_update(void *, uint16_t, bool);
static void igb_isc_rxd_refill(void *arg, if_rxd_update_t iru);
static void igb_isc_rxd_refill(void *, if_rxd_update_t);
static void igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused,
qidx_t pidx);
static int igb_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx,
qidx_t budget);
static void igb_isc_rxd_flush(void *, uint16_t, uint8_t, qidx_t);
static int igb_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t);
static int igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri);
static int igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi,
uint32_t *cmd_type_len, uint32_t *olinfo_status);
static int igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi,
uint32_t *cmd_type_len, uint32_t *olinfo_status);
static int igb_tx_ctx_setup(struct tx_ring *, if_pkt_info_t, uint32_t *,
uint32_t *);
static int igb_tso_setup(struct tx_ring *, if_pkt_info_t, uint32_t *,
uint32_t *);
static void igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype);
static int igb_determine_rsstype(uint16_t pkt_info);
static void igb_rx_checksum(uint32_t, if_rxd_info_t, uint32_t);
static int igb_determine_rsstype(uint16_t);
extern void igb_if_enable_intr(if_ctx_t ctx);
extern int em_intr(void *arg);
extern void igb_if_enable_intr(if_ctx_t);
extern int em_intr(void *);
struct if_txrx igb_txrx = {
.ift_txd_encap = igb_isc_txd_encap,

File diff suppressed because it is too large Load Diff

View File

@ -206,10 +206,10 @@
CSUM_IP_SCTP | CSUM_IP6_UDP | CSUM_IP6_TCP | \
CSUM_IP6_SCTP) /* Offload bits in mbuf flag */
struct igc_adapter;
struct igc_softc;
struct igc_int_delay_info {
struct igc_adapter *adapter; /* Back-pointer to the adapter struct */
struct igc_softc *sc; /* Back-pointer to the softc struct */
int offset; /* Register offset to read/write */
int value; /* Current value in usecs */
};
@ -218,9 +218,9 @@ struct igc_int_delay_info {
* The transmit ring, one per tx queue
*/
struct tx_ring {
struct igc_adapter *adapter;
struct igc_softc *sc;
struct igc_tx_desc *tx_base;
uint64_t tx_paddr;
uint64_t tx_paddr;
qidx_t *tx_rsq;
uint8_t me;
qidx_t tx_rs_cidx;
@ -253,7 +253,7 @@ struct tx_ring {
* The Receive ring, one per rx queue
*/
struct rx_ring {
struct igc_adapter *adapter;
struct igc_softc *sc;
struct igc_rx_queue *que;
u32 me;
u32 payload;
@ -275,15 +275,15 @@ struct rx_ring {
};
struct igc_tx_queue {
struct igc_adapter *adapter;
u32 msix;
u32 eims; /* This queue's EIMS bit */
u32 me;
struct tx_ring txr;
struct igc_softc *sc;
u32 msix;
u32 eims; /* This queue's EIMS bit */
u32 me;
struct tx_ring txr;
};
struct igc_rx_queue {
struct igc_adapter *adapter;
struct igc_softc *sc;
u32 me;
u32 msix;
u32 eims;
@ -293,8 +293,8 @@ struct igc_rx_queue {
struct if_irq que_irq;
};
/* Our adapter structure */
struct igc_adapter {
/* Our softc structure */
struct igc_softc {
if_t ifp;
struct igc_hw hw;
@ -373,7 +373,7 @@ struct igc_adapter {
u16 vf_ifp;
};
void igc_dump_rs(struct igc_adapter *);
void igc_dump_rs(struct igc_softc *);
#define IGC_RSSRK_SIZE 4
#define IGC_RSSRK_VAL(key, i) (key[(i) * IGC_RSSRK_SIZE] | \

View File

@ -44,29 +44,27 @@
/*********************************************************************
* Local Function prototypes
*********************************************************************/
static int igc_isc_txd_encap(void *arg, if_pkt_info_t pi);
static void igc_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx);
static int igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear);
static int igc_isc_txd_encap(void *, if_pkt_info_t);
static void igc_isc_txd_flush(void *, uint16_t, qidx_t);
static int igc_isc_txd_credits_update(void *, uint16_t, bool);
static void igc_isc_rxd_refill(void *arg, if_rxd_update_t iru);
static void igc_isc_rxd_refill(void *, if_rxd_update_t);
static void igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused,
qidx_t pidx);
static int igc_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx,
qidx_t budget);
static void igc_isc_rxd_flush(void *, uint16_t, uint8_t, qidx_t);
static int igc_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t);
static int igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri);
static int igc_isc_rxd_pkt_get(void *, if_rxd_info_t);
static int igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi,
uint32_t *cmd_type_len, uint32_t *olinfo_status);
static int igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi,
uint32_t *cmd_type_len, uint32_t *olinfo_status);
static int igc_tx_ctx_setup(struct tx_ring *, if_pkt_info_t, uint32_t *,
uint32_t *);
static int igc_tso_setup(struct tx_ring *, if_pkt_info_t, uint32_t *,
uint32_t *);
static void igc_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype);
static int igc_determine_rsstype(uint16_t pkt_info);
static void igc_rx_checksum(uint32_t, if_rxd_info_t, uint32_t);
static int igc_determine_rsstype(uint16_t);
extern void igc_if_enable_intr(if_ctx_t ctx);
extern int igc_intr(void *arg);
extern void igc_if_enable_intr(if_ctx_t);
extern int igc_intr(void *);
struct if_txrx igc_txrx = {
.ift_txd_encap = igc_isc_txd_encap,
@ -80,9 +78,9 @@ struct if_txrx igc_txrx = {
};
void
igc_dump_rs(struct igc_adapter *adapter)
igc_dump_rs(struct igc_softc *sc)
{
if_softc_ctx_t scctx = adapter->shared;
if_softc_ctx_t scctx = sc->shared;
struct igc_tx_queue *que;
struct tx_ring *txr;
qidx_t i, ntxd, qid, cur;
@ -91,8 +89,8 @@ igc_dump_rs(struct igc_adapter *adapter)
printf("\n");
ntxd = scctx->isc_ntxd[0];
for (qid = 0; qid < adapter->tx_num_queues; qid++) {
que = &adapter->tx_queues[qid];
for (qid = 0; qid < sc->tx_num_queues; qid++) {
que = &sc->tx_queues[qid];
txr = &que->txr;
rs_cidx = txr->tx_rs_cidx;
if (rs_cidx != txr->tx_rs_pidx) {
@ -263,7 +261,7 @@ igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len,
static int
igc_isc_txd_encap(void *arg, if_pkt_info_t pi)
{
struct igc_adapter *sc = arg;
struct igc_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared;
struct igc_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx];
struct tx_ring *txr = &que->txr;
@ -326,19 +324,19 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi)
static void
igc_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx)
{
struct igc_adapter *adapter = arg;
struct igc_tx_queue *que = &adapter->tx_queues[txqid];
struct igc_softc *sc = arg;
struct igc_tx_queue *que = &sc->tx_queues[txqid];
struct tx_ring *txr = &que->txr;
IGC_WRITE_REG(&adapter->hw, IGC_TDT(txr->me), pidx);
IGC_WRITE_REG(&sc->hw, IGC_TDT(txr->me), pidx);
}
static int
igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear)
{
struct igc_adapter *adapter = arg;
if_softc_ctx_t scctx = adapter->shared;
struct igc_tx_queue *que = &adapter->tx_queues[txqid];
struct igc_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared;
struct igc_tx_queue *que = &sc->tx_queues[txqid];
struct tx_ring *txr = &que->txr;
qidx_t processed = 0;
@ -388,7 +386,7 @@ igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear)
static void
igc_isc_rxd_refill(void *arg, if_rxd_update_t iru)
{
struct igc_adapter *sc = arg;
struct igc_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared;
uint16_t rxqid = iru->iru_qsidx;
struct igc_rx_queue *que = &sc->rx_queues[rxqid];
@ -415,7 +413,7 @@ igc_isc_rxd_refill(void *arg, if_rxd_update_t iru)
static void
igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx)
{
struct igc_adapter *sc = arg;
struct igc_softc *sc = arg;
struct igc_rx_queue *que = &sc->rx_queues[rxqid];
struct rx_ring *rxr = &que->rxr;
@ -425,7 +423,7 @@ igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx)
static int
igc_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget)
{
struct igc_adapter *sc = arg;
struct igc_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared;
struct igc_rx_queue *que = &sc->rx_queues[rxqid];
struct rx_ring *rxr = &que->rxr;
@ -457,9 +455,9 @@ igc_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget)
static int
igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
{
struct igc_adapter *adapter = arg;
if_softc_ctx_t scctx = adapter->shared;
struct igc_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx];
struct igc_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared;
struct igc_rx_queue *que = &sc->rx_queues[ri->iri_qsidx];
struct rx_ring *rxr = &que->rxr;
union igc_adv_rx_desc *rxd;
@ -489,7 +487,7 @@ igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
/* Make sure bad packets are discarded */
if (eop && ((staterr & IGC_RXDEXT_STATERR_RXE) != 0)) {
adapter->dropped_pkts++;
sc->dropped_pkts++;
++rxr->rx_discarded;
return (EBADMSG);
}

View File

@ -4010,8 +4010,8 @@ netmap_attach_common(struct netmap_adapter *na)
na->active_fds = 0;
if (na->nm_mem == NULL) {
/* use iommu or global allocator */
na->nm_mem = netmap_mem_get_iommu(na);
/* select an allocator based on IOMMU and NUMA affinity */
na->nm_mem = netmap_mem_get_allocator(na);
}
if (na->nm_bdg_attach == NULL)
/* no special nm_bdg_attach callback. On VALE

View File

@ -81,6 +81,7 @@
#if defined(__FreeBSD__)
#include <sys/selinfo.h>
#include <vm/vm.h>
#define likely(x) __builtin_expect((long)!!(x), 1L)
#define unlikely(x) __builtin_expect((long)!!(x), 0L)
@ -1727,10 +1728,30 @@ extern int netmap_generic_txqdisc;
#define NM_IS_NATIVE(ifp) (NM_NA_VALID(ifp) && NA(ifp)->nm_dtor == netmap_hw_dtor)
#if defined(__FreeBSD__)
extern int netmap_port_numa_affinity;
/* Assigns the device IOMMU domain to an allocator.
* Returns -ENOMEM in case the domain is different */
#define nm_iommu_group_id(dev) (-1)
static inline int
nm_iommu_group_id(struct netmap_adapter *na)
{
return (-1);
}
static inline int
nm_numa_domain(struct netmap_adapter *na)
{
int domain;
/*
* If the system has only one NUMA domain, don't bother distinguishing
* between IF_NODOM and domain 0.
*/
if (vm_ndomains == 1 || netmap_port_numa_affinity == 0)
return (-1);
domain = if_getnumadomain(na->ifp);
if (domain == IF_NODOM)
domain = -1;
return (domain);
}
/* Callback invoked by the dma machinery after a successful dmamap_load */
static void netmap_dmamap_cb(__unused void *arg,

View File

@ -37,8 +37,8 @@
#endif /* __APPLE__ */
#ifdef __FreeBSD__
#include <sys/cdefs.h> /* prerequisite */
#include <sys/types.h>
#include <sys/domainset.h>
#include <sys/malloc.h>
#include <sys/kernel.h> /* MALLOC_DEFINE */
#include <sys/proc.h>
@ -174,7 +174,8 @@ struct netmap_mem_d {
struct netmap_obj_pool pools[NETMAP_POOLS_NR];
nm_memid_t nm_id; /* allocator identifier */
int nm_grp; /* iommu group id */
int nm_grp; /* iommu group id */
int nm_numa_domain; /* local NUMA domain */
/* list of all existing allocators, sorted by nm_id */
struct netmap_mem_d *prev, *next;
@ -310,7 +311,7 @@ netmap_mem_rings_delete(struct netmap_adapter *na)
static int netmap_mem_map(struct netmap_obj_pool *, struct netmap_adapter *);
static int netmap_mem_unmap(struct netmap_obj_pool *, struct netmap_adapter *);
static int nm_mem_check_group(struct netmap_mem_d *, bus_dma_tag_t);
static int nm_mem_check_group(struct netmap_mem_d *, void *);
static void nm_mem_release_id(struct netmap_mem_d *);
nm_memid_t
@ -576,6 +577,7 @@ struct netmap_mem_d nm_mem = { /* Our memory allocator. */
.nm_id = 1,
.nm_grp = -1,
.nm_numa_domain = -1,
.prev = &nm_mem,
.next = &nm_mem,
@ -615,6 +617,7 @@ static const struct netmap_mem_d nm_blueprint = {
},
.nm_grp = -1,
.nm_numa_domain = -1,
.flags = NETMAP_MEM_PRIVATE,
@ -625,7 +628,6 @@ static const struct netmap_mem_d nm_blueprint = {
#define STRINGIFY(x) #x
#define DECLARE_SYSCTLS(id, name) \
SYSBEGIN(mem2_ ## name); \
SYSCTL_INT(_dev_netmap, OID_AUTO, name##_size, \
@ -649,9 +651,14 @@ DECLARE_SYSCTLS(NETMAP_IF_POOL, if);
DECLARE_SYSCTLS(NETMAP_RING_POOL, ring);
DECLARE_SYSCTLS(NETMAP_BUF_POOL, buf);
int netmap_port_numa_affinity = 0;
SYSCTL_INT(_dev_netmap, OID_AUTO, port_numa_affinity,
CTLFLAG_RDTUN, &netmap_port_numa_affinity, 0,
"Use NUMA-local memory for memory pools when possible");
/* call with nm_mem_list_lock held */
static int
nm_mem_assign_id_locked(struct netmap_mem_d *nmd, int grp_id)
nm_mem_assign_id_locked(struct netmap_mem_d *nmd, int grp_id, int domain)
{
nm_memid_t id;
struct netmap_mem_d *scan = netmap_last_mem_d;
@ -666,6 +673,7 @@ nm_mem_assign_id_locked(struct netmap_mem_d *nmd, int grp_id)
if (id != scan->nm_id) {
nmd->nm_id = id;
nmd->nm_grp = grp_id;
nmd->nm_numa_domain = domain;
nmd->prev = scan->prev;
nmd->next = scan;
scan->prev->next = nmd;
@ -688,7 +696,7 @@ nm_mem_assign_id(struct netmap_mem_d *nmd, int grp_id)
int ret;
NM_MTX_LOCK(nm_mem_list_lock);
ret = nm_mem_assign_id_locked(nmd, grp_id);
ret = nm_mem_assign_id_locked(nmd, grp_id, -1);
NM_MTX_UNLOCK(nm_mem_list_lock);
return ret;
@ -728,7 +736,7 @@ netmap_mem_find(nm_memid_t id)
}
static int
nm_mem_check_group(struct netmap_mem_d *nmd, bus_dma_tag_t dev)
nm_mem_check_group(struct netmap_mem_d *nmd, void *dev)
{
int err = 0, id;
@ -1399,7 +1407,7 @@ netmap_config_obj_allocator(struct netmap_obj_pool *p, u_int objtotal, u_int obj
/* call with NMA_LOCK held */
static int
netmap_finalize_obj_allocator(struct netmap_obj_pool *p)
netmap_finalize_obj_allocator(struct netmap_mem_d *nmd, struct netmap_obj_pool *p)
{
int i; /* must be signed */
@ -1440,8 +1448,16 @@ netmap_finalize_obj_allocator(struct netmap_obj_pool *p)
* can live with standard malloc, because the hardware will not
* access the pages directly.
*/
clust = contigmalloc(p->_clustsize, M_NETMAP, M_NOWAIT | M_ZERO,
(size_t)0, -1UL, PAGE_SIZE, 0);
if (nmd->nm_numa_domain == -1) {
clust = contigmalloc(p->_clustsize, M_NETMAP,
M_NOWAIT | M_ZERO, (size_t)0, -1UL, PAGE_SIZE, 0);
} else {
struct domainset *ds;
ds = DOMAINSET_PREF(nmd->nm_numa_domain);
clust = contigmalloc_domainset(p->_clustsize, M_NETMAP,
ds, M_NOWAIT | M_ZERO, (size_t)0, -1UL, PAGE_SIZE, 0);
}
if (clust == NULL) {
/*
* If we get here, there is a severe memory shortage,
@ -1634,7 +1650,7 @@ netmap_mem_finalize_all(struct netmap_mem_d *nmd)
nmd->lasterr = 0;
nmd->nm_totalsize = 0;
for (i = 0; i < NETMAP_POOLS_NR; i++) {
nmd->lasterr = netmap_finalize_obj_allocator(&nmd->pools[i]);
nmd->lasterr = netmap_finalize_obj_allocator(nmd, &nmd->pools[i]);
if (nmd->lasterr)
goto error;
nmd->nm_totalsize += nmd->pools[i].memtotal;
@ -1802,24 +1818,26 @@ netmap_mem_private_new(u_int txr, u_int txd, u_int rxr, u_int rxd,
return d;
}
/* Reference iommu allocator - find existing or create new,
* for not hw addapeters fallback to global allocator.
/* Reference IOMMU and NUMA local allocator - find existing or create new,
* for non-hw adapters, fall back to global allocator.
*/
struct netmap_mem_d *
netmap_mem_get_iommu(struct netmap_adapter *na)
netmap_mem_get_allocator(struct netmap_adapter *na)
{
int i, err, grp_id;
int i, domain, err, grp_id;
struct netmap_mem_d *nmd;
if (na == NULL || na->pdev == NULL)
return netmap_mem_get(&nm_mem);
domain = nm_numa_domain(na->pdev);
grp_id = nm_iommu_group_id(na->pdev);
NM_MTX_LOCK(nm_mem_list_lock);
nmd = netmap_last_mem_d;
do {
if (!(nmd->flags & NETMAP_MEM_HIDDEN) && nmd->nm_grp == grp_id) {
if (!(nmd->flags & NETMAP_MEM_HIDDEN) &&
nmd->nm_grp == grp_id && nmd->nm_numa_domain == domain) {
nmd->refcount++;
NM_DBG_REFC(nmd, __FUNCTION__, __LINE__);
NM_MTX_UNLOCK(nm_mem_list_lock);
@ -1834,7 +1852,7 @@ netmap_mem_get_iommu(struct netmap_adapter *na)
*nmd = nm_mem_blueprint;
err = nm_mem_assign_id_locked(nmd, grp_id);
err = nm_mem_assign_id_locked(nmd, grp_id, domain);
if (err)
goto error_free;
@ -2878,7 +2896,7 @@ netmap_mem_pt_guest_create(nm_memid_t mem_id)
ptnmd->pt_ifs = NULL;
/* Assign new id in the guest (We have the lock) */
err = nm_mem_assign_id_locked(&ptnmd->up, -1);
err = nm_mem_assign_id_locked(&ptnmd->up, -1, -1);
if (err)
goto error;

View File

@ -146,7 +146,7 @@ struct netmap_mem_d* netmap_mem_private_new( u_int txr, u_int txd, u_int rxr, u_
#define netmap_mem_get(d) __netmap_mem_get(d, __FUNCTION__, __LINE__)
#define netmap_mem_put(d) __netmap_mem_put(d, __FUNCTION__, __LINE__)
struct netmap_mem_d* __netmap_mem_get(struct netmap_mem_d *, const char *, int);
struct netmap_mem_d* netmap_mem_get_iommu(struct netmap_adapter *);
struct netmap_mem_d* netmap_mem_get_allocator(struct netmap_adapter *);
void __netmap_mem_put(struct netmap_mem_d *, const char *, int);
struct netmap_mem_d* netmap_mem_find(nm_memid_t);
unsigned netmap_mem_bufsize(struct netmap_mem_d *nmd);

View File

@ -2616,17 +2616,25 @@ static int
v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo,
daddr_t startlbn, daddr_t endlbn)
{
struct bufv *bv;
struct buf *bp, *nbp;
bool anyfreed;
uint8_t anyfreed;
bool clean;
ASSERT_VOP_LOCKED(vp, "v_inval_buf_range_locked");
ASSERT_BO_LOCKED(bo);
anyfreed = 1;
clean = true;
do {
anyfreed = false;
TAILQ_FOREACH_SAFE(bp, &bo->bo_clean.bv_hd, b_bobufs, nbp) {
if (bp->b_lblkno < startlbn || bp->b_lblkno >= endlbn)
continue;
bv = clean ? &bo->bo_clean : &bo->bo_dirty;
bp = BUF_PCTRIE_LOOKUP_GE(&bv->bv_root, startlbn);
if (bp == NULL || bp->b_lblkno >= endlbn ||
bp->b_lblkno < startlbn)
continue;
TAILQ_FOREACH_FROM_SAFE(bp, &bv->bv_hd, b_bobufs, nbp) {
if (bp->b_lblkno >= endlbn)
break;
if (BUF_LOCK(bp,
LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK,
BO_LOCKPTR(bo)) == ENOLCK) {
@ -2638,39 +2646,17 @@ v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo,
bp->b_flags |= B_INVAL | B_RELBUF;
bp->b_flags &= ~B_ASYNC;
brelse(bp);
anyfreed = true;
anyfreed = 2;
BO_LOCK(bo);
if (nbp != NULL &&
(((nbp->b_xflags & BX_VNCLEAN) == 0) ||
(((nbp->b_xflags &
(clean ? BX_VNCLEAN : BX_VNDIRTY)) == 0) ||
nbp->b_vp != vp ||
(nbp->b_flags & B_DELWRI) != 0))
(nbp->b_flags & B_DELWRI) == (clean? B_DELWRI: 0)))
return (EAGAIN);
}
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
if (bp->b_lblkno < startlbn || bp->b_lblkno >= endlbn)
continue;
if (BUF_LOCK(bp,
LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK,
BO_LOCKPTR(bo)) == ENOLCK) {
BO_LOCK(bo);
return (EAGAIN);
}
bremfree(bp);
bp->b_flags |= B_INVAL | B_RELBUF;
bp->b_flags &= ~B_ASYNC;
brelse(bp);
anyfreed = true;
BO_LOCK(bo);
if (nbp != NULL &&
(((nbp->b_xflags & BX_VNDIRTY) == 0) ||
(nbp->b_vp != vp) ||
(nbp->b_flags & B_DELWRI) == 0))
return (EAGAIN);
}
} while (anyfreed);
} while (clean = !clean, anyfreed-- > 0);
return (0);
}

View File

@ -0,0 +1,5 @@
# Makes this a valid top-level target
DIRDEPS=
.include <dirdeps.mk>

View File

@ -205,12 +205,6 @@ def check_ipv4(expect_params, packet):
if dst_address and ip.dst != dst_address:
LOGGER.debug(f'Wrong IPv4 destination {ip.dst}, expected {dst_address}')
return False
chksum = ip.chksum
ip.chksum = None
new_chksum = sp.IP(sp.raw(ip)).chksum
if chksum != new_chksum:
LOGGER.debug(f'Wrong IPv4 checksum {chksum}, expected {new_chksum}')
return False
if flags and ip.flags != flags:
LOGGER.debug(f'Wrong IP flags value {ip.flags}, expected {flags}')
return False

View File

@ -8,7 +8,7 @@
#
CLDRVERSION= 45.0
UCDVERSION= 16.0.0
UCDVERSION= 15.0.0
.if ${.CURDIR} == ${.OBJDIR}
.error Do make obj first.

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,19 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libarchive \
lib/libbz2 \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/liblzma \
lib/libthr \
lib/libz \
secure/lib/libcrypto \
.include <dirdeps.mk>

View File

@ -1,7 +1,6 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \

View File

@ -3,6 +3,7 @@
DIRDEPS = \
lib/clang/libclangminimal \
lib/clang/libllvmminimal \
lib/ncurses/tinfo \
.include <dirdeps.mk>

View File

@ -0,0 +1,32 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/clang/libclang.amd64 \
lib/clang/liblldb.amd64 \
lib/clang/libllvm.amd64 \
lib/libc \
lib/libc++ \
lib/libcompiler_rt \
lib/libcxxrt \
lib/libedit \
lib/libexecinfo \
lib/liblua \
lib/liblzma \
lib/libthr \
lib/libz \
lib/libzstd \
lib/msun \
lib/ncurses/ncurses \
lib/ncurses/panel \
lib/ncurses/tinfo \
usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -2,6 +2,7 @@
DIRDEPS = \
lib/clang/libllvmminimal \
lib/ncurses/tinfo \
.include <dirdeps.mk>

View File

@ -2,6 +2,7 @@
DIRDEPS = \
lib/clang/libllvmminimal \
lib/ncurses/tinfo \
usr.bin/clang/llvm-min-tblgen \

View File

@ -1,19 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libarchive \
lib/libbz2 \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/liblzma \
lib/libthr \
lib/libz \
secure/lib/libcrypto \
.include <dirdeps.mk>

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -7,6 +7,7 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/libutil \
lib/libxo/libxo \
.include <dirdeps.mk>

10
usr.bin/env/tests/Makefile.depend vendored Normal file
View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,13 +1,13 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/ncurses/ncursesw \
lib/ncurses/ncurses \
lib/ncurses/tinfo \
.include <dirdeps.mk>

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,23 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
bin/sh.host \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libc++ \
lib/libcompiler_rt \
lib/libcxxrt \
lib/libjail \
lib/liblua \
lib/liblutok.amd64 \
lib/libsqlite3 \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,10 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,17 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
bin/sh.host \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/ncurses/tinfo \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,22 +1,15 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libarchive \
lib/libbz2 \
lib/libc \
lib/libcompiler_rt \
lib/libelf \
lib/libelftc \
lib/libexpat \
lib/liblzma \
lib/libpe \
lib/libthr \
lib/libz \
secure/lib/libcrypto \
.include <dirdeps.mk>

View File

@ -0,0 +1,24 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/arpa \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libthr \
lib/ofed/include \
lib/ofed/libcxgb4 \
lib/ofed/libibverbs \
lib/ofed/libirdma \
lib/ofed/libmlx4 \
lib/ofed/libmlx5 \
lib/ofed/librdmacm \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

Some files were not shown because too many files have changed in this diff Show More