From nobody Mon Jun 10 02:55:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyGdR00xlz5Njn4; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyGdQ5NkMz4XVW; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kE/GgNl7pkaniEdQ0kcC+b2AXfRhbLSDGOx/m0yC5gg=; b=Q934o4QoU8S+FT9+A6ahravc5TjpXOHtt36HPYiMjFrXkdOcQqfjonyVYrUy1h5CScgod+ Vw1Y3vVcNbakcCdUYD43vbSYvxNwEaoRV2QWnpkXuvxDC7o7VK6YwjwVs7ggdRhojFDae/ VlpZxBQGeTwO1rT4wn5B0r5sUnh6IvhiTzc/wLAkcBsjO+6+7rPW274sjYhcR9pUpBNnsL JRQBQJwZgfVUU8BhiTFlmfeH4oJqeG8yRXAf+i01+VDg7I1EXVP6wWy/QWOiH/L2cZMbLf Mp0pDCm+CCnh/Ron3BQBXlOXERbfxtmTwRc0hQLiXUwO9BtKjNloModHXxulgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717988138; a=rsa-sha256; cv=none; b=X7ZWqkPAThHchz29Qz9t3795Znc5M3nwNkjCcsiadGewyXKQAM58eipjMmR/kcQwuPdzkn zSK/NeBsni/G8AwK07+ehIYOa50HGIH9+NSiYkais7YqUnhI2n8rAj3yyWhnlwpSE+Rrks UHM/Mzd4NX00JGk8e1C/K8dMVTTEhVZhUzLU6g2b17y08VDjBD6aP/MsmDywzTQbLYiDkH vMAS4s9VLxEqbzorRUpg0myIM5CxodLWt6BnZVeaPxivdSWES3a8ctqhWug7E2CxBvU3PG WUx1Jxv8u3YH5Cs2yEDXb8VGqwTfYV377+am0pte9ENL0r7YuVgsAj1t1hmMiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kE/GgNl7pkaniEdQ0kcC+b2AXfRhbLSDGOx/m0yC5gg=; b=O/JyDXNZedPwsKnVE/p9/bKUBdCNNXpEZf0/YCJ9yLPQRpSJwA1V3FFrtneDxnDc2pJPd9 GKlaPAmf5rY0U1iDeZRQLAp0G+YeVNevW/ge4+rA4r/ET+aGcKmrE/D/G26uZmY1ZLOnz8 CAeOLaCo0tRt6g+TEB0umI7ZmaXkdClROsPaUnyNfUtb3wvxzBbzYBn+OpMrARcdUp+Md2 chN2/xSlC+lHzEl9BPASeHfVcjav+5zShhb6pE+teZw2YEB3uJJX5pcVWIdFD5VyZ3XEov NEFNHRcfrcALFHBBx13h/1opv1Aus6umLd6oUB8/Km+eeXnWUKJ1IQonYtc4nQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyGdQ4sT7z16nw; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A2tcGN068681; Mon, 10 Jun 2024 02:55:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A2tckZ068678; Mon, 10 Jun 2024 02:55:38 GMT (envelope-from git) Date: Mon, 10 Jun 2024 02:55:38 GMT Message-Id: <202406100255.45A2tckZ068678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 3562d64e794b - stable/14 - sqlite3: Vendor import of sqlite3 3.46.0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3562d64e794b2614f15728c8b7e3a6dff0b644a7 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3562d64e794b2614f15728c8b7e3a6dff0b644a7 commit 3562d64e794b2614f15728c8b7e3a6dff0b644a7 Author: Cy Schubert AuthorDate: 2024-06-03 01:40:14 +0000 Commit: Cy Schubert CommitDate: 2024-06-10 02:55:18 +0000 sqlite3: Vendor import of sqlite3 3.46.0 Release notes at https://www.sqlite.org/releaselog/3_46_0.html. Obtained from: https://www.sqlite.org/2024/sqlite-autoconf-3460000.tar.gz Merge commit '259d29fd8c012d4392fa59ff803b691ead5b304d' into main (cherry picked from commit 0f996f45418e82dae151e5d1da478da38d70049f) --- contrib/sqlite3/Makefile.msc | 7 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1943 +++++++-- contrib/sqlite3/sqlite3.c | 8935 +++++++++++++++++++++++--------------- contrib/sqlite3/sqlite3.h | 116 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 +- contrib/sqlite3/tea/configure.ac | 2 +- 9 files changed, 7287 insertions(+), 3758 deletions(-) diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 45a07a9f317c..a4270fb2ae71 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -18,6 +18,13 @@ TOP = . +# Optionally set EXTRA_SRC to a list of C files to append to +# the generated sqlite3.c. +# +!IFNDEF EXTRA_SRC +EXTRA_SRC = +!ENDIF + # Set this non-0 to enable full warnings (-W4, etc) when compiling. # !IFNDEF USE_FULLWARN diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 472e8acd0097..f2f70b5ae802 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.45.1. +# Generated by GNU Autoconf 2.71 for sqlite 3.46.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.45.1' -PACKAGE_STRING='sqlite 3.45.1' +PACKAGE_VERSION='3.46.0' +PACKAGE_STRING='sqlite 3.46.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.45.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.46.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.45.1:";; + short | recursive ) echo "Configuration of sqlite 3.46.0:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.45.1 +sqlite configure 3.46.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.45.1, which was +It was created by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.45.1' + VERSION='3.46.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.45.1, which was +This file was extended by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.45.1 +sqlite config.status 3.46.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index 3ce8855cc762..c83f381d90b1 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.45.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.46.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 1e02a12fbc2f..7d46e4acac57 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -580,6 +580,9 @@ zSkipValidUtf8(const char *z, int nAccept, long ccm); #ifndef HAVE_CONSOLE_IO_H # include "console_io.h" #endif +#if defined(_MSC_VER) +# pragma warning(disable : 4204) +#endif #ifndef SQLITE_CIO_NO_TRANSLATE # if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT @@ -678,6 +681,10 @@ static short streamOfConsole(FILE *pf, /* out */ PerStreamTags *ppst){ # endif } +# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +# define ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x4) +# endif + # if CIO_WIN_WC_XLATE /* Define console modes for use with the Windows Console API. */ # define SHELL_CONI_MODE \ @@ -1228,6 +1235,10 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ } #endif /* !defined(SQLITE_CIO_NO_TRANSLATE) */ +#if defined(_MSC_VER) +# pragma warning(default : 4204) +#endif + #undef SHELL_INVALID_FILE_PTR /************************* End ../ext/consio/console_io.c ********************/ @@ -1250,6 +1261,9 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ * setOutputStream(FILE *pf) * This is normally the stream that CLI normal output goes to. * For the stand-alone CLI, it is stdout with no .output redirect. + * + * The ?putz(z) forms are required for the Fiddle builds for string literal + * output, in aid of enforcing format string to argument correspondence. */ # define sputz(s,z) fPutsUtf8(z,s) # define sputf fPrintfUtf8 @@ -1261,12 +1275,18 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ #else /* For Fiddle, all console handling and emit redirection is omitted. */ -# define sputz(fp,z) fputs(z,fp) +/* These next 3 macros are for emitting formatted output. When complaints + * from the WASM build are issued for non-formatted output, (when a mere + * string literal is to be emitted, the ?putz(z) forms should be used. + * (This permits compile-time checking of format string / argument mismatch.) + */ +# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) +# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) # define sputf(fp,fmt, ...) fprintf(fp,fmt,__VA_ARGS__) +/* These next 3 macros are for emitting simple string literals. */ # define oputz(z) fputs(z,stdout) -# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) # define eputz(z) fputs(z,stderr) -# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) +# define sputz(fp,z) fputs(z,fp) # define oputb(buf,na) fwrite(buf,1,na,stdout) #endif @@ -5711,16 +5731,20 @@ SQLITE_EXTENSION_INIT1 ** index is ix. The 0th member is given by smBase. The sequence members ** progress per ix increment by smStep. */ -static sqlite3_int64 genSeqMember(sqlite3_int64 smBase, - sqlite3_int64 smStep, - sqlite3_uint64 ix){ - if( ix>=(sqlite3_uint64)LLONG_MAX ){ +static sqlite3_int64 genSeqMember( + sqlite3_int64 smBase, + sqlite3_int64 smStep, + sqlite3_uint64 ix +){ + static const sqlite3_uint64 mxI64 = + ((sqlite3_uint64)0x7fffffff)<<32 | 0xffffffff; + if( ix>=mxI64 ){ /* Get ix into signed i64 range. */ - ix -= (sqlite3_uint64)LLONG_MAX; + ix -= mxI64; /* With 2's complement ALU, this next can be 1 step, but is split into * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */ - smBase += (LLONG_MAX/2) * smStep; - smBase += (LLONG_MAX - LLONG_MAX/2) * smStep; + smBase += (mxI64/2) * smStep; + smBase += (mxI64 - mxI64/2) * smStep; } /* Under UBSAN (or on 1's complement machines), must do this last term * in steps to avoid the dreaded (and harmless) signed multiply overlow. */ @@ -5980,13 +6004,13 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ ** parameter. (idxStr is not used in this implementation.) idxNum ** is a bitmask showing which constraints are available: ** -** 1: start=VALUE -** 2: stop=VALUE -** 4: step=VALUE -** -** Also, if bit 8 is set, that means that the series should be output -** in descending order rather than in ascending order. If bit 16 is -** set, then output must appear in ascending order. +** 0x01: start=VALUE +** 0x02: stop=VALUE +** 0x04: step=VALUE +** 0x08: descending order +** 0x10: ascending order +** 0x20: LIMIT VALUE +** 0x40: OFFSET VALUE ** ** This routine should initialize the cursor and position it so that it ** is pointing at the first row, or pointing off the end of the table @@ -6000,26 +6024,44 @@ static int seriesFilter( series_cursor *pCur = (series_cursor *)pVtabCursor; int i = 0; (void)idxStrUnused; - if( idxNum & 1 ){ + if( idxNum & 0x01 ){ pCur->ss.iBase = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iBase = 0; } - if( idxNum & 2 ){ + if( idxNum & 0x02 ){ pCur->ss.iTerm = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iTerm = 0xffffffff; } - if( idxNum & 4 ){ + if( idxNum & 0x04 ){ pCur->ss.iStep = sqlite3_value_int64(argv[i++]); if( pCur->ss.iStep==0 ){ pCur->ss.iStep = 1; }else if( pCur->ss.iStep<0 ){ - if( (idxNum & 16)==0 ) idxNum |= 8; + if( (idxNum & 0x10)==0 ) idxNum |= 0x08; } }else{ pCur->ss.iStep = 1; } + if( idxNum & 0x20 ){ + sqlite3_int64 iLimit = sqlite3_value_int64(argv[i++]); + sqlite3_int64 iTerm; + if( idxNum & 0x40 ){ + sqlite3_int64 iOffset = sqlite3_value_int64(argv[i++]); + if( iOffset>0 ){ + pCur->ss.iBase += pCur->ss.iStep*iOffset; + } + } + if( iLimit>=0 ){ + iTerm = pCur->ss.iBase + (iLimit - 1)*pCur->ss.iStep; + if( pCur->ss.iStep<0 ){ + if( iTerm>pCur->ss.iTerm ) pCur->ss.iTerm = iTerm; + }else{ + if( iTermss.iTerm ) pCur->ss.iTerm = iTerm; + } + } + } for(i=0; iss.isReversing = pCur->ss.iStep > 0; }else{ pCur->ss.isReversing = pCur->ss.iStep < 0; @@ -6050,10 +6092,13 @@ static int seriesFilter( ** ** The query plan is represented by bits in idxNum: ** -** (1) start = $value -- constraint exists -** (2) stop = $value -- constraint exists -** (4) step = $value -- constraint exists -** (8) output in descending order +** 0x01 start = $value -- constraint exists +** 0x02 stop = $value -- constraint exists +** 0x04 step = $value -- constraint exists +** 0x08 output is in descending order +** 0x10 output is in ascending order +** 0x20 LIMIT $value -- constraint exists +** 0x40 OFFSET $value -- constraint exists */ static int seriesBestIndex( sqlite3_vtab *pVTab, @@ -6061,10 +6106,12 @@ static int seriesBestIndex( ){ int i, j; /* Loop over constraints */ int idxNum = 0; /* The query plan bitmask */ +#ifndef ZERO_ARGUMENT_GENERATE_SERIES int bStartSeen = 0; /* EQ constraint seen on the START column */ +#endif int unusableMask = 0; /* Mask of unusable constraints */ int nArg = 0; /* Number of arguments that seriesFilter() expects */ - int aIdx[3]; /* Constraints on start, stop, and step */ + int aIdx[5]; /* Constraints on start, stop, step, LIMIT, OFFSET */ const struct sqlite3_index_constraint *pConstraint; /* This implementation assumes that the start, stop, and step columns @@ -6072,28 +6119,54 @@ static int seriesBestIndex( assert( SERIES_COLUMN_STOP == SERIES_COLUMN_START+1 ); assert( SERIES_COLUMN_STEP == SERIES_COLUMN_START+2 ); - aIdx[0] = aIdx[1] = aIdx[2] = -1; + aIdx[0] = aIdx[1] = aIdx[2] = aIdx[3] = aIdx[4] = -1; pConstraint = pIdxInfo->aConstraint; for(i=0; inConstraint; i++, pConstraint++){ int iCol; /* 0 for start, 1 for stop, 2 for step */ int iMask; /* bitmask for those column */ + int op = pConstraint->op; + if( op>=SQLITE_INDEX_CONSTRAINT_LIMIT + && op<=SQLITE_INDEX_CONSTRAINT_OFFSET + ){ + if( pConstraint->usable==0 ){ + /* do nothing */ + }else if( op==SQLITE_INDEX_CONSTRAINT_LIMIT ){ + aIdx[3] = i; + idxNum |= 0x20; + }else{ + assert( op==SQLITE_INDEX_CONSTRAINT_OFFSET ); + aIdx[4] = i; + idxNum |= 0x40; + } + continue; + } if( pConstraint->iColumniColumn - SERIES_COLUMN_START; assert( iCol>=0 && iCol<=2 ); iMask = 1 << iCol; - if( iCol==0 ) bStartSeen = 1; +#ifndef ZERO_ARGUMENT_GENERATE_SERIES + if( iCol==0 && op==SQLITE_INDEX_CONSTRAINT_EQ ){ + bStartSeen = 1; + } +#endif if( pConstraint->usable==0 ){ unusableMask |= iMask; continue; - }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){ + }else if( op==SQLITE_INDEX_CONSTRAINT_EQ ){ idxNum |= iMask; aIdx[iCol] = i; } } - for(i=0; i<3; i++){ + if( aIdx[3]==0 ){ + /* Ignore OFFSET if LIMIT is omitted */ + idxNum &= ~0x60; + aIdx[4] = 0; + } + for(i=0; i<5; i++){ if( (j = aIdx[i])>=0 ){ pIdxInfo->aConstraintUsage[j].argvIndex = ++nArg; - pIdxInfo->aConstraintUsage[j].omit = !SQLITE_SERIES_CONSTRAINT_VERIFY; + pIdxInfo->aConstraintUsage[j].omit = + !SQLITE_SERIES_CONSTRAINT_VERIFY || i>=3; } } /* The current generate_column() implementation requires at least one @@ -6114,19 +6187,22 @@ static int seriesBestIndex( ** this plan is unusable */ return SQLITE_CONSTRAINT; } - if( (idxNum & 3)==3 ){ + if( (idxNum & 0x03)==0x03 ){ /* Both start= and stop= boundaries are available. This is the ** the preferred case */ pIdxInfo->estimatedCost = (double)(2 - ((idxNum&4)!=0)); pIdxInfo->estimatedRows = 1000; if( pIdxInfo->nOrderBy>=1 && pIdxInfo->aOrderBy[0].iColumn==0 ){ if( pIdxInfo->aOrderBy[0].desc ){ - idxNum |= 8; + idxNum |= 0x08; }else{ - idxNum |= 16; + idxNum |= 0x10; } pIdxInfo->orderByConsumed = 1; } + }else if( (idxNum & 0x21)==0x21 ){ + /* We have start= and LIMIT */ + pIdxInfo->estimatedRows = 2500; }else{ /* If either boundary is missing, we have to generate a huge span ** of numbers. Make this case very expensive so that the query @@ -7453,7 +7529,9 @@ static int writeFile( #if !defined(_WIN32) && !defined(WIN32) if( S_ISLNK(mode) ){ const char *zTo = (const char*)sqlite3_value_text(pData); - if( zTo==0 || symlink(zTo, zFile)<0 ) return 1; + if( zTo==0 ) return 1; + unlink(zFile); + if( symlink(zTo, zFile)<0 ) return 1; }else #endif { @@ -7539,13 +7617,19 @@ static int writeFile( return 1; } #else - /* Legacy unix */ - struct timeval times[2]; - times[0].tv_usec = times[1].tv_usec = 0; - times[0].tv_sec = time(0); - times[1].tv_sec = mtime; - if( utimes(zFile, times) ){ - return 1; + /* Legacy unix. + ** + ** Do not use utimes() on a symbolic link - it sees through the link and + ** modifies the timestamps on the target. Or fails if the target does + ** not exist. */ + if( 0==S_ISLNK(mode) ){ + struct timeval times[2]; + times[0].tv_usec = times[1].tv_usec = 0; + times[0].tv_sec = time(0); + times[1].tv_sec = mtime; + if( utimes(zFile, times) ){ + return 1; + } } #endif } @@ -11617,7 +11701,7 @@ static void sqlarUncompressFunc( sqlite3_value **argv ){ uLong nData; - uLongf sz; + sqlite3_int64 sz; assert( argc==2 ); sz = sqlite3_value_int(argv[1]); @@ -11625,14 +11709,15 @@ static void sqlarUncompressFunc( if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){ sqlite3_result_value(context, argv[0]); }else{ + uLongf szf = sz; const Bytef *pData= sqlite3_value_blob(argv[0]); Bytef *pOut = sqlite3_malloc(sz); if( pOut==0 ){ sqlite3_result_error_nomem(context); - }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ + }else if( Z_OK!=uncompress(pOut, &szf, pData, nData) ){ sqlite3_result_error(context, "error in uncompress()", -1); }else{ - sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT); + sqlite3_result_blob(context, pOut, szf, SQLITE_TRANSIENT); } sqlite3_free(pOut); } @@ -13784,7 +13869,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){ sqlite3_stmt *pSql = 0; rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg, "SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'" - " AND sql NOT LIKE 'CREATE VIRTUAL %%'" + " AND sql NOT LIKE 'CREATE VIRTUAL %%' ORDER BY rowid" ); while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSql) ){ const char *zSql = (const char*)sqlite3_column_text(pSql, 0); @@ -13888,103 +13973,1221 @@ int sqlite3_expert_sql( return rc; } -int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ - int rc; - IdxHashEntry *pEntry; +int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ + int rc; + IdxHashEntry *pEntry; + + /* Do trigger processing to collect any extra IdxScan structures */ + rc = idxProcessTriggers(p, pzErr); + + /* Create candidate indexes within the in-memory database file */ + if( rc==SQLITE_OK ){ + rc = idxCreateCandidates(p); + }else if ( rc==SQLITE_BUSY_TIMEOUT ){ + if( pzErr ) + *pzErr = sqlite3_mprintf("Cannot find a unique index name to propose."); + return rc; + } + + /* Generate the stat1 data */ + if( rc==SQLITE_OK ){ + rc = idxPopulateStat1(p, pzErr); + } + + /* Formulate the EXPERT_REPORT_CANDIDATES text */ + for(pEntry=p->hIdx.pFirst; pEntry; pEntry=pEntry->pNext){ + p->zCandidates = idxAppendText(&rc, p->zCandidates, + "%s;%s%s\n", pEntry->zVal, + pEntry->zVal2 ? " -- stat1: " : "", pEntry->zVal2 + ); + } + + /* Figure out which of the candidate indexes are preferred by the query + ** planner and report the results to the user. */ + if( rc==SQLITE_OK ){ + rc = idxFindIndexes(p, pzErr); + } + + if( rc==SQLITE_OK ){ + p->bRun = 1; + } + return rc; +} + +/* +** Return the total number of statements that have been added to this +** sqlite3expert using sqlite3_expert_sql(). +*/ +int sqlite3_expert_count(sqlite3expert *p){ + int nRet = 0; + if( p->pStatement ) nRet = p->pStatement->iId+1; + return nRet; +} + +/* +** Return a component of the report. +*/ +const char *sqlite3_expert_report(sqlite3expert *p, int iStmt, int eReport){ + const char *zRet = 0; + IdxStatement *pStmt; + + if( p->bRun==0 ) return 0; + for(pStmt=p->pStatement; pStmt && pStmt->iId!=iStmt; pStmt=pStmt->pNext); + switch( eReport ){ + case EXPERT_REPORT_SQL: + if( pStmt ) zRet = pStmt->zSql; + break; + case EXPERT_REPORT_INDEXES: + if( pStmt ) zRet = pStmt->zIdx; + break; + case EXPERT_REPORT_PLAN: + if( pStmt ) zRet = pStmt->zEQP; + break; + case EXPERT_REPORT_CANDIDATES: + zRet = p->zCandidates; + break; + } + return zRet; +} + +/* +** Free an sqlite3expert object. +*/ +void sqlite3_expert_destroy(sqlite3expert *p){ + if( p ){ + sqlite3_close(p->dbm); + sqlite3_close(p->dbv); + idxScanFree(p->pScan, 0); + idxStatementFree(p->pStatement, 0); + idxTableFree(p->pTable); + idxWriteFree(p->pWrite); + idxHashClear(&p->hIdx); + sqlite3_free(p->zCandidates); + sqlite3_free(p); + } +} + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ + +/************************* End ../ext/expert/sqlite3expert.c ********************/ + +/************************* Begin ../ext/intck/sqlite3intck.h ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* +** Incremental Integrity-Check Extension +** ------------------------------------- +** +** This module contains code to check whether or not an SQLite database +** is well-formed or corrupt. This is the same task as performed by SQLite's +** built-in "PRAGMA integrity_check" command. This module differs from +** "PRAGMA integrity_check" in that: +** +** + It is less thorough - this module does not detect certain types +** of corruption that are detected by the PRAGMA command. However, +** it does detect all kinds of corruption that are likely to cause +** errors in SQLite applications. +** +** + It is slower. Sometimes up to three times slower. +** +** + It allows integrity-check operations to be split into multiple +** transactions, so that the database does not need to be read-locked +** for the duration of the integrity-check. +** +** One way to use the API to run integrity-check on the "main" database +** of handle db is: +** +** int rc = SQLITE_OK; +** sqlite3_intck *p = 0; +** +** sqlite3_intck_open(db, "main", &p); +** while( SQLITE_OK==sqlite3_intck_step(p) ){ +** const char *zMsg = sqlite3_intck_message(p); +** if( zMsg ) printf("corruption: %s\n", zMsg); +** } +** rc = sqlite3_intck_error(p, &zErr); +** if( rc!=SQLITE_OK ){ +** printf("error occured (rc=%d), (errmsg=%s)\n", rc, zErr); +** } +** sqlite3_intck_close(p); +** +** Usually, the sqlite3_intck object opens a read transaction within the +** first call to sqlite3_intck_step() and holds it open until the +** integrity-check is complete. However, if sqlite3_intck_unlock() is +** called, the read transaction is ended and a new read transaction opened +** by the subsequent call to sqlite3_intck_step(). +*/ + +#ifndef _SQLITE_INTCK_H +#define _SQLITE_INTCK_H + +/* #include "sqlite3.h" */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** An ongoing incremental integrity-check operation is represented by an +** opaque pointer of the following type. +*/ +typedef struct sqlite3_intck sqlite3_intck; + +/* +** Open a new incremental integrity-check object. If successful, populate +** output variable (*ppOut) with the new object handle and return SQLITE_OK. +** Or, if an error occurs, set (*ppOut) to NULL and return an SQLite error +** code (e.g. SQLITE_NOMEM). +** +** The integrity-check will be conducted on database zDb (which must be "main", +** "temp", or the name of an attached database) of database handle db. Once +** this function has been called successfully, the caller should not use +** database handle db until the integrity-check object has been destroyed +** using sqlite3_intck_close(). +*/ +int sqlite3_intck_open( + sqlite3 *db, /* Database handle */ + const char *zDb, /* Database name ("main", "temp" etc.) */ + sqlite3_intck **ppOut /* OUT: New sqlite3_intck handle */ +); + +/* +** Close and release all resources associated with a handle opened by an +** earlier call to sqlite3_intck_open(). The results of using an +** integrity-check handle after it has been passed to this function are +** undefined. +*/ +void sqlite3_intck_close(sqlite3_intck *pCk); + +/* +** Do the next step of the integrity-check operation specified by the handle +** passed as the only argument. This function returns SQLITE_DONE if the +** integrity-check operation is finished, or an SQLite error code if +** an error occurs, or SQLITE_OK if no error occurs but the integrity-check +** is not finished. It is not considered an error if database corruption +** is encountered. +** +** Following a successful call to sqlite3_intck_step() (one that returns +** SQLITE_OK), sqlite3_intck_message() returns a non-NULL value if +** corruption was detected in the db. +** +** If an error occurs and a value other than SQLITE_OK or SQLITE_DONE is +** returned, then the integrity-check handle is placed in an error state. +** In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_step(sqlite3_intck *pCk); + +/* +** If the previous call to sqlite3_intck_step() encountered corruption +** within the database, then this function returns a pointer to a buffer +** containing a nul-terminated string describing the corruption in +** English. If the previous call to sqlite3_intck_step() did not encounter +** corruption, or if there was no previous call, this function returns +** NULL. +*/ +const char *sqlite3_intck_message(sqlite3_intck *pCk); + +/* +** Close any read-transaction opened by an earlier call to +** sqlite3_intck_step(). Any subsequent call to sqlite3_intck_step() will +** open a new transaction. Return SQLITE_OK if successful, or an SQLite error +** code otherwise. +** +** If an error occurs, then the integrity-check handle is placed in an error +** state. In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_unlock(sqlite3_intck *pCk); + +/* +** If an error has occurred in an earlier call to sqlite3_intck_step() +** or sqlite3_intck_unlock(), then this method returns the associated +** SQLite error code. Additionally, if pzErr is not NULL, then (*pzErr) +** may be set to point to a nul-terminated string containing an English +** language error message. Or, if no error message is available, to +** NULL. +** +** If no error has occurred within sqlite3_intck_step() or +** sqlite_intck_unlock() calls on the handle passed as the first argument, +** then SQLITE_OK is returned and (*pzErr) set to NULL. +*/ +int sqlite3_intck_error(sqlite3_intck *pCk, const char **pzErr); + +/* +** This API is used for testing only. It returns the full-text of an SQL +** statement used to test object zObj, which may be a table or index. +** The returned buffer is valid until the next call to either this function +** or sqlite3_intck_close() on the same sqlite3_intck handle. +*/ +const char *sqlite3_intck_test_sql(sqlite3_intck *pCk, const char *zObj); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE_INTCK_H */ + +/************************* End ../ext/intck/sqlite3intck.h ********************/ +/************************* Begin ../ext/intck/sqlite3intck.c ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* #include "sqlite3intck.h" */ +#include +#include + +#include +#include + +/* +** nKeyVal: +** The number of values that make up the 'key' for the current pCheck +** statement. +** +** rc: +** Error code returned by most recent sqlite3_intck_step() or +** sqlite3_intck_unlock() call. This is set to SQLITE_DONE when +** the integrity-check operation is finished. +** +** zErr: +** If the object has entered the error state, this is the error message. +** Is freed using sqlite3_free() when the object is deleted. +** +** zTestSql: +** The value returned by the most recent call to sqlite3_intck_testsql(). +** Each call to testsql() frees the previous zTestSql value (using +** sqlite3_free()) and replaces it with the new value it will return. +*/ +struct sqlite3_intck { + sqlite3 *db; + const char *zDb; /* Copy of zDb parameter to _open() */ + char *zObj; /* Current object. Or NULL. */ + + sqlite3_stmt *pCheck; /* Current check statement */ + char *zKey; + int nKeyVal; + + char *zMessage; + int bCorruptSchema; + + int rc; /* Error code */ + char *zErr; /* Error message */ + char *zTestSql; /* Returned by sqlite3_intck_test_sql() */ +}; + + +/* +** Some error has occurred while using database p->db. Save the error message +** and error code currently held by the database handle in p->rc and p->zErr. +*/ +static void intckSaveErrmsg(sqlite3_intck *p){ + p->rc = sqlite3_errcode(p->db); + sqlite3_free(p->zErr); + p->zErr = sqlite3_mprintf("%s", sqlite3_errmsg(p->db)); +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function attempts to prepare SQL statement zSql and +** return the resulting statement handle to the user. +*/ +static sqlite3_stmt *intckPrepare(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pRet = 0; + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3_prepare_v2(p->db, zSql, -1, &pRet, 0); + if( p->rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + assert( pRet==0 ); + } + } + return pRet; +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function treats argument zFmt as a printf() style format +** string. It formats it according to the trailing arguments and then +** attempts to prepare the results and return the resulting prepared +** statement. +*/ +static sqlite3_stmt *intckPrepareFmt(sqlite3_intck *p, const char *zFmt, ...){ + sqlite3_stmt *pRet = 0; + va_list ap; + char *zSql = 0; + va_start(ap, zFmt); + zSql = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK && zSql==0 ){ + p->rc = SQLITE_NOMEM; + } + pRet = intckPrepare(p, zSql); + sqlite3_free(zSql); + va_end(ap); + return pRet; +} + +/* +** Finalize SQL statement pStmt. If an error occurs and the handle passed +** as the first argument does not already contain an error, store the +** error in the handle. +*/ +static void intckFinalize(sqlite3_intck *p, sqlite3_stmt *pStmt){ + int rc = sqlite3_finalize(pStmt); + if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + } +} + +/* +** If there is already an error in handle p, return it. Otherwise, call +** sqlite3_step() on the statement handle and return that value. +*/ +static int intckStep(sqlite3_intck *p, sqlite3_stmt *pStmt){ + if( p->rc ) return p->rc; + return sqlite3_step(pStmt); +} + +/* +** Execute SQL statement zSql. There is no way to obtain any results +** returned by the statement. This function uses the sqlite3_intck error +** code convention. +*/ +static void intckExec(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pStmt = 0; + pStmt = intckPrepare(p, zSql); + intckStep(p, pStmt); + intckFinalize(p, pStmt); +} + +/* +** A wrapper around sqlite3_mprintf() that uses the sqlite3_intck error +** code convention. +*/ +static char *intckMprintf(sqlite3_intck *p, const char *zFmt, ...){ + va_list ap; + char *zRet = 0; + va_start(ap, zFmt); + zRet = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK ){ + if( zRet==0 ){ + p->rc = SQLITE_NOMEM; + } + }else{ + sqlite3_free(zRet); + zRet = 0; + } + return zRet; +} + +/* +** This is used by sqlite3_intck_unlock() to save the vector key value +** required to restart the current pCheck query as a nul-terminated string +** in p->zKey. +*/ +static void intckSaveKey(sqlite3_intck *p){ + int ii; + char *zSql = 0; + sqlite3_stmt *pStmt = 0; + sqlite3_stmt *pXinfo = 0; + const char *zDir = 0; + + assert( p->pCheck ); + assert( p->zKey==0 ); + + pXinfo = intckPrepareFmt(p, + "SELECT group_concat(desc, '') FROM %Q.sqlite_schema s, " + "pragma_index_xinfo(%Q, %Q) " + "WHERE s.type='index' AND s.name=%Q", + p->zDb, p->zObj, p->zDb, p->zObj + ); + if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXinfo) ){ + zDir = (const char*)sqlite3_column_text(pXinfo, 0); + } + + if( zDir==0 ){ *** 15215 LINES SKIPPED *** From nobody Mon Jun 10 02:56:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyGf733x6z5NkJD; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyGf72Wk0z4Xvj; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv04UIoxo8bEFmCzuphP0aj88EFOyrKztqc9uwtovnw=; b=e4OLbAR+pWPoCaN8Vki+UFON1zmoF+y3EvuFvTpns3o728j7gX5qCttIQkl2loQy8tzK8v SE1rDzXxzLD0UsPu/S4hMWNZ4Y33ABPzu8QiFfTAKyYdwTKvAtfsvnHedXrhB1BC2fsfBt QtIIA6ECR24RWFCfVrDNE58R+4VVsdPjbboN6N6WaxGMS5YQje6d3rEAs85kpXecJ/zL4d J8q0r9aKM5lf63/g7P/Eh4RLq0XGfKoVxnx7oQWxyMqAkY9P2KdoGCU9qvUft3w0gAWtVf uURbP3QmV4TF3PxSNqREKHNNGpIpjLWdj7uPX5Butr+kZnuSih44iZ9YQP0rsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717988175; a=rsa-sha256; cv=none; b=Tsf1W+vQ5SkXZaQBQmFikQdboSAthA4BkE5E8R8AcbOynAJh+tw2qLMQdTs4iQwgDicp7H 2lyWroGvsTA0cheBGhWwJp6f15CZSaGKSUGOi0rCF2SReu7DJUvTNQKEQtRm/4Vj2BRjoq Pl7Nj5bVQ8Z9l99AodiwAbs3J+R6sNLTFV/05l5/qe8Y6Gf4fCQcgliSKDRj/bqpzx3zb9 7KzXE+y9We+gq9E3wkuVArBCuyWi1GGQtVroyZ0VhwN0A0BtJ+MAOMUzdqrLG9DlRz4+Wn T5oK675uOxxYwHvHNO4iiXHQlI5dnK933gaDfbY7lKcNkqL6ePrVAJf/mhHWZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv04UIoxo8bEFmCzuphP0aj88EFOyrKztqc9uwtovnw=; b=oa08bR1RqhVZD1r1BZbrLkpllxrPwi3KNNFUKh5ZgrLC4YXPWQAnXbiKGDr1AMVQZuT67+ 3B9gUNyiPZdjqZgPDKvkZUvBRqUJxwhhj7fJYN6OAXv88mFveQ0LGPEcVfrjqzd5KxH4KA Gv9EwPmp+D7i03B2ufXQPr/sb89pTZX5CVDqZQtiNzTM3/qmJsn832I7qOm1utT4ODG5cS s6tocnee6RsSoSqD4nswvnUUxFFU805wmvs1nzm9uBFgj2ZYfAR09mNHV7bFy1J6wED1K3 H+IcyC8wGCGhyXhZJpkkdD7jKi7jXSSYRsX3ENjlIg5lb4fCHAEdTPFRe8GURA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyGf7271Rz17bf; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A2uFAO068898; Mon, 10 Jun 2024 02:56:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A2uENQ068895; Mon, 10 Jun 2024 02:56:14 GMT (envelope-from git) Date: Mon, 10 Jun 2024 02:56:14 GMT Message-Id: <202406100256.45A2uENQ068895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 960554869b20 - stable/13 - sqlite3: Vendor import of sqlite3 3.46.0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 960554869b2059f852155c9e15c16def9fab2f1c Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=960554869b2059f852155c9e15c16def9fab2f1c commit 960554869b2059f852155c9e15c16def9fab2f1c Author: Cy Schubert AuthorDate: 2024-06-03 01:40:14 +0000 Commit: Cy Schubert CommitDate: 2024-06-10 02:56:07 +0000 sqlite3: Vendor import of sqlite3 3.46.0 Release notes at https://www.sqlite.org/releaselog/3_46_0.html. Obtained from: https://www.sqlite.org/2024/sqlite-autoconf-3460000.tar.gz Merge commit '259d29fd8c012d4392fa59ff803b691ead5b304d' into main (cherry picked from commit 0f996f45418e82dae151e5d1da478da38d70049f) --- contrib/sqlite3/Makefile.msc | 7 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1943 +++++++-- contrib/sqlite3/sqlite3.c | 8935 +++++++++++++++++++++++--------------- contrib/sqlite3/sqlite3.h | 116 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 +- contrib/sqlite3/tea/configure.ac | 2 +- 9 files changed, 7287 insertions(+), 3758 deletions(-) diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 45a07a9f317c..a4270fb2ae71 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -18,6 +18,13 @@ TOP = . +# Optionally set EXTRA_SRC to a list of C files to append to +# the generated sqlite3.c. +# +!IFNDEF EXTRA_SRC +EXTRA_SRC = +!ENDIF + # Set this non-0 to enable full warnings (-W4, etc) when compiling. # !IFNDEF USE_FULLWARN diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 472e8acd0097..f2f70b5ae802 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.45.1. +# Generated by GNU Autoconf 2.71 for sqlite 3.46.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.45.1' -PACKAGE_STRING='sqlite 3.45.1' +PACKAGE_VERSION='3.46.0' +PACKAGE_STRING='sqlite 3.46.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.45.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.46.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.45.1:";; + short | recursive ) echo "Configuration of sqlite 3.46.0:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.45.1 +sqlite configure 3.46.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.45.1, which was +It was created by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.45.1' + VERSION='3.46.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.45.1, which was +This file was extended by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.45.1 +sqlite config.status 3.46.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index 3ce8855cc762..c83f381d90b1 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.45.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.46.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 1e02a12fbc2f..7d46e4acac57 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -580,6 +580,9 @@ zSkipValidUtf8(const char *z, int nAccept, long ccm); #ifndef HAVE_CONSOLE_IO_H # include "console_io.h" #endif +#if defined(_MSC_VER) +# pragma warning(disable : 4204) +#endif #ifndef SQLITE_CIO_NO_TRANSLATE # if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT @@ -678,6 +681,10 @@ static short streamOfConsole(FILE *pf, /* out */ PerStreamTags *ppst){ # endif } +# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +# define ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x4) +# endif + # if CIO_WIN_WC_XLATE /* Define console modes for use with the Windows Console API. */ # define SHELL_CONI_MODE \ @@ -1228,6 +1235,10 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ } #endif /* !defined(SQLITE_CIO_NO_TRANSLATE) */ +#if defined(_MSC_VER) +# pragma warning(default : 4204) +#endif + #undef SHELL_INVALID_FILE_PTR /************************* End ../ext/consio/console_io.c ********************/ @@ -1250,6 +1261,9 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ * setOutputStream(FILE *pf) * This is normally the stream that CLI normal output goes to. * For the stand-alone CLI, it is stdout with no .output redirect. + * + * The ?putz(z) forms are required for the Fiddle builds for string literal + * output, in aid of enforcing format string to argument correspondence. */ # define sputz(s,z) fPutsUtf8(z,s) # define sputf fPrintfUtf8 @@ -1261,12 +1275,18 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ #else /* For Fiddle, all console handling and emit redirection is omitted. */ -# define sputz(fp,z) fputs(z,fp) +/* These next 3 macros are for emitting formatted output. When complaints + * from the WASM build are issued for non-formatted output, (when a mere + * string literal is to be emitted, the ?putz(z) forms should be used. + * (This permits compile-time checking of format string / argument mismatch.) + */ +# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) +# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) # define sputf(fp,fmt, ...) fprintf(fp,fmt,__VA_ARGS__) +/* These next 3 macros are for emitting simple string literals. */ # define oputz(z) fputs(z,stdout) -# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) # define eputz(z) fputs(z,stderr) -# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) +# define sputz(fp,z) fputs(z,fp) # define oputb(buf,na) fwrite(buf,1,na,stdout) #endif @@ -5711,16 +5731,20 @@ SQLITE_EXTENSION_INIT1 ** index is ix. The 0th member is given by smBase. The sequence members ** progress per ix increment by smStep. */ -static sqlite3_int64 genSeqMember(sqlite3_int64 smBase, - sqlite3_int64 smStep, - sqlite3_uint64 ix){ - if( ix>=(sqlite3_uint64)LLONG_MAX ){ +static sqlite3_int64 genSeqMember( + sqlite3_int64 smBase, + sqlite3_int64 smStep, + sqlite3_uint64 ix +){ + static const sqlite3_uint64 mxI64 = + ((sqlite3_uint64)0x7fffffff)<<32 | 0xffffffff; + if( ix>=mxI64 ){ /* Get ix into signed i64 range. */ - ix -= (sqlite3_uint64)LLONG_MAX; + ix -= mxI64; /* With 2's complement ALU, this next can be 1 step, but is split into * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */ - smBase += (LLONG_MAX/2) * smStep; - smBase += (LLONG_MAX - LLONG_MAX/2) * smStep; + smBase += (mxI64/2) * smStep; + smBase += (mxI64 - mxI64/2) * smStep; } /* Under UBSAN (or on 1's complement machines), must do this last term * in steps to avoid the dreaded (and harmless) signed multiply overlow. */ @@ -5980,13 +6004,13 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ ** parameter. (idxStr is not used in this implementation.) idxNum ** is a bitmask showing which constraints are available: ** -** 1: start=VALUE -** 2: stop=VALUE -** 4: step=VALUE -** -** Also, if bit 8 is set, that means that the series should be output -** in descending order rather than in ascending order. If bit 16 is -** set, then output must appear in ascending order. +** 0x01: start=VALUE +** 0x02: stop=VALUE +** 0x04: step=VALUE +** 0x08: descending order +** 0x10: ascending order +** 0x20: LIMIT VALUE +** 0x40: OFFSET VALUE ** ** This routine should initialize the cursor and position it so that it ** is pointing at the first row, or pointing off the end of the table @@ -6000,26 +6024,44 @@ static int seriesFilter( series_cursor *pCur = (series_cursor *)pVtabCursor; int i = 0; (void)idxStrUnused; - if( idxNum & 1 ){ + if( idxNum & 0x01 ){ pCur->ss.iBase = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iBase = 0; } - if( idxNum & 2 ){ + if( idxNum & 0x02 ){ pCur->ss.iTerm = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iTerm = 0xffffffff; } - if( idxNum & 4 ){ + if( idxNum & 0x04 ){ pCur->ss.iStep = sqlite3_value_int64(argv[i++]); if( pCur->ss.iStep==0 ){ pCur->ss.iStep = 1; }else if( pCur->ss.iStep<0 ){ - if( (idxNum & 16)==0 ) idxNum |= 8; + if( (idxNum & 0x10)==0 ) idxNum |= 0x08; } }else{ pCur->ss.iStep = 1; } + if( idxNum & 0x20 ){ + sqlite3_int64 iLimit = sqlite3_value_int64(argv[i++]); + sqlite3_int64 iTerm; + if( idxNum & 0x40 ){ + sqlite3_int64 iOffset = sqlite3_value_int64(argv[i++]); + if( iOffset>0 ){ + pCur->ss.iBase += pCur->ss.iStep*iOffset; + } + } + if( iLimit>=0 ){ + iTerm = pCur->ss.iBase + (iLimit - 1)*pCur->ss.iStep; + if( pCur->ss.iStep<0 ){ + if( iTerm>pCur->ss.iTerm ) pCur->ss.iTerm = iTerm; + }else{ + if( iTermss.iTerm ) pCur->ss.iTerm = iTerm; + } + } + } for(i=0; iss.isReversing = pCur->ss.iStep > 0; }else{ pCur->ss.isReversing = pCur->ss.iStep < 0; @@ -6050,10 +6092,13 @@ static int seriesFilter( ** ** The query plan is represented by bits in idxNum: ** -** (1) start = $value -- constraint exists -** (2) stop = $value -- constraint exists -** (4) step = $value -- constraint exists -** (8) output in descending order +** 0x01 start = $value -- constraint exists +** 0x02 stop = $value -- constraint exists +** 0x04 step = $value -- constraint exists +** 0x08 output is in descending order +** 0x10 output is in ascending order +** 0x20 LIMIT $value -- constraint exists +** 0x40 OFFSET $value -- constraint exists */ static int seriesBestIndex( sqlite3_vtab *pVTab, @@ -6061,10 +6106,12 @@ static int seriesBestIndex( ){ int i, j; /* Loop over constraints */ int idxNum = 0; /* The query plan bitmask */ +#ifndef ZERO_ARGUMENT_GENERATE_SERIES int bStartSeen = 0; /* EQ constraint seen on the START column */ +#endif int unusableMask = 0; /* Mask of unusable constraints */ int nArg = 0; /* Number of arguments that seriesFilter() expects */ - int aIdx[3]; /* Constraints on start, stop, and step */ + int aIdx[5]; /* Constraints on start, stop, step, LIMIT, OFFSET */ const struct sqlite3_index_constraint *pConstraint; /* This implementation assumes that the start, stop, and step columns @@ -6072,28 +6119,54 @@ static int seriesBestIndex( assert( SERIES_COLUMN_STOP == SERIES_COLUMN_START+1 ); assert( SERIES_COLUMN_STEP == SERIES_COLUMN_START+2 ); - aIdx[0] = aIdx[1] = aIdx[2] = -1; + aIdx[0] = aIdx[1] = aIdx[2] = aIdx[3] = aIdx[4] = -1; pConstraint = pIdxInfo->aConstraint; for(i=0; inConstraint; i++, pConstraint++){ int iCol; /* 0 for start, 1 for stop, 2 for step */ int iMask; /* bitmask for those column */ + int op = pConstraint->op; + if( op>=SQLITE_INDEX_CONSTRAINT_LIMIT + && op<=SQLITE_INDEX_CONSTRAINT_OFFSET + ){ + if( pConstraint->usable==0 ){ + /* do nothing */ + }else if( op==SQLITE_INDEX_CONSTRAINT_LIMIT ){ + aIdx[3] = i; + idxNum |= 0x20; + }else{ + assert( op==SQLITE_INDEX_CONSTRAINT_OFFSET ); + aIdx[4] = i; + idxNum |= 0x40; + } + continue; + } if( pConstraint->iColumniColumn - SERIES_COLUMN_START; assert( iCol>=0 && iCol<=2 ); iMask = 1 << iCol; - if( iCol==0 ) bStartSeen = 1; +#ifndef ZERO_ARGUMENT_GENERATE_SERIES + if( iCol==0 && op==SQLITE_INDEX_CONSTRAINT_EQ ){ + bStartSeen = 1; + } +#endif if( pConstraint->usable==0 ){ unusableMask |= iMask; continue; - }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){ + }else if( op==SQLITE_INDEX_CONSTRAINT_EQ ){ idxNum |= iMask; aIdx[iCol] = i; } } - for(i=0; i<3; i++){ + if( aIdx[3]==0 ){ + /* Ignore OFFSET if LIMIT is omitted */ + idxNum &= ~0x60; + aIdx[4] = 0; + } + for(i=0; i<5; i++){ if( (j = aIdx[i])>=0 ){ pIdxInfo->aConstraintUsage[j].argvIndex = ++nArg; - pIdxInfo->aConstraintUsage[j].omit = !SQLITE_SERIES_CONSTRAINT_VERIFY; + pIdxInfo->aConstraintUsage[j].omit = + !SQLITE_SERIES_CONSTRAINT_VERIFY || i>=3; } } /* The current generate_column() implementation requires at least one @@ -6114,19 +6187,22 @@ static int seriesBestIndex( ** this plan is unusable */ return SQLITE_CONSTRAINT; } - if( (idxNum & 3)==3 ){ + if( (idxNum & 0x03)==0x03 ){ /* Both start= and stop= boundaries are available. This is the ** the preferred case */ pIdxInfo->estimatedCost = (double)(2 - ((idxNum&4)!=0)); pIdxInfo->estimatedRows = 1000; if( pIdxInfo->nOrderBy>=1 && pIdxInfo->aOrderBy[0].iColumn==0 ){ if( pIdxInfo->aOrderBy[0].desc ){ - idxNum |= 8; + idxNum |= 0x08; }else{ - idxNum |= 16; + idxNum |= 0x10; } pIdxInfo->orderByConsumed = 1; } + }else if( (idxNum & 0x21)==0x21 ){ + /* We have start= and LIMIT */ + pIdxInfo->estimatedRows = 2500; }else{ /* If either boundary is missing, we have to generate a huge span ** of numbers. Make this case very expensive so that the query @@ -7453,7 +7529,9 @@ static int writeFile( #if !defined(_WIN32) && !defined(WIN32) if( S_ISLNK(mode) ){ const char *zTo = (const char*)sqlite3_value_text(pData); - if( zTo==0 || symlink(zTo, zFile)<0 ) return 1; + if( zTo==0 ) return 1; + unlink(zFile); + if( symlink(zTo, zFile)<0 ) return 1; }else #endif { @@ -7539,13 +7617,19 @@ static int writeFile( return 1; } #else - /* Legacy unix */ - struct timeval times[2]; - times[0].tv_usec = times[1].tv_usec = 0; - times[0].tv_sec = time(0); - times[1].tv_sec = mtime; - if( utimes(zFile, times) ){ - return 1; + /* Legacy unix. + ** + ** Do not use utimes() on a symbolic link - it sees through the link and + ** modifies the timestamps on the target. Or fails if the target does + ** not exist. */ + if( 0==S_ISLNK(mode) ){ + struct timeval times[2]; + times[0].tv_usec = times[1].tv_usec = 0; + times[0].tv_sec = time(0); + times[1].tv_sec = mtime; + if( utimes(zFile, times) ){ + return 1; + } } #endif } @@ -11617,7 +11701,7 @@ static void sqlarUncompressFunc( sqlite3_value **argv ){ uLong nData; - uLongf sz; + sqlite3_int64 sz; assert( argc==2 ); sz = sqlite3_value_int(argv[1]); @@ -11625,14 +11709,15 @@ static void sqlarUncompressFunc( if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){ sqlite3_result_value(context, argv[0]); }else{ + uLongf szf = sz; const Bytef *pData= sqlite3_value_blob(argv[0]); Bytef *pOut = sqlite3_malloc(sz); if( pOut==0 ){ sqlite3_result_error_nomem(context); - }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ + }else if( Z_OK!=uncompress(pOut, &szf, pData, nData) ){ sqlite3_result_error(context, "error in uncompress()", -1); }else{ - sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT); + sqlite3_result_blob(context, pOut, szf, SQLITE_TRANSIENT); } sqlite3_free(pOut); } @@ -13784,7 +13869,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){ sqlite3_stmt *pSql = 0; rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg, "SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'" - " AND sql NOT LIKE 'CREATE VIRTUAL %%'" + " AND sql NOT LIKE 'CREATE VIRTUAL %%' ORDER BY rowid" ); while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSql) ){ const char *zSql = (const char*)sqlite3_column_text(pSql, 0); @@ -13888,103 +13973,1221 @@ int sqlite3_expert_sql( return rc; } -int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ - int rc; - IdxHashEntry *pEntry; +int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ + int rc; + IdxHashEntry *pEntry; + + /* Do trigger processing to collect any extra IdxScan structures */ + rc = idxProcessTriggers(p, pzErr); + + /* Create candidate indexes within the in-memory database file */ + if( rc==SQLITE_OK ){ + rc = idxCreateCandidates(p); + }else if ( rc==SQLITE_BUSY_TIMEOUT ){ + if( pzErr ) + *pzErr = sqlite3_mprintf("Cannot find a unique index name to propose."); + return rc; + } + + /* Generate the stat1 data */ + if( rc==SQLITE_OK ){ + rc = idxPopulateStat1(p, pzErr); + } + + /* Formulate the EXPERT_REPORT_CANDIDATES text */ + for(pEntry=p->hIdx.pFirst; pEntry; pEntry=pEntry->pNext){ + p->zCandidates = idxAppendText(&rc, p->zCandidates, + "%s;%s%s\n", pEntry->zVal, + pEntry->zVal2 ? " -- stat1: " : "", pEntry->zVal2 + ); + } + + /* Figure out which of the candidate indexes are preferred by the query + ** planner and report the results to the user. */ + if( rc==SQLITE_OK ){ + rc = idxFindIndexes(p, pzErr); + } + + if( rc==SQLITE_OK ){ + p->bRun = 1; + } + return rc; +} + +/* +** Return the total number of statements that have been added to this +** sqlite3expert using sqlite3_expert_sql(). +*/ +int sqlite3_expert_count(sqlite3expert *p){ + int nRet = 0; + if( p->pStatement ) nRet = p->pStatement->iId+1; + return nRet; +} + +/* +** Return a component of the report. +*/ +const char *sqlite3_expert_report(sqlite3expert *p, int iStmt, int eReport){ + const char *zRet = 0; + IdxStatement *pStmt; + + if( p->bRun==0 ) return 0; + for(pStmt=p->pStatement; pStmt && pStmt->iId!=iStmt; pStmt=pStmt->pNext); + switch( eReport ){ + case EXPERT_REPORT_SQL: + if( pStmt ) zRet = pStmt->zSql; + break; + case EXPERT_REPORT_INDEXES: + if( pStmt ) zRet = pStmt->zIdx; + break; + case EXPERT_REPORT_PLAN: + if( pStmt ) zRet = pStmt->zEQP; + break; + case EXPERT_REPORT_CANDIDATES: + zRet = p->zCandidates; + break; + } + return zRet; +} + +/* +** Free an sqlite3expert object. +*/ +void sqlite3_expert_destroy(sqlite3expert *p){ + if( p ){ + sqlite3_close(p->dbm); + sqlite3_close(p->dbv); + idxScanFree(p->pScan, 0); + idxStatementFree(p->pStatement, 0); + idxTableFree(p->pTable); + idxWriteFree(p->pWrite); + idxHashClear(&p->hIdx); + sqlite3_free(p->zCandidates); + sqlite3_free(p); + } +} + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ + +/************************* End ../ext/expert/sqlite3expert.c ********************/ + +/************************* Begin ../ext/intck/sqlite3intck.h ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* +** Incremental Integrity-Check Extension +** ------------------------------------- +** +** This module contains code to check whether or not an SQLite database +** is well-formed or corrupt. This is the same task as performed by SQLite's +** built-in "PRAGMA integrity_check" command. This module differs from +** "PRAGMA integrity_check" in that: +** +** + It is less thorough - this module does not detect certain types +** of corruption that are detected by the PRAGMA command. However, +** it does detect all kinds of corruption that are likely to cause +** errors in SQLite applications. +** +** + It is slower. Sometimes up to three times slower. +** +** + It allows integrity-check operations to be split into multiple +** transactions, so that the database does not need to be read-locked +** for the duration of the integrity-check. +** +** One way to use the API to run integrity-check on the "main" database +** of handle db is: +** +** int rc = SQLITE_OK; +** sqlite3_intck *p = 0; +** +** sqlite3_intck_open(db, "main", &p); +** while( SQLITE_OK==sqlite3_intck_step(p) ){ +** const char *zMsg = sqlite3_intck_message(p); +** if( zMsg ) printf("corruption: %s\n", zMsg); +** } +** rc = sqlite3_intck_error(p, &zErr); +** if( rc!=SQLITE_OK ){ +** printf("error occured (rc=%d), (errmsg=%s)\n", rc, zErr); +** } +** sqlite3_intck_close(p); +** +** Usually, the sqlite3_intck object opens a read transaction within the +** first call to sqlite3_intck_step() and holds it open until the +** integrity-check is complete. However, if sqlite3_intck_unlock() is +** called, the read transaction is ended and a new read transaction opened +** by the subsequent call to sqlite3_intck_step(). +*/ + +#ifndef _SQLITE_INTCK_H +#define _SQLITE_INTCK_H + +/* #include "sqlite3.h" */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** An ongoing incremental integrity-check operation is represented by an +** opaque pointer of the following type. +*/ +typedef struct sqlite3_intck sqlite3_intck; + +/* +** Open a new incremental integrity-check object. If successful, populate +** output variable (*ppOut) with the new object handle and return SQLITE_OK. +** Or, if an error occurs, set (*ppOut) to NULL and return an SQLite error +** code (e.g. SQLITE_NOMEM). +** +** The integrity-check will be conducted on database zDb (which must be "main", +** "temp", or the name of an attached database) of database handle db. Once +** this function has been called successfully, the caller should not use +** database handle db until the integrity-check object has been destroyed +** using sqlite3_intck_close(). +*/ +int sqlite3_intck_open( + sqlite3 *db, /* Database handle */ + const char *zDb, /* Database name ("main", "temp" etc.) */ + sqlite3_intck **ppOut /* OUT: New sqlite3_intck handle */ +); + +/* +** Close and release all resources associated with a handle opened by an +** earlier call to sqlite3_intck_open(). The results of using an +** integrity-check handle after it has been passed to this function are +** undefined. +*/ +void sqlite3_intck_close(sqlite3_intck *pCk); + +/* +** Do the next step of the integrity-check operation specified by the handle +** passed as the only argument. This function returns SQLITE_DONE if the +** integrity-check operation is finished, or an SQLite error code if +** an error occurs, or SQLITE_OK if no error occurs but the integrity-check +** is not finished. It is not considered an error if database corruption +** is encountered. +** +** Following a successful call to sqlite3_intck_step() (one that returns +** SQLITE_OK), sqlite3_intck_message() returns a non-NULL value if +** corruption was detected in the db. +** +** If an error occurs and a value other than SQLITE_OK or SQLITE_DONE is +** returned, then the integrity-check handle is placed in an error state. +** In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_step(sqlite3_intck *pCk); + +/* +** If the previous call to sqlite3_intck_step() encountered corruption +** within the database, then this function returns a pointer to a buffer +** containing a nul-terminated string describing the corruption in +** English. If the previous call to sqlite3_intck_step() did not encounter +** corruption, or if there was no previous call, this function returns +** NULL. +*/ +const char *sqlite3_intck_message(sqlite3_intck *pCk); + +/* +** Close any read-transaction opened by an earlier call to +** sqlite3_intck_step(). Any subsequent call to sqlite3_intck_step() will +** open a new transaction. Return SQLITE_OK if successful, or an SQLite error +** code otherwise. +** +** If an error occurs, then the integrity-check handle is placed in an error +** state. In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_unlock(sqlite3_intck *pCk); + +/* +** If an error has occurred in an earlier call to sqlite3_intck_step() +** or sqlite3_intck_unlock(), then this method returns the associated +** SQLite error code. Additionally, if pzErr is not NULL, then (*pzErr) +** may be set to point to a nul-terminated string containing an English +** language error message. Or, if no error message is available, to +** NULL. +** +** If no error has occurred within sqlite3_intck_step() or +** sqlite_intck_unlock() calls on the handle passed as the first argument, +** then SQLITE_OK is returned and (*pzErr) set to NULL. +*/ +int sqlite3_intck_error(sqlite3_intck *pCk, const char **pzErr); + +/* +** This API is used for testing only. It returns the full-text of an SQL +** statement used to test object zObj, which may be a table or index. +** The returned buffer is valid until the next call to either this function +** or sqlite3_intck_close() on the same sqlite3_intck handle. +*/ +const char *sqlite3_intck_test_sql(sqlite3_intck *pCk, const char *zObj); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE_INTCK_H */ + +/************************* End ../ext/intck/sqlite3intck.h ********************/ +/************************* Begin ../ext/intck/sqlite3intck.c ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* #include "sqlite3intck.h" */ +#include +#include + +#include +#include + +/* +** nKeyVal: +** The number of values that make up the 'key' for the current pCheck +** statement. +** +** rc: +** Error code returned by most recent sqlite3_intck_step() or +** sqlite3_intck_unlock() call. This is set to SQLITE_DONE when +** the integrity-check operation is finished. +** +** zErr: +** If the object has entered the error state, this is the error message. +** Is freed using sqlite3_free() when the object is deleted. +** +** zTestSql: +** The value returned by the most recent call to sqlite3_intck_testsql(). +** Each call to testsql() frees the previous zTestSql value (using +** sqlite3_free()) and replaces it with the new value it will return. +*/ +struct sqlite3_intck { + sqlite3 *db; + const char *zDb; /* Copy of zDb parameter to _open() */ + char *zObj; /* Current object. Or NULL. */ + + sqlite3_stmt *pCheck; /* Current check statement */ + char *zKey; + int nKeyVal; + + char *zMessage; + int bCorruptSchema; + + int rc; /* Error code */ + char *zErr; /* Error message */ + char *zTestSql; /* Returned by sqlite3_intck_test_sql() */ +}; + + +/* +** Some error has occurred while using database p->db. Save the error message +** and error code currently held by the database handle in p->rc and p->zErr. +*/ +static void intckSaveErrmsg(sqlite3_intck *p){ + p->rc = sqlite3_errcode(p->db); + sqlite3_free(p->zErr); + p->zErr = sqlite3_mprintf("%s", sqlite3_errmsg(p->db)); +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function attempts to prepare SQL statement zSql and +** return the resulting statement handle to the user. +*/ +static sqlite3_stmt *intckPrepare(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pRet = 0; + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3_prepare_v2(p->db, zSql, -1, &pRet, 0); + if( p->rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + assert( pRet==0 ); + } + } + return pRet; +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function treats argument zFmt as a printf() style format +** string. It formats it according to the trailing arguments and then +** attempts to prepare the results and return the resulting prepared +** statement. +*/ +static sqlite3_stmt *intckPrepareFmt(sqlite3_intck *p, const char *zFmt, ...){ + sqlite3_stmt *pRet = 0; + va_list ap; + char *zSql = 0; + va_start(ap, zFmt); + zSql = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK && zSql==0 ){ + p->rc = SQLITE_NOMEM; + } + pRet = intckPrepare(p, zSql); + sqlite3_free(zSql); + va_end(ap); + return pRet; +} + +/* +** Finalize SQL statement pStmt. If an error occurs and the handle passed +** as the first argument does not already contain an error, store the +** error in the handle. +*/ +static void intckFinalize(sqlite3_intck *p, sqlite3_stmt *pStmt){ + int rc = sqlite3_finalize(pStmt); + if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + } +} + +/* +** If there is already an error in handle p, return it. Otherwise, call +** sqlite3_step() on the statement handle and return that value. +*/ +static int intckStep(sqlite3_intck *p, sqlite3_stmt *pStmt){ + if( p->rc ) return p->rc; + return sqlite3_step(pStmt); +} + +/* +** Execute SQL statement zSql. There is no way to obtain any results +** returned by the statement. This function uses the sqlite3_intck error +** code convention. +*/ +static void intckExec(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pStmt = 0; + pStmt = intckPrepare(p, zSql); + intckStep(p, pStmt); + intckFinalize(p, pStmt); +} + +/* +** A wrapper around sqlite3_mprintf() that uses the sqlite3_intck error +** code convention. +*/ +static char *intckMprintf(sqlite3_intck *p, const char *zFmt, ...){ + va_list ap; + char *zRet = 0; + va_start(ap, zFmt); + zRet = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK ){ + if( zRet==0 ){ + p->rc = SQLITE_NOMEM; + } + }else{ + sqlite3_free(zRet); + zRet = 0; + } + return zRet; +} + +/* +** This is used by sqlite3_intck_unlock() to save the vector key value +** required to restart the current pCheck query as a nul-terminated string +** in p->zKey. +*/ +static void intckSaveKey(sqlite3_intck *p){ + int ii; + char *zSql = 0; + sqlite3_stmt *pStmt = 0; + sqlite3_stmt *pXinfo = 0; + const char *zDir = 0; + + assert( p->pCheck ); + assert( p->zKey==0 ); + + pXinfo = intckPrepareFmt(p, + "SELECT group_concat(desc, '') FROM %Q.sqlite_schema s, " + "pragma_index_xinfo(%Q, %Q) " + "WHERE s.type='index' AND s.name=%Q", + p->zDb, p->zObj, p->zDb, p->zObj + ); + if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXinfo) ){ + zDir = (const char*)sqlite3_column_text(pXinfo, 0); + } + + if( zDir==0 ){ *** 15215 LINES SKIPPED *** From nobody Mon Jun 10 07:29:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyNjd71glz5P6PR; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyNjd6RR3z4tGm; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8rKw+E+6oY66WW+1N1ap+zzhAG6fu7eBBgW/m60YFM=; b=JKDgURss5ibphkwqTNww+5kMIZtRp5lfnC3AiMlxeroRVHtmJamXUVIgGvaLC8Hf4w4S6p gyBarfzn7V40dJCXQ8B8wX7DjdUVgHy1+WDv12XukPVrEW1Jaaqqb5VLVe5T2MlI8DC6HY y+Tcrjv7hXfw2vdddMhA3JNejCXozSu3enWXPrD7iMrtYHLsHyQhuniHByIKcEmFkDEls7 3ZUIYiUUvPXrCEP1VZ2uHs2TaQhiqyd98H0nVKAoNEET1UxtI++piQd8AWY5eYSnHbDbXs HBA2runleKSFvUMd6ojr0yo9AZ4Yfi5PJnttnrbw1ulJvi9fd07DK8yAm/IOSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718004581; a=rsa-sha256; cv=none; b=Vnj9Fh2/9o2fBedEIV1DkpLZDTm8tO3LTdL1rW1rZS0Gl9iFjZvNDZT37sgGkbm/QRIRmx ngWfJtaQ4QLHBdcJXHubx6VPZg3QcObu/wBtRKIhxyVENGZbOzW7xXOho0p4fp5g3kX3fC sp0LAAMn3Fmr+ZSl/h0x/nGK7VYForliNGDwbBWOuawQZ28FzzdqhEqgZ+SLw97cuWXjPT szy52MDCorI3lKbtCu7tNTS6B/wRyvBIrAzxKm7aNU4POqxvYKUQxQ5Xe7HGzIiHCLnIvo WIMEd4H5JUe7dKyQavF3VahVS/9wqmahBuJ+fHEKCNnDI2s0oQXwMCmF4eQZBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8rKw+E+6oY66WW+1N1ap+zzhAG6fu7eBBgW/m60YFM=; b=iprE0FPpxcYM2N5TpgF/9J0Mq1FW/fJKY1sBtbL1rz8dOQkILU+KRKfdGPyCv17DZuxSxi datrxwAqqllp2T7stXtXfsOj65Ccpn1TbZabyZMcyJKawnaaLpZer6p6KnZ82O9GPn2XDP fNHqKmB9KZvF6o+t3OPQ/PafGgPlvc6Pnv/TU1X1E3+aha3876rGrXtYZT3R/Yd9Be74/x 8a018MRlNCKmtDg1istP1PH9Hxt8YvjtspCxCXWbJXXZY4gPI+r3Xt80JLlykxabtRMNlj vH1TzxqHoUiXUgistRvP6CbQWFknV+f8+Mf5EuQ3v4X5n1dI93AZdDEc7QCrJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyNjd5wftzGrS; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A7TfI6027948; Mon, 10 Jun 2024 07:29:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A7TfcU027946; Mon, 10 Jun 2024 07:29:41 GMT (envelope-from git) Date: Mon, 10 Jun 2024 07:29:41 GMT Message-Id: <202406100729.45A7TfcU027946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 55c5dad2f305 - stable/14 - Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 55c5dad2f305f74d1ff5ca85c453635511aab9b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=55c5dad2f305f74d1ff5ca85c453635511aab9b2 commit 55c5dad2f305f74d1ff5ca85c453635511aab9b2 Author: Dimitry Andric AuthorDate: 2024-06-07 18:42:53 +0000 Commit: Dimitry Andric CommitDate: 2024-06-10 07:29:25 +0000 Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): [libc++][NFC] Rewrite function call on two lines for clarity (#79141) Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity. Merge commit d129ea8d2fa3 from llvm-project (by Vitaly Buka): [libcxx] Align `__recommend() + 1` by __endian_factor (#90292) This is detected by asan after #83774 Allocation size will be divided by `__endian_factor` before storing. If it's not aligned, we will not be able to recover allocation size to pass into `__alloc_traits::deallocate`. we have code like this ``` auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1); __p = __allocation.ptr; __set_long_cap(__allocation.count); void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; } inline ~basic_string() { __annotate_delete(); if (__is_long()) __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); } ``` 1. __recommend() -> even size 2. `std::__allocate_at_least(__alloc(), __recommend(__sz) + 1)` - > not even size 3. ` __set_long_cap() `- > lose one bit of size for __endian_factor == 2 (see `/ __endian_factor`) 4. `__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap())` -> uses even size (see `__get_long_cap`) This should fix incorrect deallocation sizes for some instances of std::string. Memory profiling or debugging tools like AddressSanitizer, LeakSanitizer or TCMalloc could then complain about the the size passed to a deallocation not matching the size originally passed to the allocation. Reported by: Aliaksei Kandratsenka PR: 279560 MFC after: 3 days (cherry picked from commit ead8e4c081e5c4de4d508fc353f381457b058ca6) --- contrib/llvm-project/libcxx/include/string | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/string b/contrib/llvm-project/libcxx/include/string index ba169c3dbfc9..56e2ef09947f 100644 --- a/contrib/llvm-project/libcxx/include/string +++ b/contrib/llvm-project/libcxx/include/string @@ -1943,10 +1943,10 @@ private: if (__s < __min_cap) { return static_cast(__min_cap) - 1; } - size_type __guess = - __align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1; + const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor; + size_type __guess = __align_it<__boundary>(__s + 1) - 1; if (__guess == __min_cap) - ++__guess; + __guess += __endian_factor; return __guess; } From nobody Mon Jun 10 07:29:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyNjr0vTyz5P6GG; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyNjr0Qr5z4tnv; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6DE9itxYpoEFE3p/tVFL+NuwhF+G7R0QNDNDspy2nw=; b=JzEf61lypo9ADsdsGwSteGvDt/YfOFRkDENmdq4iG29zZVL7PM7eD/DgbENEi+H0mf++zv mQuAErWpQOrdlFCUxTM+f9QS/o3MA+SJwntdyLA71bADE04hFzBkbyIt+wDXdKdsokaoNO Kjml8vsDpiYAdv+Ign6Tu6u9+9XKddfMKec7JfqkRxVI6pgQ32gRhift7Xgn/cSUwYqhmf SUaKjZixmdcHeyt8zSKbPupxktWuBDTXnGgxQ6TpBJF5GYUDUs++kN/LXy0gAv2IiGO6X1 kTX3qUrn8h6m2/9XloCD9xBcOk+VaR0RkSEThvTl/uVj47LV8kuiHDeFZoIpOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718004592; a=rsa-sha256; cv=none; b=SJ0WAZ825YXAYB+yc8dMc13pyFMh4b810t13AYW9jb0VVdHAc7rSvSerlI4eerjhV9FTpl fS4KeWW8QbDepN0BPxcjYaaqvyhNe9gZfasjvUnKS8s3DiNR6i1JMyCxI2lofpsXP+jEgb sL5X4LAMOOigtpuz0w2efzez+Ii8kJQaB7V+UvzTCGQcCcSs+KjbZQdH42BV4KRRdTtgVX Y5GUtCdumw/YPyunQmOyn4gtkKawiwznxdhxcalHstQ0BZWFkPUXRfrOYQuJEzJRZ6DT/4 0u7s0vYllt3m5vEGRMUCrc01r3PiNYryWM2VC0tatLit2nkSWihpk/uJtLFY7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6DE9itxYpoEFE3p/tVFL+NuwhF+G7R0QNDNDspy2nw=; b=kwQs6dyhFZMxcrecMryCsn4PZdVy3y3feG+aarWLIrm8U327v/tplEuClifBly5SFK0b/C fEv+oiBqaEOhw0jjlLvrp4enefFVLwdHu+4K2LcLeaQaooIYAVwrLlSHvNYqbCXYbonzla bwKWjlwfbsMlVrVaEQE2AHsm5NaxCARGdVXetqWQ1simYQTKLzpmwfCBZGuXXEnWMnTfgi gGIs5lnEJepiVqxBnI+qHvWou8WIlIZfzgl5V4gJVd2n5+enUoDoh9Xnr3FsNpkJnvWkfG tL9oDSoqfoD2MdryKt9ATnsqqLUHKm4hdx9ejjNBIeqXeTgYr+R4prAXNsl2PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyNjr021VzGrT; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A7TpRS028110; Mon, 10 Jun 2024 07:29:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A7TpjK028107; Mon, 10 Jun 2024 07:29:51 GMT (envelope-from git) Date: Mon, 10 Jun 2024 07:29:51 GMT Message-Id: <202406100729.45A7TpjK028107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ef4d145057c1 - stable/13 - Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ef4d145057c10e452ac07b3111b4b4d0c5382fb5 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ef4d145057c10e452ac07b3111b4b4d0c5382fb5 commit ef4d145057c10e452ac07b3111b4b4d0c5382fb5 Author: Dimitry Andric AuthorDate: 2024-06-07 18:42:53 +0000 Commit: Dimitry Andric CommitDate: 2024-06-10 07:29:30 +0000 Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): [libc++][NFC] Rewrite function call on two lines for clarity (#79141) Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity. Merge commit d129ea8d2fa3 from llvm-project (by Vitaly Buka): [libcxx] Align `__recommend() + 1` by __endian_factor (#90292) This is detected by asan after #83774 Allocation size will be divided by `__endian_factor` before storing. If it's not aligned, we will not be able to recover allocation size to pass into `__alloc_traits::deallocate`. we have code like this ``` auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1); __p = __allocation.ptr; __set_long_cap(__allocation.count); void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; } inline ~basic_string() { __annotate_delete(); if (__is_long()) __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); } ``` 1. __recommend() -> even size 2. `std::__allocate_at_least(__alloc(), __recommend(__sz) + 1)` - > not even size 3. ` __set_long_cap() `- > lose one bit of size for __endian_factor == 2 (see `/ __endian_factor`) 4. `__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap())` -> uses even size (see `__get_long_cap`) This should fix incorrect deallocation sizes for some instances of std::string. Memory profiling or debugging tools like AddressSanitizer, LeakSanitizer or TCMalloc could then complain about the the size passed to a deallocation not matching the size originally passed to the allocation. Reported by: Aliaksei Kandratsenka PR: 279560 MFC after: 3 days (cherry picked from commit ead8e4c081e5c4de4d508fc353f381457b058ca6) --- contrib/llvm-project/libcxx/include/string | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/string b/contrib/llvm-project/libcxx/include/string index ba169c3dbfc9..56e2ef09947f 100644 --- a/contrib/llvm-project/libcxx/include/string +++ b/contrib/llvm-project/libcxx/include/string @@ -1943,10 +1943,10 @@ private: if (__s < __min_cap) { return static_cast(__min_cap) - 1; } - size_type __guess = - __align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1; + const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor; + size_type __guess = __align_it<__boundary>(__s + 1) - 1; if (__guess == __min_cap) - ++__guess; + __guess += __endian_factor; return __guess; } From nobody Tue Jun 11 01:33:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyrmZ1wR0z5NLQR; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyrmZ1Qlsz4n1r; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cptJ0DlMG35yLKgs4bpuIcgWduHvYoe9B6DMPFiYYdM=; b=kJWbvR8o+HrUa3PcujACkAfCZmTsB/EiBqGeao+Bf2HKqlHNkgseawng0ZH8JsacMfTKmr UOnv6JwZIwFGDZZ832QqLDgmHgXUZGO49SefQFE8W68vFAad6ig9+q0hsoPLP4Eu+nBICS PpN+75ufxnKrcaSwihwg6RvB8ISAX+NBnGoJz9ZVWHdf3Uxckcl2jYo6V59wfhxo73BTc4 mLWho+GsVAcFctRCU8RueLwb+VT104NSFHYBd2DAPPTbm+DzayrMK9l8kImmfYN/SumVbT X/Vb8ybaRSYti3PptnFqRZrszcB5VUF0PBqGqxhDoYCk/4qav5mproAEAIVqow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718069630; a=rsa-sha256; cv=none; b=qDVcl/b/7bMc01mehPHnxSkpYQcwWbBc+Igsfk6B+vYR7NRfsSUPt351Dhi5DzLFExWlZ4 ZVpTtWp2PYMTpQz3c9n1rczVbtkSDhT005UJk2ZujW8Cdr5BabYIK+//emWS6hMB5a/YMC SK1bjt2qZts3Nr8+NYTgQTOxu2Ps9j3lryd3IlJi2HWte103MTL4rs+eYs/XzwtqFL+eYb AVrsDCz8GzePXfAcKflaN8kh6S3ynvxxaEdEgDF2abGqolKlS8ZSZ2gnhEKxuxcHXI92Rc GNfbJblv8EM9uvJVldaE5rpIO7RwjlGYO+yaaweSmhxmeDgrxCbE6xdJdFOBeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cptJ0DlMG35yLKgs4bpuIcgWduHvYoe9B6DMPFiYYdM=; b=Bi3eFAGl9TYU0a+ar6BfnU54ADKLIzeVlt7/7lyHqk2InhIg7EALoI6U9dCZK/ab1wsmoA 0AgGfsvg8KxIytKZp5mWPCXngyyH3eaaBnKSbJP+NtqhpLpjV5i2Ves+YkvPjO8nFxNQ7W kYEo7CtgKBSQRHHRFV4tPqauTshlrksP+ILomOVqwUSJi6uBl75w2XGuLeSbxhHVbDjuJa VeNwUx13n83HjSni/Jyz25dtL/bPcfk0Le+oj2XQNK3XlzHIWTkENyz8ceDsArdVvukt8V fxwUGeb8TCUNcZVnG79zfHi/PO1dUtJmgOk1GO0xqX7q6k1bpiDiWnYk2d4+TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyrmZ11tpzq3m; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B1XoKs068679; Tue, 11 Jun 2024 01:33:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B1Xo9c068676; Tue, 11 Jun 2024 01:33:50 GMT (envelope-from git) Date: Tue, 11 Jun 2024 01:33:50 GMT Message-Id: <202406110133.45B1Xo9c068676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: a3f7b81fdd22 - stable/14 - mbuf: provide m_freemp() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a3f7b81fdd2205207085ba5d038b402aba748c6e Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a3f7b81fdd2205207085ba5d038b402aba748c6e commit a3f7b81fdd2205207085ba5d038b402aba748c6e Author: Gleb Smirnoff AuthorDate: 2024-06-11 01:31:02 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-11 01:31:02 +0000 mbuf: provide m_freemp() This function follows both m_nextpkt and m_next linkage freeing all mbufs. Note that existing m_freem() follows only m_next. Reviewed by: khng Differential Revision: https://reviews.freebsd.org/D45477 (cherry picked from commit badf44cc21249a56e7d822a77acfdd21f8352d50) --- sys/kern/kern_mbuf.c | 19 +++++++++++++++++++ sys/kern/uipc_mbuf.c | 3 +++ sys/sys/mbuf.h | 2 ++ 3 files changed, 24 insertions(+) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 0897ac4cc2db..002e508e91cc 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1569,6 +1569,25 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } +/* + * Free an entire chain of mbufs and associated external buffers, following + * both m_next and m_nextpkt linkage. + * Note: doesn't support NULL argument. + */ +void +m_freemp(struct mbuf *m) +{ + struct mbuf *n; + + MBUF_PROBE1(m__freemp, m); + do { + n = m->m_nextpkt; + while (m != NULL) + m = m_free(m); + m = n; + } while (m != NULL); +} + /* * Temporary primitive to allow freeing without going through m_free. */ diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index f1e986eaa348..b10e524e6e4b 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -113,6 +113,9 @@ SDT_PROBE_DEFINE1_XLATE(sdt, , , m__free, SDT_PROBE_DEFINE1_XLATE(sdt, , , m__freem, "struct mbuf *", "mbufinfo_t *"); +SDT_PROBE_DEFINE1_XLATE(sdt, , , m__freemp, + "struct mbuf *", "mbufinfo_t *"); + #include /* diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 757eba3165f9..f7925da795cd 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -67,6 +67,7 @@ SDT_PROBE_DECLARE(sdt, , , m__cljget); SDT_PROBE_DECLARE(sdt, , , m__cljset); SDT_PROBE_DECLARE(sdt, , , m__free); SDT_PROBE_DECLARE(sdt, , , m__freem); +SDT_PROBE_DECLARE(sdt, , , m__freemp); #endif /* _KERNEL */ @@ -844,6 +845,7 @@ void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t, u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); +void m_freemp(struct mbuf *); void m_free_raw(struct mbuf *); struct mbuf *m_get2(int, int, short, int); struct mbuf *m_get3(int, int, short, int); From nobody Tue Jun 11 01:33:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyrmb3PtRz5NLbj; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyrmb2j9tz4mtD; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=vapllASqZLXJpCuSoq0v5J/Ufdxnvhwd1dtWYDt2bY2sbGVvfbhtT7c+2cc/O2yx7UO0CD QEh5u6ZuzpACwB/Ns3OHmt5EqoAv1bEaLDscWDOs0iv151gWbASQLLmmBw6KIqa9tj03d2 ELwWBn41+KrgrxXSZn4wptMGgxQ5EExDA5kmxpMFXiI6G+iCcj3s6Ilqe2qgb3E39EJsPx pmq0izGfMDsuEEvrepF2dzayckSGqsqAGeM81zkGH7mR2+6H+01zcCRwmOjLcvxBaVizd0 /6W9c8eMtwgQDoDJ+qmiJP28O82/kuj9axmxs5r+IrnLSgR3jeKwX/x8dCacRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718069631; a=rsa-sha256; cv=none; b=ZYxbkidHMRBotF4YwCnSI/sGJ/+StqMqz/mZ+awchpHjLLM+WITDODvH18uzflslQd8rpu lf6jMeON//TSbmPr01H9cevIOUy7otakzXzgtzh0RGWvjz2qzqMtTepSAYh6mXPa/25Nx2 jVfSuVVKxT7GwOkOgJIiAR97LpC1fq4FMHVWouZvB+npraIomIJMm/1dgnvrPIpvUtrdbz bkCJ6e5dmx8FmRPgiQX7hOX0eXREqs97jOssJEZc72fO/Gd5PAE1UjjCy2tC5sfKwNMGkV 3P8dIA1P+cwp7e6Lz8fNmjmC0tBnk0DlVadRGDysCGnbQ2FRpd2rnfZpu2uWnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=Uz9O6nY1neYmK/A3JMM3VyFppMfe21rax2pIF1tG+LZUTiMz4RAH42C7EcYAOq1jLMD20C h85GvPT1aLp2CFPWVCq/VPhYw5lucMY9ZIcm+R6YCg2wmcU7cB3KURtsOx096I+r5uDHiC 62p3JdOmFM4WFACvr3Pn+gETb3j4HBYZ2YVJ7BIYZonMJdCDKCFHIjprx8xKJlQfyKmJZz +5RbeWfCoWHZux/fXPnTlXoj9AkZLasgsdoXg5aopcMoaqg0PIUXt9I1Q2IPYE/5SAV8pw pRf91LD/TYYuYSYNcHPIEITSdfxH6Dc4BSPvxXocsC8j6Iyyc5d9+WShFKfw5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyrmb2KbMzpgs; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B1XpGv068730; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B1XpOC068727; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git) Date: Tue, 11 Jun 2024 01:33:51 GMT Message-Id: <202406110133.45B1XpOC068727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: f70581ff7d55 - stable/14 - unix: use m_freemp() when disposing unix socket buffers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f70581ff7d556aa49a130fa24c876e74b877278c Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f70581ff7d556aa49a130fa24c876e74b877278c commit f70581ff7d556aa49a130fa24c876e74b877278c Author: Gleb Smirnoff AuthorDate: 2024-06-11 01:31:08 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-11 01:31:08 +0000 unix: use m_freemp() when disposing unix socket buffers The new unix/dgram uses m_nextpkt linkage, while the old unix/stream uses m_next linkage. This fixes memory leak. Diagnosed by: khng Reviewed by: khng, markj PR: 279467 Fixes: 458f475df8e5912609c14208c189414a8255c738 Differential Revision: https://reviews.freebsd.org/D45478 (cherry picked from commit a9b55a66440ce67e545b60f2861badbfc5ec6327) --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index e54cd01956bf..87b82763b5f1 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2189,7 +2189,7 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } @@ -3276,7 +3276,7 @@ unp_dispose(struct socket *so) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } From nobody Tue Jun 11 04:49:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyx6G3fGCz5Ncyy; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyx6G360fz54lM; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUCeRuhUJSkztkUveV/NPSp0ko2XRfS/KamdqW2gdLk=; b=KizvdMw4qtJP/ZmjA8e95Bi+Drh+Lcdr3BKZJfdDOneO7MWsSS9M9lq0b+wxd2HXVAcGwd P5bjjFEd3uWcrLCj/iZ16E1k5j2djH4MORox9f8gZmX/CRsRTZkOdUMMs3l6rZ9Izwsfmc KevgZjuuj2UwYWUwoB2nYWOFPcDxw+4w6cHPM+YTXP0yMdYs5RkIX2WycLWSIMHc6WTit6 ZuUG4ZasTbr2I1sNqWsVrvwJgIxBs1dDsubh/h/U2pur2PJaGP/vGiYwsy3UjF1VDE0R4J ABsYcoqqXN8i3l9KYqvskO0yj7mp8IxOa/PMp05wchpV+XxJ/8BKCkw47gq0gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718081366; a=rsa-sha256; cv=none; b=CAwPAHVXlUb6YZ7yByyD/SVxb+fbtgmZXFmn2k3ZXM+q/JBmar27bUZ4cooNQBN+yeQLjy 7V6JR4DxZOzAyOpnHNGHw4tfCUf6+F2iDINdYbJrs8rJGa1USHquvNBGc7M7WMT4eLN729 aaD3M3WkpZsBLEB1CbpxgXtIf1HO1Ie89iBmNZDVxyYHNcMpqvNENrIZZEdHVr86P8Zbn3 gINQT7IQIC7Mfw/kcUg2303bimQ8KaBvmp3xb7WEoaGryfXuobx+H9HIiG2m9ShLEfU70g HxU8b3C44EH/01x0pv1tx/lT+QdfTF7PvWo+0WEJrvMKvqR0QJ+oJQLfM6kqFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUCeRuhUJSkztkUveV/NPSp0ko2XRfS/KamdqW2gdLk=; b=N7kMkf9nnUsV2TrWA3QKMCmSE/AS69pJgzAtPBwXOnx5YzIpyczl989QcWglkMfCIIYsCu YdT+Dy1/t3gIgguo+EUbDDKd2WuiFrrxtn+7tOyEpezzmdH7D52U+FuhxCai7XI3HdbgJE AlSRlldNR35cbtQwt+H3AA/X8+L6/wXjnP/VKBRyqR6ku/It70ElSRGFaZSx9/H/jzjHGz 4hrUwynpOTEHPT0Te3k1qQfLx2sTpxlxVjxd6AF90RaPpjrqC9bVZnUIpxWEKIcAF+MWiL 1nETl33SI+940c8IjlkAYWjZEVcwR2HVQi8mb8FdgYCkoUstBGwNSOOjWp6NDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyx6G2hsXzvkM; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B4nQMi092247; Tue, 11 Jun 2024 04:49:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B4nQJ6092244; Tue, 11 Jun 2024 04:49:26 GMT (envelope-from git) Date: Tue, 11 Jun 2024 04:49:26 GMT Message-Id: <202406110449.45B4nQJ6092244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9cd77bd9c68b - stable/14 - sys/sysctl.h: Fix wrong assertion with multiple access flags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9cd77bd9c68bda6134c6672e9a923869b7923343 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9cd77bd9c68bda6134c6672e9a923869b7923343 commit 9cd77bd9c68bda6134c6672e9a923869b7923343 Author: Zhenlei Huang AuthorDate: 2024-06-08 03:21:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-11 04:48:59 +0000 sys/sysctl.h: Fix wrong assertion with multiple access flags With multiple flags passed in, e.g., CTLFLAG_RD | CTLFLAG_CAPRD, due to the precedence rules, this will result in false positive assertion. Fix that by surrounding the replacement lists with parentheses. Reviewed by: imp, erj Fixes: 10a1e981d411 iflib: mark isc_driver_version as constant MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45531 (cherry picked from commit 23f4131ad685debef98566351cb9f0e0a5903903) --- sys/sys/sysctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index bc7a2bc601a1..76cbae25f4e5 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -395,14 +395,14 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\ __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING) #define SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \ ({ \ char *__arg = __DECONST(char *, arg); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | \ From nobody Tue Jun 11 04:50:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyx7J0NX2z5NdHT; Tue, 11 Jun 2024 04:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyx7H70mzz5581; Tue, 11 Jun 2024 04:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=; b=F20ItGeysmz9NIgXIF0DwUL6Ze6izDspPNfONE8zf+pjR8cSvR25g7/EHQEPSmhZUmIR4s 0xTgN06H0vgVHBfGRdYTM3wf06vvP0hDknVGEn167LLJ/WI0pfZ7A2PdL8r+eYCBMtwDDz 1SW5YAcJuEplC7bNtzhmreTODlO+D4vd7wWWwleFiA4RHszAhlqI4A9lD8UoniPzycWMhz DBcIg09iyRcHN9gUEt70tU/fddh8wirCAcd9KBjSd8qkzrrhsOchxLRugMbe5m9UAefX03 ryijo5bzh7kN56PtcAdUkOosvA+l6YKRXNNHx6YUSfLQrD1OogveGcchucWEzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718081420; a=rsa-sha256; cv=none; b=PW3FoSvfw3CgYvbjkh7LkwNBvk1dhWBsqpxMn2bThVMkQGNvYkazYqhJxGxprh4NcCukaT dTsdOSV54GwjRlBi+mSPosccqsWG7ClizNDBNsrL9ewAwyvKMUHbSFtg82zFFTk0L5hrCz wY5AUesLbRXOWxbjPLXfsqq1fXVAKM2lFNuP9Athl+XEaNOpC0Wei8VdOPCooQxssfmjBZ ARF64P0iLPXeFt+qAl/sGOAG0x+kf6jXNi1K/+AhhX/MJRSg43vyy/6+iGJeuWymqKXX+8 urbqh5ziQ0Viyix3C+mOEyyb7rDsetMFfZuQ+gsLsDXKZ0mKcR2tPQ1DbLkAag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=; b=DZhhJCyksyGqcpjMMcX48YFw9rU4AIO9UyJ/lMnotb0/A8Eqm1fGM5+cFX/+mw0PYXMgK3 KIMUBuLloLFtL4nFvscTtI8+DCbmUXOWXZegDO6BfUVyBOsrk4FF4SYulw2yJbZXPQRLno O5Pd4mijW6n2+PnOxXMLxWez5tN8VeLwHjvsb4khNoSZaUcOKOZikQSqXFVTZ+sw3aaWWS We98SOJ2zGpildRzBx5to7ewRivijfZuUeUO6AMt+TZgcjyvhwFW8kbPAJYTNrBcGDbUUw ZEYgm7rCQNhk6m5Z34erIPb8I1Ycrv5RLlSRa2I41ax7BWL7osJF/+530mYIvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyx7H6czczvVp; Tue, 11 Jun 2024 04:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B4oJFw001064; Tue, 11 Jun 2024 04:50:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B4oJaY001061; Tue, 11 Jun 2024 04:50:19 GMT (envelope-from git) Date: Tue, 11 Jun 2024 04:50:19 GMT Message-Id: <202406110450.45B4oJaY001061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c720ff8f95fc - stable/13 - sys/sysctl.h: Fix wrong assertion with multiple access flags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c720ff8f95fc2e36944f503d1b40301cea7b7687 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c720ff8f95fc2e36944f503d1b40301cea7b7687 commit c720ff8f95fc2e36944f503d1b40301cea7b7687 Author: Zhenlei Huang AuthorDate: 2024-06-08 03:21:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-11 04:49:58 +0000 sys/sysctl.h: Fix wrong assertion with multiple access flags With multiple flags passed in, e.g., CTLFLAG_RD | CTLFLAG_CAPRD, due to the precedence rules, this will result in false positive assertion. Fix that by surrounding the replacement lists with parentheses. Reviewed by: imp, erj Fixes: 10a1e981d411 iflib: mark isc_driver_version as constant MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45531 (cherry picked from commit 23f4131ad685debef98566351cb9f0e0a5903903) (cherry picked from commit 9cd77bd9c68bda6134c6672e9a923869b7923343) --- sys/sys/sysctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 3a61f1153c5a..ff87e32df2b7 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -382,14 +382,14 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\ __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING) #define SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \ ({ \ char *__arg = __DECONST(char *, arg); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | \ From nobody Tue Jun 11 13:27:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cC1fZGz5LgHG; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cC0nYtz4flb; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECPxdYIc86+g8kFFhxd94cAZrQJ0sGEKAhgYiEWXMkM=; b=XkE1u2cewEH5AaHb/trz5jdDF0qxBAOhnid5H3lgTfh/rs9Di2DqGed12VF+jEa5dbDq45 2VwStyLH8sqLiDwMSVPrnmlD5lqJVgnJ9S/2Jp6M9/twTZ8b9vduHKltt25ONwhMgNCOeT loPc/7kLadM919O/3FnQjjwIN4cjdswlRE24iiOtobBAwqSIzXIRfVQIZATtSrs0x9IG7W h3STh4rD3DbV+nxTmdiIr6/MDzYweEl9HeYsFnA21S2Vd1hYqPzvOGwZ9ziqfTTB4R31fn DO3qVRUXTsEywPF/FQ4SGBevi6fteT9BMSK+2WwqBOzbNR1KclAv7D31FRQsOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112459; a=rsa-sha256; cv=none; b=idM4RZT5hr1RQyX7sfdwOqk4/U78yvhqU5fh94TeAZI+S5A0c/DbV4NrElu/bM07u58ZSK yD3y4SQAcbQqLMmDFy0pn5fuEdiIs3ahLxwUddmhLnDpohuohjbaj8mbjjVYu8APMcM6bH 3OCR3s6BuX9XKTMtfnRKsUoHarqtNKgsy2LEQyhDxpSUpvPE4Lal7dEtErlqNADb5b5/ei nMv//d049ei+sa34fEQzQnmbl6W8UgjAJS+ZYLWbxbELJRf7GFdhzYK+bVSreXElBuGypt g1Y03JoDq1TOU3IOOx4IqfektyQAtdX5IUggJRAPEC10PCkZuitM3utxbZoxvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECPxdYIc86+g8kFFhxd94cAZrQJ0sGEKAhgYiEWXMkM=; b=UDA9Hi6n9SUVkZaKEGmbKqEWQQoQPTsD7/DQ+3uULYi9n4UYEgZzwsGW56cRxoQkRzsZjQ JriNrFhNvRfAhiHDwsJfv9Glvj6hcePHzQI4bWAksCRo8j0AWADwPW7CsvhqLmGUBj8h+l xx0QCR2+SY6RbFOlAhCpcYlBfKknfThAtFg0+oepMswOGS+RyJCv7+TqL7Pfwp2sHJ1FJJ u7PR1aoialOfsQFnCkpzU7pMqsie+SJtQJbAxmuSlmfpGl6E9eCsVLG8kwER11ZTckweKZ 3ClpQlFsqa56xx3wGIpf+aOkZjNFYafv0S6b+a/q8RO+dnyKIH42Elw07U1I/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cC0GgWz199G; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRcul072731; Tue, 11 Jun 2024 13:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRcE0072728; Tue, 11 Jun 2024 13:27:38 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:38 GMT Message-Id: <202406111327.45BDRcE0072728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c3fe41b3a375 - stable/14 - vnet tests: check for if_bridge.ko List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 commit c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 Author: Kristof Provost AuthorDate: 2024-06-04 18:02:18 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:03:23 +0000 vnet tests: check for if_bridge.ko A number of tests create a bridge, but did not check if if_bridge.ko is loaded. We usually get away with that, because `ifconfig bridge create` autoloads the module, but if we run the tests in a jail (e.g. because of kyua's upcoming execenv.jail.params feature) we can't load the module and these tests can fail. Check if the module is loaded, skip the test if it is not. Reviewed by: markj MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 Differential Revision: https://reviews.freebsd.org/D45487 (cherry picked from commit 480ad4055314efbfff7eedbb34272031d836ba89) --- tests/sys/common/vnet.subr | 7 +++++++ tests/sys/net/if_bridge_test.sh | 13 +++++++++++++ tests/sys/net/if_ovpn/if_ovpn.sh | 2 ++ tests/sys/netinet/carp.sh | 7 ++++++- tests/sys/netpfil/common/rdr.sh | 1 + tests/sys/netpfil/pf/altq.sh | 4 +--- tests/sys/netpfil/pf/pfsync.sh | 1 + tests/sys/netpfil/pf/sctp.sh | 1 + tests/sys/netpfil/pf/tcp.sh | 1 + 9 files changed, 33 insertions(+), 4 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index 50abadaec81d..0f7dec0dc6f1 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -26,6 +26,13 @@ vnet_mkepair() echo ${ifname%a} } +vnet_init_bridge() +{ + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi +} + vnet_mkbridge() { ifname=$(ifconfig bridge create) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 44370a905223..66656be1d84f 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -39,6 +39,7 @@ bridge_transmit_ipv4_unicast_head() bridge_transmit_ipv4_unicast_body() { vnet_init + vnet_init_bridge epair_alcatraz=$(vnet_mkepair) epair_singsing=$(vnet_mkepair) @@ -76,6 +77,7 @@ stp_head() stp_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -142,6 +144,7 @@ stp_vlan_head() stp_vlan_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -216,6 +219,7 @@ static_head() static_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) bridge=$(vnet_mkbridge) @@ -273,6 +277,7 @@ span_head() span_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) epair_span=$(vnet_mkepair) @@ -326,6 +331,7 @@ delete_with_members_head() delete_with_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -352,6 +358,7 @@ mac_conflict_head() mac_conflict_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -390,6 +397,7 @@ inherit_mac_head() inherit_mac_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -418,6 +426,7 @@ stp_validation_head() stp_validation_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -461,6 +470,7 @@ gif_head() gif_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -545,6 +555,7 @@ check_mtu() mtu_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) gif=$(ifconfig gif create) @@ -606,6 +617,7 @@ vlan_head() vlan_body() { vnet_init + vnet_init_bridge vid=1 @@ -673,6 +685,7 @@ many_bridge_members_head() many_bridge_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) ifcount=256 diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index 88df430aead6..3623f57115ac 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -584,6 +584,7 @@ multi_client_head() multi_client_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) @@ -796,6 +797,7 @@ ra_head() ra_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index d08940d433d7..d0e10bc2c085 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -71,6 +71,7 @@ basic_v4_head() basic_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -105,7 +106,6 @@ basic_v4_cleanup() vnet_cleanup } - atf_test_case "unicast_v4" "cleanup" unicast_v4_head() { @@ -116,6 +116,7 @@ unicast_v4_head() unicast_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -173,6 +174,7 @@ basic_v6_head() basic_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -220,6 +222,7 @@ unicast_v6_head() unicast_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -281,6 +284,7 @@ unicast_ll_v6_head() unicast_ll_v6_body() { carp_init + vnet_init_bridge j=carp_uni_ll_v6 @@ -391,6 +395,7 @@ nd6_ns_source_mac_head() nd6_ns_source_mac_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) diff --git a/tests/sys/netpfil/common/rdr.sh b/tests/sys/netpfil/common/rdr.sh index 7d6297870e6c..0d6f27694c8c 100644 --- a/tests/sys/netpfil/common/rdr.sh +++ b/tests/sys/netpfil/common/rdr.sh @@ -83,6 +83,7 @@ local_redirect_body() firewall=$1 firewall_init $firewall nat_init $firewall + vnet_init_bridge bridge=$(vnet_mkbridge) ifconfig ${bridge} 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 57a9edf11366..a902c7caaf4f 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,9 +156,7 @@ codel_bridge_body() { altq_init is_altq_supported codel - if ! kldstat -q -m if_bridge; then - atf_skip "This test requires if_bridge" - fi + vnet_init_bridge epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 91c7b8410a08..441221f39d27 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -326,6 +326,7 @@ pbr_common_body() atf_skip "This test requires carp" fi pfsynct_init + vnet_init_bridge bridge0=$(vnet_mkbridge) bridge1=$(vnet_mkbridge) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 66225e132d1c..c6dba1719d00 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -504,6 +504,7 @@ pfsync_body() sctp_init pfsynct_init + vnet_init_bridge if ! kldstat -q -m carp then atf_skip "This test requires carp" diff --git a/tests/sys/netpfil/pf/tcp.sh b/tests/sys/netpfil/pf/tcp.sh index 84536480b44e..f1bffdba2bfa 100644 --- a/tests/sys/netpfil/pf/tcp.sh +++ b/tests/sys/netpfil/pf/tcp.sh @@ -39,6 +39,7 @@ rst_head() rst_body() { pft_init + vnet_init_bridge epair_srv=$(vnet_mkepair) epair_cl=$(vnet_mkepair) From nobody Tue Jun 11 13:27:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cD1LwGz5Lfq1; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0knPz4fPC; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyJhvn/xrlfx/I+ohgQZBuAaK+thlvUSmCZrQYmJx7s=; b=tNzBKi3iP9fp0wMP6WZpMFXVTYhRroTcfcWtkcRmpIEgoE7xglV3pslLj8SsNMoxhrIauC p/vYTjxiovkgcuOubGfvR8cHRSZ2AZa3SWd+xId3ZifMyXuT2TczW6mGRJnoxIRuCUhVDL Ytk+RxFr0+/Y0FB2U3zGxAJFY/pAiZcs6XosAPK2mc10qFJce0VXn5ybi/cO9yqk6ZJwxw BiOXEme1UGQE4o57aKY4jVEvxaLAaP3T2LPJmkC4PhECaP5l8vKjCFdMf7yaeSYRmTQY3T 2rE2wJOyB8NLgUOMh5Yg2jYH7r+Xv9Y1fvPCUlkQSubUtgcTLH9EEnzP/kgSFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112460; a=rsa-sha256; cv=none; b=jSWTZw3lTU5DQfezH/oMLxphER0Af1taC2Kbp2XmxP3I8fmi3kI7cWQJKIapqvpkFf5eoS 7hRpMdKdHIa64KClzkQY8xpjjko1zsT6hdULTVsrQmz+lxl79m43sekAgNKKcGON++In8V kE3FHtOCPfZD/AHY8eqFzcmZqUzbFKWc9KwX8dfgz+jaJByfQTzkZghcWpC/v3FN/ksI/b QfMkhnD1ES+Y5hDOBITBsaJ6+EivBTqGvJdhZSAuAnaw+3ZL1LaRnlbYOAsv2V/JqqPoe2 FQxrjnyAAL/mQtEUnWrgB2l5J2ck5ebC0Mi0AxW44E+Zz3GPuil2TEuP3TM3yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyJhvn/xrlfx/I+ohgQZBuAaK+thlvUSmCZrQYmJx7s=; b=K/1Jk4H7K05NCG+HvA5WXLBYqRIA/pJxASoQRabnQb8vl0lIuRFq1wZn4OGjiEa8sjUCgp V8ck09InIaGndnFmPwQ910BRNVJVMMgOfCef4RvuImI9vd9u1rXvaUJuEO8oWQRLlB5p64 /PpJEtFunZ+hQvR6hggOxCg4uxpEx7/GKgRpirMSpaN9VtU/8loI+hWh0sAkU0KFH4xOF1 6fOGqyUXbl4AEONldqSkqg7/XX02yzEgJfIFmvK2lh6iSboYPxNJPePP/TUBLjZtNSzB3w WGpjxzQOlOOkg0IP4xzMfJJiFYUozL4gpxRYrQHP7g/NOzYAVUyIse/nZzrH8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0MKnz19nt; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRdQn072833; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRdgJ072830; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:39 GMT Message-Id: <202406111327.45BDRdgJ072830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 154dd1eaa643 - stable/13 - vnet tests: check for if_bridge.ko List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 154dd1eaa643ffff4df525dca2e747490df61df3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=154dd1eaa643ffff4df525dca2e747490df61df3 commit 154dd1eaa643ffff4df525dca2e747490df61df3 Author: Kristof Provost AuthorDate: 2024-06-04 18:02:18 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:05:13 +0000 vnet tests: check for if_bridge.ko A number of tests create a bridge, but did not check if if_bridge.ko is loaded. We usually get away with that, because `ifconfig bridge create` autoloads the module, but if we run the tests in a jail (e.g. because of kyua's upcoming execenv.jail.params feature) we can't load the module and these tests can fail. Check if the module is loaded, skip the test if it is not. Reviewed by: markj MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 Differential Revision: https://reviews.freebsd.org/D45487 (cherry picked from commit 480ad4055314efbfff7eedbb34272031d836ba89) --- tests/sys/common/vnet.subr | 7 +++++++ tests/sys/net/if_bridge_test.sh | 11 +++++++++++ tests/sys/netinet/carp.sh | 2 ++ tests/sys/netpfil/common/rdr.sh | 1 + tests/sys/netpfil/pf/altq.sh | 4 +--- tests/sys/netpfil/pf/pfsync.sh | 1 + tests/sys/netpfil/pf/sctp.sh | 1 + tests/sys/netpfil/pf/tcp.sh | 1 + 8 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index cc04b326c9db..9e92adc0db75 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -16,6 +16,13 @@ vnet_mkepair() echo ${ifname%a} } +vnet_init_bridge() +{ + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi +} + vnet_mkbridge() { ifname=$(ifconfig bridge create) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index b9540c79faaa..f67978e25900 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -39,6 +39,7 @@ bridge_transmit_ipv4_unicast_head() bridge_transmit_ipv4_unicast_body() { vnet_init + vnet_init_bridge epair_alcatraz=$(vnet_mkepair) epair_singsing=$(vnet_mkepair) @@ -76,6 +77,7 @@ stp_head() stp_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -142,6 +144,7 @@ stp_vlan_head() stp_vlan_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -216,6 +219,7 @@ static_head() static_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) bridge=$(vnet_mkbridge) @@ -273,6 +277,7 @@ span_head() span_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) epair_span=$(vnet_mkepair) @@ -326,6 +331,7 @@ delete_with_members_head() delete_with_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -352,6 +358,7 @@ mac_conflict_head() mac_conflict_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -390,6 +397,7 @@ inherit_mac_head() inherit_mac_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -418,6 +426,7 @@ stp_validation_head() stp_validation_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -461,6 +470,7 @@ gif_head() gif_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -526,6 +536,7 @@ many_bridge_members_head() many_bridge_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) ifcount=256 diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 8136b174785f..23dccaf90de6 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -66,6 +66,7 @@ basic_v4_head() basic_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -110,6 +111,7 @@ basic_v6_head() basic_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) diff --git a/tests/sys/netpfil/common/rdr.sh b/tests/sys/netpfil/common/rdr.sh index 7d6297870e6c..0d6f27694c8c 100644 --- a/tests/sys/netpfil/common/rdr.sh +++ b/tests/sys/netpfil/common/rdr.sh @@ -83,6 +83,7 @@ local_redirect_body() firewall=$1 firewall_init $firewall nat_init $firewall + vnet_init_bridge bridge=$(vnet_mkbridge) ifconfig ${bridge} 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 0ced82a3a942..8622ce72dfbf 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,9 +156,7 @@ codel_bridge_body() { altq_init is_altq_supported codel - if ! kldstat -q -m if_bridge; then - atf_skip "This test requires if_bridge" - fi + vnet_init_bridge epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index ada98699efec..8fcfdc2dcfa3 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -323,6 +323,7 @@ pbr_common_body() atf_skip "This test requires carp" fi pfsynct_init + vnet_init_bridge bridge0=$(vnet_mkbridge) bridge1=$(vnet_mkbridge) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 66225e132d1c..c6dba1719d00 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -504,6 +504,7 @@ pfsync_body() sctp_init pfsynct_init + vnet_init_bridge if ! kldstat -q -m carp then atf_skip "This test requires carp" diff --git a/tests/sys/netpfil/pf/tcp.sh b/tests/sys/netpfil/pf/tcp.sh index 84536480b44e..f1bffdba2bfa 100644 --- a/tests/sys/netpfil/pf/tcp.sh +++ b/tests/sys/netpfil/pf/tcp.sh @@ -39,6 +39,7 @@ rst_head() rst_body() { pft_init + vnet_init_bridge epair_srv=$(vnet_mkepair) epair_cl=$(vnet_mkepair) From nobody Tue Jun 11 13:27:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cD42b1z5LgCw; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cD1LpDz4fjY; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHRWY0guO7Rnr4of2N3ya8sMMzr6M3J5Kdz0izQHV0Y=; b=xLiashf6P7IXjJNgS8GFgs/MI0Oah9eRM5IEn9c/W0LRXdSj8Vz9mLQqKMeML/cDyNFTMZ kmmenBtYUEOoCuA6g/EMxGIVibPxQCeNeRhXdgryKDAKKbhoTH7tFpAdfH61CCUSoS9hxm ERaGiHo2u2NLxB9zOKqGNR9LVVF8oTjf+ahuDZTr0A0h2zMm5G9CJnspKmqzWZ/+Pr9fdX +pA3+cDqYTeoECJJke8J3TOq0XP8KjJww0bwBldMqPhtFRoh+3ZSmX6ZMlhLA80WOnMvfx UhjQZXUpfyXSFLfs5sI3r4DJ5Xb0zJ8ab5lzDrg3Yi1L92/7ZrSp17aPIqtL6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112460; a=rsa-sha256; cv=none; b=q8GIeDhylmIC356GnGKRsliBoIpRkPGqtwox93PqwFHwvk+YQ8xaiHp/+DTyFcl3Ch7HKR N/fZELNFXMPDwPvXKxFWBFhI7pAYfydrFo0eRNq5WxcUt/I0WxribS0rhaWQOevFXCtZqK hiW4XIHYbhs1KIgQi5CyEmlYjUDXSJ/BhMYfI/98Dgw6BtJsivooJAPk5/u3MJxCnrPu4i kEv2+p275xHEWghAUEAZZykt7cqF+A7nZEFBIG2F1aKoNjrH50EexdAEV+UatfkhZuIO2S ugdyEXXeLYkQbTw28EKO6+pkk7F4DITNeNlti2J1uXfUpWMv1rlDcDqAsOmRQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHRWY0guO7Rnr4of2N3ya8sMMzr6M3J5Kdz0izQHV0Y=; b=NWZL0DFHvnwnlnaP+Xzc1voKjPFbMcZ/gSzIZ/HaRD6kMeiDexTB9qwLfZqX20/wIO+lIW 40HJzpzNz7G/eGtNltnBvd0YZTlolWKdJvZYrVSLvGLplMis7DFw8+wiHihgzeXGWs0Y4r ROxNO+yWedPILn1xZdSB7OSMaC7T1jMKnrAdjd8bG9siz+kjy7xJbBtfa2NXOy4UBagX+R z2GTzq6NZg1wzCBM1VYwXwLxgF09nUthzXzBwSnp1anAqtz68UJ1+ucgqsS1i2F8B7naL9 KSFd8+w+pCauShJLlyS2JEt7FdOBugPAWMdheXqfdD5HagPbcl5YgPenhmHP2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0mBYz199H; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRdSA072884; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRdmv072881; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:39 GMT Message-Id: <202406111327.45BDRdmv072881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 357d111ef71f - stable/14 - pf tests: make ether:dummynet test a little more robust List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 357d111ef71fabba9590d2f59a1539d5d27a1f82 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=357d111ef71fabba9590d2f59a1539d5d27a1f82 commit 357d111ef71fabba9590d2f59a1539d5d27a1f82 Author: Kristof Provost AuthorDate: 2024-06-01 20:37:36 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:05:38 +0000 pf tests: make ether:dummynet test a little more robust Allow slightly more bandwidth, but cause ping to give up sooner. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1c5b886e111663d3c7e30beddae9c10445f620d4) --- tests/sys/netpfil/pf/ether.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh index 9a1ab1b005d7..e1855949476b 100644 --- a/tests/sys/netpfil/pf/ether.sh +++ b/tests/sys/netpfil/pf/ether.sh @@ -415,7 +415,7 @@ dummynet_body() # Sanity check atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 - jexec alcatraz dnctl pipe 1 config bw 30Byte/s + jexec alcatraz dnctl pipe 1 config bw 300Byte/s jexec alcatraz pfctl -e pft_set_rules alcatraz \ "ether pass in dnpipe 1" @@ -430,14 +430,14 @@ dummynet_body() ping -i .1 -c 5 -s 1200 192.0.2.2 # We should now be hitting the limits and get this packet dropped. - atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2 + atf_check -s exit:2 -o ignore ping -c 1 -t 1 -s 1200 192.0.2.2 # We can now also dummynet outbound traffic! pft_set_rules alcatraz \ "ether pass out dnpipe 1" # We should still be hitting the limits and get this packet dropped. - atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2 + atf_check -s exit:2 -o ignore ping -c 1 -t 1 -s 1200 192.0.2.2 } dummynet_cleanup() From nobody Tue Jun 11 13:27:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cF2SMQz5LfdZ; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1mh2z4fJx; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh6s/wN9zph7UNogDV0de46i8ybs0UHDYG47w1GnU6k=; b=PuiHbo6vx0pBHm7HZEOpgcT7E/UpoRRcKMIPiRHK1LNqkyKXrEDS/yaTa9/hNXNI49TU0p ra/W5yKPqJ1/XVyG/xUZIm0oMsMVaKEFzGKSrCSKiqD1p3mNIzyjwDpSohQvaexA3AeSwn aWLbZz7GnzECyqp8k0iqi0kG50AOvk63iBSrhZEaxz1IdBMllkrDv1CYEjaeFrn1dUHsLM CCPI4sOeWHA96bVMWtVm3M3oA7ksyO0IRlK0yAWOg9XdjzT25Y7ao1mt30tPWgTxSWk1LQ +2e5Zs2OPUsKem8ipG0yrAr0WCVSeYaEx1XsrGx1quFgJm1yI5gj+BcYSXhPgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112461; a=rsa-sha256; cv=none; b=qYE2Q0VszJd+sUBD0qlZiwtOazJrmxyM7M/s+lVFzsYHv6hQkAmBpSvFV9aCx5Uy7UetNk iHdh6MtK6Opdr+8U49w0v8x1LvTehfZ/OqriaXE/5Xf2Urp6TLA2eJNFdxnflJ6zeFE/zh ImFyUEMShmPMHRD91O3GOVTADvAi+P7Peo4SWkFSLZr1qe3tJ7uikoYPuhkpUEQ2WDm4GH m0kym5OmkfENfVRIjZ+3V3p1P5GMi+EASu7z+BWfnblKLSyBQaERALlm0kwBfW8hdI/fNa 7X7xdHtVyvBnCiiUe13/vccctUaXPw39v6wkUogBXl1lWc8z4qvwZL3Ggm6ydQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh6s/wN9zph7UNogDV0de46i8ybs0UHDYG47w1GnU6k=; b=jnAvVbdUGusQtf8ULQQti2fkk5SVVlT4YH/JPCyEyzvtiaM60NgIrT0gIdICLmGZU0T5+m Q/0yTJs8Pe1KmI8IzF2nKqiIapdBAYf8bVXK+balhacTvYYAqf0zmxvowPXMQ/LOGl/0qW kzVtPTMTcGxf4zHNkD9jGN01L1UuQID7jS9fvniiGeSH7F5A5ADG2mtOOVcIYPFZZ8YsH6 ieyH3wn3+oc8EjxHs9e9TqeLNpY+GbaOVtT42OjaGbnyuuLjfnJdFPq5PnZwi+bGG4ZSc3 njbXhRYBRPWVVyZVQPjw4VltN5VYK9jvPWyJw+Zib0KgG3SJ2X0Kr/UEbSePSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1KSJz19nv; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRfw0072979; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRfmr072971; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:41 GMT Message-Id: <202406111327.45BDRfmr072971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 8fb5dc88ad8e - stable/14 - pf: fix overly large copy in pf_rule_to_krule() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae commit 8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae Author: Kristof Provost AuthorDate: 2024-06-04 12:55:02 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:06:04 +0000 pf: fix overly large copy in pf_rule_to_krule() The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX). Use the smaller of the sizes when copying. Reported by: CheriBSD MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 (cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98) --- sys/netpfil/pf/pf_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 1a383ae6fd09..7c148d857144 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2071,7 +2071,8 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; - bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); + /* pf_rule->timeout is smaller than pf_krule->timeout */ + bcopy(rule->timeout, krule->timeout, sizeof(rule->timeout)); krule->max_states = rule->max_states; krule->max_src_nodes = rule->max_src_nodes; krule->max_src_states = rule->max_src_states; From nobody Tue Jun 11 13:27:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cF2WmVz5LfqP; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1q3Tz4fd6; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxxQzD0llWaoJtPi+o213mhovubUdjIOHN49Y4UVRaA=; b=W6z+hnOaL0nmcgFk5zoaln5LuQejaSuLBeH6Z5Du+MAz8V3QvX9U53NnIYUYIq6sbSGV8d j5i15ssNQDhUSppeAdR3ehGkOj+9yADR+cmMpLR0L62LKgY/dQ6R16Y0cIk82gCKFMjBd8 lNC4NAxx6pHZDF124W2n4XFfP+eZYUdRzYuqOiIqkuYYzFXYxdMW+ziOjsTNnmNye/5jPl ozKkzA9WL9/pA1+VPewF7i2JzV8GP90V5n79hGB0IPUJCYI8x0nN2N/beej3Aa8D6FhT05 etAfGGBI4rkM4IfhAuaBDRJYihl9wePS5Qrst6Zg4D7TInFohzT4wnguGLw21A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112461; a=rsa-sha256; cv=none; b=T/x3PV56B8xa9PYzcDatsJrJXZj6wbu634Ae8VSX2pUAuwTznpVTx1SQsQh8V77D6iYq5/ Vfpyw6MsZh1dmFI6YnNrc3Z8AZNEgz+2eM5nPP9ugZSuJF48EzfQMxn6PC1tJxwy3wjd1H cqifkQHzyAvdi6hvtCgS3XyLIIaW3wZhCUGd4Soc4gFy0FuREQAxXdD9j/Dx1pQI/KxCoj rxndMQcSQpwjvW4r69jcHwaOR44O+Z3IbJeHLv8TPaUYG0i3r8OpN5PgeTmLLxvozYZUgQ lGzWYT/ynY+TSez104I4hAwWnJsBVzZZ9lrZ0mYuIhSaUCjtlHIdue3tcM/6hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxxQzD0llWaoJtPi+o213mhovubUdjIOHN49Y4UVRaA=; b=NDDsfjObUQtSGdlZ2hpy4me2bvN9LthUcuHVEHJNxHWzoR6gY0aVOL8n2CAzc2UvlmuvaV z7VvVSylgzpf5/eiznVJcPkk/hYrajX+Uxq5nDb3Yj1ppjcUehjv4JJUgTGuQo1w9tPTEe kGvyKvjSl1xFUbUaBWC+2lb/96xnkjg4LtVioahBEJU/HR+wbrzu/+JFPMU/p+so35wz1S XhEGKW1X+1hYxuPUbhkFkvsfMX6CBgaRVn0CVdZrd9gbvDA21lNvH7pjdF6hLDG77TSp5+ Kef4+kviB7uSI0V4phrqlIJWBvr3spu2znYSqh1talxcfz7HDZH/I6bbVBr3Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1M06z19M9; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRfxE072980; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRfV6072976; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:41 GMT Message-Id: <202406111327.45BDRfV6072976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d92f239a92c4 - stable/13 - pf: fix overly large copy in pf_rule_to_krule() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d92f239a92c448f2954fd4c14775a36532a78dc6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d92f239a92c448f2954fd4c14775a36532a78dc6 commit d92f239a92c448f2954fd4c14775a36532a78dc6 Author: Kristof Provost AuthorDate: 2024-06-04 12:55:02 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:06:11 +0000 pf: fix overly large copy in pf_rule_to_krule() The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX). Use the smaller of the sizes when copying. Reported by: CheriBSD MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 (cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98) --- sys/netpfil/pf/pf_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 98b5ce318596..a7f9f2604068 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1799,7 +1799,8 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; - bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); + /* pf_rule->timeout is smaller than pf_krule->timeout */ + bcopy(rule->timeout, krule->timeout, sizeof(rule->timeout)); krule->max_states = rule->max_states; krule->max_src_nodes = rule->max_src_nodes; krule->max_src_states = rule->max_src_states; From nobody Wed Jun 12 16:41:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzrs63dFfz5N37N; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs60S8xz4gZ8; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wq5yKIK3n4bGIep4MGA0xhfy2Kcj5IP/YlsMI/yZcB4=; b=FDQSuzbjWAil2ZKjy4e5EjzKE9QY8+VkkWPO2LliLnTdPpO6nJHQVRVJnOoVeu2rU3LxaO nxWxDEFKSGzY/s9dmGzTXqu5FlbUWQe2T/9a7ud+bF8J3VtKqgE+8tWpngqpEw8uLhazAH jKycUka0LR7Lc0kve0ksH3Egzw1w9nWwkIsssCgeWE7DqEpsDppOwXlSX2Q4ZO92g/QD03 Ic3L+EpW8ZZVVtjABNNC3jnStldKKFatuGG5BD4MfaUgQVeHDwBuXFR3vtFHG6vo4u/bks UcbVjGUnQWSLRI+wr73BDdY922jVmFxT+ncom9+18L36OBkhScltoJHpftIDiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210474; a=rsa-sha256; cv=none; b=U+NQFCbHCjHXeC6NeKUgSnKsG1OUSFZ7c3KsZKvalC/UogAEhHwBsrjzh6DHVJahkOF8BF 81wq4Q2t1+ES/t2iSWNp17jYZ4DKLlWb+kVpl3Qhz1qaIvAwMKWHGKxSbpvXQxmXbYNEJi LxVbYOHDPHjGiQyTabfzAcKR5DE88vywCIsrU5B1tmvlsRsS6diLHoSeC/ruOHgIz8/jdN GLSuSBCMwJ8lPWBGqq8aGhLo35ueAndErj9MmpVi7CGlppbr6rteSd8xJYz3vnw6r7frKi UH5O4YRMd7FqUVWhVIkfF3Fx+ZWsbvAkHSUY6il3KfQczWmnmUw3OeR8jtt4cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wq5yKIK3n4bGIep4MGA0xhfy2Kcj5IP/YlsMI/yZcB4=; b=Xw6BMDcqDGxouuB66v3zLX+/peLnEPcQxivYAMcCIj0asDNt7axuAOlXYn8CgAEfjGjhnG 6jNln4PxnOOhxPcLWFM9al9lDBgzzc1hWiKUaaL8DH78jDgCmIQxclXYmD+I/fV6kE4D5U IZKe2cMI61b7CzJD27YRE3XgMROzX7ZYWB95jvKzRdmFDaoBicz9MB8oJ9xPSea9o62ed+ v9vA1k6W8sJPI1Iz6Yrm6A3UDsRSJfrRchF4HvK2LZRP6LjbLjKwdzcbQevs2X/tc9SPlc /Hnonuemh2beYncAX5rdWtQaLmFhWvqr2//BoNBTO2Dg+pPwTy92vgoyriyeCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs603tdz10nQ; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfDaF046285; Wed, 12 Jun 2024 16:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfDc1046282; Wed, 12 Jun 2024 16:41:13 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:13 GMT Message-Id: <202406121641.45CGfDc1046282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0c2b2e5bd99a - stable/14 - iwn(4): correct debug message: "not" to "no" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 commit 0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:01:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:56:52 +0000 iwn(4): correct debug message: "not" to "no" Sponosred by: The FreeBSD Foundation (cherry picked from commit 9e012a9da5df131b64c2dfd7d9b6645af4ccef0f) --- sys/dev/iwn/if_iwn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 3b1d879914b6..d2d44d93f948 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -7532,7 +7532,7 @@ iwn_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, break; } if (qid == sc->ntxqs) { - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: not free aggregation queue\n", + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: no free aggregation queue\n", __func__); return 0; } From nobody Wed Jun 12 16:41:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzrs73WrVz5N3Jr; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs71CxJz4gcW; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiU6thc7FYRMS6p4QZwZNGwUXDnrwDm/gViEKqet9yM=; b=TLNKojoEbHxm0mpJ0umkztHnZaZzZ8Fq/K/uB4RPZRMX2eeZ1x7pbDqMxlbu4BQWI7O2Bg uELq6TXo5DWmUPRM0ade5vLNrn6Mxglh0lyKxe4BqXYIM0ydzJLRgOifgly/iIk1/4kw5o FH9LnRpllrwWWenbo8F7Uim1xnN7mnErf1plQNf+/deHudS6+vOjPo0yeD+nL+Mgn5IOWL m2mSPXkCstJHKzv4m/x7/IcADbbvUceG9aFi7b1d8ziCxVUxBVNvQF9KnBXRLgVUhndMjU i/pUMaE97xpkxGkMx+Qys9uQQ8gLcDmi4SJlahJaSfOrfsAgKr5/VPOJ3bf0wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210475; a=rsa-sha256; cv=none; b=UXxSonWH+cdpgOhGsL+2Y7gGHkBgXVa1l98VAnvLYCWnhJvbXU8M0Q6DgPbLm/g1OQPWNW e0C2ERmGkP+XWJQ4cwLrKsLqdWeYKbKf01045mmqrxWoX9LWZySWATU90Z4oynaMaeqrV+ 91ZSC/y7k+AzHbrUcMAwc3VqNATkcum8Oe2xbhAXhxRABTbd8lMRv1Qao0JfLvCY6ZVbIk Bj4Po8ZB8CzpIH6d1vxIiSlYVLzJY8GUBFdjfNCmMcuLCCELJWjtKUMp9/XCgQ4ZCX232W DA8lnw7ILf+GtUysIuNtOMN8nOu4snjsANMsczjUgh55+uESbB5HwuOxGctoxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiU6thc7FYRMS6p4QZwZNGwUXDnrwDm/gViEKqet9yM=; b=raEkPW2uAm+n3c0JjeleMIxhPyjMSGkdW3lRfO6wmp3Ll4w19OSRf2zRMw/SSdiXHgGRt2 AzMrCgHCBY6bXdvEDOEue7hGzka6T/WURHIlZHGxNLAObppyX/JVRnBgWPekEUVoydcauI QwiSTHAl9r5A3lEq/H1yY7p1xSCCdxOCCmWTRJAi9b3fFtHLGehl6qJvlHYTmamahgVBpT yHfJEDOEflzGM/6QBK7rT6+sm+iOQYLGkk5bIZvZ0WyNNinIZmpx+QHl4lP1ccCeGn3tJI kaTAW8BsIt4RSYh4P1XLqFa2H/bBPnQvnb6T22Q77gXSdrdEkn1R8dSIWkjsLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs70hmhz114T; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfFCh046355; Wed, 12 Jun 2024 16:41:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfFal046352; Wed, 12 Jun 2024 16:41:15 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:15 GMT Message-Id: <202406121641.45CGfFal046352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4ed728875b89 - stable/14 - fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ed728875b89bbb05885b5dd7a606f70acd1524d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ed728875b89bbb05885b5dd7a606f70acd1524d commit 4ed728875b89bbb05885b5dd7a606f70acd1524d Author: Bjoern A. Zeeb AuthorDate: 2024-04-23 01:10:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:00 +0000 fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925, QCA ath1xk, and add Intel iwlwifi IDs. Rather than using a package per driver add fine(r) grained flavors even though it is a lot more likely to break in certain cases. For Intel we need a great level of detail to match PCI IDs so also pass the full pciconf -l line to into the pci_* files as "$2" to have access to these. This lines up with ports commit 80f50c9eb66d. Sponsored by: The FreeBSD Foundation Reviewed by: manu (earlier version) Differential Revision: https://reviews.freebsd.org/D44918 (cherry picked from commit d33f5a0afa54be7f18775f6506f015c7f79a6a5f) --- usr.sbin/fwget/pci/Makefile | 1 + usr.sbin/fwget/pci/pci | 2 +- usr.sbin/fwget/pci/pci_network_intel | 437 ++++++++++++++++++++++++++++++++ usr.sbin/fwget/pci/pci_network_mediatek | 53 ++-- usr.sbin/fwget/pci/pci_network_qca | 62 +++-- usr.sbin/fwget/pci/pci_network_realtek | 46 +++- 6 files changed, 539 insertions(+), 62 deletions(-) diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile index 66b3901e4a91..6c500dae6df6 100644 --- a/usr.sbin/fwget/pci/Makefile +++ b/usr.sbin/fwget/pci/Makefile @@ -1,6 +1,7 @@ PACKAGE= fwget SCRIPTS=pci \ + pci_network_intel \ pci_network_mediatek \ pci_network_qca \ pci_network_realtek \ diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci index 6a66049842e2..fbdfa0001c5c 100644 --- a/usr.sbin/fwget/pci/pci +++ b/usr.sbin/fwget/pci/pci @@ -107,7 +107,7 @@ pci_search_packages() fi . ${LIBEXEC_PATH}/pci_${class}_${vendor} - pci_${class}_${vendor} ${device} + pci_${class}_${vendor} ${device} "${fulldevice}" done IFS=${oldifs} } diff --git a/usr.sbin/fwget/pci/pci_network_intel b/usr.sbin/fwget/pci/pci_network_intel new file mode 100644 index 000000000000..cf8c52075db3 --- /dev/null +++ b/usr.sbin/fwget/pci/pci_network_intel @@ -0,0 +1,437 @@ +#- +# 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. +# + +# Some iwlwifi chipsets are detected by other means and we cannot replicate +# the full logic here. +# Currently we also filter out all those which do have a wildcard device ID +# as well as all for those which exists no firmware (yet). + +# iwlwifi (dynamic) +pci_network_intel_iwlwifi() +{ + + local idstr=$(echo $2 | sed 's,.*\ device=\(0x[0-9a-z]*\) subvendor=\(0x[0-9a-z]*\) subdevice=\(0x[0-9a-z]*\),\1/\2/\3,') + + case "${idstr}" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh } + ### >>> + + # 7000 + 0x08b1/*/0x4a6c) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a6e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x402a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x406a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x446a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x486e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4870) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc02a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc06a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc760) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x426a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc26a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2050) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2150) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5c10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5f10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9e10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x500a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x502a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x900a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5002) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5090) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5100) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5102) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5190) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5412) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5490) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5590) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9112) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x520a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5202) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5290) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5302) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + + # 8000 + 0x24f3/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x01f0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0004) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x10b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0044) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0250) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xb0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x1030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x8030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x9030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xc030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xd030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f5/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f6/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e01) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e02) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x10d0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9074) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + + # 9000 + 0x9df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x30dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x31dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271c/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x2526/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0xa370/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + + # 22000 + 0x02f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1653) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1654) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + + # ax210 + 0x7a70/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1673) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1674) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x2020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2729/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + + # bz + 0x272b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x272d/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x2727/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x7740/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0xa840/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + + # sc + 0x6e70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xd340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe440/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + + ### <<< + + esac +} + +pci_network_intel() +{ + + for _drv in iwlwifi; do + pci_network_intel_${_drv} "$1" "$2" + case $? in + 1) break ;; + esac + done +} diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 5e4d2af9eb26..3ed6c8b95b47 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -25,45 +29,38 @@ # SUCH DAMAGE. # -# mt7915 -pci_network_mediatek_mt7915() +pci_network_mediatek_mt76() { - # awk 'BEGIN { x = 0; } { if (/mt7915_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7915) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } + ### >>> -# mt7921 -pci_network_mediatek_mt7921() -{ + 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - # awk 'BEGIN { x = 0; } { if (/mt7921_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7961) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0608) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} - -# mt7996 -pci_network_mediatek_mt7996() -{ - - # awk 'BEGIN { x = 0; } { if (/mt7996_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7990) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; + ### <<< esac } pci_network_mediatek() { - for _drv in mt7915 mt7921 mt7996; do + for _drv in mt76; do pci_network_mediatek_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_qca b/usr.sbin/fwget/pci/pci_network_qca index cf33e0d87239..a97d29ef1135 100644 --- a/usr.sbin/fwget/pci/pci_network_qca +++ b/usr.sbin/fwget/pci/pci_network_qca @@ -29,18 +29,27 @@ pci_network_qca_ath10k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath10k-kmod\"; return 1 ;;\n", tolower($3) }' hw.h - # We ignore the ubiquity entry for now. case "$1" in - 0x003c) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0041) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x003e) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0040) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0056) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0046) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0050) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x003c) addpkg "wifi-firmware-ath10k-kmod-qca988x_hw20"; return 1 ;; + 0x003e) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21" + addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + return 1 ;; + 0x0040) addpkg "wifi-firmware-ath10k-kmod-qca99x0_hw20"; return 1 ;; + 0x0041) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21"; return 1 ;; + 0x0042) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + addpkg "wifi-firmware-ath10k-kmod-qca9377_hw10" + return 1 ;; + 0x0046) addpkg "wifi-firmware-ath10k-kmod-qca9984_hw10"; return 1 ;; + 0x0050) addpkg "wifi-firmware-ath10k-kmod-qca9887_hw10"; return 1 ;; + 0x0056) addpkg "wifi-firmware-ath10k-kmod-qca9888_hw20"; return 1 ;; + + ### <<< esac } @@ -48,31 +57,42 @@ pci_network_qca_ath10k() pci_network_qca_ath11k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath11k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1101) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1104) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1103) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1101) addpkg "wifi-firmware-ath11k-kmod-qca6390_hw20"; return 1 ;; + 0x1103) addpkg "wifi-firmware-ath11k-kmod-wcn6855_hw20"; return 1 ;; + 0x1104) addpkg "wifi-firmware-ath11k-kmod-qcn9074_hw10"; return 1 ;; + + ### <<< esac } # ath12k pci_network_qca_ath12k() { - # No ath12k firmware package yet - return 0 - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath12k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1109) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; - 0x1107) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1107) addpkg "wifi-firmware-ath12k-kmod-wcn7850_hw20"; return 1 ;; + + ### <<< esac } pci_network_qca() { - for _drv in ath10k ath11k; do + for _drv in ath10k ath11k ath12k; do pci_network_qca_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_realtek b/usr.sbin/fwget/pci/pci_network_realtek index 795d9d4a6e0a..d70470b65244 100644 --- a/usr.sbin/fwget/pci/pci_network_realtek +++ b/usr.sbin/fwget/pci/pci_network_realtek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -29,14 +33,21 @@ pci_network_realtek_rtw88() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw88-kmod\"; return 1 ;;\n", tolower($2) }' *.c case "$1" in - 0xd723) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc82f) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh } + ### >>> + + 0xd723) addpkg "wifi-firmware-rtw88-kmod-rtw8723d"; return 1 ;; + 0xb821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xc821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xb822) addpkg "wifi-firmware-rtw88-kmod-rtw8822b"; return 1 ;; + 0xc822) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + 0xc82f) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + + ### <<< esac } @@ -44,11 +55,22 @@ pci_network_realtek_rtw88() pci_network_realtek_rtw89() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw89-kmod\"; return 1 ;;\n", tolower($2) }' *.c - case "$1" in - 0x8852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xa85a) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xc852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; + case "$1" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh } + ### >>> + + 0xb851) addpkg "wifi-firmware-rtw89-kmod-rtw8851b"; return 1 ;; + 0x8852) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xa85a) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xb852) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xb85b) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xc852) addpkg "wifi-firmware-rtw89-kmod-rtw8852c"; return 1 ;; + 0x8922) addpkg "wifi-firmware-rtw89-kmod-rtw8922a"; return 1 ;; + + ### <<< esac } From nobody Wed Jun 12 16:41:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsN72hxz5N3Dg; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsN5fhMz4gcy; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gP4gKuORWlIfT4Isr/YWygbpKzIlNxSSIV/PwQtGZg=; b=UNbeTqLoSSHoENCfW8rrxXZ0/mqf4kbb5GXeBtIiZXPpD7USVXyJUCYsNzatZGwo9m3YNB 6FNp8pZKZtG6Bn1aIiPQvOvLX/7MREPXOzEQZz2Ai3r7d7bS4U+Z42KcB4Dr5TbQlwzqFp HVNoVju9oHCdMFHbxuRfl12OHvkLLrSIxAhoQgOoIPsoqWpkax8RakT0ZjwiIsGAm33sS6 FzQWedO1H3Xu4gLyFz6Oj7wpbjMLLCv6wJV7gaQVWXbZs2r5tXFUlLSebb6cCs2ALq1VyT FR0HOTZSyXhsPGF3r9l4HqZNVNhAzimbg99sPkh+jxA6XAYuz+f/QVnPp3Xy3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210488; a=rsa-sha256; cv=none; b=EvQ5UQyvqtW8zrZDj/sVWH34Scj9/p5gDUAE7sXcncoVyWdSsRLEeqe2pAXpj0Y6yk5EZs 0K3x5g4O+/1e77rxuX3JCDLKNigdiLfDiVKnMfDS7FyyCU4CBnlZ4mM0QwZFKjbeIGvLJy RyNIrXBJqcHc4zPUwYdfPQn9TSyzWkzN6Clr3TrnuK+0yLJDnCIpHxOPsldDz55JQurIWy 79K/7feB0YmbCJFu7r+IYlA8wMkswYdvGZndU1XyDMu+6UHVLfGYifE+Fl18bhqx49DneF lEqW9AABNLeMTmKg1EV6Zqy/4GrPc6Chc/XAdeSv1LSrGl8usfHSFsD/CWtvNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gP4gKuORWlIfT4Isr/YWygbpKzIlNxSSIV/PwQtGZg=; b=CR5vwVnSaayWpfwBccQki57cnoMJuXa9exeH7jJodh3HQACbqnOOkHy5Oh9J3bIM/1gP9M GVmCnyfJe5K5HWfkrhpnNYC9S+7oTjQgLOAHFJsp/B2Fs//8WdbjtgL+AuKpnjpY9P8NMM OHw2vdKN+RIcqB25HV2cboQXAVBLNwlPx3M9y5V5517SgGf6mrcFZKNC8KYvVGOCmtdrSr E2/yNao0h8NI2cG/f9xuXlpGXvflueWoO+FRNwC7d0dkmSU4CqnqBGWs056zmcPHQjVkhe Mbx4coaoJLJPwLExuazhag8pID/xpMMm++H/C87VJ/VNep2a7F/0/ojxjwJViQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsN5Gdcz10sC; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfSZU046947; Wed, 12 Jun 2024 16:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfSee046944; Wed, 12 Jun 2024 16:41:28 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:28 GMT Message-Id: <202406121641.45CGfSee046944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 537b2e7d48ca - stable/14 - LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 commit 537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 Author: Bjoern A. Zeeb AuthorDate: 2024-06-07 23:57:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:28 +0000 LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions Rather than using the values and leaving net80211 names in a comment define the LinuxKPI IEEE80211_HT_CAP_* to the net80211 IEEE80211_HTCAP_* names. That way errors like the one fixed in 3e0915b7b685 are less likely to happen. Sponsored by: The FreeBSD Foundation (cherry picked from commit 63a327b954a38ecd46934a2911321f3ea3d500b3) --- .../linuxkpi/common/include/linux/ieee80211.h | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 0fd90e921c77..aa1a0a4f3c5f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -254,20 +254,20 @@ enum ieee80211_ac_numbers { #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0xf -/* XXX net80211 calls these IEEE80211_HTCAP_* */ -#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 /* IEEE80211_HTCAP_LDPC */ -#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 /* IEEE80211_HTCAP_CHWIDTH40 */ -#define IEEE80211_HT_CAP_SM_PS 0x000c /* IEEE80211_HTCAP_SMPS */ +/* Define the LinuxKPI names directly to the net80211 ones. */ +#define IEEE80211_HT_CAP_LDPC_CODING IEEE80211_HTCAP_LDPC +#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 IEEE80211_HTCAP_CHWIDTH40 +#define IEEE80211_HT_CAP_SM_PS IEEE80211_HTCAP_SMPS #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 -#define IEEE80211_HT_CAP_GRN_FLD 0x0010 /* IEEE80211_HTCAP_GREENFIELD */ -#define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ -#define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ -#define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ -#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ -#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ -#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 /* IEEE80211_HTCAP_LSIGTXOPPROT */ +#define IEEE80211_HT_CAP_GRN_FLD IEEE80211_HTCAP_GREENFIELD +#define IEEE80211_HT_CAP_SGI_20 IEEE80211_HTCAP_SHORTGI20 +#define IEEE80211_HT_CAP_SGI_40 IEEE80211_HTCAP_SHORTGI40 +#define IEEE80211_HT_CAP_TX_STBC IEEE80211_HTCAP_TXSTBC +#define IEEE80211_HT_CAP_RX_STBC IEEE80211_HTCAP_RXSTBC +#define IEEE80211_HT_CAP_RX_STBC_SHIFT IEEE80211_HTCAP_RXSTBC_S +#define IEEE80211_HT_CAP_MAX_AMSDU IEEE80211_HTCAP_MAXAMSDU +#define IEEE80211_HT_CAP_DSSSCCK40 IEEE80211_HTCAP_DSSSCCK40 +#define IEEE80211_HT_CAP_LSIG_TXOP_PROT IEEE80211_HTCAP_LSIGTXOPPROT #define IEEE80211_HT_MCS_TX_DEFINED 0x0001 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x0002 From nobody Wed Jun 12 16:41:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsK40h2z5N3Db; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsK2cjlz4gqq; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfzOPFDLtvkXYJEEo1lb1zronH4rEt4+YrJq2ICUpcg=; b=DLz7Kgu6OuEP5qOjOBj189jcs1BfJy2uFDaEOy6jWw9fFOCE3JF1XZyZ0yneYVQqCcUpEu mdMeg2HglabGWNeQCbaMdu8XNNh55gIPxEDKmuJv9bDOU1tLA+sj110/x5Gik71R6ENFCH KkDv0kl2X3MRtwsDz1s+TrvPcYHiZYPgPCUVLzWO4KVg4G5R6qtJ+2M4d36cTXXTnYWKz6 vnaQ1FEJtc/GpOoravaYLb5ebkmSMFEpp61Ld1OUTR6DobnCA3EWgStuAyRGHzpmJyQGN9 /ZDY51oDLP6jhZzkYAOD3+7SDQP2siXelt+RDwXCJTNNckfhXQshUgal8QE8/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210485; a=rsa-sha256; cv=none; b=SkN/VbSvHl4kGbX2qoryhMzZVKyfzZJu2jjgltrRX5Mhce/nV8Lc/pHOwWV9G+6OS3/b0u gDIJEoD3hyvGoQgVQVQVe1k5UMxzUA35lsey9W6MoGovNusqyHNZWuO0U8F0On7IStvT3O sdO6MSe80UpiepD9KQHQ8G6dP0XmsWgVxww5HReGl7FThMruKe9DbVs148JfNNP88uawyu X3j8OKuZK9mzMGprON/45uCKvgcJuNxhmEiGKjZygcRV6FQWGIjrfZ8LncIL9zOKsESjpK +RwJYrl4qH0Hjyr0o5pXZmBFm3bqmdXnRlOLV0QIbqTD5vUL6jOOZMSOjxbsgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfzOPFDLtvkXYJEEo1lb1zronH4rEt4+YrJq2ICUpcg=; b=te8UPZoJVKkmdth3O2ykl9jslKTDUMa0V1G1J9rZRF+O4m35LbEhlZsrfeWexH/BAJv5Sa taZLyESuuN8HxgdijlzP3H7f+KPWqznWEI5NomWhHeZUlZYFC7G0ReZHiTSqZwnXabY9FF Fzz0urqUko2/fqH/wnuGCu/VXh/IMo3iZJX/4uG9qoSg2HZstsK8lFjW9iXYlnFootw5hl FNjXGDyNKpepVCRfpSkp7DqBI+kNpiyy4GOVQ7s+mQkcoHybkJetxFiPuiZqbn7ExXLEvi EhAEv09eshHFdHj77b+hD/ew5RRGu7KYJdS5Eb9fVc5+UrWVjWX4KgDoylfR5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsK2Dg3z10nY; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfPxu046794; Wed, 12 Jun 2024 16:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfPqw046791; Wed, 12 Jun 2024 16:41:25 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:25 GMT Message-Id: <202406121641.45CGfPqw046791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 49f29c4183d9 - stable/14 - LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49f29c4183d93afd2724509362daaf41b16eca5d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=49f29c4183d93afd2724509362daaf41b16eca5d commit 49f29c4183d93afd2724509362daaf41b16eca5d Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 21:07:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:04 +0000 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls Lock the two TX MO downcalls into driver/firmware in lkpi_80211_txq_tx_one() to make sure they cannot happen in the middle of other (net80211 triggered) updates calling down into the driver/firmware. Sponsored by: The FreeBSD Foundation (commit) Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43966 (cherry picked from commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1943c6efd4d8..ecacb74f01f3 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3770,7 +3770,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif LKPI_80211_LTXQ_UNLOCK(ltxq); + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + LKPI_80211_LHW_UNLOCK(lhw); return; ops_tx: @@ -3783,7 +3785,9 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_tx(hw, &control, skb); + LKPI_80211_LHW_UNLOCK(lhw); } static void From nobody Wed Jun 12 16:41:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsJ3ztpz5N3DZ; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsJ1kH1z4gnT; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//CxYJ+XTPuyS/cxI0Z+etDm1LGvbYPAAPTbC15Ge3c=; b=rDSVFIJjFJXCD9aHBp7PQ7ETZA4wTOgOdO/4exi8VwKynvYts4bWCo4LJ/i7HstcKMbQwt yK6wCXc7CNkroEt+8n4d9ubRxrTdfRPawRY2aUOIR9mxKhqWrV05iOQnsSbes3aNtwmjDj dggUIocuhqvlCBlDI1OZIxXNDFvR21yJ0rOThF1vCk75ckmMRKNQJCbqhlZwlqK3Q+azPB HUDxK7IjTy0KgL0t6gDAjKb/D281Vw2xVwrl/v2iXxMVmguYprE+z78BXxOvolPAQ+bnAd U+z4S7LSxJmxuPfsw0pqNqJ+2cZvFSZb6XQvIPGGUQ9nFvpCOv2MPiNOfLwqNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210484; a=rsa-sha256; cv=none; b=VIvYDO2eShbmaBUkc5eLOAPqxvKZgHv8i0uEfwMkPx4nhIeJ55R+cF3oH2YGasXC6zm1I7 t2P3n8Al9PQN0qRCs0ovck+q15M6Gxhyb8779F8wl55oP5hkkao7uAKEVZB9phteeUahsG oD5hFLBkBy+tPpwz9yHyGaq/KkxFejNv250KDdbjAIeitc664rgSamf/mSOQW6zN9ET14k wKqoXwl7PmBNohuempOpbC37FilMFEDI1pnU/KJwDUX6xj5dnq53hGVa8lvjPchEiuqx6t /wLjLmrolk5vl4DIMFRmoNl4zdI9su4wObcHsr7s3irBl2PeM78YNv68zdMSsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//CxYJ+XTPuyS/cxI0Z+etDm1LGvbYPAAPTbC15Ge3c=; b=mnzTI7a7UPnHlWGcfy+JJedMxia36rDF3aH7H+FAByO+y9mOErV+Hf+7U3CM6w/L9G2Pt5 GwBrTovUDvRvUiDyipAAnyyGDNWRPsYVjb64WsFR/4RuEn0Yftol5eHjz7tfi2xH1ZBUmh Nj+ezh2LCeAdKCVTkmdHhxhV21o88I6+2h+ue6EOaVHbEWr5R/V6qwDdBQWfQkVUOErNGq 0Cpaf1N6QhmDzQLLeOrn/9pehBd7sjM0rb4bsgU6hE1RgO5eRWOH+Ktil83Ed+NIjrdzMY EX31h4CCdKo6pPtxTH+oxBMWWK0ir6fhcgwOPcz7Oc4VFFuNP/JBUZI1Oi+qSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsJ1Lb0z11QC; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfOu4046746; Wed, 12 Jun 2024 16:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfOh9046743; Wed, 12 Jun 2024 16:41:24 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:24 GMT Message-Id: <202406121641.45CGfOh9046743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 323db2cbbb99 - stable/14 - LinuxKPI: 802.11: rename chanctx_conf for consistency List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 323db2cbbb99d0ad0175d4187aaec1d966761d94 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=323db2cbbb99d0ad0175d4187aaec1d966761d94 commit 323db2cbbb99d0ad0175d4187aaec1d966761d94 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:56 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45185 (cherry picked from commit d1af434d99941d32a09c48fb3ef77ef83e203d29) --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 32b0287db65c..1943c6efd4d8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1079,7 +1079,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1145,54 +1145,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1218,14 +1218,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1236,26 +1236,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1457,9 +1457,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1467,8 +1467,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1795,9 +1795,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1805,8 +1805,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2364,9 +2364,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -2374,8 +2374,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4771,7 +4771,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops; From nobody Wed Jun 12 16:41:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsD57KLz5N3Jt; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsC6J0Rz4gnP; Wed, 12 Jun 2024 16:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAt68nZivDQUKxIuljbaHvSPkN7o02/6+1VsJl35Mgc=; b=BDtqIbV1645jUOfGpyfc+6Ay1wmCSXB3p1Z+s7lZBq9UksvF7c4ZzG6rKwc41p/1nISCUY wq5cz15+7AxCq1SzpdiDgBK5mRr/9BofEWEafZ3CW+IL/24lKAOr5ZinXm6KFhJ9/EXLgz arTsB+mRC7dSBOfektJDtzcTEqH0dXO1lsLKQuQKLee2/Cadhh5L7uElyS3ZV2NuI1AJMM GFzkMbty/XkNXlhI2wTHWkC0vXYEjtBJxB8K77AkyS7V2tmLbA7pdrJf6X3FAtq40wWsq1 uQf6IOTTUGz14drYeYA6lsVGPfCaREX8mTDB35coPdaCt33TNRfAIrW40JpUqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210479; a=rsa-sha256; cv=none; b=S7praf9tImQvjvhMnoGdwqzi5hQJPAJrmZjl5Pk38WWxQZK9yXy7oclKjawZau1iZMJtYE kQw1zhc2RdMJsxzP3qszygjWFOie5nmx5OXgPnLCfMTjrGovBCk8ft7MOgH5Zgv9DcBjE4 G2ui5SvnA3MHR0NpWnRVmNws2dlcE4kIrZdrCUvkatC+eXW/htCX9kHI8H8GZ/pTSFP05/ zlOBfvbDiNDzKDsHX6fd6CQtQFgzlp9gZq1XDd2eZX5exraEszx6DoqGigiEX6alNsfEVA faOid3Di1JiBVJNZA75nCaeTpN9VU6XrGZW6j9uenJphMV0rx5Oi4j/2dAJYgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAt68nZivDQUKxIuljbaHvSPkN7o02/6+1VsJl35Mgc=; b=i+pBkSyZSwL7iUQhFPJX+wXGNCCCI/tbB8aOlPE77GvXvk0yNGqs8u1lZKy/nxLWh8Uh+d bOI0UfmrOqS8lj06rFlzbHr1Qd5ztz2j7wJBZGzlfYxiXLe2JbQwuORHzNnlfYwen2NlqR D8U19k+MJ7APonUQXukUfLrAjCw/OqPg4zq/WUUejMS2zHs4suOaI8QdcDaSSNG7GnsKF6 rohxpwPgG2Vvl12hzjD0UBrljuOVFb2lwm3/jud8n/0PHdfZAQmG9hg82gSHmvXAkzCM1N Ln6FGdREyEgJlkFQp0Ct96YCmj8YuaPv8dztdAC2Umla2aT5KgQEzHzVAmmIxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsC4M0Xz11QB; Wed, 12 Jun 2024 16:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfJh6046528; Wed, 12 Jun 2024 16:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfJWS046525; Wed, 12 Jun 2024 16:41:19 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:19 GMT Message-Id: <202406121641.45CGfJWS046525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 31c476da2d94 - stable/14 - LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 31c476da2d944c3776186e73f8db56c57ba89b8d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=31c476da2d944c3776186e73f8db56c57ba89b8d commit 31c476da2d944c3776186e73f8db56c57ba89b8d Author: Bjoern A. Zeeb AuthorDate: 2024-04-06 21:15:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:44 +0000 LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the struct is already given. Such is the case in iwlwifi d3. Also add an initial implementation of device_can_wakeup(). Though this is likely all we need we have no way of setting the flag for it yet so leave a pr_debug() and a comment there as well. Until we want to support WoWLAN this is likely not needed for wireless. Doing it the proper way checking a bool in 'struct dev_pm_info' would change 'struct device' and with that 'struct pci_dev' and break the KBI. In favour of mergeability this version does not implement the full functionality yet. Both help to make an updated iwlwifi d3 compile. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45358 (cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642) --- sys/compat/linuxkpi/common/include/linux/pm.h | 30 +++++++++++++++------------ sys/compat/linuxkpi/common/src/linux_compat.c | 18 ++++++++++++++++ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 871c7b587864..c8d943027909 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -58,25 +58,26 @@ struct dev_pm_info { IS_ENABLED(CONFIG_PM_SLEEP) ? (_p) : NULL #ifdef CONFIG_PM_SLEEP +#define __SET_PM_OPS(_suspendfunc, _resumefunc) \ + .suspend = _suspendfunc, \ + .resume = _resumefunc, \ + .freeze = _suspendfunc, \ + .thaw = _resumefunc, \ + .poweroff = _suspendfunc, \ + .restore = _resumefunc, \ + #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } #define DEFINE_SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } + +#define SET_SYSTEM_SLEEP_PM_OPS(_suspendfunc, _resumefunc) \ + __SET_PM_OPS(_suspendfunc, _resumefunc) #else #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ @@ -86,6 +87,9 @@ const struct dev_pm_ops _name = { \ } #endif +bool linuxkpi_device_can_wakeup(struct device *); +#define device_can_wakeup(_dev) linuxkpi_device_can_wakeup(_dev) + static inline void pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index b0691eb0f79a..894e233042e3 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2592,6 +2592,24 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) return (io_mapping_init_wc(mapping, base, size)); } +/* We likely want a linuxkpi_device.c at some point. */ +bool +device_can_wakeup(struct device *dev) +{ + + if (dev == NULL) + return (false); + /* + * XXX-BZ iwlwifi queries it as part of enabling WoWLAN. + * Normally this would be based on a bool in dev->power.XXX. + * Check such as PCI PCIM_PCAP_*PME. We have no way to enable this yet. + * We may get away by directly calling into bsddev for as long as + * we can assume PCI only avoiding changing struct device breaking KBI. + */ + pr_debug("%s:%d: not enabled; see comment.\n", __func__, __LINE__); + return (false); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Wed Jun 12 16:41:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsG3BCFz5N3GR; Wed, 12 Jun 2024 16:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsF71wbz4gfy; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3u/RBonjeTYuGDbwfSTQK5xmnvBQySalsw6tUvw6Xw=; b=RSUhH8LjW9Xrm9EyWYokXQmbM+5OicBHok+bjPlKwRX8Xxj2AVIEaj5eZiRsisTlopFr0t 4WGI2/KyChrougOt0lWd+mw2GDkFyyMM7IZc6XUPJIpJBNiCeq+h9lVopjIuZCGCMxaFww HFudEL/wGvMJu8hM/tgB9MsVdpdbdKszHLg0SfafbFL4nslXJcyIq9uroxnyDqYHvhSa9L mMopyvKK1QOKus/vLr91tWj61PEfD5xlloC1x6yRIegkFf1aJCkdhiFa6wHO+F+xrVXkZK XBRtI5QmwIGbYz1Yk67AxiGZ7HWMpn2rKGz5e4atg1ovF26K0cVVoHTb9GbxIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210482; a=rsa-sha256; cv=none; b=meI/vF+jH6AEzV4vGVVJCq/2A7K8O1noSpteRZBCeher3YmSgVpg8a4qtsm5u49CAKFXCb 1r3DLLZO3daXbmG7T4htGrh4bG2ADPlYK9js51nO+Pt2u6kj0hmX6pOJvn3F+pgtp7nKK9 WfvPPCi7s3zb34Sw6ZrgM2z9dBSdzTbJFttQ/nqfJQNm8fea/GoUKZ46utPnzswhciD1G4 l/SCDAUWQlo9huyUVR+TfHsJ3S1uKlj6igT7fxLmL8qM5adYos3767otHWhhrNXvVKjz4f O6QwXTFXAFw1OUXKp4XFi+Rf9uI5iZJQ3CirS2pW5R6Bsyigt8ZUgM3uFt1O8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3u/RBonjeTYuGDbwfSTQK5xmnvBQySalsw6tUvw6Xw=; b=qZJtVB5ZMhaFxaGlv3ouMgCVuWOmKmpmZYKaHoIwa63zhrxpmstoPoCFJXZxBvjvYMrWs9 5Ppjo095AzceIFxDHaL999+qhgGM0ppU/qjQZxcOmE0W4OlJngRISWDQuYxmq9qDuXYJOa hel9hrfLbzgYv5+b7/SGqF3zXyvyGxTdlxIEFCxMTx7I2ZOcNCWewRPnlDbwd6VI3Tx+ru TRjNuy+B6FlF0IRDfSGxT9+gqfakrXJNtj1xci33CSbHPTjSXN9ZNjOWnt9rfHENtIKoun 0jpBL9VLZvt2PrlsjbFLZm39UQNpK5A2cr0AYC+VMBZkfMauvFkkLvR5mddaXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsF6f9Kz11Hh; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfLD2046619; Wed, 12 Jun 2024 16:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfLKN046616; Wed, 12 Jun 2024 16:41:21 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:21 GMT Message-Id: <202406121641.45CGfLKN046616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: eef52bbe9cb4 - stable/14 - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eef52bbe9cb44616116fab65f9bbf16d1e2d43ef Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=eef52bbe9cb44616116fab65f9bbf16d1e2d43ef commit eef52bbe9cb44616116fab65f9bbf16d1e2d43ef Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:30 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Wed Jun 12 16:41:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsM0kfRz5N37T; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsL3Zbpz4gg7; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=hXc1IG76sjvT+GxuV4gIsHJ7a9fZZbu/iaWu2IjdV4sDpYa+oMqE+WfareQAAW/FFZjqof 42xUYDdi9A35A0zNEYcucZmemJhyTMxTCSxqeZ8QxEHLVjRhad80l7wmXuRxyXWWV5tY81 zJTN7oHrHqmPD7EukT+ONdlzSyASPXDflSBXwPbreFUQqtJgPfsisgwmbCSOWxiUdAJZfi 4qUnbpJ911jyIP7JNkNVCOO9JEQeUXY9T8vmSMtUG2M3FjjFzh6mpVQIHdzPyxhmhpUqYI PgqQoF8ywo7SIsNamADkjcWGVoDDK8ZVjUbNHqEQsBv71qT399cGReROAMxPfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210486; a=rsa-sha256; cv=none; b=cKPc0C+xKfY1Tqkmm/1rjtwJCY1dno1ZrEm7ymePuUJH5wE8+KBd/q7pBGEmExTvAFKxFc yI2Diz0vKErvK6Qj9/0XxpUUkgkfI8VRadpuNhlMutrPeejpbTXV7soQZzWjGoq4+AZ0r2 ZEshleGTsayibhW5sD9QmVLSbkXswc8gIkErTSY2QwmzF6eHWrxuacGH1gaF/m9GMlt1Xs w5UIkPOCAbXaCsm5fBbp39FziYmKqI3GZaJfwZazq117uFi+g+h2spcCRqW/PGgw+VcvA6 sThA1V5gjypM0ozSVcnTZONeLyT0tkt2cuX5u7sBSFWleyfVjjuS5F2zSH8AWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=I35oYt7QWnibY3mCkd7TkPdJTindpEpiI68huTjdy7ddGR2bF4QGJsa9HlbwuLX2QXSXeD QN6Ab/XKINyLaqjVTWqmyjaBP65tCmfQMjbe5Y7cbkPmRxgvb24004v3ggtlMM8K6wQShj jQLDHvynwAzG4PmJYnOKUCbsBVYAqa38C7p1gCVB6PksYVke5/kKV97hrm0MjuxtsQRb/H y8yTqwocZO6rKT5QSRPgJwJY5MaO1ESIFz3GMlQG/6CVcgsOdnr+0Z16fOlsZcLa800Vqh OI9JjC3HiiuX3ol7aQaOlQQINg7QX7jMqRX6B6NHjrCHs910BiZcIaEWNZuITQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsL3BxCz10Fm; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfQ94046849; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfQBU046846; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:26 GMT Message-Id: <202406121641.45CGfQBU046846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 29f9003cbbb3 - stable/14 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 29f9003cbbb3874fdbb02b99069868d00bcdff5a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=29f9003cbbb3874fdbb02b99069868d00bcdff5a commit 29f9003cbbb3874fdbb02b99069868d00bcdff5a Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:11 +0000 LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() The logic following this new assignment in some cases may not set lsta but the later tracing is checking for it to be != NULL. With lsta not initialized that check may not hold up and later we would dereference lsta->state and possibly panic. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45507 (cherry picked from commit 582469016aed4fac3a7ead24dc31000edbb7e823) --- sys/compat/linuxkpi/common/src/linux_80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ecacb74f01f3..6c96f1541488 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5055,6 +5055,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni); From nobody Wed Jun 12 16:41:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsF12Yxz5N3B2; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsD650qz4ghf; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4efHithKnGao3p3rkW9BJhuANO2HPdUCB1rFd38sM0=; b=dqrgVauZlYsgZXTzluyO35Xh9Y8GFHBqAlZe4PEVAKCw2BtasCY9ESZh2Ni93/NUTkazdr a7ghfLAipsvp64IrO5LUEDoS7BD4oqtxX15EVSVKeKfDGmDib3gL3MrdB2xJCWm6IF23Ok HZ9v3KHrc7EyFv/Esn6Iuu0nVIUTYKar1swIifBFYwIZK6UV5vr+G8V89pkZKVhFNc/Y79 tIHofoQHfXLteCSy3xKxYPY47EZsUY7+AMsV9yK1omMP1FPft4R6kHEr6pt/ni9K5CSSvi EtAGO7SdjZ/QVj7SExgAy633A90EFV1XGOxBFm7nrK5vETXfZyPCrc83DHVJuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210480; a=rsa-sha256; cv=none; b=KerGEcQiFTfTrknT7BFoiBlk99O/htVLS8vzqzVRR402qN1mL++bE3P/qigvJG+m/PgfJp LlGCeQeihWYBmHWR3JA8PiUrGjHr3R4g93/JwpFBA36OURvj1SgHukTsG4JQvTYv+rNox3 F+el5fsqQsG/R4xvdq6XVSOZsQ/qTcWmrmdpvE7Lw3qnbuX80LWAk1hMKI617Ee7UtdqCn gqW1dx8tholf7b4EdneoVySHp7LtbKawfycJSFhEIyg1RwgXQxFCElGEKcjRE4CY1xonTB 3NUpre8tzZNxiNjiahAiWMR8RjDUi2GGNw9Q8znS2ee1DLvYLOsAUyGjsgA2/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4efHithKnGao3p3rkW9BJhuANO2HPdUCB1rFd38sM0=; b=sl2EsuHpt0e4tvvqq4LtXtjTw5Op+L2oNYNyAWx4vBNNIWURG4LZwEOxotxEv/WJOPArSn 8sXvTNY2b4jFybjwyc5bBHOlaeBGoi3gPOSX5PWAXIEvjpPMgy0BGtbEoIxCA3yB9NdQZu 8i/QdvJ4JiGF5MP9ebIFiSSydVRoTM1hL9csPIsos83d+B1OTDxvUvlCgfDzAxAECgJ7V8 tTMIk3cd+LehheY/+qSGsrSW2uUD9ufgSt+zD4azni3LmsAnXJgv8i8p3ska7LV4tMMGH2 uK9c5ttsI4wfnEXO8Bxs33VKkV1H1dzrXi0XrnJAcARIQ5er8OpdwmHOcZhD3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsD5jQbz10Fk; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfKHN046576; Wed, 12 Jun 2024 16:41:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfKl1046573; Wed, 12 Jun 2024 16:41:20 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:20 GMT Message-Id: <202406121641.45CGfKl1046573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 04131cf0765d - stable/14 - LinuxKPI: remove extern from function declarations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 commit 04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 Author: Bjoern A. Zeeb AuthorDate: 2024-05-27 19:49:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:51 +0000 LinuxKPI: remove extern from function declarations Sponsored by: The FreeBSD Foundation Reviewed by: emaste (earlier version, found another two) Differential Revision: https://reviews.freebsd.org/D45386 (cherry picked from commit ecd1d1f1dac49c7ecbf1e7c5ffc64356c2851efd) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 2fcc0dc05f29..e5dd2e44b0fa 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -90,15 +90,15 @@ struct page_frag_cache { * * NOTE: This function only works for pages allocated by the kernel. */ -extern void *linux_page_address(struct page *); +void *linux_page_address(struct page *); #define page_address(page) linux_page_address(page) /* * Page management for unmapped pages: */ -extern struct page *linux_alloc_pages(gfp_t flags, unsigned int order); -extern void linux_free_pages(struct page *page, unsigned int order); +struct page *linux_alloc_pages(gfp_t flags, unsigned int order); +void linux_free_pages(struct page *page, unsigned int order); void *linuxkpi_page_frag_alloc(struct page_frag_cache *, size_t, gfp_t); void linuxkpi_page_frag_free(void *); void linuxkpi__page_frag_cache_drain(struct page *, size_t); @@ -147,8 +147,8 @@ dev_alloc_pages(unsigned int order) /* * Page management for mapped pages: */ -extern vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); -extern void linux_free_kmem(vm_offset_t, unsigned int order); +vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); +void linux_free_kmem(vm_offset_t, unsigned int order); static inline vm_offset_t get_zeroed_page(gfp_t flags) From nobody Wed Jun 12 16:41:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsQ4ZGGz5N37w; Wed, 12 Jun 2024 16:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsP6Hyzz4gXC; Wed, 12 Jun 2024 16:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xhwqn3i9cOMm/t3jloFgazq2HNgfPdFsHV+4IH5CyBo=; b=gjOBZcJUtmBBjpyGSdNeWirLf+wH1qOOgVUPV4LVPHkBu4ydMg/Ty2R0yJ/tUfZ1c90zQM a7LT44R/DpWjKBWYN9JwvCoe54h9RvmQuqGYMU/OX+q43tlMvuOxiJAyrEo3j+fzCOGvA/ iSxWDuBTK2vOo2YulVDL46TkU6oD4HqdxV6GBv1p+5u8d9xxvjKnqEMUwJUHHlXd4veOTv h4QeO2nwP3nG0XF1Sr+jke2oJgQXhOSIFPE/9Eklh0T5pFc2qMcVVIGDLBXmw01eOeYQMQ P/t8zO4ww4ZUS6iH4VCyw3j3EGb6DBvVJZKpCjT1XemLBk4ZzTytDMg4nIZyVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210489; a=rsa-sha256; cv=none; b=kxA9DZpczXTtLK2ffYPmlBdXoJMsEYX4UGKV7/2sWvHj3trdI+Mn9wTz4b+aptgoQ4iIzS BIYnJTWk0+Qn0HbBNUyI+KjfS4FM3TpHZhPj9RPjUGPKK4kjlUxZdixbSfaVD5696qIDlh 9+tcjT1+N6Me49Im2X5I6sKDqYu7iUHQw1+SVCktpAtu6/wvt53X9k1TkOAV7Mes4tXMRL o5hLpiY48V0I1jMZthhavbweeCxU/sWkjZ9JBIwCAw+Op0Y2RVoA5uZFotxRY9bb1TTbp6 By9tx14vXz2PloNbjgfbIZhWLRlDhCsgjj1VHUwzrNQ91Fqf/3zlK5XA2c/Wsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xhwqn3i9cOMm/t3jloFgazq2HNgfPdFsHV+4IH5CyBo=; b=SW6V0H39jx4kdnMn5pH8STUGAkW9RFASeIM4T6l5giz5C9AQ7nPXlKJoHITXfU/NMTwOln S7bBWYWshJUP3MB440vLdDNSi9kjHsdJoUAxbDZtrK8HCSgafgvIauacdtQLhEjU2a4sqJ rq8yrky/TiTcDZYA6DPoUjJCb4xmMNklCxQvQCZpOYdED5t38SKE8FjKGrSTuGWyUmgvEr QXmQkIG3Of1l78AxJ3v07EGdY1976GOBfH0Lh4FQ8KotZlIqnJUgm6KcnLNM7LfFHmqc7i qa5n5hc5yIOo3Ec1JOWJotcj3oeP8Qz6XAlwwX7lNbamjhalhUtRKwcKnQJRMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsP5wCsz114W; Wed, 12 Jun 2024 16:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfTXN046996; Wed, 12 Jun 2024 16:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfTcf046993; Wed, 12 Jun 2024 16:41:29 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:29 GMT Message-Id: <202406121641.45CGfTcf046993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9e36362f6a87 - stable/14 - LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e36362f6a871215c269edb43b87daba55b495e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9e36362f6a871215c269edb43b87daba55b495e5 commit 9e36362f6a871215c269edb43b87daba55b495e5 Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 20:57:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:32 +0000 LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() We have to unlock the net80211 ic lock in order to be able to call sleepable downcalls to the driver/firmware; a 2nd thread may go through net80211::join1() and (*iv_update_bss)() after we checked and unlocked. Re-check status at the end of the function under the ic lock so that we do not accidentally set lvif_bss_synched to true again despite it no longer being true. This should fix a race where we lost the (*iv_update_bss)() state during startup where one SCAN->AUTH is followed by a (then) AUTH->AUTH and lkpi_sta_a_to_a() did the wrong thing. Once we re-consider net80211 state and allowing a second join on a different node or iv_bss update without previously tearing down the older node we can likely undo a lot of these extra checks and workarounds. Sponsored by: The FreeBSD Foundation (updated version) Tested by: emaste (on and off) Reviewd by: cc Differential Revision: https://reviews.freebsd.org/D43967 (cherry picked from commit 105b9df26ee0286f3a5a7d191075e068dee1c4a2) --- sys/compat/linuxkpi/common/src/linux_80211.c | 66 +++++++++++++++++++--------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 6c96f1541488..728103778e4e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1276,25 +1276,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta = ni->ni_drv_data; LKPI_80211_LVIF_LOCK(lvif); - /* Re-check given (*iv_update_bss) could have happened. */ - /* XXX-BZ KASSERT later? or deal as error? */ - if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL) - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched, ni, lsta); - - /* - * Reference the ni for this cache of lsta/ni on lvif->lvif_bss - * essentially out lsta version of the iv_bss. - * Do NOT use iv_bss here anymore as that may have diverged from our - * function local ni already and would lead to inconsistencies. - */ - ieee80211_ref_node(ni); - lvif->lvif_bss = lsta; - lvif->lvif_bss_synched = true; - /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); LKPI_80211_LVIF_UNLOCK(lvif); @@ -1343,11 +1324,56 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int * (ideally we'd do that on a callback for something else ...) */ + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(vap->iv_ic); + + LKPI_80211_LVIF_LOCK(lvif); + /* Re-check given (*iv_update_bss) could have happened while we were unlocked. */ + if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL || + lsta->ni != vap->iv_bss) + ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " + "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, + lvif, vap, vap->iv_bss, lvif->lvif_bss, + (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, + lvif->lvif_bss_synched, ni, lsta); + + /* + * Reference the "ni" for caching the lsta/ni in lvif->lvif_bss. + * Given we cache lsta we use lsta->ni instead of ni here (even though + * lsta->ni == ni) to be distinct from the rest of the code where we do + * assume that ni == vap->iv_bss which it may or may not be. + * So do NOT use iv_bss here anymore as that may have diverged from our + * function local ni already while ic was unlocked and would lead to + * inconsistencies. Go and see if we lost a race and do not update + * lvif_bss_synched in that case. + */ + ieee80211_ref_node(lsta->ni); + lvif->lvif_bss = lsta; + if (lsta->ni == vap->iv_bss) { + lvif->lvif_bss_synched = true; + } else { + /* Set to un-synched no matter what. */ + lvif->lvif_bss_synched = false; + /* + * We do not error as someone has to take us down. + * If we are followed by a 2nd, new net80211::join1() going to + * AUTH lkpi_sta_a_to_a() will error, lkpi_sta_auth_to_{scan,init}() + * will take the lvif->lvif_bss node down eventually. + * What happens with the vap->iv_bss node will entirely be up + * to net80211 as we never used the node beyond alloc()/free() + * and we do not hold an extra reference for that anymore given + * ni : lsta == 1:1. + */ + } + LKPI_80211_LVIF_UNLOCK(lvif); + goto out_relocked; + out: LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); +out_relocked: /* - * Release the reference that keop the ni stable locally + * Release the reference that kept the ni stable locally * during the work of this function. */ if (ni != NULL) From nobody Wed Jun 12 16:41:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsN0682z5N3Df; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsM4Ktbz4gnb; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivJDjp6q+2MwTrhNEKmNtYxI1T1WtCZUR4xDteFKKfE=; b=GeUgNJvO+YYRKxQ4aqTp7MM0z71vU4g9Jcyk6Wmvs3ZpXm3aAj/lMJD6RPna5GIzHBUzcu xLacZXaSKzAltx5a1Vhiq2l3S5N+nliDZvJVNXQH+5IZDvyJXTgu9FJmbhI5pmkS/j3kI7 HJeHa7XYUqhMyQxxWtnNbKArjVaMNh6y7p31r6QENoVbCtgJGVXmt+/rg45yXIikdsvSMM ICHONiqJZFbzYlC46UFFu304uTlIWRmGOCneMlHbFwmC2RU22ZjySSwBWyeAAJ3lNpefiJ OS1vb2Q0e4WQD/5gfWt8H5MTBsdnrldkDiTl1zRUDr3FKmDksgvuwNvNqOmPRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210487; a=rsa-sha256; cv=none; b=AM0m6h5GWZIGGu5jCQojznjQW5xS0cnCBp54IbB542MYMsu8fJ/R+4MLX6CvnVE18ji6SR ZKqIgNepheeHBqz4BGlknJOeraAluVNsKTnx5cIvZLkcRUyrM0sF+7Z12ThsQb1ZwrVmzw LpZ2+sHiFCJvs+UsZbzH8yPzg0zpD8DHXT3jkraItS1rzXF/KnbfZo3X/ynlBvXnbM6uv+ //t6NGCrFK0gi2hesG3pMDWYQvaMwbN0UtzAVD7MCJjnu6uUDDKT2JDeNGUf/Yc65CregR RpFYJmMEKou5p16GmI7QWHxWAuLfJAKsaliO0A86ioZSH7b4l19CPBZinMe1Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivJDjp6q+2MwTrhNEKmNtYxI1T1WtCZUR4xDteFKKfE=; b=LiHHoh2p1OQ2jCXEmNsHEGB+CvtP0u1qLjAJvi6C662cEpOjam+j5pK86Wc3bq+re8hSWC n52g5yfrGnv262LFKAwGPz3epyVOmIRDfke1nFeR6Swm9qbzPiaz2frVsn1F9jWLeCnjaw NuXc5YcVWSED71yNyPF2lysS3riSxa0djewZ324ZpKGzRZRbJQwgwch9rAfqKCpn8fIusD aberB9UyGLHYaVxYLQSSOh+0ErA8RLuDYnfF3C4bClgercoxO4A+8wBamUZiNNhG6ubasH F61JDl0iLfx0PwLIqvOB481WENhB9A4JK8HYuQ/7pKaChlJh2Bigwnd/y++1Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsM3wXPz11QD; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfRJ6046897; Wed, 12 Jun 2024 16:41:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfRbh046894; Wed, 12 Jun 2024 16:41:27 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:27 GMT Message-Id: <202406121641.45CGfRbh046894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e0ac61759dea - stable/14 - LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e0ac61759dea2d572a078ab018ca5d3ead912f0b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e0ac61759dea2d572a078ab018ca5d3ead912f0b commit e0ac61759dea2d572a078ab018ca5d3ead912f0b Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 21:57:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:20 +0000 LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300. Correct to get the expected behavior. Sponsored by: The FreeBSD Foundation Fixes: b0f73768220e9 LinuxKPI: 802.11 header updates Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45506 (cherry picked from commit 3e0915b7b6857afdbd283f2d448906e6a032ee07) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 2000e7480ff8..0fd90e921c77 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -263,7 +263,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ #define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ #define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0100 /* IEEE80211_HTCAP_RXSTBC */ +#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ From nobody Wed Jun 12 16:41:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsH3wTVz5N3Jv; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsH0yrKz4gnR; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT8C+W0CCsHJKriZ8oIznI8vyeMNDdT9ZzSuBU1TmEg=; b=hhIPt2H02Ef+uy42SFShl81o9RzxNflL8VOUiZX3ui4xGhNGDTqVvF+Sl/Bt2DIrIBSxOE 6mdfPBvUEmotYhqIfCVBIL5q4MU7yKICZo9dYV3hZZq7pGuxtNtlqCu/NPmTVGNBmLt/7S IFmCOrvFvaDI8fDYee8r/yKo66AMeG2ueRKPDQTcl/FedA1UosS1hlgcufKg658jtMSWXg TLeW1JfFuDlYEquVk8ezuclF4hxaxDKZ/T1uN8okraUED/H6drI9sHdL80ehcei2CiQX8R TUHAG5gPXVnQurWvADWvWZ3eE0Dc74mHWE0FbC+iZW5MVESG1jFWHtLOHanPyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210483; a=rsa-sha256; cv=none; b=kkrOFfAsh18MxMhENgp4aXrqh9QG1a73jpWUnIHk7ngl1hwigxrl4IRUqjxZOQQPkw8I62 Ee7VPLxP3gPutSET2WFxjFFlu2tP6z1h822rRzcDVKdSX1T+5dap1A1k5l3y26/gDbW5Zw St4zzfbrUsT9JllbRxIYzeMQpdS0TKWof4EUNjf8/1PT+LgFcL+2b+WDmap97E5MAMsSYy 6ym0fPEjcQBpqc1E2eNbw4j/1wRoBWDT23hZhPnxu2UmirpARWdO5HH7T6H4aGIjlrfSvy WuL4wS0DTnDWPua/d6nag3+L/f5JxYoP7T/Qv9fmp0QFWEzek+NiNDaQhoNaLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT8C+W0CCsHJKriZ8oIznI8vyeMNDdT9ZzSuBU1TmEg=; b=dFC4a3WEdJjK1nwfre3+naRKBFiraQSWtGpIHAoj8cN+oK+eUdF8t8sl7Fp7r3bRKVaQV7 nkxI6BjgOvTU6HfUsXQaO0kSsViGLvkLnWNkPRdX9/8vsEDHiCIgYhuNBylTUefmqbZrAa 78GsqvxDidhnZCTOHM/1tzsM8YJfN6FjaENncPhnT3M9RbL9KwFmQYK/b5yydRm2ASzeAZ sRXHh4c92mdTcfCqa4DigSzyrnb8OMVosDYF1Kf8YGdBCDbscXBMRiELaJb7P15ZBiU1c/ 67GOIjKAgmZFTqmGTzq20S93fwX8jgJk9WiLLnsKwcCS801HhY0Q1DngoblzwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsH0bf0z11Hj; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfMvK046681; Wed, 12 Jun 2024 16:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfMMA046677; Wed, 12 Jun 2024 16:41:22 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:22 GMT Message-Id: <202406121641.45CGfMMA046677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7ad7453748e2 - stable/14 - LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ad7453748e2adafa1e1a3e44b02fc852d4c5301 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ad7453748e2adafa1e1a3e44b02fc852d4c5301 commit 7ad7453748e2adafa1e1a3e44b02fc852d4c5301 Author: Bjoern A. Zeeb AuthorDate: 2024-05-22 02:24:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:36 +0000 LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes While the previous order worked well for iwlwifi 22000 and later chipsets (AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes. Change the teardown order to avoid these problems. The inline comments in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new order and also the old problems we were seeing (too early sta removal or silent non-removal) leading to follow-up problems. There is a possible further problem still lingering but a lot harder to trigger (see comment in review) and likely related to some other doings so we'll track it separately. Sponsored by: The FreeBSD Foundation PR: 275255 Tested with: AX210, 8265 (bz); 9260 (Bakul Shah) Differential Revision: https://reviews.freebsd.org/D45293 (cherry picked from commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c) --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 ++++++++++++++++++---------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 758db287d613..32b0287db65c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -994,33 +994,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new) } } -static void +static enum ieee80211_bss_changed lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { + enum ieee80211_bss_changed changed; + + changed = 0; sta->aid = 0; if (vif->cfg.assoc) { - struct ieee80211_hw *hw; - enum ieee80211_bss_changed changed; lhw->update_mc = true; lkpi_update_mcast_filter(lhw->ic, true); - changed = 0; vif->cfg.assoc = false; vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; - /* - * This will remove the sta from firmware for iwlwifi. - * So confusing that they use state and flags and ... ^%$%#%$^. - */ IMPROVE(); - hw = LHW_TO_HW(lhw); - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, - changed); - lkpi_hw_conf_idle(hw, true); + /* + * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with + * assoc = false right away here will remove the sta from + * firmware for iwlwifi. + * We no longer do this but only return the BSS_CHNAGED value. + * The caller is responsible for removing the sta gong to + * IEEE80211_STA_NOTEXIST and then executing the + * bss_info_changed() update. + * See lkpi_sta_run_to_init() for more detailed comment. + */ } + + return (changed); } static void @@ -1460,6 +1464,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -1743,16 +1749,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* See comment in lkpi_sta_run_to_init(). */ + bss_changed = 0; + bss_changed |= lkpi_disassoc(sta, vif, lhw); - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST - * as otherwise drivers (iwlwifi at least) will silently not remove - * the sta from the firmware and when we will add a new one trigger - * a fw assert. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -1769,7 +1770,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; @@ -1802,6 +1802,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -2290,14 +2292,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + bss_changed = 0; /* + * Start updating bss info (bss_info_changed) (assoc, aid, ..). + * * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. + * See comment there; removes the sta from fw if not careful + * (bss_info_changed() change is executed right away). + * + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + * + * The order which works best so far avoiding early removal or silent + * non-removal seems to be (for iwlwifi::mld-mac80211.c cases; + * the iwlwifi:mac80211.c case still to be tested): + * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here) + * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST + * (removes the sta given assoc is false) + * 3) add the remaining BSS_CHANGED changes and call bss_info_changed() + * 4) call unassign_vif_chanctx + * 5) call lkpi_hw_conf_idle + * 6) call remove_chanctx */ - lkpi_disassoc(sta, vif, lhw); + bss_changed |= lkpi_disassoc(sta, vif, lhw); + + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -2311,15 +2332,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } + lkpi_lsta_remove(lsta, lvif); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.use_short_preamble = false; + vif->bss_conf.qos = false; + /* XXX BSS_CHANGED_???? */ lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); LKPI_80211_LVIF_LOCK(lvif); @@ -2327,7 +2352,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif->lvif_bss = NULL; lvif->lvif_bss_synched = false; LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); /* * The very last release the reference on the ni for the ni/lsta on * lvif->lvif_bss. Upon return from this both ni and lsta are invalid @@ -2347,6 +2371,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); From nobody Wed Jun 12 16:41:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsR2yvjz5N3Gh; Wed, 12 Jun 2024 16:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsR0Q2Wz4glW; Wed, 12 Jun 2024 16:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4Et0HF/jYB/yNPoWFfwjixclw/ZtbpxXTQ34jcyDfA=; b=t9VJ5dQCd7zWwl7z6vUBX/3Xt1BomAy6vwScSsAYr1h5MS/3jfjElhcKV4gQhOJdTb5DWm 6q8Y3IKQbaslrjZQ0pdMciHsyt+DDJVYopTOewA4cuizwjHs4KFCZdxaBqzzf7M4IGRR9I 0rY/V6/r+tGlMUjcYPEikzTZ0LX3vvTqLRw8v5HzzovbLWd0u/J4ySQOntfF1V/AKqoJaF R+WV0dzc2/4Y1NT26Tpr4u/Wab903GdK/nx2DSWyDRvaCpNWPVyP02tKJP//vqoWyT7ED0 21tzlA5TiZrjpLpRvCin6EC5fIEO7vND1QxfeBEqYKyanT1RdZUYOzDWl125Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210491; a=rsa-sha256; cv=none; b=jIjCq/p9FFNzAr6DLB5W8ywZipOHjdBsxus0y7yT7YGt0jL1/8W7nE3JNyreOUCXLV/r0L sWcXCTkt9x/MwSjQpMai5A6ZfrQBiaezY0AqqwGiI8Vuil67z3ICNsjF2Yat+V0CgLK1km TvEv1IYeejFDZwXFcAC8km98tnmNZXwVO4rbyJNtBLXjaVki4P2z3B0VonUH7W1ikHqMKb NXzVKLEPdRLl8zSVmk5hnvhOM9mxCOSK2WwqySEN9OMDSFj0GjcD14iyoU2gKdgTGdRIK+ SS16uVt7fC1YJTGcg1F6263PLDL8/JyTLrVLVKzWyk0dKjF6lftxyFNTGzJBiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4Et0HF/jYB/yNPoWFfwjixclw/ZtbpxXTQ34jcyDfA=; b=hQ82RV2ArZqZcyu794MJDsFDCvojw7mdTcGSoaRrWrW2Lo0aWvE9JEedEvLttlRyfRqU2b XdvWqYg2f4Yy3iRXakr0nuFdLnPHVEcnxrNxek7b2js2jzqPWzmnV49hFXc7bBiECdAmzJ vgO8ptLfRDw6M7F9+vXsv/tm/SzTuDym91bWI7eEroS7UskxbEmwepOFIkSAQ301z3YGA2 2kYNngRlZ4UWDlQdVub1Laocz1X/UKhE6IzyzQrnxmMdjOWAfArqqljW9poTRCiQcVMwGX kXCORApovo4N2k4mBDh+QqR7K8IzdqFebKJ0stY02DrGLopLr0CcBCE2BRq3Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsQ70smz10nc; Wed, 12 Jun 2024 16:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfUdw047068; Wed, 12 Jun 2024 16:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfUr3047065; Wed, 12 Jun 2024 16:41:30 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:30 GMT Message-Id: <202406121641.45CGfUr3047065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2ab1b827d49f - stable/14 - LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ab1b827d49f473e30a91382d2ce03e268af45c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2ab1b827d49f473e30a91382d2ce03e268af45c5 commit 2ab1b827d49f473e30a91382d2ce03e268af45c5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:54:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:46 +0000 LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames The "Invalid TXQ" error from iwlwifi seems to be triggered by a frame being sent for a sta which is no longer known to the driver/fw. While we make sure to trigger the sending of the frame in net80211 early enough (by calling (*iv_newstate)() early on rather than at the end), TX in LinuxKPI is run in a deferred task. When we drop the net80211 ic lock again and re-acquire the LHW lock the packet may not yet have made it to the driver. Work around this between the (ic and lhw) locks by making sure (a) no new packets get queued after we return from (*iv_newstate)(), and (b) the TX task has run or gets cancelled and we manually push any remaining packets out (or let lsta_free() clean them up). The disabled packet queuing now also needs to be re-enabled in scan_to_auth() in case an lsta is staying in service or gets re-used. Also make sure that any following lkpi_wake_tx_queues() calls no longer ignore queues which have not seen a prior dequeue. This former workaround "feature" (ltxq->seen_dequeue) should be fully garbage collected in a later change on its own. Sponsored by: The FreeBSD Foundation PR: 274382 Tested by: emaste, lwhsu, thj, rkoberman at gmail.com Accepted by: adrian Differential Revision: https://reviews.freebsd.org/D45508 (cherry picked from commit 886653492945f7e945eb9bdaf5bc2ae26df96236) --- sys/compat/linuxkpi/common/src/linux_80211.c | 95 +++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 728103778e4e..ca8db481347e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -146,6 +146,7 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); #endif +static void lkpi_80211_txq_tx_one(struct lkpi_sta *, struct mbuf *); static void lkpi_80211_txq_task(void *, int); static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); @@ -1062,6 +1063,51 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta, } } +/* + * On the way down from RUN -> ASSOC -> AUTH we may send a DISASSOC or DEAUTH + * packet. The problem is that the state machine functions tend to hold the + * LHW lock which will prevent lkpi_80211_txq_tx_one() from sending the packet. + * We call this after dropping the ic lock and before acquiring the LHW lock. + * we make sure no further packets are queued and if they are queued the task + * will finish or be cancelled. At the end if a packet is left we manually + * send it. scan_to_auth() would re-enable sending if the lsta would be + * re-used. + */ +static void +lkpi_80211_flush_tx(struct lkpi_hw *lhw, struct lkpi_sta *lsta) +{ + struct mbufq mq; + struct mbuf *m; + int len; + + LKPI_80211_LHW_UNLOCK_ASSERT(lhw); + + /* Do not accept any new packets until scan_to_auth or lsta_free(). */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = false; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + while (taskqueue_cancel(taskqueue_thread, &lsta->txq_task, NULL) != 0) + taskqueue_drain(taskqueue_thread, &lsta->txq_task); + + LKPI_80211_LSTA_TXQ_LOCK(lsta); + len = mbufq_len(&lsta->txq); + if (len <= 0) { + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + return; + } + + mbufq_init(&mq, IFQ_MAXLEN); + mbufq_concat(&mq, &lsta->txq); + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + m = mbufq_dequeue(&mq); + while (m != NULL) { + lkpi_80211_txq_tx_one(lsta, m); + m = mbufq_dequeue(&mq); + } +} + /* -------------------------------------------------------------------------- */ static int @@ -1275,6 +1321,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int __func__, ni, ni->ni_drv_data)); lsta = ni->ni_drv_data; + /* + * Make sure in case the sta did not change and we re-add it, + * that we can tx again. + */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = true; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + LKPI_80211_LVIF_LOCK(lvif); /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); @@ -1427,7 +1481,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -1585,7 +1639,7 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in } /* Wake tx queue to get packet out. */ - lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), true, true); + lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, true); /* * .. we end up in "assoc_to_run" @@ -1729,7 +1783,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); - /* Call iv_newstate first so we get potential DISASSOC packet out. */ + /* Call iv_newstate first so we get potential DEAUTH packet out. */ error = lvif->iv_newstate(vap, nstate, arg); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " @@ -1738,12 +1792,16 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2121,12 +2179,16 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2255,12 +2317,16 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -3596,7 +3662,7 @@ lkpi_ic_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, lsta = ni->ni_drv_data; LKPI_80211_LSTA_TXQ_LOCK(lsta); - if (!lsta->txq_ready) { + if (!lsta->added_to_drv || !lsta->txq_ready) { LKPI_80211_LSTA_TXQ_UNLOCK(lsta); /* * Free the mbuf (do NOT release ni ref for the m_pkthdr.rcvif! @@ -3822,6 +3888,7 @@ lkpi_80211_txq_task(void *ctx, int pending) struct lkpi_sta *lsta; struct mbufq mq; struct mbuf *m; + bool shall_tx; lsta = ctx; @@ -3837,9 +3904,19 @@ lkpi_80211_txq_task(void *ctx, int pending) LKPI_80211_LSTA_TXQ_LOCK(lsta); /* * Do not re-check lsta->txq_ready here; we may have a pending - * disassoc frame still. + * disassoc/deauth frame still. On the contrary if txq_ready is + * false we do not have a valid sta anymore in the firmware so no + * point to try to TX. + * We also use txq_ready as a semaphore and will drain the txq manually + * if needed on our way towards SCAN/INIT in the state machine. + */ + shall_tx = lsta->added_to_drv && lsta->txq_ready; + if (__predict_true(shall_tx)) + mbufq_concat(&mq, &lsta->txq); + /* + * else a state change will push the packets out manually or + * lkpi_lsta_free() will drain the lsta->txq and free the mbufs. */ - mbufq_concat(&mq, &lsta->txq); LKPI_80211_LSTA_TXQ_UNLOCK(lsta); m = mbufq_dequeue(&mq); From nobody Wed Jun 12 19:16:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJJ5JtYz5NHbG; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJJ4pjpz56Q1; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0UbzKXJXKYWmBDzo0hbXSaiO5yRgoxPTvW8dMCWpkU=; b=CU2y1qr1fL8SY3XEpCH4ps75ezdKJ7k6o+Y2S4xiBwzOy+XlQ7UTK+kCFnVzrV4IG19VLN bKNmqbebTJWADsBODkrA2H74Da9vUmeeC6e9EI1yJmEV58o3O3hgQoJskGFqW2dyN3DwoR OABe3SOFUM7WBFvT47pXY7nC16InJoa6nnycmXK+BS4TZBzQGwC4qkBwKjpiXcJNAWIITW wdzSh3T5yO29CMSKu0OI73BcoV62jO+xuOw2AHCUa8k6ZlrG4IPn4rHVV+OnOO45zIbU6X rUPeMMMiH0RJ125ZNw1ZHiH9pvl1RXp0zyEBiOHWOcblvYxoZmTMXkqdxbwA+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219792; a=rsa-sha256; cv=none; b=Fh5wOa0WMgB4dxTAtIJ0l2UhEHFhK9EfNWy+88qJAM6ONiOxTIZhgdSAHrStkKdjAB2Pom OYNR/tPa31l4jpRxzVc1Rrg3XtBB090hR99E6+nVdGoQVU3I60Er1WqG6PRCizjdWa2X34 PVR35eQfGjMAZTxtvBnlfDPFSSx9g3U71UPaYq+aOZyktFBPMXfUP3vIq2tH4nFSu3Uuiy HBCLlllX4/HwFfK6qzMsxopROHhscgKE53RQMdZfW7KS03oSdNsy+HtHvghDw7KkapFjzA Fi/fZ88AuVhKQNNUXsZ8Lc0+fyIlacYONmGabLLIjeHbjsl4HrVpNrpshkYMiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0UbzKXJXKYWmBDzo0hbXSaiO5yRgoxPTvW8dMCWpkU=; b=PJw10lu1Nt8QyrM4TQ2KZhxUm6JMcLPhM8N4EbulS7yptbzAnuO7GOmSL9TOvKO/qaig2L mdADB2I5DFqPUggTxLXic1FAbnz0xstgU7XIdfekUUJPdke0jbXY4UoiJum9j+Dj8d5HVN gupZrzvIns+ilzWwHyfi7/MGd+UBojMD03Wc6+uf0WRBGkbvQxRWnZ40Fk+IiIfcNHP3OL m/cIqsAFjmAPHovL6GYvVycyxrsLLRDOEjPObuh6n9O1d7VlJ0xtss5xyKrziTOeZWZqZS rzXqqFJP8Y5ia41CBbR3hIy+aQlmjA7lFnooHM4CX9xgIMDc9e6CxHBHfu/d8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJJ4Hgzz15Dj; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGWur003395; Wed, 12 Jun 2024 19:16:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGWC6003392; Wed, 12 Jun 2024 19:16:32 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:32 GMT Message-Id: <202406121916.45CJGWC6003392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4cb9d580269b - stable/13 - bsdinstall: update comment related to pkg List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4cb9d580269b866a6fbf69826efcd156be538826 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4cb9d580269b866a6fbf69826efcd156be538826 commit 4cb9d580269b866a6fbf69826efcd156be538826 Author: Bjoern A. Zeeb AuthorDate: 2024-04-25 14:47:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:20 +0000 bsdinstall: update comment related to pkg pkg_add has been gone since 2013(?). Refer to pkg(8) instead. Sponsored by: The FreeBSD Foundation Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44946 (cherry picked from commit ad31d4764255c0848f1f0fa10760d16b5a2922aa) --- usr.sbin/bsdinstall/scripts/docsinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall index 92d1743b5ddc..77d311c9ca16 100755 --- a/usr.sbin/bsdinstall/scripts/docsinstall +++ b/usr.sbin/bsdinstall/scripts/docsinstall @@ -148,7 +148,7 @@ f_mustberoot_init dialog_menu_main || f_die f_dialog_menutag_fetch selected -# Let pkg_add be able to use name servers +# Let pkg(8) be able to use name servers f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ # From nobody Wed Jun 12 19:16:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJK6TWZz5NHMY; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJK5KMnz56MX; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDQ/u6siWNHc9mTFmO1gKxC+4Rq7b1joBfRMnhKlSws=; b=bZtlQl53uNc4Qwv72EHpJYGaODY85k5NKGvjhaMhcV4H5BoAukHfxYWNdIOzc2RID2v+ol jGRp2YxeZBh+R1PMwz0i7JLnJ3r1D8LLUo1sPTwMA49qGb07QLX+/k4YvASpphMk9YxMtT 8A8GecPCLV9fQ+yib4jhZP6Fducz5jgL8YJcVRwOEpYF5LGHX+0eSlVdObyxrXcH+6BL8+ gYQnwuJIMQrLnPF/7CT4TcJqNnC6DiN8KvOfsjapEHkk1jwu1dOLUE7XRjSJm5ddw8VfFd qVgqflWzS4dBDaNMOOsuALc3lwlWN/ac8y5P6v8Rviweu74rR3IrSHGE9ZaVYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219793; a=rsa-sha256; cv=none; b=geS28mokQWyidogEGkZRAxOv0zdCnXzda6uURbmSySgIY0gSubfukp96W528Z/NgPThtzo 0gyBwRrER8Rbu0lqMr2iar8UW1ZoihNm0J54Q+bXJsPyel5OZ8HZ/HdSixoJFNcThhtiQw y2UWe0fkeiW55WBJ+1tjZi3bQWLxF3tlqa8lJaMMeU/sAHAHxmR5GKZ8DTLo/LxNUJU5dx PRPUPm4q2o/kl1RalcfIkejEexWG6h31muWdClHbEu2B1Lub4LmmcGeREWYjeb/xMKUQ6k 3IjLkNFcAZ7Ecpd7s4BmbOTK8uGZ6nTyMDWBgJrpdT0BD2gHe38mJBwoE/lTxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDQ/u6siWNHc9mTFmO1gKxC+4Rq7b1joBfRMnhKlSws=; b=v/E8Vrb30EX5cnCdMB1o9OgH+IH08pl2nt5R2MWG4Dm8dQKoaoEJ40cF7gAVhExqoT+xan Gbjx8U1i4C9nurMNNx0Tz4jdL9ZYA3dLHXzMtEiLcvwom2mBYYT3AMFeU31g57pbutKyyJ m8Acdg5qA7V0ZBPLxcMUF/XoHuorrWWdrg8WpdlAWy7jWmh9U361JqR+wiTcW4oNsvftVJ xn30UpPhgkFzOK6f6jOibc5Q6L1PxLBmR29LuLveGmAhBdaJmupyecGk25byGSn+WhQCPI gE7UrBmOCQnSe8PMKOV14PlC+LTxr8LL0PaYUuyU0Y1WotsRNeATJhn5KLRRvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJK4x4cz14Tm; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGX38003450; Wed, 12 Jun 2024 19:16:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGX4T003447; Wed, 12 Jun 2024 19:16:33 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:33 GMT Message-Id: <202406121916.45CJGX4T003447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8e64a7ec0b5d - stable/13 - net80211: amrr_init: change order of commands List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 commit 8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 Author: Bjoern A. Zeeb AuthorDate: 2024-02-05 14:48:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:26 +0000 net80211: amrr_init: change order of commands First run the KASSERT before trying to do the free operation. Better for reporting and debugging. Add a guard setting the value to NULL afterwards. NULL pointers are a lot easier to test for. Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43751 (cherry picked from commit cd9fee3d2c370e81109505c2abfd381af952e9b3) --- sys/net80211/ieee80211_amrr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_amrr.c b/sys/net80211/ieee80211_amrr.c index 7248af0edccf..461554d75ea1 100644 --- a/sys/net80211/ieee80211_amrr.c +++ b/sys/net80211/ieee80211_amrr.c @@ -132,8 +132,9 @@ amrr_init(struct ieee80211vap *vap) static void amrr_deinit(struct ieee80211vap *vap) { - IEEE80211_FREE(vap->iv_rs, M_80211_RATECTL); KASSERT(nrefs > 0, ("imbalanced attach/detach")); + IEEE80211_FREE(vap->iv_rs, M_80211_RATECTL); + vap->iv_rs = NULL; /* guard */ nrefs--; /* XXX locking */ } From nobody Wed Jun 12 19:16:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJM0g79z5NHbH; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJL5yHpz567F; Wed, 12 Jun 2024 19:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1d/XabHf7PY9iurRAsRQUqQksFjs/CL6O7nEVPiZRw=; b=CNXEdfhePHaj3/KIEdSIbhum8AdNDKfNBxEPYYYRCJCo9yko1Z04x4sJvGiIJGQe52b1R9 Pv03CzWvR5dpNDqoLiVvev+REDGx2Oo5BrI22unyyA2fDxH8k9jQCDRDuj52zukN79PblK Nxo2C2bOu6HSZSO9IQWrvMyt1lU0JgKPMuLpDnaL7VlxZY1ENEDMuiyCpjFJ+VOysmF8Tu 7SrvXkc2tl1E1jr8jbmQioavnz3TfMGp989+RDDJb+c0byFNi7FRzs4e7buk/doRbsyM3v MMDpczrJTsC+/LB9lC2AsAOWGyybbH58oYTpsjTDtZS77IsL4ysUCJ5WSDCR+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219794; a=rsa-sha256; cv=none; b=kjHoLSnw9Y95Yy74ut95nVXbuLZnhMM2eWGz44CZ1DWxxk6aQgWcH6fOn+RQf/hOrt+8G/ LfR52P645x32VD0QKh2SrcrlSICHFors1AzSum+fIAqXIHtdeNYMXTaNyiQIO5Q/X1l29F 1iq7rac9Lwa8lhUcizPb6cImxo8/CvrRNDUd4CWY6iphDV6BMX+sanbm7AvAJr7LwtCoPL FEHCCznmK8s9R3rew7Du+HtUJ6tkLYYHFJMRJ1dyPXtEQkXmpigoMikzFj5Rg8T0PHEkei xyVuqWkfiPmQjoTbDIScwJjt8UNGGirkDhSmWFhKVuKxkKy1L1MiLHgthWFtRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1d/XabHf7PY9iurRAsRQUqQksFjs/CL6O7nEVPiZRw=; b=PGC73/TCPBdf6dh15QcLE2o1DE/8uZLacPUaus9/QcC1B5To97xAOeytlaCz/jZSTwWuHh tBP+AM/O8ObVlzOd1eF0StOiFsAEnI3N8WmShGObvhnzgFyxWOeBmsxUV+XxnL5t7t8dz9 h5Th9+QkK7+GAuNtn99h6bMgPaBeYVpdCr0KnYWwaV3ETHGBzOxsbQ3VWm2doUR28PWsel uT3cdSFi4tPx7bhT51df1qvuMHLqXsaANBEMni4NAO58eqPkGwJuZfLu53NiPvL+kFT6px tIY+7/PbylYpab9sU7gyqlwqFJC53tRXogJyQ98do7aDK8dWfL5u4zimBnJzLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJL5ZlPz14Tn; Wed, 12 Jun 2024 19:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGYIr003490; Wed, 12 Jun 2024 19:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGYox003486; Wed, 12 Jun 2024 19:16:34 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:34 GMT Message-Id: <202406121916.45CJGYox003486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7ced40667656 - stable/13 - net80211: fix IEEE80211_FHT_BITS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ced406676562da38b5c2ae1f5cd5ba90fc5e012 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ced406676562da38b5c2ae1f5cd5ba90fc5e012 commit 7ced406676562da38b5c2ae1f5cd5ba90fc5e012 Author: Bjoern A. Zeeb AuthorDate: 2024-05-31 21:48:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:36 +0000 net80211: fix IEEE80211_FHT_BITS AMPDU_RX was added as a second AMPDU_TX, LDPC_TX and LDPC_RX missing; correct and add missing. Makes ddb output (and other debugging) look more correct. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45505 (cherry picked from commit 5bbf4b6291863452acfb5a7fc76f227848841cac) --- sys/net80211/ieee80211_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index aa99ccefd248..393c703c29df 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -722,7 +722,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FHT_BITS \ "\20\1NONHT_PR" \ - "\23GF\24HT\25AMPDU_TX\26AMPDU_TX" \ + "\21LDPC_TX\22LDPC_RX\23GF\24HT\25AMPDU_TX\26AMPDU_RX" \ "\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN\33SHORTGI20\34SHORTGI40" \ "\35HTCOMPAT\36RIFS\37STBC_TX\40STBC_RX" From nobody Wed Jun 12 19:16:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJN2scXz5NHJq; Wed, 12 Jun 2024 19:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJM710Mz567f; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80wgffg2vkfVU2vqcQQ045O4mNaydAf92ZIp/PuPTzs=; b=T+ZlA3H/WCi691OtHm9hGxyCUZu0YfvkcXc+QXm8DAZqlABWdLm4MsadJ3Fpv+CMHs2UUe csfVItX2tFIX4/b3vDBeoQtt3DEIJoUHd4rTaF156HlgiD7cM0ZA4hbwo7prWFXtgxSLrg XIBPqUQoT0h/Itc+rSPmiDVcYkTXBGZtQU9lX1VG1r5uitQ2OAqlNESZsmWtEt6REsmbhk j8eJzm4ekCtjRWG1AgzSJnWPYFRR7ZuByg4FW9vgxAnzw8rJsjmaQOV+chJrzk0At4YmtR s+GMDrdl93eqt9G03YRhpuPVq3JibhsZw0N4Wa1PFmi8p4iK3Rqwp74XgONL8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219796; a=rsa-sha256; cv=none; b=LAsMgpJe5fMUWYd+tr4V1enOJdpNYDtkxjXGEIkzAQh2N8L1j9ODS2zvrQyg4hlKIsUDNG BeSx0AMvlwGCympr7UmwNUj6/3Gaq70HSZnDAn5O4UPVsereCq95+EFti/MpAheQXHUmzE 78wIrw9YUSE4kc2f788lwy1lO0U/dIVvZHmq7c8UfQVWEFBc7BAuok56TinIridE2PCTI3 awvjPxY1wsWqDi+tr7hKCD02LajsCK/y6JqUDit/rZ11I3VDKrxdSbk3jgrvadiWVkXfoa bBSymkzDrFb66iGj4s8DwCPN8F1VtoX6zcmiD+TeuzXtua48eWECmSaMoOE8jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80wgffg2vkfVU2vqcQQ045O4mNaydAf92ZIp/PuPTzs=; b=O3zYVoYI0I9gFYzpEQtrLxwyxRfkWWKYpx2garY/arRCG2QkgPnXmQBtE431dj08tZ/swJ VnEZJX3BeLxdUi+1IV8lUtrPhpVxRyxBL5o3+i1Z4M04wPFw+CyKIHA+SAHMftYNAKT7lM qkiHwpWt3Wdki+j9H0hvjrtOqrPWGfqTroqLvrctPxJfpuE1nTjfY4zsUS+jRw5waP1BaW EQAUKcpvHWvgMzm/GXa3SUqZmZzbdgn4UkkRLG6nwew1deWaGD/7Ckz7cBvwr07x5xL4Do nOOxhYuMZt/Xz/r83q5qg+P40P+8gtg61uhNr4A3wMYEVNA1Ohg3OEnQNwmTJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJM6bryz14Tp; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGZUG003551; Wed, 12 Jun 2024 19:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGZvw003549; Wed, 12 Jun 2024 19:16:35 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:35 GMT Message-Id: <202406121916.45CJGZvw003549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 999d1558b1d8 - stable/13 - iwn(4): correct debug message: "not" to "no" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 999d1558b1d831038b257de49a1f77178c962086 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=999d1558b1d831038b257de49a1f77178c962086 commit 999d1558b1d831038b257de49a1f77178c962086 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:01:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:43 +0000 iwn(4): correct debug message: "not" to "no" Sponosred by: The FreeBSD Foundation (cherry picked from commit 9e012a9da5df131b64c2dfd7d9b6645af4ccef0f) --- sys/dev/iwn/if_iwn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 2cbde90782be..4091bf135ae1 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -7520,7 +7520,7 @@ iwn_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, break; } if (qid == sc->ntxqs) { - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: not free aggregation queue\n", + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: no free aggregation queue\n", __func__); return 0; } From nobody Wed Jun 12 19:16:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJP21Xqz5NHpF; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJP0sp4z56Ql; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k8BzpgY1gFe+MdrEKdJml4fMp048oN8rhOdSGmpCeM=; b=UThkeYDULyMwHUxf5vuLvxTeZ5GIU1Exn2UHVbDTRkI1Q4yl5xlgMwm03mBZDz0+RfcRc0 OogNBLGIaX32reURASQA0p19KFo0pI1Krw4EUfsSGoZTMyuaPIE0eS4nXrAV4FQZLRLnC7 8KJvrRMUCasTTQFBnXz9OdJPSR7iUD2PBco13jLLVNrSEWAzYKqhdPopNiUNawYrkWUYVj Qzqn91w5C7hcRiPPglr8GEhg0JGhdtn4t0XhPMyrFRSDagguFKxx3+2WKRVATLoRc5SX6v j4BEsBAhIDNnhPiohZX2EMHZd4usMvXb9JAfAzsprwnX/CNOivDZpUDxFuCGLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219797; a=rsa-sha256; cv=none; b=L2QHNAb2Si6UeZ72saSM0ak4+zei0XgPbH/BfeQdwwYU120MoQ0hv3FPKfULai35m+Srmr sUnGIr+QFQsC0yyc+A3YOQFjY9hW/NBEOWczQebxQq7BNwWMEnOLLODLtrs6hkvmnkrsBR VVEzEHvMsKQQujBZpUYnoHRWZwCabG69XdOviSpOMcVgOLWPCUOZaRPThtSs28FhJx9KfN 1g+gNkkLE4tDf+jtOFIvpjfmX2uLEkh5IkiD+5qEjREQnhHOBqPfwl5B+jpsG/F4ttcqhT q+Ax7UAicwpBX3uMc0yW7t0VUhNPtVpf2NcfQ11yidpfj/qsdBch8CtWJ+aNZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k8BzpgY1gFe+MdrEKdJml4fMp048oN8rhOdSGmpCeM=; b=pLyLmWPPwJIMWyfQDemUJM0uCvhol3YfT2xWJokNVyrgGYFZakhnAdowKJ3RpvxuCUqp+a WCBm2njZnOkznPDL6ggEEnjtNBED9wkKeGOd0Isr3GjOE4fAyrgX2GmKLgfgMmqTVhVlV9 mfyPpi1SHC0ZM/RGd5snxPFrDsncBaRNrOHX9iZo+ifYphrXGahCxXcYNifJWOnFjlogd8 mjQPkI2ofBO6/Ojf1waZ0QMxRc0jRT2WjxutUwItoX94b68CW7Iq1NFIW7jNvZbsac0Y6U 4jKqFvJbe2qagdh1eGmqTJN1yW3IFEUtuQwjcg5iMKI52JyP1nOU73vco1airg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJP0TByz15BD; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGah7003590; Wed, 12 Jun 2024 19:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGaRb003587; Wed, 12 Jun 2024 19:16:36 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:36 GMT Message-Id: <202406121916.45CJGaRb003587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 98cf07160021 - stable/13 - LinuxKPI: add PCI_VENDOR_ID_ITTIM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98cf071600217600d33a033063e71f41553dc6e2 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=98cf071600217600d33a033063e71f41553dc6e2 commit 98cf071600217600d33a033063e71f41553dc6e2 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:40:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:48 +0000 LinuxKPI: add PCI_VENDOR_ID_ITTIM Add PCI_VENDOR_ID_ITTIM as needed by mt76. Sponsored by: The FreeBSD Foundation (cherry picked from commit ce707e674f7941c0743e72193c433fcf554a82b5) --- sys/compat/linuxkpi/common/include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci_ids.h b/sys/compat/linuxkpi/common/include/linux/pci_ids.h index f23cd7d6a124..b52ecc525db6 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci_ids.h +++ b/sys/compat/linuxkpi/common/include/linux/pci_ids.h @@ -51,6 +51,7 @@ #define PCI_VENDOR_ID_HP 0x103c #define PCI_VENDOR_ID_IBM 0x1014 #define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_VENDOR_ID_ITTIM 0x0b48 #define PCI_VENDOR_ID_MEDIATEK 0x14c3 #define PCI_VENDOR_ID_MELLANOX 0x15b3 #define PCI_VENDOR_ID_QCOM 0x17cb From nobody Wed Jun 12 19:16:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJQ5Fkrz5NHbQ; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJQ1sMcz56HX; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYnMV0Pap9TSfWNXc6mmwWaXY4XprPFj3QrJegs6ENo=; b=aALlUNtVL/P3GHaPVv3l9/+qYKjw0MykhphNety1zErrO1XKtSIbinR+tNOVyIQmK0Byu6 6MSF5x2dkuD36UX3OS/3GZJiZKHwpl8PMDUv1aJPADrYoCTUPxoZTcaSIuzPTlvpaZDj4Y +c6Bn3yPtvTv1xUC5cSDzmQAZH8tReMrgDyATyOokmGrPK1TcGQ9hIhMSswEpWW7/tCm7/ 8OvzeL1pk4in1I418GDSibP5mFhQhIusHonNM4xmjeM5RbRjdBl7UL2CykP1Yg+hgXmL0o PAaVmA88Zh7YbJBQeT3uGwNRcF4rtThPdIfkntOoMpYxmyfCvAeA4/Z70tLjIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219798; a=rsa-sha256; cv=none; b=NE5Z7T1VWHJTi5npQLz3zcan8JxLz+Yz5XQr/WAOduolz/8ARXpPUWRbAEzumRJMiRzrhB RD558Zjt3Mryt2DCmjWg/a0xRvudYElzKt1t7APPRn/wfn7WGDJr+nVWumGnXyiuyi+hrB ldSZN9gdXyJhRKixuC2QmfWBXiimC5Als/FAU97Ac1tR+6otAE4CL0/bzzQFbqnSqBWSWM sFaqaFkl/3TpzaSATwFjFpg5RDKclLm3oFcYDBYTPZhGD6lkf5Afj4lxYLtlFFYuhUM4aE 8OJ6EE5Td1ecTDFjBY+9VxSrsuEClc85jYxMxWhBACAF6fOw3Xp0C19IJKirJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYnMV0Pap9TSfWNXc6mmwWaXY4XprPFj3QrJegs6ENo=; b=EG5iML7C28hxbFngwCXXxs4i1P01hXQN0cN1mux4fsndQsQulJDloNDfXsxqxB1Fbdaj+P /wAHXZjayFVGn7rtpfkB0GOfLaYB9K/GHxR+51yRO54VF3f0QbcLwNq9T8qTgv++FzgDnh +wkCtmdyaL2cKf6UpG9bAT7XpFIamEGzc9sxWJye1U02Y3ZocFSw8dELLCwYwh8JriGZ0v SJBFDprt2uNGb/MJWS6YaF9a8eEfQ4qCIdlDUt31CdxDKspSvEwqq2edm85lmwai6X8By9 7DZsVb66L9dcAVtmX4xUKoAK8Hywip55d/oED0xpfCnfQqOZFPiCY+7kexh34A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJQ1T2fz15Dk; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGcXA003638; Wed, 12 Jun 2024 19:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGcuf003635; Wed, 12 Jun 2024 19:16:38 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:38 GMT Message-Id: <202406121916.45CJGcuf003635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f1146027f1d9 - stable/13 - LinuxKPI: add further constants to pci.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 commit f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 Author: Bjoern A. Zeeb AuthorDate: 2024-03-31 17:26:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:53 +0000 LinuxKPI: add further constants to pci.h Updated wireless drivers require more knowledge about PCI (BAR) bits. Sponsored by: The FreeBSD Foundation Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D44573 (cherry picked from commit a1cdddcf1596d258ce0b01b156dfd9921bd60e08) --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index d8ab851435f5..5e859e1a65c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -107,6 +107,8 @@ MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ #define to_pci_dev(n) container_of(n, struct pci_dev, dev) #define PCI_STD_NUM_BARS 6 +#define PCI_BASE_ADDRESS_0 PCIR_BARS +#define PCI_BASE_ADDRESS_MEM_TYPE_64 PCIM_BAR_MEM_64 #define PCI_VENDOR_ID PCIR_VENDOR #define PCI_DEVICE_ID PCIR_DEVICE #define PCI_COMMAND PCIR_COMMAND From nobody Wed Jun 12 19:16:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJR4hGBz5NHdp; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJR2yCQz56J2; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3km4zg+HDVWdqomKnjU9cp93AACkolhQSO6vzICJgvo=; b=xSC/Ia+XNpBXKuTwHkboI1tEU2ZFfs8syZbE/hcSpUzgECy8bS4XLJAwpwq4XqrjhwQgJY gQVthLRfQL7jdKCHBqBcKUuDGkcvHLZz9RBGioewXlIS3bYRxK5ipXHA0yXnax9C8Cb3cC EGVFK/LpHMNvJreuJJDynX/u0KK6wXQs498mTFdHaSNs9tghyr1oxQjBFN68FhDr6pNpY3 hO9uvu0NExlmlgV8IwjSMhG1WRO+G8dFObdJI7g9wXQZxlVNAzXu6KqqC+Dc6X/mP0U5WF WMhSGsHM0Ne4UsUCHvGGaHghjcv5aowDFmqasrWtuONIPMAQ3Z86n0d1tVc8wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219799; a=rsa-sha256; cv=none; b=LNjxFMxaC7T76CNeOe8zmZ8IHekfywaX8Le04nNREkSA5aCO3utxjUPlWOhJIZEQpKS41g h0AJktSQ/Pwl+BQT9w5oS3Fo3B7+s7ntYUi1KpClFqt6tvWv1oNs4T1xCbOrEkgHyAZtsZ eK5s2wJiD3vFOvQ87cXpPAPjSZoE+Sc7ARnnutYfqCjwoHy5AEp3uboZ2Bpp+LqmPL0kOB AkrxRnU681OxLWiblkMCO0TaYxMc+yZuXujSpEQBR/ASAspv0KX5V18s/9be+Nvi62E7Jq xMD1oC/2HE5XKs9S/9fLKClZidi3q2Wzo6iotWsKT0MaeanaVe3OWBQIYIgTsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3km4zg+HDVWdqomKnjU9cp93AACkolhQSO6vzICJgvo=; b=d7CbzPQAZTGDg7C3JPD0PALWZ82ynnpegyKhY5553A0mCQEJXqpIPOhWfuHVoq9gMlHxJ6 vqWHKUo68iLxaB8mwOUOpWaebel3B9P968gdXM37M4uM9L6Ixobl+WNLtteN73QLTkb9vz ZFFsPxOA3KH+GmPHBJDEc+kAaSLlL2vkroYfCVsFaeX+s57KqR7Q2tHcjNdcwucxA9E8aR qpBGXqAAyDsszL5IMtEuuAhS3ypZvnDxjBPcLr/ioEWqSfF8ABC0RGu4W49mjnmXl7j0O5 2xNSWzbro2AWcs3FDPzbvoxfMmlCaPWC6tp8qeu6TCWeFO/d4gwzjVaEMld8mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJR2XC9z1584; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGdTJ003677; Wed, 12 Jun 2024 19:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGdnN003674; Wed, 12 Jun 2024 19:16:39 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:39 GMT Message-Id: <202406121916.45CJGdnN003674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 25878310adcb - stable/13 - LinuxKPI: implement memzero_explicit() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 25878310adcbb361b31bc89b34f744c0c5a29bb1 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=25878310adcbb361b31bc89b34f744c0c5a29bb1 commit 25878310adcbb361b31bc89b34f744c0c5a29bb1 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:30:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:01 +0000 LinuxKPI: implement memzero_explicit() Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44586 (cherry picked from commit 218b2ccf8cc90698487515c681f3e3453b0dcead) --- sys/compat/linuxkpi/common/include/linux/string.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index f745c2f6d343..06dcdbd97663 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -273,4 +273,11 @@ memcpy_and_pad(void *dst, size_t dstlen, const void *src, size_t len, int ch) memset(_ptr + _o, _c, sizeof(*(ptr)) - _o); \ }) +static inline void +memzero_explicit(void *p, size_t s) +{ + memset(p, 0, s); + __asm__ __volatile__("": :"r"(p) :"memory"); +} + #endif /* _LINUXKPI_LINUX_STRING_H_ */ From nobody Wed Jun 12 19:16:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJS69Kqz5NHmW; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJS3nKNz56Vy; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=yl7kC8TT6OQf+wyfL1JyL1FxZJ3Smv9bcnkCK83RltTkNYEO2M69URg9qZ7ZqWydAlPF41 jImwncwl1b+cutP2CCNtR1EW7Adxo1WC/2HuFM9Z23D5mbIaGW0M9ykAioiKpH98Bw+E6e tP8fyQ9AA2G+MEFC0BLDnd+qijgAY3eSHwCFxwSj63QxPqElND8Cz4dYwMDNrG4BCegOZB mPOBhbHZizvy7539IFlVxYzzW17ul40mlZ0fdfN7Ee5qkE9ZL85g6P/uMF5pYICqU0UA+G 8u0KujEEN79tXgo7zGZZLygoRDUDz2Eh8gt04SXlRg/tb2g2Hz059tzHNymuZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219800; a=rsa-sha256; cv=none; b=oJ4rSZ69kktMFVT1bIrOAeWE8rCm7zsyhg0RIkwIi7UOzbFsNdScr94FlL13a5iwnquGPQ HncCwV/nRNLYrcyZnVHhLAVJtj0uZg3e0v4aVG3NeKbQKSNTaa5r2Oj0gekdagOgpaNv9u dWJ6tADuyDUDa7nvZT565+TS7sHZXwDp57pevCbDte4gIxemkH4zawvd5RSELSRVi7+pCJ e07bgQAT19vkcG8JX6htg+WqLBSasQDDbnG82bUJ31Q1eI5SsDqQ9j+61inrR46/t/T8E9 2ZVl9oukoae2rTofDeR4WXy7bTYGunGwhG41BkslqW9ZwzKjuDBk9pNIipxZ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=Ci0yMCsdl8DL19HjUQQ2OLMxrOhcKL0UF11UWZKWYqYu7/bPRy7ODMQzOQvxkoOqjPTwMq 71CsKS9I/oWtW/CAlJZ7aiMKqUOBK+dhvGFXvAnQ3zKamLcAo1yZTFZjxA1UgNxgNeMsSG pvs2maiBS1/a5qhcG7udOPOdxmnvJQZdumMHQ1SHEYv/6uUPkSke3g1MV+45janqaPuqH3 2QVPzB/1wu/Z6kal/+sjuOsredPEk83zOXJ6619/IPik5HPIA/O5E7LJ4jVDZ0iTcL77+q 66Oq08rbBDIMjlYGVqqa0C3MUhvZ2XzvuhTGD1mFmSeoClGXJshs8SPbLmqjXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJS3N9Xz14mQ; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGehM003716; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGexJ003713; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:40 GMT Message-Id: <202406121916.45CJGexJ003713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8d796198774d - stable/13 - LinuxKPI: add BITS_TO_BYTES() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d796198774d0908f7a1328fa7257b37ed665a35 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d796198774d0908f7a1328fa7257b37ed665a35 commit 8d796198774d0908f7a1328fa7257b37ed665a35 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:48:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:06 +0000 LinuxKPI: add BITS_TO_BYTES() Just like BITS_TO_LONG() ... used in rtw89. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44603 (cherry picked from commit f674f016c03d49e14f1c651ed088a6f2d01a62ee) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 58677631b604..1415d5224084 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -54,6 +54,7 @@ #define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) #define BITS_PER_BYTE 8 #define BITS_PER_TYPE(t) (sizeof(t) * BITS_PER_BYTE) +#define BITS_TO_BYTES(n) howmany((n), BITS_PER_BYTE) #define hweight8(x) bitcount((uint8_t)(x)) #define hweight16(x) bitcount16(x) From nobody Wed Jun 12 19:16:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJV1K8Mz5NHmX; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJT4nkpz56bX; Wed, 12 Jun 2024 19:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL4ktS6yAerSScC7RlwcpU/06gJAEnKcjds9H42plLE=; b=FGLK/XLmlGtS8OLIqLTdc0VZVzKoBZHWC5uenGHSN9igxEHioYlQqfLCKbuIXSILQDBpR2 Ro9WGjeCXk5aNVf0h9hT5tP2Q5UUka7V2hmF9n8C2WHfSTvgiqMVfyuOtJnAZXDLkQfKKw CxDfbguZnDAKjqfLbGVey4q5UiHxP+kuRhS2fQLKeAZ2uO+VQpwCL+PhL59lA2V1lqn9dR YWU4nAqStXCQ8DcsyVHRpfH7Ii95BajozmpC2FZzibfuE0htA7vRQPscWfMGpcQn0Atu4+ f1Uu+XeGOjnoKMHgnNcIrFjbjK4ipyCEem09/QbBKVV8nIqysk/QY/FZc4U3VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219801; a=rsa-sha256; cv=none; b=Uh3gxlhuVO4VnjRyM9ikM/A6qjEFLQaEYeCxjdT/X4cMinADN1uex3vs78+BpCPN2hzogB p38W5Ojx4nMcABteGRQBjKrrMf4Q6AhV855qDVMhUzMpTipw4a+2ygH7fX1UHE37sXzVuF rOFxO3LbVmcWY9JW3nX43zcvcaGHjJSMdNDDXE4YXX/JaEkGvWY3aKxAyYgDRM+koeSOHv DtjSis7wzJ+N5OpC8Qdk99qupswurIejGvmPrRe0+H3EqE29rZj4U4yeR/esSbUxedPLVb QepyNlM7Yx9wkczAcWaY9FrpOIdSmT4C8X9pfLNmO7sTRPtvTO2EjOtW+A+6Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL4ktS6yAerSScC7RlwcpU/06gJAEnKcjds9H42plLE=; b=cBaJ8fl96bquHNtotegR2NVZ1tTuH6b4LQCmTDXQgOYs3e/djBoeU1XqmSMzJ0KujFkfs9 JmsYh1NOqGLP3fPqvuap9FpMCNKiCY2fIVqi7bDHU1CNGOIuli3+NWS35SFo05viu+I5PV PSDaghPp9y6Jo9GNqmjUqDOSdr1lQ/ycZLAwjtkYVjLQdArX/0o5dVfEC9Vaxct6S7ExQ7 zNdCswWbdVQ5htmol2+Zl80hzpwO8P94ngnfba1F5kOBjnKfWfiFutEvZqzP1vRxn/BXOL uDnFIvERELkoWgNn4eoQgzCPFgPUBixDaG8uBCDNwCpo1NnUTfhXh3eZzCAIww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJT4PsQz15Dl; Wed, 12 Jun 2024 19:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGfOO003761; Wed, 12 Jun 2024 19:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGfXE003758; Wed, 12 Jun 2024 19:16:41 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:41 GMT Message-Id: <202406121916.45CJGfXE003758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d5edaf3cf216 - stable/13 - LinuxKPI: add dev_alloc_pages() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf commit d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:44:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:13 +0000 LinuxKPI: add dev_alloc_pages() Add dev_alloc_pages() though it seems a weird KPI, not passing a dev despite its name. Used by updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44588 (cherry picked from commit 738c02ba24c66391870067602f1c9c030d5c5e5d) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index c5de09e896de..2fcc0dc05f29 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -138,6 +138,12 @@ __free_page(struct page *page) linux_free_pages(page, 0); } +static inline struct page * +dev_alloc_pages(unsigned int order) +{ + return (linux_alloc_pages(GFP_ATOMIC, order)); +} + /* * Page management for mapped pages: */ From nobody Wed Jun 12 19:16:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJV6pfbz5NHbX; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJV60Tpz56fB; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=vYTq2JN/qDVpQfN2CbBU2Emk/v8F1vDKEIrWL/3+L9RcvBSfMAoL7JkNMFSuavFQuz+qCW ouE9rdBdOE7e/CiFRueNhHLyz5dXNdWr8f763PnbV4KrgguGQMBR2hsJvyrR7I4JJMH2Xi P+Mvpbu9Gm1dG4j1M2pBadiZR/MhVjAf2H4t+syiKKZmshvCURbqh4yG/jVDj7q3bzHo0p 6/EYOUr0d6JPtHyVLwyBkgxMRwt3QCnfTi0d0bATWtK5dUy3WsHLITQ9aITrB2UknzJPAf 15REUOd5V+j5YqV6hGJNJKTaDlYHyj8ix05nqCj+GOk4vHMGBYEngym5MOHyTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219802; a=rsa-sha256; cv=none; b=lHjkcsOyiIHkUhM9cUvjo/aC6YIyfaV8WU1zXXcWMpScF7Uf3pw29SJhNiKRxgHzUWEQ28 Kij+CMX3WcMqxT7NyazKYL3L5vmwdq+5FihV5E9BPE+CYAi/cs1/KQlgtGuRodgoZ9RXu7 /CFK3XIsuYPUjCQH6rW26vE4EdqQ7gVmMBkyHhI4wPgHpglDSWqugznPbnEYcRbys1wQfX 1XXKodMRK/fZkVcwRmL/NMxgaI8saBYVoKURUsD9fWBgp6UKM9uTto3hA5FPP+v8i35vu0 j4r3l7H4oey2I/PKTGTfSm68ZeLbA7G8Ms3eQW1Y33s0y8GG5QGOB4KM7TF1YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=Ndwb08PaqHrZ1KnK3/oYVZn0ePGZK50xKv9OAyVBNHOS9mSZst19j9kXtigb8iyy3oRLPz r+9btfyqhfW1zWSWnzkHpknahb+T2l+fNEE3CF1mZxurTnMvXoSB3X+Df2vy5f7TuOYmlL 5JbZG9F4MetbIuyLmCf5VzzXWjZ5+1N3USg3fhuI8/tLzaJ9VpNtw7rLScuE/XzB0Prv/S d/JJeNu1WSNX79OXtMv+HvGNRzCFUgbiVLTfFpg3QUysBt29FupfGrQNDWq4FOQh2TZczs 3lCyeNc9q9BM+/y2PHBdLSos3YPuwhrNmgcUyWD3wdhxOxnHaQm1PTzaFjjGmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJV5WyLz15BF; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGg2h003803; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGgaZ003800; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:42 GMT Message-Id: <202406121916.45CJGgaZ003800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 425edb6fc2d5 - stable/13 - LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 425edb6fc2d5e1fcc38e8e194639980d1115b511 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=425edb6fc2d5e1fcc38e8e194639980d1115b511 commit 425edb6fc2d5e1fcc38e8e194639980d1115b511 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:17:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:25 +0000 LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() Implement skb_queue_splice_tail_init() and SKB_DATA_ALIGN() as needed by the mt76 wireless driver. Sponsord by: The FreeBD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44590 (cherry picked from commit 3d3ec17825a124f0119d76c4d2523d73012fa226) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 02190a29e241..ee3f427aa6e9 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -89,6 +89,7 @@ struct skb_shared_hwtstamps { }; #define NET_SKB_PAD max(CACHE_LINE_SIZE, 32) +#define SKB_DATA_ALIGN(_x) roundup2(_x, CACHE_LINE_SIZE) struct sk_buff_head { /* XXX TODO */ @@ -824,7 +825,7 @@ skb_mark_not_on_list(struct sk_buff *skb) } static inline void -___skb_queue_splice_init(const struct sk_buff_head *from, +___skb_queue_splice(const struct sk_buff_head *from, struct sk_buff *p, struct sk_buff *n) { struct sk_buff *b, *e; @@ -847,7 +848,21 @@ skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) if (skb_queue_empty(from)) return; - ___skb_queue_splice_init(from, (struct sk_buff *)to, to->next); + ___skb_queue_splice(from, (struct sk_buff *)to, to->next); + to->qlen += from->qlen; + __skb_queue_head_init(from); +} + +static inline void +skb_queue_splice_tail_init(struct sk_buff_head *from, struct sk_buff_head *to) +{ + + SKB_TRACE2(from, to); + + if (skb_queue_empty(from)) + return; + + ___skb_queue_splice(from, to->prev, (struct sk_buff *)to); to->qlen += from->qlen; __skb_queue_head_init(from); } From nobody Wed Jun 12 19:16:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJX1GSVz5NHbY; Wed, 12 Jun 2024 19:16:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJW6qC3z56c9; Wed, 12 Jun 2024 19:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgXisdiLrz8/MJSdl5/f2alnmx1vxk7BalmPdQpwcag=; b=cz/auIlqS2RIuwcTnRU92YjmZPhK4CLYSZny0dgO2M/rpGzYMNYHwk8CGVVXzFj1oTgQb2 9HPW4neXKn4+rm81PVdQmNh/V3+JBjZXFvmRWIpIyiheaqDxDYNRHRrcPM1eaj1vjw4xfm w1IQUHwN4Z+XAr3S2IRae7TUKn/3Nc+knkqLY20MCVMD2py0FthMrrreqj8SMK8oaQeq7t BNAeYKq6e+ktbNghs4ttwVxtVX65wtXRwhAYhw6g7drPvjmjZ5LkY32QbtCkT9MHCFVrcY vEegl6K4lArjqsFlpecGmSGy0Zao2hj1887BWOVREHtlHYfrZqQBzVs8ZE6PuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219804; a=rsa-sha256; cv=none; b=XsYDBX/NT79sgLUsSvKD2I2fmIyX1OyPUkb5xpB9a0vLPXaFVIkGVx+Z7RQARoLLpwEdaL rxZtyk26JlP8FZvju7m9bmwefLm/USrhsssGFGIto4BlVWfI7GVCK0fMDMfka8WOsDFuze 5xCqmtcUJ+L7UfixGY2QuJo5e9kJWmWQyjQGTEw7v/AUuXMPTiybtttMqGRJNKZ0gubkK9 hUza7fmhaThcLnczkNHH+FjI1NkmhqBr7tYq6uKzjJl4YaCD+qVAMnvGpAsRPXXWiiOsFb jxYb7T62or5d9mGRo2JBxROWIAOatOITV1WI62vMWoaIfL3pPDDcO7gwh5UeRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgXisdiLrz8/MJSdl5/f2alnmx1vxk7BalmPdQpwcag=; b=BfLfIwwrlEmbgw1BHxM7y7wqRcW9/FS419M0xKhaAGrCKP++FN9uOSIYa4nkd7sg4HVU/N cxsM1VVVsVCelELWdWir18pBNac9V3Q2M9MWedFbDyKLfTdMZRrc+3O5G7dMzQpvHBosDU xFGs6l66+2NzYFA75psH9t8DmSpfJ5RNgIAQPzHqdw1RiN4+IAmBXaNaDUWPNrbxddk1vn ut0VKeJHF5RZ/C+Yc6QTu2eklaEOy96qpcq1Mjj4PtP9kWW8EYoSOTCDOGwYST4SxXQtMU NDdANJK/hNYUivZB2DYPYV7aSmXt29gm+VGboLvRy/ZjK8vXcDv4VdgCSUpNBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJW6QtCz14xG; Wed, 12 Jun 2024 19:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGhUr003854; Wed, 12 Jun 2024 19:16:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGhZj003851; Wed, 12 Jun 2024 19:16:43 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:43 GMT Message-Id: <202406121916.45CJGhZj003851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4d9e8a65d031 - stable/13 - LinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 commit 4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 Author: Bjoern A. Zeeb AuthorDate: 2024-03-31 17:27:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:33 +0000 LinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled() A newer version of iwlwifi requires a return value from napi_schedule(); unclear if the function always should have been bool. Add the bool to test based on the napi_schedule_prep() result. Also add napi_is_scheduled() for rtw89. Sponsored by: The FreeBSD Foundation Reviewed by: emaste (previous version) Differential Revision: https://reviews.freebsd.org/D44591 (cherry picked from commit 21761f2ede4ebad13e78112b9409c1f20f946781) --- sys/compat/linuxkpi/common/include/linux/netdevice.h | 9 ++++++++- sys/compat/linuxkpi/common/src/linux_netdev.c | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index 02734585bf63..12ff307b3ce4 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -233,7 +233,7 @@ void linuxkpi_netif_napi_add(struct net_device *, struct napi_struct *, void linuxkpi_netif_napi_del(struct napi_struct *); bool linuxkpi_napi_schedule_prep(struct napi_struct *); void linuxkpi___napi_schedule(struct napi_struct *); -void linuxkpi_napi_schedule(struct napi_struct *); +bool linuxkpi_napi_schedule(struct napi_struct *); void linuxkpi_napi_reschedule(struct napi_struct *); bool linuxkpi_napi_complete_done(struct napi_struct *, int); bool linuxkpi_napi_complete(struct napi_struct *); @@ -275,6 +275,13 @@ netif_napi_add_tx(struct net_device *dev, struct napi_struct *napi, netif_napi_add(dev, napi, napi_poll); } +static inline bool +napi_is_scheduled(struct napi_struct *napi) +{ + + return (test_bit(LKPI_NAPI_FLAG_IS_SCHEDULED, &napi->state)); +} + /* -------------------------------------------------------------------------- */ static inline void diff --git a/sys/compat/linuxkpi/common/src/linux_netdev.c b/sys/compat/linuxkpi/common/src/linux_netdev.c index 61ebcdbf7a39..61342395f03c 100644 --- a/sys/compat/linuxkpi/common/src/linux_netdev.c +++ b/sys/compat/linuxkpi/common/src/linux_netdev.c @@ -185,7 +185,7 @@ linuxkpi___napi_schedule(struct napi_struct *napi) } } -void +bool linuxkpi_napi_schedule(struct napi_struct *napi) { @@ -195,8 +195,12 @@ linuxkpi_napi_schedule(struct napi_struct *napi) * iwlwifi calls this sequence instead of napi_schedule() * to be able to test the prep result. */ - if (napi_schedule_prep(napi)) + if (napi_schedule_prep(napi)) { __napi_schedule(napi); + return (true); + } + + return (false); } void From nobody Wed Jun 12 19:16:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJY3tFnz5NHdt; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJY19qJz56X7; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbsv0DnGi+NFRChhOkK9Vkx9R1oT3GBPkwWDZXEjovg=; b=U15yasldaN/+MI7Una3dLOOewnGVzeJ9Rlyyaa4UxhT/BapLI6cU1R3NWWprBEo2n8iJvW eXr2tCwOWmLAKPSLOv7VNKi0ztKLuCi9oRo9t+GYEbHepHPNiuqpjQsHbdKWi6bfEBmurP 46WBJ3zMrNK7BUKCMXPN4guh49TQZNCYTcgTNy+/kC4L/PgpsdDWW6X8OOW+rB145q66Ue euCpZadMCpcWLNQeuGsKlHN5Vptg79S46pLxDxXIeUQUzKGpXrisUJsdGGxUCozJc1oI0p pFoCXxKgSaJZUqVvQOcHiqiZfxoxRxoYaEr/ghb9QzCbDiHzggFgCa9s3Irgiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219805; a=rsa-sha256; cv=none; b=dCDTE+G/8tZ10ZSx1VWsFNexUVAvROu6QewBCO/QySaWJ9dUV/mAsoSdyrZ+uwgX7wdNr0 1sw2U3nmC18F7KKivf9cJfY9w/9olmP1/yRnUxT8OjB2+QjzCIOgV0nMEL9uj24baLA0+7 X1hvuiQ6WeAYQx+VpLq/vtiUVzf3Oc2ZL8pUDowPXmfDObDq5YFE6yEDMTXBC9Ihln6jKl uNqt+uMjp6MK+LXnvdXvEnd0MoNtzIl3Jr4xMGpJqhHBhN+ApwcS4gb07wZupnZmycsBLz eycE0WDA7PBiRqATvtMN0PXZGCTmN3Iop6WZuA2hNTEqK4jtrMUrr2gWNpGGQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbsv0DnGi+NFRChhOkK9Vkx9R1oT3GBPkwWDZXEjovg=; b=MvC57WIWKUfjg9/2bogRqoHlYa8i51Ia7aDlQOMr/s0WV8Oz3GJHn6CO3WYSlRAcZp6gEO KmbDoMIHSyTAUvKaE0hDlykjA6u3fFKhwaoMTCfNE1NjB7XA4cxFtk5cnGDnzyzMts4Vsi mSz1vkmq5nQTtoenKt5RCEjtMmFpjyfCjDLhqHnHPDPjoTkoaUKfYuBpRFcXaATVVt4Fqp LKxrpYSVKy1IrHO4xPjRgBsJeiaIZogvxTu5K+UM1TIFo1pa/3jyyTX8s2hyrhqWStvh7+ 3rKNDNPsgiNzt1RKlpRhN3IwRJ9TFhYbhxCwB2E4tA3Z/wRz3euDeTUVL97F0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJY0p30z14xH; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGjQa003893; Wed, 12 Jun 2024 19:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGjbj003890; Wed, 12 Jun 2024 19:16:45 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:45 GMT Message-Id: <202406121916.45CJGjbj003890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e262be127d20 - stable/13 - LinuxKPI: add devm_kfree() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e262be127d20b193701b1bd127e2f157ace9d2ab Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e262be127d20b193701b1bd127e2f157ace9d2ab commit e262be127d20b193701b1bd127e2f157ace9d2ab Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:45:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:40 +0000 LinuxKPI: add devm_kfree() mt76 calls devm_kfree() directly, so alias it to our lkpi_devm_kmalloc_release() function. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44589 (cherry picked from commit 170c2e0e2bb1b2d9a7661ba729f8264381c9d9d7) --- sys/compat/linuxkpi/common/include/linux/device.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 7742750339d9..c20afda0d209 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -257,6 +257,7 @@ int lkpi_devres_destroy(struct device *, void(*release)(struct device *, void *) void lkpi_devres_release_free_list(struct device *); void lkpi_devres_unlink(struct device *, void *); void lkpi_devm_kmalloc_release(struct device *, void *); +#define devm_kfree(_d, _p) lkpi_devm_kmalloc_release(_d, _p) static inline const char * dev_driver_string(const struct device *dev) From nobody Wed Jun 12 19:16:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJZ3WbRz5NHph; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJZ2RHVz56lh; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8/PceXyILzw4gwp94Bzr/dTJwjmreZ7TImLTIj8PyY=; b=CCZVwvI2u0GQEHhBJNgeL8+MU0rM+iyqSPCmOvP4OGClDq1jzuHmkipCWcLgIQaCt1sB0u 2iVoGRNffIieGms04wF57691yfNMEtDd1cl1fIooh0eeXFdm9kbCeEc5Jqvv61VNG/N28H tlai9sBOuX085rnbi7h/8MLenBZ2MbzoxkoWz9P35ZSk9PmC2Gv8Q65SbRQe3RB4vmsJmv LAvWawcqEwgxVaOhGw5yG0/OQ+IeYcIVbi2C6ePEPHaKnPNIXQ5/VODcP/I9l3iCmcPBhG 2A2ivhwfwCvsj6i5zKTIlUdCl/ESydhioyExqqI0ki/D1zEz94Q5h/BYFOsIAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219806; a=rsa-sha256; cv=none; b=vlu6O7RfWZFH9ig/t24BGBwmzgmsQhnWQ5q/XyI3SdwE337lrCDUTySFRE35mgQVnzXB1O mGzVSNVov8EaJ8FDNzuTyor73oXwl+LEPmaEm8u6ZsgKDqyvwk2a/n57FFiMi4UKGIe+EH 58kGyTa1DEL5U3K9S8VpXYnHjV3AsCfsWk4zT8xonBSF0sFD4VNOcLCvVVJ825PtJIY9hW o5BCfQRCARaUNowZHtsKzYqW6pg0ZiNmG8OSCO3EGhQ66GPoxOunmSfIYArKWLsIqhwe9/ mAZEUHcZ12YdJU9CTBIoZ5otjy4ubtg0rFC56E+1ZMzMkcbrKA0oZKhAjZO5tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8/PceXyILzw4gwp94Bzr/dTJwjmreZ7TImLTIj8PyY=; b=Qk4bAy6NXXT7JGhO9qWR5EcFpKlsPc1aMDSk+x3OfOuN5QNp1Xj/mq6xwU/4x+X26BodvL G3U7alCpQirZT1Btim9FBxICrHBUHjPuR7qFR2BA1St1wmyai7IWS0jqkEsq6BUDMDPqE2 Rxubcc4tQbi+ABeerdz9mqdiKIsYpsVIicRyWeWDI+tj/WopJfYAOq2fg7qLxld2ouhh9T 8mRDZQQOHgJEOUQwEWIKUwjLt5pYe7wVRqQSudrfmfHbT/ZW4mTAymB4Dwbz2HLxON8dq5 DI7F4aYCceVMs9JOPtqjZNO/WMwn4F0nQAo7zrieLYrdw9+1j0x4unTL9YQ8lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJZ23h1z1585; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGkin003938; Wed, 12 Jun 2024 19:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGksL003935; Wed, 12 Jun 2024 19:16:46 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:46 GMT Message-Id: <202406121916.45CJGksL003935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0f87cc98f926 - stable/13 - LinuxKPI: add __counted_by() and __nonstring List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0f87cc98f92691957a253b78a5b6fba5f1824ea9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0f87cc98f92691957a253b78a5b6fba5f1824ea9 commit 0f87cc98f92691957a253b78a5b6fba5f1824ea9 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:41:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:46 +0000 LinuxKPI: add __counted_by() and __nonstring Add checks for __counted_by(_x) and __nonstring as and depending on compiler support enable the attribute/feature. This is needed to make mtk76 and ath1xk drivers compile. Sposnored by: The FreeBSD Foundation Reviewed by: emaste, dim Differential Revision: https://reviews.freebsd.org/D44587 (cherry picked from commit 2a8c50592f7fce8bceedf004f674a5a9eae0fd46) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 22300e73652d..94595b2e8c50 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -66,6 +66,17 @@ #define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE) #define fallthrough /* FALLTHROUGH */ do { } while(0) +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif +#if __has_attribute(__counted_by__) +#define __counted_by(_x) __attribute__((__counted_by__(_x))) +#else +#define __counted_by(_x) +#endif + #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #define typeof(x) __typeof(x) From nobody Wed Jun 12 19:16:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJc5NCPz5NHhg; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJc4VNsz56gZ; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUAy4bc5fDl5vUXmhMFDnbW9ZWpjOeMCmVyYi1Ee5wI=; b=wb6mmkaFJ/tqENur3GFCUqZN0bG0/QrLBHcgW5zCmlIrBf/lEFlbOmzQnQtLnCIgrovjrP yrNA7wtAxmLGJoWPqTsHEN4UOrv5tCD6dWVC1LdwMQjI3E6O8GBcJ/IKz6NZonycsgkTiK M51gUXimD+geTuObKOu2wJ1wuIrKSgpT0QoKqpZXIA0PeCaJVLYFYZ0I015jAcyRkZYz1f celFdKz6cHwRnOQphel9UWQse8lfNC7II/UiiCgZ6KQE+TWdLB2M/QTc1C4HA19JL8XWcJ A8P/6wInIgxXQMGMqwCGQ+sCvzKPBsawTqLy6iFwn2Bvd7p26KKD0r0Zt70Ksw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219808; a=rsa-sha256; cv=none; b=JcQHNDxuUCkHePDrjx1WIbWkdUMqmTahuWCbKfpsU3sZ25iCTK3ObvfKzB8Ml2o6kvH0c+ KumSn3blSXLll3JIbxNGxunCGsOVUqutaBzzbQeL6pRVMRELE9lsYagx1kT5QK9Usr71mw 0RWuIjBrUnqJsPn1M01mCUnRS6uAFiRZFHV8oVOtCuxKVrj3hitbgL7COvhdzLdKqqKPWQ pWt4a0gnJIjTqRskmFO9GBuXwC8FjNiZrJ/9EM8emQAd2LLUiDZJo1rGyhKfSAS8RYaG65 BNHu+E5ylIZQSZFEyO1d/KG6wMQLsWBsxUKm2w8CRZ3tbUshGJQJmJ6nCHLjCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUAy4bc5fDl5vUXmhMFDnbW9ZWpjOeMCmVyYi1Ee5wI=; b=aR2FXBoTjfY0SBZvHkJXujXvCx0gaFl+QvatsCItpAed34Vo0nxKWXtpzsS2MupQ4vGg+C uaiUnGBhYnrI1bk331B8egg2WBDpNNIyqbZAe7GKwDCBopUp54CdAt6rS6Ml8/SV045Q1N zIcZ/fN1e9m/8cfX1zbVdw56C8Lq6xa1mfjddSd/KSR3jw68TJ7X0G93wzCUl5fE8NPZsP f9fmardGmH4WW9hE6FJIEEBR8tPrWPwJ40+k/yi8mgHi7KIdqJiLpAQWC+yx+NO8qzJdcr tX98j7+uixATJ85+1FBejsAHvOjc4e4JdMypgG5UHj5ONnNIeqi/tkQqWSyxjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJc458pz14Tq; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGmYK004028; Wed, 12 Jun 2024 19:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGmwx004025; Wed, 12 Jun 2024 19:16:48 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:48 GMT Message-Id: <202406121916.45CJGmwx004025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 395833f4ea8f - stable/13 - LinuxKPI: add kvmemdup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 395833f4ea8f4852f47ca1473baf99239331379e Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=395833f4ea8f4852f47ca1473baf99239331379e commit 395833f4ea8f4852f47ca1473baf99239331379e Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:43:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:56 +0000 LinuxKPI: add kvmemdup() Add kvmemdup() as a variant of kmemdup(). While currently it could just call kmemdup() we duplicate the code and use kvmalloc() in case someone will change the implementation of kvmalloc/kvfree in slab.h. This is used by an updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45181 (cherry picked from commit 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf) --- sys/compat/linuxkpi/common/include/linux/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 06dcdbd97663..9302c95e8636 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -97,6 +97,18 @@ kmemdup(const void *src, size_t len, gfp_t gfp) return (dst); } +/* See slab.h for kvmalloc/kvfree(). */ +static inline void * +kvmemdup(const void *src, size_t len, gfp_t gfp) +{ + void *dst; + + dst = kvmalloc(len, gfp); + if (dst != NULL) + memcpy(dst, src, len); + return (dst); +} + static inline char * strndup_user(const char __user *ustr, long n) { From nobody Wed Jun 12 19:16:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJb6R5vz5NHpr; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJb3nf5z56rM; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3nILbUfAUuWw71hIkxgsVICusdVKJM5AzsR59zHYO4=; b=H4ioFi36FeV82BXxYnMz4ToMfaCVLeRS6VQT9aKyNGy+M9cKHWZ/GYqTY6DHEwpLgJViwr aNMxqiXECz/r+gou6hfZZjvdza0414pAaWWLrXpeGIqyNmcAkSOb9uOBMQBEg4OVgqMZcm iQtrfSDbkYlUPieoDzRE8NCtyrdckJ6OEfTeQnYHYMkMnmi7VT1EvrYmjkfSznbj3MyvDL tKQAnoudSL29w/BNsTew1Cj6wLaK3H8OLrbZTL6Pvrovsm3ZtMR0sW2R7J3oudO/qhNKvc pYXgzpKCp7RKNtvFY3ZjIwBoDNO0u7UTn9XimSL10c5vjfe0Lp/p6LHBVXE17Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219807; a=rsa-sha256; cv=none; b=fXS3Daq07MhI8l9zqAPK7l4/JquYOeZiKd9evUN7GDtb/hmnlu+7VCvsRgaTjXmtbL1ZFa aAhnJAfs498fGTrP1shnJ/qL81Drmd8SoMB3SuQjJ1f+BWmNPTYiInLHCHgXBWLezzkN1s 6W2oHiGAkJlYvnSLsEpyfKlhYIdUrNhJZc3fqgUHkd71ySdCSo9IaJTqSa9n8vcviN4+Ah KknJxcjOHUViYzVygCiV3pB+8JcmuLs7KktTKJIox1Y+XHUR/sxlrs0rPNAPfjNSJjEILU KDsvKcicMYarvJ3uvAej+ow1FhOGDGaVCOrfY9A08VLpsjDF59GP1f51XHQ8kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3nILbUfAUuWw71hIkxgsVICusdVKJM5AzsR59zHYO4=; b=iZ6+pkzPpjG1jgvlgh4wqS9K0cEz21+Zu9bC9D6Cmcw9n47cPUkYHszoY3rZLzzhqmQ6dd RM3UpxhuN3T4kebNf2UVpMrlUF2WJJhJVcO523ZWWSKohdgx9ZYkyq4GQr6AzOfT5csamZ 4Yo48yIm0mGQloRBNZDo0JQ+tnwvhaEtVM+Np1A1DwlcgyRrcd4T1WH4RaoOd054WyUSrp SBIsEizveAm24JxZxj4c1RXkYOG6o+vUG84Ko96KnE8phZ1rKGoJGlQEF7KlWbzgfX4l8P z9UMpYGPbblfC6usFGoLwO1QE1dl71oJdjINYm/GQkwys8uimcY5Pff/s2vCwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJb3Lswz14xJ; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGl7f003989; Wed, 12 Jun 2024 19:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGl7s003986; Wed, 12 Jun 2024 19:16:47 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:47 GMT Message-Id: <202406121916.45CJGl7s003986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c503386b189f - stable/13 - LinuxKPI: utsname.h add missing SPDX-License-Identifier List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c503386b189f2335bf1f4ee1597b6d7af1a87375 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c503386b189f2335bf1f4ee1597b6d7af1a87375 commit c503386b189f2335bf1f4ee1597b6d7af1a87375 Author: Bjoern A. Zeeb AuthorDate: 2024-04-19 18:23:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:51 +0000 LinuxKPI: utsname.h add missing SPDX-License-Identifier Reported by: markj (2023-05-24; sorry took me a while) (cherry picked from commit 563c72e2137cb8cb9eb0eabf78319e8fe9c8aedd) --- sys/compat/linuxkpi/common/include/linux/utsname.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/utsname.h b/sys/compat/linuxkpi/common/include/linux/utsname.h index e6c52f8a5020..3239801ca17b 100644 --- a/sys/compat/linuxkpi/common/include/linux/utsname.h +++ b/sys/compat/linuxkpi/common/include/linux/utsname.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2023 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without From nobody Wed Jun 12 19:16:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJd6W8Cz5NHml; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJd5VC1z56dS; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1DGpO7LZjZinw4EWv2q6PEryVzJVWKjk2OKXkqzkHs=; b=XDBHlwZARTByt1kRMGA8YXUA9X68/ezi9MSvchbCZPh9HKDsYR2q7kOuNEKEhQiB/HRFLJ L5zYj4nqTzJVsFB0oqh9HEmKWn1Ho1Hr/NDqftXoQjhCW+p6BDv1FXwd70arnAkgOKXuKK OJ9taxs4B+2J1ZblfoMjo0N8eXzAm8d6GbP2ElytYRbe3Gvgfc4Z8sourq1mtX5IUT/cnu RExY0DlEsLGtQ6S9omQNgNbDO0pP+1EzP4Y5BTQj8s9oFltel3rqJF77XweYSAgoILwzLX ZRK8QcvNBNQuelie+QB+alJ4UONV+dQ894gIjdIxxiXPvWbyjWVDTWJtVDlX1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219809; a=rsa-sha256; cv=none; b=jepdgqHpTpkF5Shvusmb4iWFDOaa+JUBl6Ej8q5BPDGSUL7GvfdtkhDSN0dMXt/9vP2mOq yXD3iaArK20Es97GIFLVxfcf746T2nlrCTIPiLkc8PQqND3vBrK69oQhziqtc4x3iCnZaO GIO+W27wkBOmcme2V8RiFjFDf9ZUtoGptt+3fz1781cAYOZKg1LElbRkKG4hqhYEWnrp/7 uGSo2Me41kFsVAAIvG67H54/oPkBqQIBiEr91oawPtSa/KBxgveXJya3UvnNIsCxHfAXCr y8LnlfuZzb3GQWlNX5oFLT0R3d5BbcCqE6yk5YCiTgP34TKxFWTpJgLCbjDrEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1DGpO7LZjZinw4EWv2q6PEryVzJVWKjk2OKXkqzkHs=; b=vBSOmGBr+LMjrYdwWReN+1ydIq1DVmVRCQ66jZLdsek3y/Rk5qOAqQ/JSCuZd6UngckEAj rTjL6S4AQvsfdJin8YUkmWYWh4Cs0UTf5GsWwY3ME0JI7kRjLWvjtnYYN62ZTY0kHkRZrJ YbnM1Z+XhJ0Bv54ionmqRffA4Nd4U6ycCeZd7jZ3aE4bSUu7mTLZlOmMNsa6PsqLOzkOAQ Yoq8RLG/RHEbUnZr00v+5vLoo2IY6S35JylMp7UpN/c9IY08xzDAt9JANPwLfF9S+0Yfcv IaqnisFyXwQOXsq7CQsY15onZTSqNpXvBZ9YVLfSHImiBMe68Q3PKZ/R+OuEEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJd56k2z1587; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGnZD004067; Wed, 12 Jun 2024 19:16:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGned004064; Wed, 12 Jun 2024 19:16:49 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:49 GMT Message-Id: <202406121916.45CJGned004064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 33929383594a - stable/13 - LinuxKPI: add FIELD_PREP_CONST() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33929383594abc079f8269e2837b49f265260909 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=33929383594abc079f8269e2837b49f265260909 commit 33929383594abc079f8269e2837b49f265260909 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:40:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:01 +0000 LinuxKPI: add FIELD_PREP_CONST() Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely expected on this version in Linux. This is called by an updated wireless driver. Sposnored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45180 (cherry picked from commit bb025df257386c5d1087b652e8ed951bceb89862) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index a2020d247489..8a91b0663f37 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -131,6 +131,10 @@ _uX_replace_bits(8) #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) +/* Likely would need extra sanity checks compared to FIELD_PREP()? */ +#define FIELD_PREP_CONST(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + #define FIELD_GET(_mask, _value) \ ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask))) From nobody Wed Jun 12 19:16:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJg0CHvz5NHf9; Wed, 12 Jun 2024 19:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJf6TQmz575D; Wed, 12 Jun 2024 19:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEGHpHBBWfNITX1bxW9uBbn5vG+Oo/Q1aVC1XCTBxmg=; b=VgXpG2Fu1SeAJurIfoTSMTNjSJxdHjA687twYnXG+fVhFv1vGEMOooWHSP79nEjkayloL5 t5nZQRrjEIHfyuseJdHSNMGYRzFPUzAzvwcI7G7OLgkWp3h/WkxRmevOL4jsdSBhiQ5rKE HiWfh+aBaY9q/sAZp6vCy1xdKnDjhSvbRdf+n3pPVldOlefTLK5xUFssAUdPQx3mLL4ULw 1oaK6cVdGhZ+2oH0EUTMcUkXtUFBeqAORCnnf8UM7NX2kBImjdu6NrK4VeAYKHhfMm++0v v60heb9yO4ueE50QsntoQkj6zSyYTo6L/zDtxKvXBsdmJAsLEv4RoRhRv2vnxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219810; a=rsa-sha256; cv=none; b=gldDqzCFL6Skm5gs0LzXsHFhn2Y0/TE6FwZNzTivCQM13xeu28gB/WdAs+HNo3NS2HwcDl ojX1gTL82WhoA+mk4B2VReR8C/1M0XV56FFbF5tWSKH3KsTo0BB3CNlr9xsa1j5kJTTEM8 mpInrRr0lFu10Kxx02s68jJWHA9CctHBwwFL9hgi9il4ZdOK6hKMPnjwGZreeSknhrmcdA HRcJHOZmtSnM7yGfC8yUvWHwhP9G01HiTZ3Icvggm54BNvPoM376pgINjHd2/Izy2r27zO lp+ZFBTGBfcrTR2xG89LQcUOTp2kWlBI2ZAWbYN2Ln97r9U7aa9iDc44Gif1TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEGHpHBBWfNITX1bxW9uBbn5vG+Oo/Q1aVC1XCTBxmg=; b=umFUqXVuSNMouPSxKofk5J6CQeMBOoCP1YE3xTs7ZjFY+LPpeD9Q9mXaRxAsUQ81bP2b+Q a7t1TinAtbmkTVMfg9e/TVU+yfI598NE2xwpNoiPYZ6FzIlE9JkvS6SSSrji/UpArWYKgQ Hn6/L9oDuxTJWMXn8+/i8O4ykhqOpxh/dTMMMcKi3i641ExQB7ngAaiCH7uSV2P9Kij1R7 AT2FTtm6tl9H7Jd8KSevN8n/Dk24xpFmGRVdJP631JR4lbUBUZAZqrKnyN2JH5f2G5TYyN YwVRnZwlSI5mkpL3OTirSrngQKUrsYTtzAmdOqQbr0XpBhGhkBHRtKZdgzjDjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJf63SQz15Dm; Wed, 12 Jun 2024 19:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGocH004118; Wed, 12 Jun 2024 19:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGoiM004115; Wed, 12 Jun 2024 19:16:50 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:50 GMT Message-Id: <202406121916.45CJGoiM004115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 323d4a20bd20 - stable/13 - LinuxKPI: remove extern from function declarations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 323d4a20bd202463b2da29b7d7d1957671c66619 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=323d4a20bd202463b2da29b7d7d1957671c66619 commit 323d4a20bd202463b2da29b7d7d1957671c66619 Author: Bjoern A. Zeeb AuthorDate: 2024-05-27 19:49:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:06 +0000 LinuxKPI: remove extern from function declarations Sponsored by: The FreeBSD Foundation Reviewed by: emaste (earlier version, found another two) Differential Revision: https://reviews.freebsd.org/D45386 (cherry picked from commit ecd1d1f1dac49c7ecbf1e7c5ffc64356c2851efd) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 2fcc0dc05f29..e5dd2e44b0fa 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -90,15 +90,15 @@ struct page_frag_cache { * * NOTE: This function only works for pages allocated by the kernel. */ -extern void *linux_page_address(struct page *); +void *linux_page_address(struct page *); #define page_address(page) linux_page_address(page) /* * Page management for unmapped pages: */ -extern struct page *linux_alloc_pages(gfp_t flags, unsigned int order); -extern void linux_free_pages(struct page *page, unsigned int order); +struct page *linux_alloc_pages(gfp_t flags, unsigned int order); +void linux_free_pages(struct page *page, unsigned int order); void *linuxkpi_page_frag_alloc(struct page_frag_cache *, size_t, gfp_t); void linuxkpi_page_frag_free(void *); void linuxkpi__page_frag_cache_drain(struct page *, size_t); @@ -147,8 +147,8 @@ dev_alloc_pages(unsigned int order) /* * Page management for mapped pages: */ -extern vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); -extern void linux_free_kmem(vm_offset_t, unsigned int order); +vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); +void linux_free_kmem(vm_offset_t, unsigned int order); static inline vm_offset_t get_zeroed_page(gfp_t flags) From nobody Wed Jun 12 19:16:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJh1xSQz5NHkF; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJh0wJ4z56vh; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgMbcaHN6TnYbNfMb3XlNI3GxFjCgWsQeZIK67yGH6I=; b=MTJ6RvyN7byGPyA8U7olsU3CSGvxJTfk0zZ2BslUSNZ6XiJMaX/UrOqT/oJJcifByMUxvj 2S+J57S5ExPrkDJ8hIIYThTyiFND2BNCmaSsPC/+UAyMuk2jFkmeYBmaTIeNI/oY8UrNqS WSuRnPUPxmQAVBNEvJH093DCDyHin1py/k78v+xmDdP9YOcdy1qOUI9hwp8F4d8CVs8n8O DIqTFkwEzo2g1jr+zbCT0GMDb75yEbnBuNeIrHFNE6pxZJOzDdZuU5BMV7sujiWPbIovuT 0pjDnAobx/GToXjVMsfGgkIBDXTX8ODeh14p+ziFd1TTm78A0JMbpr9Xe1KnbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219812; a=rsa-sha256; cv=none; b=d5Fkoyno9CJNja+cpY6DjqTPYhdTDyKEUDZ+YeBRMwHOFUypCE7UD5RenFvC22z6lgDZkp eE7EL6tVaFNEtK4is3QnCtjNx+ev8YZV1HuBs7z+En6XpimBEpES0VCw35lKKxNjExJ9vt bWAZm5py0vvi6dHAVGrwLecbQTMR62UU6Sr083NFdei7+ZwbgJjbOf7LgE4JuKkgACyeLc DRi9SC9avanJedJ4Mm2f9aprbLXSPVuifo/Uv6aQopfOljMQk7hkCBMpkif+ZNgtiCHNzN TRZZ0lGU7mwL0ZfY6nPSwcr2brVuLq7kd+F9Go/nYoHfSg3bhR4ki+rzd9Jk1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgMbcaHN6TnYbNfMb3XlNI3GxFjCgWsQeZIK67yGH6I=; b=rb+DcPWfPQ+iFmtV+COIRV79qdYr3bpAGajuTIyjlCO6QEi3s5v7ND+U78qy3a4IVmdc4h bAhGrqC3AtGGPeBTDCqRb9hEXemAkRNOFuhqHbFSq3B1cUBG/JrfhePdYrcNOfPKswACvh cQxKUUxv8Dhn5iqd5s9Ptsx/L1JODv2vd2uURUgEXxAb0eAUeWeq9+0o1Od0AzWRb4MhB+ Lk/Eo/4vwirREJ08z5Kzxo3HYmHpZN6HKp2L68w2X1eccrabKWxVs9Ljr6EZR2ZgMVfVHH 3gpGp6+FBhZwWB6yZKNV5F9Vp/AwJUq2PvTfjgzhwCtB7ppbjgER0QVxs4KzOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJh0Wf0z14jH; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGp84004167; Wed, 12 Jun 2024 19:16:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGpYx004164; Wed, 12 Jun 2024 19:16:51 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:51 GMT Message-Id: <202406121916.45CJGpYx004164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 947dfe1e01f3 - stable/13 - LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 947dfe1e01f31819b2a37c1400731ac367bacebe Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=947dfe1e01f31819b2a37c1400731ac367bacebe commit 947dfe1e01f31819b2a37c1400731ac367bacebe Author: Bjoern A. Zeeb AuthorDate: 2024-04-06 21:15:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:11 +0000 LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the struct is already given. Such is the case in iwlwifi d3. Also add an initial implementation of device_can_wakeup(). Though this is likely all we need we have no way of setting the flag for it yet so leave a pr_debug() and a comment there as well. Until we want to support WoWLAN this is likely not needed for wireless. Doing it the proper way checking a bool in 'struct dev_pm_info' would change 'struct device' and with that 'struct pci_dev' and break the KBI. In favour of mergeability this version does not implement the full functionality yet. Both help to make an updated iwlwifi d3 compile. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45358 (cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642) --- sys/compat/linuxkpi/common/include/linux/pm.h | 30 +++++++++++++++------------ sys/compat/linuxkpi/common/src/linux_compat.c | 18 ++++++++++++++++ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 53be7399579d..79e1ed8ba1c6 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -54,25 +54,26 @@ struct dev_pm_domain { IS_ENABLED(CONFIG_PM_SLEEP) ? (_p) : NULL #ifdef CONFIG_PM_SLEEP +#define __SET_PM_OPS(_suspendfunc, _resumefunc) \ + .suspend = _suspendfunc, \ + .resume = _resumefunc, \ + .freeze = _suspendfunc, \ + .thaw = _resumefunc, \ + .poweroff = _suspendfunc, \ + .restore = _resumefunc, \ + #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } #define DEFINE_SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } + +#define SET_SYSTEM_SLEEP_PM_OPS(_suspendfunc, _resumefunc) \ + __SET_PM_OPS(_suspendfunc, _resumefunc) #else #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ @@ -82,6 +83,9 @@ const struct dev_pm_ops _name = { \ } #endif +bool linuxkpi_device_can_wakeup(struct device *); +#define device_can_wakeup(_dev) linuxkpi_device_can_wakeup(_dev) + static inline void pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index d3804e9ecf05..81127bf364f9 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2773,6 +2773,24 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) return (io_mapping_init_wc(mapping, base, size)); } +/* We likely want a linuxkpi_device.c at some point. */ +bool +device_can_wakeup(struct device *dev) +{ + + if (dev == NULL) + return (false); + /* + * XXX-BZ iwlwifi queries it as part of enabling WoWLAN. + * Normally this would be based on a bool in dev->power.XXX. + * Check such as PCI PCIM_PCAP_*PME. We have no way to enable this yet. + * We may get away by directly calling into bsddev for as long as + * we can assume PCI only avoiding changing struct device breaking KBI. + */ + pr_debug("%s:%d: not enabled; see comment.\n", __func__, __LINE__); + return (false); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Wed Jun 12 19:16:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJj4gt3z5NHhm; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJj1xxmz5713; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cie1NNB94d06DDKcK1SqXg0Asyuy/xSgMA7bI0xmCkY=; b=sdyRaW8rNYRiVOx12NSNtGKCD5JmsOPD5GEZ7TDe9Jk2MP7i8DZFRu4sH2VQZDzquf6JCq wP43178og5NGvcvHy/+o31nHvZ8ASTDUlHynYtIgB/8thQOnq/d+lW9G+GbAWejJL4pzbP xqh9B2DJBpM3qjIa1L9Q6hQyZ/dlKEKLc6qpxF7Ag62C3OP4gaWNI/Q7UQILIWrq3Izl3P 1vMHo+8YGA9GlTpHsdIe2iD0cK/+J6AmEdlQCtqipVZbhg73VW4IfM98RqYK+HPmi7UwKI YkAnHDs6AvA0XqXY3r/DtIr070tpsvTuM0YJhUFyvu7bZOIvlbLpsdcE+iguiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219813; a=rsa-sha256; cv=none; b=fFMMUIb7rdw+Jghid9viiAi75DkJ0ZUdoV/Shf9ELstpUUBL5C46wOpjA9Fnfl9h7MmbMu 2ud43+nMk7iVNZAal8WhefXIC/A+QVXY4H6sMODS9EEa3i6/66stH/YLzPVYys/uDDCl7i sRG2X3QTU14SvorGUJlPRJ1NqAvFFraV/AZRw/2nS2yNn7sH9iCYRlhdgVyQpDC7Fa3c+b Eq70aaYKxJQElNSwHA1X1ZX2s2qDbQ0lAEocoDBDtCwwzkeRTzHguTLIigMuehuyZJBiPx 4HEw/sSSGrYfUkSrJ5dHDLQmZnajr40z2lqIlSvme2RKeDAS+UPQMHJJilf+9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cie1NNB94d06DDKcK1SqXg0Asyuy/xSgMA7bI0xmCkY=; b=fO+615iBIyKbHKumGpjRpc9KwE1vL0+Y3KRxIyivC1IYHnO82xf39k3nY332PetFytR9Co xDIMgwTD/biLI+BfPr3ZtLaCXlpYdWEUCJHW+w9hgZcJvqKDzMq5bjRjKCYF1M5EYu/yod NV3VpjUSdbypSmyx1KNJ1GUXoIbF+KRSUE6EutJUoZVwJXyMXJt5id/o+OhcIfZHUUIBUY guHppYVKjQOphyTG4sKHz9O0sXy7Om26VJeRNh9Wfj7YhzyC4lLh0H7ENjuw8VAM24XuM4 m0As6j7j7SREqSLoiUiV+gyTgnmodrZarbig+Twy7IErJNHsNm2FY5nsIaJL4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJj1WVMz14Dh; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGrw2004224; Wed, 12 Jun 2024 19:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGrHZ004221; Wed, 12 Jun 2024 19:16:53 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:53 GMT Message-Id: <202406121916.45CJGrHZ004221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7cda20918644 - stable/13 - LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7cda20918644f283590a5bb348066bdc2bef18b8 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7cda20918644f283590a5bb348066bdc2bef18b8 commit 7cda20918644f283590a5bb348066bdc2bef18b8 Author: Bjoern A. Zeeb AuthorDate: 2024-03-04 23:03:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:59:35 +0000 LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we accidentally returned the bit number instead of the shifted value which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT, which in turned lead to us trying to decode the frame again despite HW had already done it. This was found out of a discussion in D43634. Reviewed by: cc, adrian Differential Revision: https://reviews.freebsd.org/D44208 (cherry picked from commit 906521f8176b13533556d742db4ab28e847b85c0) --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 876ff3693bd0..e5fcb81dce6a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -546,7 +546,7 @@ lkpi_l80211_to_net80211_cyphers(uint32_t wlan_cipher_suite) case WLAN_CIPHER_SUITE_TKIP: return (IEEE80211_CRYPTO_TKIP); case WLAN_CIPHER_SUITE_CCMP: - return (IEEE80211_CIPHER_AES_CCM); + return (IEEE80211_CRYPTO_AES_CCM); case WLAN_CIPHER_SUITE_WEP104: return (IEEE80211_CRYPTO_WEP); case WLAN_CIPHER_SUITE_AES_CMAC: From nobody Wed Jun 12 19:16:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJk4sTkz5NHhp; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJk3GxHz56sy; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YedWzx5J//eJb31ChTuUrkK4/aQAkpsx6vr7v7aLbCY=; b=DEkibcF8A2Tcg1KJpaUoaIIigMiiD6qu9+4T2r0KWGBp561mLcQGt/saAaNBSRJrb8BGl7 zWMPU2j+8NkAqNjz8ZpgU3Hef2c7WN7BS8paQ1jm2gH+SpmEqQ1yPiDtTezyZnt3TT4cRK q+gLaxQn93FbJk/leUbFJhd+A1Nv6G+QQyNSSfn806ttaqeqBGYUaSfqEqswpJya6r8BJ/ I4QkbP8GdF7iLEQatFzHPgIk05erKKNYJLnny5gsR5ru71N2+/0wHJGIcY5Hdbfl/aBd3a 7clW4Mu0DKznQQQJL2XfCONYk6CrvRjHI3RaPm5e5YNQjZ7TQM2DsDMEYZh3CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219814; a=rsa-sha256; cv=none; b=ML2JKolUXu+isHfIB8COJIw7HIg7b7rJrWCPJS6dXKH/eFW6/HCA3tCmRqO60SnJzLiqJa awe9Ur2Yt5s4+spgn0pV2YgfWCWa+XM/keTRjNLvzJAvSJFdvvA5A/Mv+SYzQm5AhV48dT kFQJYYn1ZrPbTGWVmvn9oXj0UulB7tskJtDt1CyiDbS8cLQbV4JMUnH7PrsfMafSlOayOb yNHj26V/mHlhuxrHikaoCneBBF+3EdnETpLeK+4hcsOjUOVb7xqzxYQ/hDlNxqnCyML1OH ocvLxS06bJMPjgiOL3aweQUSMYrBgCbOXjGJelELEPT9Ae3Kvl3BnpQugr1niA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YedWzx5J//eJb31ChTuUrkK4/aQAkpsx6vr7v7aLbCY=; b=hFEA6KDKyLnjv+UUiGQhOWtsI+3cW8RB0MykyCGsHbQ4mhvLRDiZIQFuTNt4zfaDVPqybs PvE9eac00L71RAi2Uidjm1Z0O4kjGmXdnQPppZNcj3OtHNWCEfVgnsS7LsEi7wGaNMlhNk 1lv3MMgPRZitVHIJWAALbHvZc2ZfcKMbbvqRBNYQTk5YHuk9nMDWGrZZlRjYYnEPknutoa ahSsLgfZKvifSxtCg3Lms5L00sflrwTnRMpwAc9O94W0gpApaB7aFfsCZfiFemddkyXI8L tpFUvaXvCQSoE00yQXgpfVvj8nURQBz3ZGJwJ2QXmHFavgc0Ghj3mbK9p2FWXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJk2qj6z14jJ; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGsa6004272; Wed, 12 Jun 2024 19:16:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGsBH004269; Wed, 12 Jun 2024 19:16:54 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:54 GMT Message-Id: <202406121916.45CJGsBH004269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c91ba48865a6 - stable/13 - net8011: radiotap: add more EHT constants List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c91ba48865a61a84f521085fd59ed797655e8816 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c91ba48865a61a84f521085fd59ed797655e8816 commit c91ba48865a61a84f521085fd59ed797655e8816 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:34:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:00:10 +0000 net8011: radiotap: add more EHT constants (cherry picked from commit ab95bca9988ab15a2502efd03db43068a0a2b18b) --- sys/net80211/ieee80211_radiotap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index dba454a8fa42..d44f81b68b8c 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -540,6 +540,11 @@ struct ieee80211_radiotap_eht_usig { #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_VALIDATE_BITS_OK 0x00000080 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_PHY_VER 0x00007000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW 0x00038000 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_20MHZ 0x0 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_40MHZ 0x1 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_80MHZ 0x2 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_160MHZ 0x3 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_320MHZ_1 0x4 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_UL_DL 0x00040000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BSS_COLOR 0x01f80000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_TXOP 0xfe000000 From nobody Wed Jun 12 19:16:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJl6D3fz5NHfG; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJl4Nr9z576B; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZJpUdd3CVsMEb3R3z+pY5xD7fxu2fgPsas+0NpGOrs=; b=aTi66ABwVCkFZqKd6s+4uitsbadr6LcCLNuQ25bGIQ6TzzezGWc61kaHZ3wkIwZbA8rHHc PFP3R9gJjFfoQrxQV14tO5QGpsdFttWkkSNYc+jq0OtR1Z6OczDJ+gdwMgcgL4zb/qCZoj 8I6neCE9bH5qJgN/PDIajaIELmC5XGsYOe5TuNng0B0XspUje7J6sZW4BNjalCWzZTnXMK lLq81CaYguzbpY/UEZ3qM4Mx38p8kGWbhrtJ2pNK677PLHxOp6oatuu0XUfDanEVs+/oIx 5a1Lwr1JtTcipnHTU2YgeO79HuF/OOwccjmPcKvfu4neZZwKHtCy9SbZZWvyIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219815; a=rsa-sha256; cv=none; b=SJL4Aba3MtkjkOOS2q+6JMIbc/E45y0FZXcNcCBgn5Qa1l/3bR2nTM7sSjskk+eOYmMIS7 fZcZ3SocyCE89laqIgLHAEVGyTGYIl8qVdQQZmS9rV9m/PP1HIEK27tnquFBnrNXytV25X D3YmIqWgg+KRcI+WULAQWP9LB1HWXvXSUWdOoCmimGE6TrgRPDwW6CL4nmog1jpnqswUPy Cu6kTSuC1KyinGRkEDLz8wLIN4YuU+ERtqSeiI2td/uppQZegjsrNlmbMe33qAF1ysxmWC DFHSLJS32Ow3fsVvhypjZzR+v2a8tgcr1moHMBRTBG+dXkXRA5HajIWk3IuzaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZJpUdd3CVsMEb3R3z+pY5xD7fxu2fgPsas+0NpGOrs=; b=ClBTzNWP+iBppBM5/axoFvDfHVyqd5d8oiMsHjDlBAWkj7bf4JuH4d9ufERK40g1jlEnEc 5QZbMbWyPzfgwoVtD3Xs4rwiMJ2BqmXbT2yEpitJca+oWu/Z//VRQyy/gOHkq9rqx8mUh1 r+NO/eEL1zxoyqe63NAqLlRW3NdWAAG4/OU3IMLpp/kg8v25IeaiJ6ctpiJR+1zdke0O/F fzO6KzCdi32ezSYq3AQaPpK+3mGPKZGxWITZfdNM9yFJ2kxkk4lBJtguFmKR9n87wjQsS9 z/NPI2Fa+0+s0F+WDUu0zRVLaWnyRqszhh6Fli57BOroTrlg5QF65tka+KkQFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJl3ydfz14xK; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGtI3004314; Wed, 12 Jun 2024 19:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGti7004311; Wed, 12 Jun 2024 19:16:55 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:55 GMT Message-Id: <202406121916.45CJGti7004311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1c17a175c4c1 - stable/13 - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1c17a175c4c1b9f0cd995d77e3015698e3e174a9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1c17a175c4c1b9f0cd995d77e3015698e3e174a9 commit 1c17a175c4c1b9f0cd995d77e3015698e3e174a9 Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:00:49 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Wed Jun 12 19:16:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJn1FqSz5NHq6; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJm5Wm1z57F3; Wed, 12 Jun 2024 19:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZIJ7MPfO4dMuLvXdPMukRqbKvB2vC1DG18hXI2fH44=; b=mY0YtUki21bqz1FE6xzH4YwogEVz8o6lK7JcRcg2wKGgjogMmMdfL5FHfJuUDm5j2M186S w21W0kUM7UBQwn7D3L3FAfImOvzB50b8OwNefSn+38E7HsenVHstt4qkMiF679b/SMvMhZ 4uBLlY1N5/ouYCGcCeG0sqBk9Mdk5BK0rvFM5mWFhzUTEPRC/j9nSBCKgBLIkRIlddUb1p 1/Q765PQS1Mf0l6MBJfwyN9lFnVRXUF7XqF/Z3C9nFGQqoyAZiI2L59Eu4yMcNtAu888Qy gR1lq+2A795ey7ZWqpGfNkWF2DAsS8zbYqbZ6GvPb9RRmXYUhtbxdYUiWUvCDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219816; a=rsa-sha256; cv=none; b=Qp5vdwHzIEVXpq40zKkUSUJ+PwS0GyWJt4xX+v/hsB7CKHIqt59z5tUctLf+8FQbDh7Q8V b8wypzDBcL5OM++Q1hS3Ho+yjCEujKdmOwSFVuR4gnjYfI+j5no/DYCm+J1o4uUbG4cPr8 Mhv2f4bO6sw7F+z1ZFr8mGOr9+CGEJmiADNgzbuK5xw2lWYhiL9x9SD7KFsIBSbmQW8hVr uM4A919LbC6flqWpd3J2XRCQaemVpYjRkCOrX4HZSogX21hALfUiLm1MR+M3uEtWTC4ZiZ LN6m+srdCA1skFShYqIZjl4sFc0hFuKGQR4GkqaCmkIY5xHCCW81AJsbyToTAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZIJ7MPfO4dMuLvXdPMukRqbKvB2vC1DG18hXI2fH44=; b=HhHmJt1hWGeRoIh5uANWHgJ5trOA9WcjHqCAssR3iocHVk8jhi0TdGKBLQfYUSS/ivr2BD +XGp2mwqHH1P8S+mDgX5ynXP53XE1gC7ycEB0zVAapeS8AYIObzveNbNEiE9aEJzON/s8G uA75ZHDcsbxHGSMRzNIETvQXUjvxdhyTjOk4DgwJthmD+qY2G7vllBjU453okSBNCrXjO6 toW5FkHu+Oer9gsT2y8v1QHLWrf8ASiQzujdqZz7oNbc7pZh3X4EUuuTn0I0/jpnDsSjAO fI48dtX/jgv/IcHDu+ksOf3oeDnP5H6mSl0eEVICPcyNzSSgc40zxHocd2OdWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJm58JGz158D; Wed, 12 Jun 2024 19:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGuXY004373; Wed, 12 Jun 2024 19:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGuCF004370; Wed, 12 Jun 2024 19:16:56 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:56 GMT Message-Id: <202406121916.45CJGuCF004370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ba0e9f526481 - stable/13 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 commit ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:05 +0000 LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() The logic following this new assignment in some cases may not set lsta but the later tracing is checking for it to be != NULL. With lsta not initialized that check may not hold up and later we would dereference lsta->state and possibly panic. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45507 (cherry picked from commit 582469016aed4fac3a7ead24dc31000edbb7e823) --- sys/compat/linuxkpi/common/src/linux_80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e5fcb81dce6a..b48f64fb1b0f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4926,6 +4926,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni); From nobody Wed Jun 12 19:16:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJp1fGcz5NHhq; Wed, 12 Jun 2024 19:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJn63SSz576t; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaM42kImBv3Z69Lvuj2uxf+fAnlEX32FI4p5lxcqHI=; b=y286BU4TL11c1S+Di3yn25DDEgKjyqdwwUQ2OPfc3jYLpJGG+jLTrjOB4EF14QS5lQKQbC b4vW1kc6DIxRzToaOxRdqQxL3mR1394G3V2G4h+VHUWgnjNoUoRcIg0BMv4LGAQsVKeiui iOnktiRxZdzJwmlp69O4+oydUbMoiL39T3wjNiNPFki7xnP5m6lAMcWFvF7TJF2m/zRm7V QO6QHYYn0eo49ODpHjQHhGu7lKQfA3LW65W5zPt4P256cNlP80Uhxxn3Qv0F0frwnUUHW5 e7UArpTmBkqGsCn3kjInTIkNMisLNWcqpcxia1343pQmoCXWoFXK7g27ztekNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219817; a=rsa-sha256; cv=none; b=enwe0N7VqXeT36RM52n2U9SUE3X3+bTdxUW974S82CUqDIWj+wx3LCeiz+sOBftk+aL9uH tYTrEQ4C/zF4fO/nbeCPenmqSUUZVmEwYYn78tfqGBygHEjH/rbJXaW+LCPim8SkZAvacK 28EHowz4Hy/ez24OgU1lPTN8LWFIYKOlopEapucPbdko4s2ndXHozYNUaB0zBZyS++KaKw 9B+dTSEG8jXHjEIDrGYqMSdrQzZ9uShVfdALkh6W7tQnP7dbCSjCbYfk6Kplqnd9Mlwv5O /g6YianrKLajsePRTFImCcExBGS6abw41Dz5mhnoexqg+Ymu7FQ3Z4czpL5C1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaM42kImBv3Z69Lvuj2uxf+fAnlEX32FI4p5lxcqHI=; b=cn2/oNxUTWxaL4URRxfPAdICv+943BqocU5pvPqszrKDHc3jGQMqGW9G4p14ODyxliXFRv RckK3vBUPFf8q8pfKPu4rO6FFpgdJlP3CL/QGgeBnyXOwWTzZVSezcfGkQ+94nzc/Uf0AB GwnD4jU/KE/ffPBDO9HuLcFnYIYpCnI4K9VO50ZJn3NCm0134KUDAMvVPiABPNHMGRhqVU x2J8DkIs0ml0SSmBJGlcFMb1xZI4W8BuoLZ/e1eCcwCyrRaD8lKGLVfRjny54SQgR/JJ2P JEwAB6m+nC7hV4PgRU8oCBScuVN8RJi63M9CO/90achcTtwRQ0U+GwwhEd20Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJn5fwgz15BH; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGvhS004421; Wed, 12 Jun 2024 19:16:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGvVc004418; Wed, 12 Jun 2024 19:16:57 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:57 GMT Message-Id: <202406121916.45CJGvVc004418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 88de7a318d13 - stable/13 - LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 88de7a318d1381acc8c654c50ed7ea185f9abbbe Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=88de7a318d1381acc8c654c50ed7ea185f9abbbe commit 88de7a318d1381acc8c654c50ed7ea185f9abbbe Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 21:57:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:40 +0000 LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300. Correct to get the expected behavior. Sponsored by: The FreeBSD Foundation Fixes: b0f73768220e9 LinuxKPI: 802.11 header updates Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45506 (cherry picked from commit 3e0915b7b6857afdbd283f2d448906e6a032ee07) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 2000e7480ff8..0fd90e921c77 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -263,7 +263,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ #define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ #define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0100 /* IEEE80211_HTCAP_RXSTBC */ +#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ From nobody Wed Jun 12 19:16:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJq2K56z5NHxr; Wed, 12 Jun 2024 19:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJq0fFQz57JB; Wed, 12 Jun 2024 19:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9F08clXp8hSJ/PAXz+ffY3MJcGTpb+12AYAlHlRKk9c=; b=lQ9hENFza77Olx4RsIPdGPwe3vwZ6mrpk0+z7Gs2OpK6vfu3zLUOXWtWSfITDU6huucaeb Sw4/vAzhP00BFouRZ0CAmC7merRO05t0xi+l9+3rk60461p8vOo8sxVe/JwGXVSs5bj4EW Y6nml64mB50ofWln3xUeWqLpi2Y/tvNtQRGnnQYWKbh7fO53fj/ap3+FF/GMjDnWWshaCY A0pQDeSICwKLZ0T/du8TaGMZGvBQ5ye/aMslxUfSTJ/KRU5s5flvngPMEIS5WN/PsFhsQ0 ZPyTi86myJ1KiUTiTLFWPzwte3JP89eOrAXq0jSNCitJQAiDRqivV7Q75Ic/ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219819; a=rsa-sha256; cv=none; b=yXr4d+ZqgZqaAiJ2kvK3AL+AGRmvWHgdDVquX5/xHkSaEWIbFz4Kxa1lNGuUvgAYeKEjfF LvMAgTYSN5heZdt7OZkyW4sLWYhIaSlV907iBfrPir4Rz1ONB1Q1YTAIXhrQo1vJKyQ3Ux HOEfgtVc/zPQgG1JyVqDFaPc4QEmADMUZAJGZS8OhPi52OyGSwbmvn8MpH06NYGQMW9g1K JF3taFaxvT720CxTgEwByd2+IpFwsYBNqcrlpKIHm8Rlm68ZbX0yZ4M043gDeQNYnKTWMy OiPlJCOh7WUVY7XKiGIK+/PRU0JlO1ezv+3eyPu0Hzo/gF6O6Oayo4Ol6hj3fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9F08clXp8hSJ/PAXz+ffY3MJcGTpb+12AYAlHlRKk9c=; b=As/F368egAHEJi7qmIPzwpMQUcjz3cYSdIz33MlkmyiGWCgDOL54i/rXUv8FURH+tjW1FC xydSt6spPzT6kfPrjM7zhjOLRbgpc3My384/Q00hlAWrUOmw0tzNNK65a8rkCnS9hJBiw8 Itkbbp2izuN8YMBO6epSVs4/0O7ZIItwurCwOV4LLRX0rFYFjYVxtV8+KqcnujJF5pQXdR EhNElOfCphkMXyNoaEhvuH2pODdHiSnFJLuxCoLJtPCyBaFLVa7HNxnKRg54K4O5z2zCDC IYSQ+aimE8eLNPzgJOeBufJZ/+XBY6AsFZYWABy28x1PA+J4NWyjrnBb5TtWng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJp73YKz158F; Wed, 12 Jun 2024 19:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGwGr004476; Wed, 12 Jun 2024 19:16:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGwUx004473; Wed, 12 Jun 2024 19:16:58 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:58 GMT Message-Id: <202406121916.45CJGwUx004473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2f5608c9af3b - stable/13 - LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 commit 2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 Author: Bjoern A. Zeeb AuthorDate: 2024-06-07 23:57:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:46 +0000 LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions Rather than using the values and leaving net80211 names in a comment define the LinuxKPI IEEE80211_HT_CAP_* to the net80211 IEEE80211_HTCAP_* names. That way errors like the one fixed in 3e0915b7b685 are less likely to happen. Sponsored by: The FreeBSD Foundation (cherry picked from commit 63a327b954a38ecd46934a2911321f3ea3d500b3) --- .../linuxkpi/common/include/linux/ieee80211.h | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 0fd90e921c77..aa1a0a4f3c5f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -254,20 +254,20 @@ enum ieee80211_ac_numbers { #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0xf -/* XXX net80211 calls these IEEE80211_HTCAP_* */ -#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 /* IEEE80211_HTCAP_LDPC */ -#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 /* IEEE80211_HTCAP_CHWIDTH40 */ -#define IEEE80211_HT_CAP_SM_PS 0x000c /* IEEE80211_HTCAP_SMPS */ +/* Define the LinuxKPI names directly to the net80211 ones. */ +#define IEEE80211_HT_CAP_LDPC_CODING IEEE80211_HTCAP_LDPC +#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 IEEE80211_HTCAP_CHWIDTH40 +#define IEEE80211_HT_CAP_SM_PS IEEE80211_HTCAP_SMPS #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 -#define IEEE80211_HT_CAP_GRN_FLD 0x0010 /* IEEE80211_HTCAP_GREENFIELD */ -#define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ -#define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ -#define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ -#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ -#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ -#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 /* IEEE80211_HTCAP_LSIGTXOPPROT */ +#define IEEE80211_HT_CAP_GRN_FLD IEEE80211_HTCAP_GREENFIELD +#define IEEE80211_HT_CAP_SGI_20 IEEE80211_HTCAP_SHORTGI20 +#define IEEE80211_HT_CAP_SGI_40 IEEE80211_HTCAP_SHORTGI40 +#define IEEE80211_HT_CAP_TX_STBC IEEE80211_HTCAP_TXSTBC +#define IEEE80211_HT_CAP_RX_STBC IEEE80211_HTCAP_RXSTBC +#define IEEE80211_HT_CAP_RX_STBC_SHIFT IEEE80211_HTCAP_RXSTBC_S +#define IEEE80211_HT_CAP_MAX_AMSDU IEEE80211_HTCAP_MAXAMSDU +#define IEEE80211_HT_CAP_DSSSCCK40 IEEE80211_HTCAP_DSSSCCK40 +#define IEEE80211_HT_CAP_LSIG_TXOP_PROT IEEE80211_HTCAP_LSIGTXOPPROT #define IEEE80211_HT_MCS_TX_DEFINED 0x0001 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x0002 From nobody Wed Jun 12 21:34:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzMH610wz5NVNt; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzMH5TL5z4LhS; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwWUAQvCZm/QXZ6K6Z+pOWAcSfH1jkHqAdA1y/nS6wU=; b=kxNkI5s4Ao0RXbKSyAqcSdT4rmpHrnhPsY9MF6kIK0RaLi8Sysl4SyCGUKcL1xR/MCuzPY Q9xbJ0uM0ZtpOY0CDu3VsNh2+DhCw3vrLzbrAxxleGqYpnnRdfvtchQM9/8DoluOWm4GGb TltRL0SyLQZ5SWuv8Y75mJqm3hp5bFOLCc0aSmAv7XT++I/wLpaK3K5gHgq6xVFPKpFI4g r5tTI95DnytCQD+OV6DHkQuOwiSbOXRMdVahHdXiLIfoclI23/uq4mVGvI0oJ5XnORbHLF y1bHq7sL9zEob2mOuIiobFYtNIYkM5Zo1ZRGOG+gpYKMjYNW72cUnJZcLlOeJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228059; a=rsa-sha256; cv=none; b=jiY60+McuX510FksmpTmG7LDm4D+Vu9z0nQJZ5K02KeAjhQ4XVEWQXu0M2RXZcDnlhQXOq kcj8Af/hV+hvBhgaJzfMDmp98H4OLHzwtwyPDh+G8FJMRYoitdI8/FY9nP/pBl7V3xU3Ax /Z/Ew94bdQht/QwknuwZdYe0QHVJgRgi4RoMoSEHW4dtuJp1pNaiSEQMu4j16lnl8FfJzz kh8KcEVlpoN3j101agBBuNSYnxiwFbBTxBLmxvU7Tm6jh5HOaI1OddRwX4sv/3HYcAgNgF eex0B/ICk388jDgBIe+zPPgI3zNea/BLPhRm8o/QOm1rnE/07L3fdC0ZKw719Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwWUAQvCZm/QXZ6K6Z+pOWAcSfH1jkHqAdA1y/nS6wU=; b=aUUyhEm6xT18V1k8DiYxXySU9UvgFT/rokTqh6qBNnyAf1LH7lgRoXeoy7z32+1CIxKduZ jY0NSvrib6UTOoLdYokj4PeMUfIiyJcX9Hc44v1vOePIev8Uv+ew1Oz1bwpHMI31oSPDkk YYB9IRHkxxcUKhagATHz0rrXfIE7NewWDeydYF/2Y5uI2Zr0v66RtrRbs5ZFsHoyh5AVkv uSts6jr+TMNlQ+8HGhv74jCvQjtLhMFpFMEuN7CdDNiSQNzXEq9iAQAoVprbsvoA+XpcKa 0Ckrgtb4h2KMGk4Ax2aoax8x+7NC0ePoULlkCCH8pudJxePSqM/gBEMVxwuU8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzMH551pz182f; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLYJdv041166; Wed, 12 Jun 2024 21:34:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLYJRt041163; Wed, 12 Jun 2024 21:34:19 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:34:19 GMT Message-Id: <202406122134.45CLYJRt041163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 83549ee250c0 - stable/13 - u3g: Add support for SIM7600G List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 83549ee250c041bc46971d66b7a2f55bc11b41a5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=83549ee250c041bc46971d66b7a2f55bc11b41a5 commit 83549ee250c041bc46971d66b7a2f55bc11b41a5 Author: Maxime Thiebaut AuthorDate: 2024-06-06 10:43:46 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 19:34:29 +0000 u3g: Add support for SIM7600G Signed-off-by: Maxime Thiebaut Reviewed by: kp (cherry picked from commit b5b90ff9844d1cb780ff777fc42ad393e4683563) --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index cbe7ecc5bf74..986e243c60d3 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -207,6 +207,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), U3G_DEV(ALINK, SIM7600E, 0), + U3G_DEV(ALINK, SIM7600G, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 602420b44ce7..a32a53d49735 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1064,6 +1064,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem product ALINK SIM7600E 0x9001 LTE modem +product ALINK SIM7600G 0x9011 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From nobody Wed Jun 12 21:34:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzMJ3rZWz5NV6Z; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzMJ2DKpz4Ly0; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik5w5UcAEB0l/8I47UEapii6UiNKYgBvYGAZOAHdWN4=; b=EkGTomrCLmQpkgjJ8GvfZLKn+p9ue4fpFyZxms6g+S0cI2QsvjT3PfArewoEPzq8301Gdh TnOsUsoCO0BJ/ryl25biVti+X9Ugt3OSdGNG17GXtoO9RkCBrayGdLY159iH1t+w2fNVK0 GLVH6BF0h91nwIvLPABOjOSF7zNaNPPwtxruvwR81IsfXKb+yY08AneoCHC+ywXt4x7SL2 oYEiEH+TF+x1U5EfFTQpxYUIi7Bm6mWc829QiV+a0GZmQrJosv2s8qvCBGH5fYTa+HJzCe SrFS/kcQJP4KeDYdQA0vGVJSc1rIhqxi8dRdDdMrIFtjd43OX89gticZFpbvyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228060; a=rsa-sha256; cv=none; b=ryVn5S9Y+hsrG3tITm1I4O+n5WY4M3mPoAZAlSRPG3m/PCosmz+T7oKxsoTHOF/XWBhPI1 my80NjcwVvRBBCfjWFeZhuOlJ95lUSRfL+ZPOdhyhTElBOzVpIvP0rQA/W2s9BKkATydtV BvgSRQVfFBJyVF0w2oaddbGiZe63tF5QODOpHhq8ntj+11PR2s6dLksRfOYwAjIXzXjYwR L0z0dFGyrnMpS+/XCcTJHRxxQvAlhlrEyVbMyUxxf8N3uIr7wUxwUrMmFNA2BL5UF/wPfU zS5iSd/935zgr61dVrPVVaMgTLzcym18CXPHMi1js44KIdw71FFzHL7dMJNh9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik5w5UcAEB0l/8I47UEapii6UiNKYgBvYGAZOAHdWN4=; b=IZKm5F7X6SPkHeQ/YZ4N4+uj2MdL4ldEay8c0cvkbOyX8swi098c5t46ExYEY5hgA3KuTH mfMXAHH5cwFC/MC7ZORcPYVx8kbH4d76hJbyM+Pwiktfwo4UORatpVk+gMuWNTTQsIsG/m /7nd78oWAt7xxtvL2YOS0AxH+A1mIttz9fDwfoZZ1vA4Qu0T8ufiZhLqFuleLXsd+CTor2 KFFSC581IPLMmLUVN7tTFidRKDMmlfm6bMbAywQgi3T6aOEu67rt4N5b1tDGoANCW/vOgV AlEWZrGSGbg1C/izKyLWAAR6B1VnwurrPgEwb9cJdSBeyjMkZ9c5M/zjoJ54SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzMJ1rP0z18CS; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLYKOu041270; Wed, 12 Jun 2024 21:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLYKQl041267; Wed, 12 Jun 2024 21:34:20 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:34:20 GMT Message-Id: <202406122134.45CLYKQl041267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 1296443295ab - stable/14 - u3g: Add support for SIM7600G List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1296443295aba0dd3e10a3a84013b9e60aef6196 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1296443295aba0dd3e10a3a84013b9e60aef6196 commit 1296443295aba0dd3e10a3a84013b9e60aef6196 Author: Maxime Thiebaut AuthorDate: 2024-06-06 10:43:46 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 19:34:25 +0000 u3g: Add support for SIM7600G Signed-off-by: Maxime Thiebaut Reviewed by: kp (cherry picked from commit b5b90ff9844d1cb780ff777fc42ad393e4683563) --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index e0a1ff29b0a4..88f94ddaecc6 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -205,6 +205,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), U3G_DEV(ALINK, SIM7600E, 0), + U3G_DEV(ALINK, SIM7600G, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 65dcb06c2f3f..2a217b1eaf17 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1064,6 +1064,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem product ALINK SIM7600E 0x9001 LTE modem +product ALINK SIM7600G 0x9011 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From nobody Wed Jun 12 21:55:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqc3QF0z5NXSp; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqc1TLpz4Plc; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0G7VPCvdrN5dOy6IPmc6kHRsAwNnhtNAwasxsiaXGk=; b=av4KQSfMZJPeA8mc06YKc7ypf57QQhI6Dkg8HsqK21tXwod4bSWTxMf5B8aXBTcvs/fGCB vUoS23U34d2DmhhZ4bJLBEOwmHG9Sll8xpRKC6Pc543YE11Xrja7P/oE5ShdhzddCmNLVn wNliuX4iY53oD41n56ahVH+DZmIlEc2YY1gSXNhwkGLu/c2tZBEdZYuJyrbXPwXthdusyi w5wSLLfGTuojA4XpaB7KgOvHGUahBNWDYHMb84PcVcC9mGAAffCjNJbJrVJvzWiu8WiUe8 9it4ZXlQsmIkrttzwTCUaJ/byHx/h+bZtGFSIKnbI9NGAZotbNC4cj47z8iRkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229324; a=rsa-sha256; cv=none; b=f39iI2DvbNWzNTsNR9ebDGfvkBuSblVcgmZLSpTOLWlSfoOqwrq1pcx1xEwagJFtth4ZB8 u9ecMqI3rKqU3Qhb1DxCWJ+jf2f+ZJnCGuLkViRTj+/3psiLyVSkDLXFqi3RcNcU7y060p sa5gDoe+UcFw4UUP0KXj0QdLnaWiZHOWDDKxyxpZVABtZHWI92B1L4TfahEkLxREEBZVLB OO6/ZvwOJLGCjPxj4pY8HEnv+GAnPbQF6zwAoQi4IveJzWUz8q/Soc5MCdsZApMXJEaM4j +g0ltzMqYR3cTTlrm+TKX2lJE8iMgdZH6StL6iSla+TdDNWAcd/tjqW0O6htbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0G7VPCvdrN5dOy6IPmc6kHRsAwNnhtNAwasxsiaXGk=; b=eJVmM04hXXeqDUgxnRKDMaI1cDCyO18M7DKcdXbd7h2B986XJqhO7mbV2RS/vWU8r8aDas y76hg3TRm65e506U9hR8T/YBzDT+UxyEhKrghld9uAczSSvwM/n8ybA5kKgg634zdedIDC bHO/ZWJG36Mt5WEPVz4QJyIKt7S6w4afsy9LUxAXMeSzQTwK3Gac5IiLAmNjXxzykCOh7l 49rw+NVPBAIQvDMGl7MFDXRNq/a7VVc0SzDQgMD49hbR+ggw6w0SxVHuXxNCtGGKimpTdz rRuAaLm4aVR8BOPA97/DzZcMAPDkm+DmrwaWjHSClNhlIuuBHhqMW6xpWBs4xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqc11Kxz18gC; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtODj075450; Wed, 12 Jun 2024 21:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtOPN075447; Wed, 12 Jun 2024 21:55:24 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:24 GMT Message-Id: <202406122155.45CLtOPN075447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7f7389e66816 - stable/14 - man bluetooth/fwdownloaders: alignment nits, SPDX List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f7389e6681639fdbdeef9f5987d593e13b508b3 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7f7389e6681639fdbdeef9f5987d593e13b508b3 commit 7f7389e6681639fdbdeef9f5987d593e13b508b3 Author: Alexander Ziaee AuthorDate: 2024-05-31 19:27:58 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:24 +0000 man bluetooth/fwdownloaders: alignment nits, SPDX MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1267 (cherry picked from commit 9c0d6df100eda06697ad4ca86c97c554ee9d727c) --- usr.sbin/bluetooth/ath3kfw/ath3kfw.8 | 10 +++++++--- usr.sbin/bluetooth/bcmfw/bcmfw.8 | 7 +++++-- usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 14 +++++++++----- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index 340871d31df8..ed015bbf229d 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2010 Maksim Yevmenkin .\" Copyright (c) 2013, 2016 Adrian Chadd .\" All rights reserved. @@ -31,6 +34,7 @@ .Nd firmware download utility for Atheros AR3011/AR3012 chip based Bluetooth USB devices .Sh SYNOPSIS .Nm +.Op Fl DI .Fl d Ar device_name .Fl f Ar firmware_path .Nm @@ -58,19 +62,19 @@ utility will query the device to determine which firmware image and board configuration to load in at runtime. .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-f firmware_path" .It Fl D Enable verbose debugging. .It Fl d Ar device_name Specify .Xr ugen 4 device name. -.It I -Enable informational debugging. .It Fl f Ar firmware_path Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl I +Enable informational debugging. .El .Sh EXIT STATUS .Ex -std diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index 22d793641759..b9fa72706d2d 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 Maksim Yevmenkin .\" All rights reserved. .\" @@ -64,7 +67,7 @@ I am using the following files from the bluez-firmware-1.0 package: .Dl "MD5 (BCM2033-FW.bin) = b4e142b3272cfe5a84b32fda6b4b032f" .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-m mini-driver_file_name" .It Fl f Ar firmware_file_name Specify firmware file name for download. .It Fl h @@ -75,7 +78,7 @@ Specify mini-driver file name for download. Specify device name. .El .Sh FILES -.Bl -tag -width ".Pa /dev/ubtbcmfw Ns Ar N Ns Pa \&. Ns Ar EE" -compact +.Bl -tag -width "-m mini-driver_file_name" -compact .It Pa BCM2033-MD.hex Mini-driver image. .It Pa BCM2033-FW.bin diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 368a3865a0eb..66517badd0fc 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2013, 2016 Adrian Chadd .\" Copyright (c) 2019 Vladimir Kondratyev .\" Copyright (c) 2021 Philippe Michaud-Boudreault @@ -32,6 +35,7 @@ USB devices .Sh SYNOPSIS .Nm +.Op Fl DI .Fl d Ar device_name .Fl f Ar firmware_path .Nm @@ -45,8 +49,8 @@ device. .Pp This utility will .Em only -work with Intel Wireless 7260/8260/8265 chip based Bluetooth USB devices and some of -their successors. +work with Intel Wireless 7260/8260/8265 chip based Bluetooth USB devices +and some of their successors. The identification is currently based on USB vendor ID/product ID pair. The vendor ID should be 0x8087 .Pq Dv USB_VENDOR_INTEL2 @@ -62,19 +66,19 @@ utility will query the device to determine which firmware image and board configuration to load in at runtime. .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-f firmware_path" .It Fl D Enable verbose debugging. .It Fl d Ar device_name Specify .Xr ugen 4 device name. -.It Fl I -Enable informational debugging. .It Fl f Ar firmware_path Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl I +Enable informational debugging. .El .Sh EXIT STATUS .Ex -std From nobody Wed Jun 12 21:55:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqd6mhkz5NX1T; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqd2H2Wz4Q2y; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+clVvk0nFYp7cvxewj9RR67prUvhIOODZyb8IfOcJ8=; b=dhyQs7o3pmNKOGwW2IBloew0UIM0sasNr+Y39dFPZZKC01h83vnq6sCh2Q3Brzt6RQkWSe YCP3lHlVesa6GC5uwaO5aahPZ4TicVaoRJoOmKOlk31noeye4fVxThF66LTPebzcjThjuA hdYI+UBlQgj7QwYVYOUG9D4KqLYcxWBByQUlpXgQErZsjRXYEzF1Evd9MD0Osxz+rVYtIN yi9AUggquW7D30XASxtcmbDulIQHhhJING3IEWrbq9FNNelPd55nQKLJo3208AuIkJymi/ 4vG5C0b5M7+WP+VgJQvSrtT9GzDK4KdBn7QkyaeuGIsvwdF9xw49hmiM4cwjKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229325; a=rsa-sha256; cv=none; b=AvmajXMA5qXZaNBBwo2MnZM99yBgCm+xCApK1l5Lb1iMKj8UD5Qt1u9OmZ8vQwQQbFr9xS TbHrqkW5Y+DJwPXAzXQkBse/+n115Xb3qXL+de86krffT3fzne0o20Ziw5kfB9Dpj9kQ+s XMNDTlsUk8Yp3K3UpVvESiNzPuWtWwGIdJdVC+UGqnshyHXivR8+MwNqZx7kdfhDvhLM+R QSU9/xgcWGAoQjaGLRSOc6JPYRlB1qKaC2m6035C0o/y3j3H/ye4O+K+SgC3VEL+HjJczj 6GvdRGqQC4cvHLslvSi7DbCEs8YNcX2pGiDDLxCI61MwUXQnrbXng3w0j10N5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+clVvk0nFYp7cvxewj9RR67prUvhIOODZyb8IfOcJ8=; b=s0E1u8vD/HGGlwAqfKQ7YQzPtLdbJCSZKkSIwCmX+mu1SWR6Ip7gqp7CzepcI9CpCVLEtH H8jMMzT9Pc0b3BOfG4ydVR7qCvn6Vgs6PZw9iTQytJql9uWIdOSzzoth2yg3MNvmatJjmd xxo5Mw9xP9y/gENHSyrB01sstUeo/NQthkhvq0E7TZG9m8rO27q3ORxPhUitR/6VXv30p4 vWdNz1DzZuq/oRMAvAF06Ek6/vIwNeHn8rvV1FrX63YWjJKpOFQA3VpdgAnupo0t4W3rGc J1126E7As6KERmLKBKavpsrq5VVdh1q1lWAypkeRVRXfNH7PCNPsEQVbRUu+vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqd1d1Fz18lD; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtPan075489; Wed, 12 Jun 2024 21:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtPXJ075486; Wed, 12 Jun 2024 21:55:25 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:25 GMT Message-Id: <202406122155.45CLtPXJ075486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e366cf07bc64 - stable/14 - smbfs manuals: describe consistently List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e366cf07bc647948b3ae7861d24c0a1cc0570264 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e366cf07bc647948b3ae7861d24c0a1cc0570264 commit e366cf07bc647948b3ae7861d24c0a1cc0570264 Author: Alexander Ziaee AuthorDate: 2024-05-30 21:37:15 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:25 +0000 smbfs manuals: describe consistently MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/ (cherry picked from commit dddf29712f38ba1d804c02bcfd02d24098ae48b0) --- contrib/smbfs/mount_smbfs/mount_smbfs.8 | 3 +-- contrib/smbfs/smbutil/smbutil.1 | 2 +- share/man/man5/nsmb.conf.5 | 7 ++++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/smbfs/mount_smbfs/mount_smbfs.8 b/contrib/smbfs/mount_smbfs/mount_smbfs.8 index 4b4c205dc7da..604b1b414243 100644 --- a/contrib/smbfs/mount_smbfs/mount_smbfs.8 +++ b/contrib/smbfs/mount_smbfs/mount_smbfs.8 @@ -1,11 +1,10 @@ .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $ -.\" $FreeBSD$ .Dd November 1, 2018 .Dt MOUNT_SMBFS 8 .Os .Sh NAME .Nm mount_smbfs -.Nd "mount a shared resource from an SMB file server" +.Nd mount a server message block (SMB1/CIFS) file system .Sh SYNOPSIS .Nm .Op Fl E Ar cs1 Ns Cm \&: Ns Ar cs2 diff --git a/contrib/smbfs/smbutil/smbutil.1 b/contrib/smbfs/smbutil/smbutil.1 index cf133bad309a..c82ba91ea99e 100644 --- a/contrib/smbfs/smbutil/smbutil.1 +++ b/contrib/smbfs/smbutil/smbutil.1 @@ -4,7 +4,7 @@ .Os .Sh NAME .Nm smbutil -.Nd "interface to the SMB requester" +.Nd interface to the server message block (SMB1/CIFS) requester .Sh SYNOPSIS .Nm .Op Fl hv diff --git a/share/man/man5/nsmb.conf.5 b/share/man/man5/nsmb.conf.5 index 1a09743874e5..0da10343ed77 100644 --- a/share/man/man5/nsmb.conf.5 +++ b/share/man/man5/nsmb.conf.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 .\" Originally written by Sergey A. Osokin .\" Rewritten by Tom Rhodes @@ -28,9 +31,7 @@ .Os .Sh NAME .Nm nsmb.conf -.Nd configuration file for -.Tn SMB -requests +.Nd configuration file for server message block (SMB1/CIFS) requests .Sh DESCRIPTION The .Nm From nobody Wed Jun 12 21:55:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqg0Cf9z5NXbm; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqf30HBz4Phd; Wed, 12 Jun 2024 21:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKhUsliUMUb6K0M4iO+Vw4lJ9g2jlwnDW8xgbqFDXPw=; b=hF9C9wqIrZAOPhUmrxU+a1RZQ5w2UNlihsrdT2tydCZFU9pAtr1ibxUyQ4NQpRMDHHziqI jeZoHlpLnPkadtBnsbI6b65+9iH52F/5iRjv5juF09Qq6SmoqaFHI4GenOXWFnT7CI/z/6 gFiz9zleCKXEWlfyuiXc5iGJQgIoyO7P05+S/UiWykJNJ2Bul2vZyebFUOHqKqfrVguuYT wprMltaV5Ktn0SosEmkUybatK3pUBbYERJ/kYmQZClVzsMNVwEIhEn4o/vXVQdd5Tt1Yqh aAHv+UdAvtAgQU3onc8ngAtLQOre4xshlJZaeq0DRsx5XNzYAKS6j3IoqEjK+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229326; a=rsa-sha256; cv=none; b=yNcKUY9mL7yx5AOp+0u1Xp1M4AYVpvmZRAOtAoEqMstl+x1MXWxhrp68R0FLDn6vIgJSqW Zjm6dcBux0iqyRncGTAuUoYnohH4KLg5Mm02PJBGs/jGOKrfFSvdH7BVSBm3VLSeRDuzte T9CoP5c8MaLatIGpmoJ8OrZgHIakR12SnEIYogTlYu9dkUTa1w4AXaazmwqwCCmRltxrKL VGftpQ+PnI1/0aAYEwFberWEkaX2S4GC6obv/M57B6/EISwdYzMfPIi+1RRmUqNUm9w0Fl fx7OG5k4x2ymrOi+UaTI61ZCqr3BWpi5hsRiUHbZuVTIZGZYpxIbghy9O3NihQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKhUsliUMUb6K0M4iO+Vw4lJ9g2jlwnDW8xgbqFDXPw=; b=mzsYb2hud+rDMGD94Rp/FHpTbpew3RANL5Zyp88WWpA3VCu6RwGtRIPkyPCxolsr9asJez kjWa3foFBQtJ6i1x6mJ3u3GVBzDjXrv7B9CYFRR4tFqddz7mLY7+2d6iM2CbbxpBN6IEA2 lYiW97XmoeNxm9fqg5SYxrpIQXXtX4ODTB8oSzYnJLcIEisuAJygEOE/CASHBJTOPiSNCx kslvGIlzQYYmvkxhDcQJbBZeZoblbFTkGoZsuX3LrqEfsMMv6TnMP+lUtXVB8QIBffIPiI 9GmvEmQa2jBf4fH5foojp3x/4F4IEcpDq8XRTMhlHZ0GRiT+oYkwSUYgxLilyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqf2Yjxz18gD; Wed, 12 Jun 2024 21:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtQKM075528; Wed, 12 Jun 2024 21:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtQDd075525; Wed, 12 Jun 2024 21:55:26 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:26 GMT Message-Id: <202406122155.45CLtQDd075525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 657a482888d4 - stable/14 - man bluetooth/fwdownloaders: terse descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 657a482888d4465bfa6d2e90925406418e94bbc0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=657a482888d4465bfa6d2e90925406418e94bbc0 commit 657a482888d4465bfa6d2e90925406418e94bbc0 Author: Alexander Ziaee AuthorDate: 2024-05-31 12:13:54 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:25 +0000 man bluetooth/fwdownloaders: terse descriptions + descriptions no longer wrap on a standard console, no keywords removed + more consistent language with other firmware tooling manuals MFC after: 3 days Reviewed by: imp (bumped date for Nd changes) Pull Request: https://github.com/freebsd/freebsd-src/pull/1266 (cherry picked from commit 2c901189bb65ea0bae03aa83459570a0f0ea0aa8) --- usr.sbin/bluetooth/ath3kfw/ath3kfw.8 | 4 ++-- usr.sbin/bluetooth/bcmfw/bcmfw.8 | 6 ++---- usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index ed015bbf229d..beb1b102b194 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 4, 2016 +.Dd May 31, 2024 .Dt ATH3KFW 8 .Os .Sh NAME .Nm ath3kfw -.Nd firmware download utility for Atheros AR3011/AR3012 chip based Bluetooth USB devices +.Nd download firmware for Atheros AR3011/AR3012 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index b9fa72706d2d..50e9739340ee 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -25,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: bcmfw.8,v 1.7 2003/05/21 00:33:40 max Exp $ -.\" -.Dd March 31, 2003 +.Dd May 31, 2024 .Dt BCMFW 8 .Os .Sh NAME .Nm bcmfw -.Nd firmware download utility for Broadcom BCM2033 chip based Bluetooth USB devices +.Nd download firmware for Broadcom BCM2033 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl h diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 66517badd0fc..1924c5f3ce74 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,13 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 3, 2021 +.Dd May 31, 2024 .Dt IWMBTFW 8 .Os .Sh NAME .Nm iwmbtfw -.Nd firmware download utility for Intel Wireless 7260/8260/8265 chip based Bluetooth -USB devices +.Nd download firmware for Intel Wireless AC Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI From nobody Wed Jun 12 21:55:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqh0xkBz5NXR5; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqg3gv8z4Q70; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNcg8w9EUlTAnZQQzETqKmSbicWWjw7shPvkx88B7mc=; b=cX4yYPrW0cE+oDlWqhgA64WU1jGjbBKJvvn1mCILXMzUb6Lizuc9KKfpC8QweH/WdvHRHp 1ChVb6iOWE64fM2odg2n69MOl9Tpk2Rrvqe4yi+/n9P7pD2Pe7EJv6VHRa6v0Fd/R5m50N nnHYE90pZ2suDvuAfzO5e+zc9/0E9Sq/cH/+8d1zzlWUb7aW1wrQXGFYz01VeL9Ux043E3 otjMupN2ZV3HBETvQWwgxABH3v1tmpG0gZ+mUZ8sVC2ZQ9/hVgnc/sXDu6y0SfUpUS4NP/ w5ppMnpg9U/fnwbxym/I4qcp9JQe1fxyctqbcp0mM09IVMl0XcObBYTLfGW7Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229327; a=rsa-sha256; cv=none; b=B1GtlARgfAxrryBHvoJCFVwKkwaj9SzMjjp77eaOXMbX9s83knifWZEt/NNbiFYUHEHMMD u9vzXalcC31+VKzMRnSUJJFwZ9EJzNmUpiTkNNzULZoCGj1HC1BfjR6FwIRbkhIFbR6a4S w36IuIcjQ7K9wFhMmsXh1yb5/gjdimq0YCVM7CWoY+8nxfcjOn6xVSscQJhO1o9Jak2HI5 dDLxen2JU8261YYqb2beFtdV0UYyg6QFgiZmMNdh+LDgduGAybkwysd6IDLp8JO4MrKHwq k7HjCcxiwT8RPLTyskEAX760DbPaiU2U7CjHfJZIKuH9ZuoKRe3NNs2+HQWm+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNcg8w9EUlTAnZQQzETqKmSbicWWjw7shPvkx88B7mc=; b=a+9iWMxSHUXTAhALtOm0MEH85OpUXrEk16fIyg1sxQ7N2pSjT1Kv5ntlN7hMcJZLotDK7I nG4QVKZPseccxj+PPTSxjTuC/gyvavKM68ejt/M1Ati/HSXGOO5A8mSkNWwDBGZ/120mLS 1UiJ+/wW/EnfKtfTirhsBjL1I+KHp9BdYZQ9TjP9QwkvnCxMkBfbuXBt2uhXgwl1ILM5j6 ZaeAJE88XJmjtl+H4uHMnvHiniHm6QCA9Kleurjl1kH6fM0ocK3lpTZYA2F1ejFpLwme7Q 8Nzo6/IqduTAO5gIX/pRmrtskqYsj6/WzLPH8VKds2GfpP5s259ipjjE6M1+mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqg3HjJz197D; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtRMS075576; Wed, 12 Jun 2024 21:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtRhs075573; Wed, 12 Jun 2024 21:55:27 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:27 GMT Message-Id: <202406122155.45CLtRhs075573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: aeaff9c5deac - stable/14 - smbus manuals: include term SMBus in description List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 commit aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 Author: Alexander Ziaee AuthorDate: 2024-05-30 21:58:20 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:53:22 +0000 smbus manuals: include term SMBus in description Fixes: 5ad3b09f2fe9 (smb: distinguishable descriptions) MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/ (cherry picked from commit 8ccdf86ee57575b04983bc7be68c357fb83668f8) --- share/man/man4/iicsmb.4 | 8 +++++--- share/man/man4/smb.4 | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man4/iicsmb.4 b/share/man/man4/iicsmb.4 index b6f5e39ce5cc..ffa38000659f 100644 --- a/share/man/man4/iicsmb.4 +++ b/share/man/man4/iicsmb.4 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1998, Nicolas Souchu -.\" All rights reserved. +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 1998, Nicolas Souchu. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -27,7 +29,7 @@ .Os .Sh NAME .Nm iicsmb -.Nd I2C to SMB bridge +.Nd I2C to SMBus bridge .Sh SYNOPSIS .Cd "device iicsmb" .Pp diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index d2a1c3b9a618..bec89d8cb05f 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm smb -.Nd SMB generic I/O device driver +.Nd System Management Bus (SMBus) generic I/O device driver .Sh SYNOPSIS .Cd "device smb" .Sh DESCRIPTION From nobody Wed Jun 12 21:55:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqh729dz5NXR7; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqh51z8z4Q3B; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3zBWgrXciGEQQntZxZkB63ZLVZabMmxor30K9QM+92g=; b=mkZOo1+34JaDDU46wSONqsrLGyjmD5XLnHQZrkqrbAcLoDRljf63yVzuoJhrR/jqoC5/aM 5Pm8MTANE1HnxAde9Kb93wKIohto5M3XYqF9YbXQGIPm3mQDVqMoNRHSCiFpJ7ZoBN7YBs vvLGN8C25AyDwrH42uyL/DOZFRF/jJEtYD4RFUVok9yaIjR5tAO9wGRYIOGwNobNUjUxUi E3fxpzfwlJdX6T3K5iq+qwl0ruurRor0+SnhhqF52PC2Ob5k4X7++wHhjFBFYSgajmomRu TnZMR9HrCgJ1ccRsLmr8/rSneC3k1fGN+Ej71a33lK7YjnL9P9Rm6a+6EcuuGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229328; a=rsa-sha256; cv=none; b=r5y5v+8Y9TDgQU/Ut16tzl/0vTWgwYRot9bYOTuHrH/oNcE9hdFKJ0O98/VluZT59+0xeu AZtSegw68zNWFxZhW+JMQ6P8RVzvFGXPTQ57hHME43CPV3v9QmQjh5T5c+NEY4rx4+Ie5c 1GjQpQGrViV3gB/87aQeQCCXV3ArtWWAhUqAsTdRz9wKyprJ7GuNwog0j4NjE79WHB8RJ4 Ijjm1sq0Eoh71WYiknk5RmZnohgPz/MHgkZD03poOKsq9HQlfQ7iKhEn5dXmc3jB2YZIDf IMi9MAz31ypIk+7XTL5KHev/Y93Bl8F9amHsUcjOE+mzOnB7xADXIrhHSvCmmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3zBWgrXciGEQQntZxZkB63ZLVZabMmxor30K9QM+92g=; b=dPpzWwKIiF1miQpSukfTLG0X3FB/vToemuhef6JtlcBPWFoo+NfHw7R2UQVS1OlnWQEgH/ VobLox8GZBCj/RPp0xzuB2jzP7NKHtot+GNqnmvCuctCNcHw4QfEC7rrgu/Xumatn4AhMB MV2W1GPnFsRktKcznL8Mfa1ScONVUHJHWb9/MMFZAVWRNE2sFkLojbQ9CnRNTJ42q1GtZW I353zrf1B4XBYiRCrx/7XJVvoMQwyHc5WmhY6M55iOYHM9NphsdtBPucNCp/N3ezeQi6sZ WF9m81Uu08hY9T4XLa8+R2gtkeLIcSEquR1t+pbwCg1H3KXbuLd87WaI4pEC6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqh4d37z19D1; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtSCc075627; Wed, 12 Jun 2024 21:55:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtSrA075624; Wed, 12 Jun 2024 21:55:28 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:28 GMT Message-Id: <202406122155.45CLtSrA075624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 170a7f2ec185 - stable/14 - ifconfig(8): wordsmith -G and -g descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 170a7f2ec18570e11b6b8530ce746d33119d9a6a Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=170a7f2ec18570e11b6b8530ce746d33119d9a6a commit 170a7f2ec18570e11b6b8530ce746d33119d9a6a Author: Pau Amma AuthorDate: 2024-06-06 21:12:53 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:53:56 +0000 ifconfig(8): wordsmith -G and -g descriptions Remove spurious ".Ar groupname". Add missing full stops. While there, tweak word order for better grammar. MFC after: 3 days Reviewed by: Alexander Ziaee, Mina Galić, allanjude, imp Differential Revision: https://reviews.freebsd.org/D45092 (cherry picked from commit 21faf821a3046f2522dc8d49797f1c1ec74c6b0f) --- sbin/ifconfig/ifconfig.8 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index fa463ad8af5d..259be41bf94b 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 -.\" -.Dd May 12, 2024 +.Dd June 6, 2024 .Dt IFCONFIG 8 .Os .Sh NAME @@ -216,11 +217,10 @@ Shortcut notation for Exclude members of the specified .Ar groupname from the output. -.Ar groupname . .Pp -Only one option +Only one .Fl G -should be specified as later override previous ones +option should be specified as later ones override earlier ones. .Ar groupname may contain shell patterns in which case it should be quoted. .Pp @@ -246,9 +246,9 @@ lists names of interfaces belonging to .Ar groupname . Any other flags and arguments are ignored in this case. .Pp -Only one option +Only one .Fl g -should be specified as later override previous ones +option should be specified as later ones override earlier ones. .Ar groupname may contain shell patterns in which case it should be quoted. .Pp From nobody Wed Jun 12 22:19:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W00Ly1Dn4z5NYxS; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W00Ly0hfVz4TJn; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718230746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfnUq+pAVF1R8ryEaIZNntI136d/dS5wVd/qnR6gtHY=; b=A5s2GvLfmyJMMsRx67LN295/OcxoTYLR2pPYQINfCAPntV2zyhf4EI1pWMGcQGfeNIUpvh L257uX5Y8r8XCbsMEb3dHnzxoBYoYkcP2Ek+axM8yEDU50X3MvArdIMkJxRJps4emL8BPV 3opYVczSflo36amhmyfPMjPjznsuL+xdeY8UsNNbB6oGcUx38j9qK5VrlDggqWIFmZIUl9 WsSU3AQq2DSykidPqFYmPWngagcdqun+zQHdwSvmQRyGKop00ZTS4HC5Sxb7B4IOdMLwVw 2lt0BDiJqXpchEbQfZethhq0d5ZRNxRtl2e0vqNWkhBavXWaGmOcQwczKPaFSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718230746; a=rsa-sha256; cv=none; b=Qkz/CQV/uYATotHUPOnqROL3oRoHlvw4tLdNk8+9UAzQZX/fjErkZVyPDLLHF1dQQnNapL Z0sdqY8dcRdOQogUPlfby9qjcdLaLJnJ0D2BXBBPgNQwXK6UsEos9kgUNbTfwLrU+aQo8s F6QFEqr85RwkLqvGxRvDhuJ3klzEEIrSA+MZiQxuJD3bPsm1LiLml4AjEd3J1ldhtIkh96 IElV46IYPJR7YkGdNUG8VEK/QCs/Ep8Ci673hFYPwvsd3/bpb9rjb8bIzsEdddVOcfaE+J YWHNOaunFKsz2jnli9mNcy5uUwNwJC/r/Ve2ZF1fyUSu7IKkG7KImQTXmacGPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718230746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfnUq+pAVF1R8ryEaIZNntI136d/dS5wVd/qnR6gtHY=; b=nD6QUHs4BV5pideTEBkkvMndCbSqz5TYFYqa4AP9rIQEqPQhHVBpYlsM7aDQsafLulbFND q5vPQoCTVbqpZLDoiuif4BBmBm2dqlZAQO7vusJ6p4KQl3NrLtwd4GB1ZYYrRmXIu3+Jnt N7X54GbxAllwKB22NLvxk0+dl7y/l3UBc4LtoX6UzrLiFNtvl8wE+rJuyWFOjCPzQp1TbQ wpIu6k72bzChTbAgbuMPTITKl/34XPToWGMsMjmgEHtvVQtg83pqOvdQwLIP8wX6NbNZp1 wlx3Ce6aFM5VS4TtZwVEsMw/focrF81XJM9/9rv2HDQqaFCrb6nh17fIAUf2Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W00Ly08pdz19ZY; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CMJ5gQ010485; Wed, 12 Jun 2024 22:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CMJ57g010482; Wed, 12 Jun 2024 22:19:05 GMT (envelope-from git) Date: Wed, 12 Jun 2024 22:19:05 GMT Message-Id: <202406122219.45CMJ57g010482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f9ac06af3b2d - stable/13 - net80211: move net_epoch into net80211 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 commit f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 Author: Bjoern A. Zeeb AuthorDate: 2023-10-29 14:25:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 22:18:50 +0000 net80211: move net_epoch into net80211 Move the net_epoch into net80211 around the if_input calls and out of the driver (in this first case LinuxKPI). This reduces coverage but also allows us to alloc in calls like (*ampdu_rx_start) which do not actually pass data up the stack. The follow-up commits (squashed) reverts: b65f813c1ab99448278961c5ca80dc422b1eae29 Revert "Widen EPOCH(9) usage in PCI WLAN drivers.", 21c4082de9e2cf9a0fd81a9a981ab06022956847 Revert "Widen EPOCH(9) usage in USB WLAN drivers.", 17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4 Revert "Enter the network epoch in USB WiFi drivers when processing input", af2441fbc7fa9e522e7f8697e5a181bdd4ff9e00 Revert "[ath] Attempt to fix epoch handling.", and 6c3e93cb5a4aa4b8a2d8d4d326f2a7c34d3a4458 for if_ath.c only ath: Revert "Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process". Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42427 (cherry picked from commit de607e3c230be88f6232b9c9fd6c37199648dc8c) (cherry picked from commit 1c6dd33d26eb02c6145383a49150965eeca61120) (cherry picked from commit 39b702797994fbd62a21dd3af6d4cd7045fded23) (cherry picked from commit 75f298492a12d53df97c26963ec9f2dc0b052878) (cherry picked from commit eb3821e6d92fa45ece7ec08efde45e35be1bdc95) (cherry picked from commit 82506f26c03aa312b91e01a797f31e061749a76d) --- sys/compat/linuxkpi/common/src/linux_80211.c | 3 --- sys/dev/ath/if_ath_rx.c | 11 +---------- sys/dev/ath/if_ath_rx_edma.c | 4 ---- sys/dev/bwi/if_bwi.c | 3 --- sys/dev/bwn/if_bwn.c | 3 --- sys/dev/ipw/if_ipw.c | 3 --- sys/dev/iwi/if_iwi.c | 3 --- sys/dev/iwm/if_iwm.c | 5 ----- sys/dev/iwn/if_iwn.c | 3 --- sys/dev/malo/if_malo.c | 3 --- sys/dev/mwl/if_mwl.c | 4 ---- sys/dev/otus/if_otus.c | 3 --- sys/dev/ral/rt2560.c | 4 +--- sys/dev/ral/rt2661.c | 3 --- sys/dev/ral/rt2860.c | 3 --- sys/dev/rtwn/pci/rtwn_pci_rx.c | 5 ----- sys/dev/rtwn/usb/rtwn_usb_rx.c | 3 --- sys/dev/usb/wlan/if_rsu.c | 3 --- sys/dev/usb/wlan/if_rum.c | 3 --- sys/dev/usb/wlan/if_run.c | 3 --- sys/dev/usb/wlan/if_uath.c | 3 --- sys/dev/usb/wlan/if_upgt.c | 3 --- sys/dev/usb/wlan/if_ural.c | 3 --- sys/dev/usb/wlan/if_urtw.c | 3 --- sys/dev/usb/wlan/if_zyd.c | 3 --- sys/dev/wpi/if_wpi.c | 3 --- sys/dev/wtap/if_wtap.c | 5 +---- sys/net80211/ieee80211_hostap.c | 4 ++++ sys/net80211/ieee80211_input.c | 3 +++ 29 files changed, 10 insertions(+), 95 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b48f64fb1b0f..df72495e68b6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4802,7 +4802,6 @@ linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_sta *sta, struct napi_struct *napi __unused, struct list_head *list __unused) { - struct epoch_tracker et; struct lkpi_hw *lhw; struct ieee80211com *ic; struct mbuf *m; @@ -5021,7 +5020,6 @@ skip_device_ts: } #endif - NET_EPOCH_ENTER(et); if (ni != NULL) { ok = ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); @@ -5031,7 +5029,6 @@ skip_device_ts: ok = ieee80211_input_mimo_all(ic, m); /* mbuf got consumed. */ } - NET_EPOCH_EXIT(et); #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_RX) diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index 44edc75a5f09..586a56d8120e 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -666,8 +666,6 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, int is_good = 0; struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; - NET_EPOCH_ASSERT(); - /* * Calculate the correct 64 bit TSF given * the TSF64 register value and rs_tstamp. @@ -1089,8 +1087,6 @@ ath_rx_proc(struct ath_softc *sc, int resched) int kickpcu = 0; int ret; - NET_EPOCH_ASSERT(); - /* XXX we must not hold the ATH_LOCK here */ ATH_UNLOCK_ASSERT(sc); ATH_PCU_UNLOCK_ASSERT(sc); @@ -1310,7 +1306,6 @@ static void ath_legacy_rx_tasklet(void *arg, int npending) { struct ath_softc *sc = arg; - struct epoch_tracker et; ATH_KTR(sc, ATH_KTR_RXPROC, 1, "ath_rx_proc: pending=%d", npending); DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); @@ -1323,18 +1318,14 @@ ath_legacy_rx_tasklet(void *arg, int npending) } ATH_PCU_UNLOCK(sc); - NET_EPOCH_ENTER(et); ath_rx_proc(sc, 1); - NET_EPOCH_EXIT(et); } static void ath_legacy_flushrecv(struct ath_softc *sc) { - struct epoch_tracker et; - NET_EPOCH_ENTER(et); + ath_rx_proc(sc, 0); - NET_EPOCH_EXIT(et); } static void diff --git a/sys/dev/ath/if_ath_rx_edma.c b/sys/dev/ath/if_ath_rx_edma.c index 6c722ca8275f..fb25fb77b062 100644 --- a/sys/dev/ath/if_ath_rx_edma.c +++ b/sys/dev/ath/if_ath_rx_edma.c @@ -555,7 +555,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, int16_t nf; ath_bufhead rxlist; struct mbuf *m; - struct epoch_tracker et; TAILQ_INIT(&rxlist); @@ -572,8 +571,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, TAILQ_CONCAT(&rxlist, &sc->sc_rx_rxlist[qtype], bf_list); ATH_RX_UNLOCK(sc); - NET_EPOCH_ENTER(et); - /* Handle the completed descriptors */ /* * XXX is this SAFE call needed? The ath_buf entries @@ -597,7 +594,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, if (ngood) { sc->sc_lastrx = tsf; } - NET_EPOCH_EXIT(et); ATH_KTR(sc, ATH_KTR_INTERRUPTS, 1, "ath edma rx deferred proc: ngood=%d\n", diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c index ff7038546771..8770353f0c5a 100644 --- a/sys/dev/bwi/if_bwi.c +++ b/sys/dev/bwi/if_bwi.c @@ -1503,7 +1503,6 @@ bwi_stop_locked(struct bwi_softc *sc, int statechg) void bwi_intr(void *xsc) { - struct epoch_tracker et; struct bwi_softc *sc = xsc; struct bwi_mac *mac; uint32_t intr_status; @@ -1623,9 +1622,7 @@ bwi_intr(void *xsc) device_printf(sc->sc_dev, "intr noise\n"); if (txrx_intr_status[0] & BWI_TXRX_INTR_RX) { - NET_EPOCH_ENTER(et); rx_data = sc->sc_rxeof(sc); - NET_EPOCH_EXIT(et); if (sc->sc_flags & BWI_F_STOP) { BWI_UNLOCK(sc); return; diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index b90dc2dbeab7..caa8206cf413 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -5073,7 +5073,6 @@ bwn_intr(void *arg) static void bwn_intrtask(void *arg, int npending) { - struct epoch_tracker et; struct bwn_mac *mac = arg; struct bwn_softc *sc = mac->mac_sc; uint32_t merged = 0; @@ -5134,7 +5133,6 @@ bwn_intrtask(void *arg, int npending) if (mac->mac_reason_intr & BWN_INTR_NOISESAMPLE_OK) bwn_intr_noise(mac); - NET_EPOCH_ENTER(et); if (mac->mac_flags & BWN_MAC_FLAG_DMA) { if (mac->mac_reason[0] & BWN_DMAINTR_RX_DONE) { bwn_dma_rx(mac->mac_method.dma.rx); @@ -5142,7 +5140,6 @@ bwn_intrtask(void *arg, int npending) } } else rx = bwn_pio_rx(&mac->mac_method.pio.rx); - NET_EPOCH_EXIT(et); KASSERT(!(mac->mac_reason[1] & BWN_DMAINTR_RX_DONE), ("%s", __func__)); KASSERT(!(mac->mac_reason[2] & BWN_DMAINTR_RX_DONE), ("%s", __func__)); diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 2581f13ac3eb..fd4089b7eb54 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -1158,7 +1158,6 @@ static void ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status, struct ipw_soft_bd *sbd, struct ipw_soft_buf *sbuf) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *mnew, *m; struct ieee80211_node *ni; @@ -1230,13 +1229,11 @@ ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status, IPW_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); IPW_LOCK(sc); bus_dmamap_sync(sc->rbd_dmat, sc->rbd_map, BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index fc9677c6a3d6..57249d288acb 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -1179,7 +1179,6 @@ static void iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i, struct iwi_frame *frame) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *mnew, *m; struct ieee80211_node *ni; @@ -1269,13 +1268,11 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i, IWI_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { type = ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else type = ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); IWI_LOCK(sc); if (sc->sc_softled) { diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index f4af7b1f315b..df6b37d33ce5 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -3467,7 +3467,6 @@ static bool iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, bool stolen) { - struct epoch_tracker et; struct ieee80211com *ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; @@ -3487,8 +3486,6 @@ iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); IWM_UNLOCK(sc); - - NET_EPOCH_ENTER(et); if (ni != NULL) { IWM_DPRINTF(sc, IWM_DEBUG_RECV, "input m %p\n", m); ieee80211_input_mimo(ni, m); @@ -3497,8 +3494,6 @@ iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, IWM_DPRINTF(sc, IWM_DEBUG_RECV, "inputall m %p\n", m); ieee80211_input_mimo_all(ic, m); } - NET_EPOCH_EXIT(et); - IWM_LOCK(sc); return true; diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 4091bf135ae1..8433c16cce23 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -3020,7 +3020,6 @@ static void iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { - struct epoch_tracker et; struct iwn_ops *ops = &sc->ops; struct ieee80211com *ic = &sc->sc_ic; struct iwn_rx_ring *ring = &sc->rxq; @@ -3180,7 +3179,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, } IWN_UNLOCK(sc); - NET_EPOCH_ENTER(et); /* Send the frame to the 802.11 layer. */ if (ni != NULL) { @@ -3192,7 +3190,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, } else (void)ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); IWN_LOCK(sc); DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 17c1c5145ee3..5f8a4c0b4099 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -1935,7 +1935,6 @@ malo_set_channel(struct ieee80211com *ic) static void malo_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct malo_softc *sc = arg; struct ieee80211com *ic = &sc->malo_ic; struct malo_rxbuf *bf; @@ -2068,13 +2067,11 @@ malo_rx_proc(void *arg, int npending) /* dispatch */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, ds->nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, ds->nf); - NET_EPOCH_EXIT(et); rx_next: /* NB: ignore ENOMEM so we process more descriptors */ (void) malo_rxbuf_init(sc, bf); diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 69489d5ee2ec..5d726cbb18fe 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -2604,7 +2604,6 @@ cvtrssi(uint8_t ssi) static void mwl_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct mwl_softc *sc = arg; struct ieee80211com *ic = &sc->sc_ic; struct mwl_rxbuf *bf; @@ -2793,8 +2792,6 @@ mwl_rx_proc(void *arg, int npending) /* dispatch */ ni = ieee80211_find_rxnode(ic, (const struct ieee80211_frame_min *) wh); - - NET_EPOCH_ENTER(et); if (ni != NULL) { mn = MWL_NODE(ni); #ifdef MWL_ANT_INFO_SUPPORT @@ -2810,7 +2807,6 @@ mwl_rx_proc(void *arg, int npending) ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); rx_next: /* NB: ignore ENOMEM so we process more descriptors */ (void) mwl_rxbuf_init(sc, bf); diff --git a/sys/dev/otus/if_otus.c b/sys/dev/otus/if_otus.c index 4696cfa08d2b..9fb2af8aed90 100644 --- a/sys/dev/otus/if_otus.c +++ b/sys/dev/otus/if_otus.c @@ -1804,7 +1804,6 @@ otus_rxeof(struct usb_xfer *xfer, struct otus_data *data, struct mbufq *rxq) static void otus_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct otus_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; @@ -1855,7 +1854,6 @@ tr_setup: * callback and safe to unlock. */ OTUS_UNLOCK(sc); - NET_EPOCH_ENTER(et); while ((m = mbufq_dequeue(&scrx)) != NULL) { wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, @@ -1868,7 +1866,6 @@ tr_setup: } else (void)ieee80211_input_mimo_all(ic, m); } - NET_EPOCH_EXIT(et); #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_ff_age_all(ic, 100); #endif diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index 4ae46b66ae49..d7cafe1994c9 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -1083,7 +1083,6 @@ rt2560_prio_intr(struct rt2560_softc *sc) static void rt2560_decryption_intr(struct rt2560_softc *sc) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct rt2560_rx_desc *desc; struct rt2560_rx_data *data; @@ -1194,13 +1193,12 @@ rt2560_decryption_intr(struct rt2560_softc *sc) wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); + RAL_LOCK(sc); sc->sc_flags &= ~RT2560_F_INPUT_RUNNING; skip: desc->flags = htole32(RT2560_RX_BUSY); diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 14bd808a6a7f..1194ef12189f 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -955,7 +955,6 @@ rt2661_tx_dma_intr(struct rt2661_softc *sc, struct rt2661_tx_ring *txq) static void rt2661_rx_intr(struct rt2661_softc *sc) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct rt2661_rx_desc *desc; struct rt2661_rx_data *data; @@ -1072,13 +1071,11 @@ rt2661_rx_intr(struct rt2661_softc *sc) /* send the frame to the 802.11 layer */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); RAL_LOCK(sc); sc->sc_flags &= ~RAL_INPUT_RUNNING; diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c index 1a1047e26097..122764012ce3 100644 --- a/sys/dev/ral/rt2860.c +++ b/sys/dev/ral/rt2860.c @@ -1176,7 +1176,6 @@ rt2860_maxrssi_chain(struct rt2860_softc *sc, const struct rt2860_rxwi *rxwi) static void rt2860_rx_intr(struct rt2860_softc *sc) { - struct epoch_tracker et; struct rt2860_rx_radiotap_header *tap; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; @@ -1324,13 +1323,11 @@ rt2860_rx_intr(struct rt2860_softc *sc) /* send the frame to the 802.11 layer */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); } else (void)ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); RAL_LOCK(sc); diff --git a/sys/dev/rtwn/pci/rtwn_pci_rx.c b/sys/dev/rtwn/pci/rtwn_pci_rx.c index 3bc033716a9e..7f06725afb0e 100644 --- a/sys/dev/rtwn/pci/rtwn_pci_rx.c +++ b/sys/dev/rtwn/pci/rtwn_pci_rx.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -83,7 +82,6 @@ rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *pc, static void rtwn_pci_rx_frame(struct rtwn_pci_softc *pc) { - struct epoch_tracker et; struct rtwn_softc *sc = &pc->pc_sc; struct rtwn_rx_ring *ring = &pc->rx_ring; struct rtwn_rx_stat_pci *rx_desc = &ring->desc[ring->cur]; @@ -163,15 +161,12 @@ rtwn_pci_rx_frame(struct rtwn_pci_softc *pc) /* Send the frame to the 802.11 layer. */ RTWN_UNLOCK(sc); - - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input_mimo(ni, m); /* Node is no longer needed. */ ieee80211_free_node(ni); } else (void)ieee80211_input_mimo_all(ic, m); - NET_EPOCH_EXIT(et); RTWN_LOCK(sc); diff --git a/sys/dev/rtwn/usb/rtwn_usb_rx.c b/sys/dev/rtwn/usb/rtwn_usb_rx.c index 30921bdc2101..5db967ddcc18 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_rx.c +++ b/sys/dev/rtwn/usb/rtwn_usb_rx.c @@ -361,7 +361,6 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m) void rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct rtwn_usb_softc *uc = usbd_xfer_softc(xfer); struct rtwn_softc *sc = &uc->uc_sc; struct ieee80211com *ic = &sc->sc_ic; @@ -404,7 +403,6 @@ tr_setup: m->m_pkthdr.PH_loc.ptr = rtwn_rx_frame(sc, m); m = m->m_nextpkt; } - NET_EPOCH_ENTER(et); RTWN_UNLOCK(sc); m = m0; while (m != NULL) { @@ -422,7 +420,6 @@ tr_setup: m = next; } RTWN_LOCK(sc); - NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */ diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index dd23f313a524..1cb38f3d40b3 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -2555,7 +2555,6 @@ rsu_rxeof(struct usb_xfer *xfer, struct rsu_data *data) static void rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct rsu_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; @@ -2590,7 +2589,6 @@ tr_setup: * ieee80211_input() because here is at the end of a USB * callback and safe to unlock. */ - NET_EPOCH_ENTER(et); while (m != NULL) { next = m->m_next; m->m_next = NULL; @@ -2609,7 +2607,6 @@ tr_setup: RSU_LOCK(sc); m = next; } - NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */ diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 364f02393d8d..f97e7e477026 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -1168,7 +1168,6 @@ rum_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame_min *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct usb_page_cache *pc; uint32_t flags; @@ -1287,7 +1286,6 @@ tr_setup: else ni = NULL; - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, RT2573_NOISE_FLOOR); @@ -1295,7 +1293,6 @@ tr_setup: } else (void) ieee80211_input_all(ic, m, rssi, RT2573_NOISE_FLOOR); - NET_EPOCH_EXIT(et); } RUM_LOCK(sc); rum_start(sc); diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c index 8eca1a8ab0b4..9df50534ec00 100644 --- a/sys/dev/usb/wlan/if_run.c +++ b/sys/dev/usb/wlan/if_run.c @@ -2870,7 +2870,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uint32_t dmalen) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct rt2870_rxd *rxd; struct rt2860_rxwi *rxwi; uint32_t flags; @@ -2993,14 +2992,12 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uint32_t dmalen) } } - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else { (void)ieee80211_input_all(ic, m, rssi, nf); } - NET_EPOCH_EXIT(et); return; diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 86c7eb6b2bdd..7d5e50590ea2 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -2703,7 +2703,6 @@ uath_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct uath_data *data; struct uath_rx_desc *desc = NULL; @@ -2750,7 +2749,6 @@ setup: ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); nf = -95; /* XXX */ - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, (int)be32toh(desc->rssi), nf); @@ -2759,7 +2757,6 @@ setup: } else (void) ieee80211_input_all(ic, m, (int)be32toh(desc->rssi), nf); - NET_EPOCH_EXIT(et); m = NULL; desc = NULL; } diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index 9d3a11e961c4..200b1d9264d9 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -2209,7 +2209,6 @@ upgt_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct upgt_data *data; int8_t nf; @@ -2247,14 +2246,12 @@ setup: ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); nf = -95; /* XXX */ - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); /* node is no longer needed */ ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); m = NULL; } UPGT_LOCK(sc); diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c index e55faab226ba..9e9e92230e3a 100644 --- a/sys/dev/usb/wlan/if_ural.c +++ b/sys/dev/usb/wlan/if_ural.c @@ -848,7 +848,6 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct ural_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct usb_page_cache *pc; uint32_t flags; @@ -929,13 +928,11 @@ tr_setup: if (m) { ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); } RAL_LOCK(sc); ural_start(sc); diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index b159c513a126..cf02bd1dfb5b 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -4041,7 +4041,6 @@ urtw_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct urtw_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct urtw_data *data; int8_t nf = -95; @@ -4085,14 +4084,12 @@ setup: } else ni = NULL; - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); /* node is no longer needed */ ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); m = NULL; } URTW_LOCK(sc); diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c index 110bba2fa9fa..aa0942c069da 100644 --- a/sys/dev/usb/wlan/if_zyd.c +++ b/sys/dev/usb/wlan/if_zyd.c @@ -2219,7 +2219,6 @@ zyd_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct zyd_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct zyd_rx_desc desc; struct mbuf *m; struct usb_page_cache *pc; @@ -2275,7 +2274,6 @@ tr_setup: * "ieee80211_input" here, and not some lines up! */ ZYD_UNLOCK(sc); - NET_EPOCH_ENTER(et); for (i = 0; i < sc->sc_rx_count; i++) { rssi = sc->sc_rx_data[i].rssi; m = sc->sc_rx_data[i].m; @@ -2291,7 +2289,6 @@ tr_setup: } else (void)ieee80211_input_all(ic, m, rssi, nf); } - NET_EPOCH_EXIT(et); ZYD_LOCK(sc); zyd_start(sc); break; diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 93c5bf0a60fd..0a5996cf1d97 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -1907,7 +1907,6 @@ static void wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, struct wpi_rx_data *data) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct wpi_rx_ring *ring = &sc->rxq; struct wpi_rx_stat *stat; @@ -2027,7 +2026,6 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, } WPI_UNLOCK(sc); - NET_EPOCH_ENTER(et); /* Send the frame to the 802.11 layer. */ if (ni != NULL) { @@ -2037,7 +2035,6 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, } else (void)ieee80211_input_all(ic, m, stat->rssi, WPI_RSSI_OFFSET); - NET_EPOCH_EXIT(et); WPI_LOCK(sc); return; diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c index 05487572c242..ddb0cb466297 100644 --- a/sys/dev/wtap/if_wtap.c +++ b/sys/dev/wtap/if_wtap.c @@ -439,7 +439,6 @@ wtap_inject(struct wtap_softc *sc, struct mbuf *m) static void wtap_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct wtap_softc *sc = (struct wtap_softc *)arg; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *m; @@ -480,7 +479,6 @@ wtap_rx_proc(void *arg, int npending) ni = ieee80211_find_rxnode_withkey(ic, mtod(m, const struct ieee80211_frame_min *), IEEE80211_KEYIX_NONE); - NET_EPOCH_ENTER(et); if (ni != NULL) { /* * Sending station is known, dispatch directly. @@ -490,8 +488,7 @@ wtap_rx_proc(void *arg, int npending) } else { type = ieee80211_input_all(ic, m, 1<<7, 10); } - NET_EPOCH_EXIT(et); - + /* The mbufs are freed by the Net80211 stack */ free(bf, M_WTAP_RXBUF); } diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index dcbcffbe09a0..2a90353938ff 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -422,6 +422,8 @@ hostap_deliver_data(struct ieee80211vap *vap, (void) ieee80211_vap_xmitpkt(vap, mcopy); } if (m != NULL) { + struct epoch_tracker et; + /* * Mark frame as coming from vap's interface. */ @@ -438,7 +440,9 @@ hostap_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } } diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index a1db4a50c2ce..f2da4852485a 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -273,6 +273,7 @@ void ieee80211_deliver_data(struct ieee80211vap *vap, struct ieee80211_node *ni, struct mbuf *m) { + struct epoch_tracker et; struct ether_header *eh = mtod(m, struct ether_header *); struct ifnet *ifp = vap->iv_ifp; @@ -303,7 +304,9 @@ ieee80211_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } struct mbuf * From nobody Thu Jun 13 12:44:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0MYq5wW2z5NcFl; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0MYq54ZNz42B2; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa9qm6iPiB2aR3TaQiZbP9WQGGtjZZAeORKAUMIIQxk=; b=ESswZaaWkzOL3QorvrYXQCLs5oEWBsaMBwOWRP6vsBe6OhtALw/mWEKm7eS0bd/qMxMsBO iRe29g+FPnasCBKOx2kNMf2YqVhLXcgNWa6baptd1n2cLe+Rt21hPAu9MEEj1WFWXdDt+F LQR5TdadHUuF6I4rRS3dHSuoVk0pxyHb8k0oNZOCZSjAStAcWrhRGzGiFfQ7aX1Wb3LJuh /d8UbsGiSVDgkEcpDVDuyE9mOYHdy3I7I458mT5/C5rPxL6kcKjt5mtIF80Cb3Dt8SJE4F Q1uq9lm9i+IxEIIysZwOtf4m436sJcWjkyJaFtw1oGYhZ0SLX8kYWokzMiieCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718282687; a=rsa-sha256; cv=none; b=ZpFBYWMCXWINgeC9y9HcqYXO7YRiqtA0KMll+RUAdAZLj2IVwhk0yYrC1rXaT1673tRU57 03SbOJsAJChnfELODHln0zwwRJG4sbw80D55FLrsReXG1JsqotCA4nGZvtu2sOBxp6e2/Z CE8Vifl/vJUcG0X7ZfYn3qhfzMXS24jvhmUYbPb8+mXJ1+7dIRQOaSviPMJ0PBdoSvW4WO D14kv8vJ2EviP7GZasxqX2He9+igxaPochCbEweh+6XD0UJ08JztKxYDvLT7XIXht73NTM CDDrcRqzYUw0S1uGOzFccQgJxB4PZF1UXHABND6uAUAzTEwa3fEv0A17RAqB+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa9qm6iPiB2aR3TaQiZbP9WQGGtjZZAeORKAUMIIQxk=; b=lo6H2GVgcA2vat+4N+dDqN0fUSj6Bm3WwgmlgH73lux4vD9UIdPk/8sFFTk+y9cMEABECs bIccJwJ3lCdPfRvU1NuKXpcwJWtYsG4Z0MdUSWZ33vMVNiaqch3sV2fgGMaNmKw+HRxH38 ms7pSQ6DkmPuXMSVTAZ2zn7CWq1iMDyOkZrKkZxPVlgesLGnKVjs8Hf/ffyWR9GYYbpEY0 +ck5SBstapfKe5ptKZIXNXENwon0b5Hg3VGZlkNY8YZzr7VUe0cM2VlPQwztXhSJAnt7ZM rQCuAm972GGMq86jdGGvxdI9ws8RUOhxYh9SQKd3NdRFJwBmMYlMWy3GYC/VUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0MYq4H4czdM4; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DCilKm080535; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DCils5080532; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git) Date: Thu, 13 Jun 2024 12:44:47 GMT Message-Id: <202406131244.45DCils5080532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 49e0e1481778 - stable/14 - pf: add sctp multihome probe points List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49e0e148177897d0d7a6e9ac6d0413a8b38681f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=49e0e148177897d0d7a6e9ac6d0413a8b38681f9 commit 49e0e148177897d0d7a6e9ac6d0413a8b38681f9 Author: Kristof Provost AuthorDate: 2024-06-06 15:35:09 +0000 Commit: Kristof Provost CommitDate: 2024-06-13 12:17:34 +0000 pf: add sctp multihome probe points Add probe points to allow us to probe when we add or remove multihome addresses. Example use: pf:sctp:multihome:add { printf("Add tag %x address %x", arg0, ((struct pf_sctp_source *)arg1)->addr.v4.s_addr); } pf:sctp:multihome:remove { printf("Remove tag %x address %x", arg0, ((struct pf_sctp_source *)arg2)->addr.v4.s_addr); } MFC after: 1 week Sponsored by: Orange Business Services (cherry picked from commit f042e1515433456dca4a2be8ec8ac60c75860304) --- sys/netpfil/pf/pf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 6874dd59c1f7..ae0c5dcf8128 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -128,6 +128,10 @@ SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_kstate *"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", + "struct pf_sctp_source *"); +SDT_PROBE_DEFINE3(pf, sctp, multihome, remove, "uint32_t", + "struct pf_kstate *", "struct pf_sctp_source *"); SDT_PROBE_DEFINE3(pf, eth, test_rule, entry, "int", "struct ifnet *", "struct mbuf *"); @@ -6001,11 +6005,12 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) key.v_tag = s->dst.scrub->pfss_v_tag; ep = RB_FIND(pf_sctp_endpoints, &V_pf_sctp_endpoints, &key); if (ep != NULL) { - /* XXX Actually remove! */ TAILQ_FOREACH_SAFE(i, &ep->sources, entry, tmp) { if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_OUT], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -6026,6 +6031,8 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_IN], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -6083,6 +6090,7 @@ pf_sctp_multihome_add_addr(struct pf_pdesc *pd, struct pf_addr *a, uint32_t v_ta i->af = pd->af; memcpy(&i->addr, a, sizeof(*a)); TAILQ_INSERT_TAIL(&ep->sources, i, entry); + SDT_PROBE2(pf, sctp, multihome, add, v_tag, i); PF_SCTP_ENDPOINTS_UNLOCK(); } From nobody Thu Jun 13 12:44:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0MYr1MYsz5Nc7Y; Thu, 13 Jun 2024 12:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0MYr066Pz42cw; Thu, 13 Jun 2024 12:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LSEgWMBoTkClNKJeG/YwE5jh8Av6NmfZxjOq9+MZETs=; b=vpe3Mn84LqXhTHg2VypFHc+hwG3C1X9Vw/wFz7W54A50VRNrz4F6OahfPdUcj0Fge4OYmg aIu6GaGKdMIBr5brntgVnS95pJMpx1zGhxqllqTZU+jpgkpwJn2U0cW0T2hupQiztRmCo9 TSiDWq0kS3j9C6gl8oFxmoZcZH2dvwNGkuW/OMr/bVbBMQ4nB+ZfGtA22WDuJd/sDIdELF g09D94pCwy4Q/WjB/gwImLYEOOMdIWKyzvw6ZmdEyGR4ElybGON0DCbePpNd6NIFDvgv/Z 4W3trCiHiMJJ0E5GhZ+5XvjOfaXtBzaZIGye3vyCjGDjvqsqT9j6Utwkd1LV9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718282688; a=rsa-sha256; cv=none; b=yqEXV0yv7A+JCjK/U8vGtl5U+BgaHLTJjaC8ptLIFY5rahTnnpv/MuOfV4ui/xEERWkoJ0 DmDtNAtDGNNbzXU3gnri87LROg66qeN0lTSQPbCw4JTRx/YmX8Chcj0y6A8UUpq7CFWVHr ORP/J3xgDiKqL1iQq1446ram+1n6+esCDmFfOw8ScEJVwTS37g1SAAmXuBD1xHhX8HjRbl yK//+HlNqyr1Oz9pDTcfHmBkoyi8fCIjPL5u0g3Nk/pNSk1nsEjcYHugDVEatZJFGCxGay tfP+VQ0VU1S8glCf+cS47ZO1NKXT2H9asC7W16BPTRpM4d9emyj0v66vHA46UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LSEgWMBoTkClNKJeG/YwE5jh8Av6NmfZxjOq9+MZETs=; b=KjVdcEaP8YLA3JIkvJo4EncGbazpIfCNcD8o7+HGQ4TOPN2goJvEQZcxou7Fuqqtrd3GWf 1Nlka+11j/HPNV8vd6SKZ1Irll4QMNilpDp9040Ehc0YJ2q+3aZ0ECcC/wv53CKjUizLuu 1xpBqFhLrtqMNzJEcDMCh34DvxbHyWZ3xaOxTtEPL+eEXNCfiFrt9wjpBigWuIueu+om5V bXNYcpY7ePRAdGJBSgjpdXvO+K0zUOpLi6QdgxA3i2RpcOBwHrmraYkg+WkKLk3PyvgOMm 3lDJOXCYj5GR/lKKmBRLn6ylv9gcP1VQRWVCn2grqvvyEpDeVH1LQdTYdr/Cww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0MYq6T9SzdM5; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DCilTJ080633; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DCilX9080629; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git) Date: Thu, 13 Jun 2024 12:44:47 GMT Message-Id: <202406131244.45DCilX9080629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 00a51ada6bed - stable/13 - pf: add sctp multihome probe points List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 00a51ada6bede2baee2da19bfa8f500ef6075fff Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=00a51ada6bede2baee2da19bfa8f500ef6075fff commit 00a51ada6bede2baee2da19bfa8f500ef6075fff Author: Kristof Provost AuthorDate: 2024-06-06 15:35:09 +0000 Commit: Kristof Provost CommitDate: 2024-06-13 12:18:19 +0000 pf: add sctp multihome probe points Add probe points to allow us to probe when we add or remove multihome addresses. Example use: pf:sctp:multihome:add { printf("Add tag %x address %x", arg0, ((struct pf_sctp_source *)arg1)->addr.v4.s_addr); } pf:sctp:multihome:remove { printf("Remove tag %x address %x", arg0, ((struct pf_sctp_source *)arg2)->addr.v4.s_addr); } MFC after: 1 week Sponsored by: Orange Business Services (cherry picked from commit f042e1515433456dca4a2be8ec8ac60c75860304) --- sys/netpfil/pf/pf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2c171514e946..97ae44cff69f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -120,6 +120,10 @@ SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_kstate *"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", + "struct pf_sctp_source *"); +SDT_PROBE_DEFINE3(pf, sctp, multihome, remove, "uint32_t", + "struct pf_kstate *", "struct pf_sctp_source *"); SDT_PROBE_DEFINE2(pf, purge, state, rowcount, "int", "size_t"); /* @@ -5410,11 +5414,12 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) key.v_tag = s->dst.scrub->pfss_v_tag; ep = RB_FIND(pf_sctp_endpoints, &V_pf_sctp_endpoints, &key); if (ep != NULL) { - /* XXX Actually remove! */ TAILQ_FOREACH_SAFE(i, &ep->sources, entry, tmp) { if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_OUT], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -5435,6 +5440,8 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_IN], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -5492,6 +5499,7 @@ pf_sctp_multihome_add_addr(struct pf_pdesc *pd, struct pf_addr *a, uint32_t v_ta i->af = pd->af; memcpy(&i->addr, a, sizeof(*a)); TAILQ_INSERT_TAIL(&ep->sources, i, entry); + SDT_PROBE2(pf, sctp, multihome, add, v_tag, i); PF_SCTP_ENDPOINTS_UNLOCK(); } From nobody Thu Jun 13 18:12:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0VrP0vlcz5P5vQ; Thu, 13 Jun 2024 18:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0VrP092gz4gnd; Thu, 13 Jun 2024 18:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CpPZrA4lXYsYcbaBzFGW3ybhd9b3cJqHJPNvO3B2ng4=; b=VpQVODy19Ax5znBuCL+sCEltCrGsZX3F1ogLDC6w1GLuLKOYZFz7seoPDf6VqVuA7iku7R QCuZHC9MU8/lsJOsEk8VqMVKjLn8czG78mPa82FjbCEEaRDwZNeOiQyNaQlFYgfImR7mjJ /honsZ2naJsKpmDZpw9YUP87IyBZIg3giGdI/WHdJS1AxcTOiUnelIlEAZJil5g8eBIqow h8m5MZi7hnJmEzZox7LbkmqlDwpL7+WaHuOp5UuGdNiG93ztcuHyFlIx1oXevjONzhSXZ1 d5Vc67Mi/eIEKmAe4a+4WU/bZaFTTcT9AM6Rbad5YBCjgP+svuC4/lH0kSbp2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718302373; a=rsa-sha256; cv=none; b=AuqIiOQ5vbieXGBNi2XhaM2OgU/uuY32Z9y29mV8Cwrkz7Is5mI/vQT+EnqsKu5hzhtLZ1 xV/yB7rBGMTmr1OIZfqm6YQdHgQKzsLGwCyXRIKfLwXbdr/hVvG+OVX1aqOGJ89iMqPDr3 zEL10Wh8mF/X3tE4MJU1GfKh1UOYfsITDA9O9m+baci2WpNb2co6Iyl1GVzNYIxx8d45o3 OG7p/6MI02hS8wSwasetW2qh4ZAouP0bfHS8Htjii/OX/p8T151s/myAYNA5PWc8zC+Q0Y 6P5wgoSTsyNKHLZ2OjxmFT0QMNZrWW47tX7RmwJrdxYCIC4ET8bBPGuJGqKN1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CpPZrA4lXYsYcbaBzFGW3ybhd9b3cJqHJPNvO3B2ng4=; b=aYdMqSuQeSpkuQETkRNpeQVU53GjvxzrYbr5VL8ZPlS/4SNhOtv8D66frdGAS68Sy7z2iA YJ215rSdFxiJcqpCmiUYZJX4dCQoKNV05U/DpgpNVB0tjXrbSHygPcUxHjFKs5ks+gsw1u 6qifMyMrxYz0m2zdTe5ATEYwnPhm52TfQZthcZazD/XjiQXHzEHzL5ZsWTbgevKx5kBE0L /Cwvxkmjg4oHp4oy3MsPL5iNtGDxguYD9vGQ12ZjHM0xc7NkHYQsNNduC19Bq8KRmivWg9 l5qtxKy73Je1ALeKXWiOECMJO76snOnK6w1OkibyKnm3X2wKdfW2KKW22qDLbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0VrN6tCDznTm; Thu, 13 Jun 2024 18:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DICqMT037352; Thu, 13 Jun 2024 18:12:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DICqoK037349; Thu, 13 Jun 2024 18:12:52 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:12:52 GMT Message-Id: <202406131812.45DICqoK037349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 927bb4aa5f81 - stable/14 - find: add SIGINFO handler List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 927bb4aa5f8128537145d69b13641afd68aa01d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=927bb4aa5f8128537145d69b13641afd68aa01d9 commit 927bb4aa5f8128537145d69b13641afd68aa01d9 Author: Goran Mekić AuthorDate: 2024-01-11 22:35:25 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:11:32 +0000 find: add SIGINFO handler Print number of files processed and path currently being processed on SIGINFO. Reviewed by: des, asomers Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D43380 (cherry picked from commit d06a00963b7f724b6fdd7d7cdcbed57c534196a9) --- usr.bin/find/extern.h | 1 + usr.bin/find/find.c | 9 +++++++++ usr.bin/find/main.c | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 3436f8cf07bf..323b9bfdfb93 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -126,3 +126,4 @@ extern int exitstatus; extern time_t now; extern int dotfd; extern FTS *tree; +extern volatile sig_atomic_t showinfo; diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 3bff4982b4b6..57225e8fa23f 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -172,6 +172,7 @@ find_execute(PLAN *plan, char *paths[]) { FTSENT *entry; PLAN *p; + size_t counter = 0; int e; tree = fts_open(paths, ftsoptions, (issort ? find_compare : NULL)); @@ -213,6 +214,14 @@ find_execute(PLAN *plan, char *paths[]) continue; #endif /* FTS_W */ } + + if (showinfo) { + fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); + fprintf(stderr, "Scanned: %lu\n\n", counter); + showinfo = 0; + } + ++counter; + #define BADCH " \t\n\\'\"" if (isxargs && strpbrk(entry->fts_path, BADCH)) { (void)fflush(stdout); diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 56f1feece6e4..9e02e75638f4 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -68,8 +68,10 @@ int isxargs; /* don't permit xargs delimiting chars */ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */ int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/ int exitstatus; +volatile sig_atomic_t showinfo = 0; static void usage(void) __dead2; +static void siginfo_handler(int sig __unused); int main(int argc, char *argv[]) @@ -81,6 +83,8 @@ main(int argc, char *argv[]) (void)time(&now); /* initialize the time-of-day */ + (void)signal(SIGINFO, siginfo_handler); + p = start = argv; Hflag = Lflag = 0; ftsoptions = FTS_NOSTAT | FTS_PHYSICAL; @@ -161,3 +165,9 @@ usage(void) " find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]"); exit(1); } + +static void +siginfo_handler(int sig __unused) +{ + showinfo = 1; +} From nobody Thu Jun 13 18:17:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Vxh0D2Lz5P6Dy; Thu, 13 Jun 2024 18:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Vxg6Rb8z4hRq; Thu, 13 Jun 2024 18:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSHMcC3F2/Vy5rOeLQ7oFvHUXiN9XWcrBj8++Db7vbg=; b=D6/VKgmFNjNLjbD9LYCyzbsWGXsOt0/NxbNf7WxYGNHiIDzqeFlIymZxavaKiomcS+3eHs n/Fcbefisq3QahptZT1YL66rv9UYAgYR//92CeHvUFZCpcZ8BBO4Xk6hW5JA4x00gzfzsw wuA3O4LbOoN1GBzf25Cm+fVCLRs/FM9gMWn6JSsfM0Lz2QV2qil9wSTKvWN6A2BpC3UWRt 4uR5422M4nK3SBTFRR197N4KoQyoJ4lBCDuxU8M6y6p/iiEHP7uf+87+/JrMIBcoIVfdvw II3GIuovTTgIIorGkXf2/g4XzM8aFjXL1wCqnzqriB9Zzb+b+Badb1sLJjpaUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718302647; a=rsa-sha256; cv=none; b=aBavET773E2WADbxmZrj4UXnIr9+Y9cWorVVso91eCG7aZjJYNVoqC+bScYfmPbIBnczGC jExUOKrxNCGRTodsTic89PCNAjhRiK0UC+dd/qdV0faNu3uDNKNUCrEahvL6WgafjlF4GY V5JLnjf1vKleinD4nBU98JDsUXkMQCuhN4aAQRwsNm9kh1krL04E1FXeM3XP2w5MdNVXUP yJoTBvfnjsjpx/TPRloThTAyxFG+JQG8ybijXslRNvh9eDG6eVhG5pM7S0XqoFyMW9Z++l 2tZdqQiyT3Jj/4nPdaxhAH+qaP2iCvMEwh8jeTbMNm8EJmEVjgtCikiN6t93uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSHMcC3F2/Vy5rOeLQ7oFvHUXiN9XWcrBj8++Db7vbg=; b=ldCvesXszPo1ru1K0NO2yD5Go/YCUyPLzXMprNU1CdLS1S7wIlcY0ddskAlUCXmy3ZerfS cb96o2Du4mPEyfDkEapTXonR/zocIXmBtfiXF2gG5+cdaq1JCF/+j6HQct1zP5lsNOeN+I 31HbbB6Y2uPGdMdGHjbd5MKzHV9zyFHla6xp7R4MGUL6qNN14PRs0RQfvbwpSEy95LKX4b IoTtcQVYY0ByotzwwfN477D9rHuyIeFbunUdBV2dMNK1b9r+fi7SlbeRiHJEcahq4FdVTg 3HYaRFJ3XP7z3uUgDU62gammUUeGIZxELBO324c/E4baY+XBvLSdotql27a20Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Vxg62cgznTp; Thu, 13 Jun 2024 18:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIHRKD038099; Thu, 13 Jun 2024 18:17:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIHRLs038096; Thu, 13 Jun 2024 18:17:27 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:17:27 GMT Message-Id: <202406131817.45DIHRLs038096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 57a32d76f6bd - stable/14 - tests/fusefs: fix all tests that depend on kern.maxphys List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 57a32d76f6bdd67afb527b375b357d1310de69dc Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=57a32d76f6bdd67afb527b375b357d1310de69dc commit 57a32d76f6bdd67afb527b375b357d1310de69dc Author: Gleb Smirnoff AuthorDate: 2024-05-06 19:03:20 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:15:51 +0000 tests/fusefs: fix all tests that depend on kern.maxphys The tests try to read kern.maxphys sysctl into int value, while unsigned long is required. Not sure when this was broken, seems like since cd8537910406e. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D45053 (cherry picked from commit e9b411d273336647e61704213964b995952a44fd) --- tests/sys/fs/fusefs/bmap.cc | 12 ++++++------ tests/sys/fs/fusefs/read.cc | 2 +- tests/sys/fs/fusefs/utils.cc | 13 ++++++------- tests/sys/fs/fusefs/utils.hh | 2 +- tests/sys/fs/fusefs/write.cc | 5 +++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index 4c9edac9360a..48c9c7d038ed 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -105,8 +105,8 @@ TEST_F(Bmap, bmap) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, pbn); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf - 1); leak(fd); } @@ -142,7 +142,7 @@ TEST_F(Bmap, default_) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, 0); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1); EXPECT_EQ(arg.runb, 0); /* In the middle */ @@ -152,8 +152,8 @@ TEST_F(Bmap, default_) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1); /* Last block */ lbn = filesize / m_maxbcachebuf - 1; @@ -163,7 +163,7 @@ TEST_F(Bmap, default_) ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE); EXPECT_EQ(arg.runp, 0); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1); leak(fd); } diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 373f742d4fd3..9693428914e6 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -1339,7 +1339,7 @@ TEST_P(ReadAhead, readahead) { expect_open(ino, 0, 1); maxcontig = m_noclusterr ? m_maxbcachebuf : m_maxbcachebuf + m_maxreadahead; - clustersize = MIN(maxcontig, m_maxphys); + clustersize = MIN((unsigned long )maxcontig, m_maxphys); for (offs = 0; offs < bufsize; offs += clustersize) { len = std::min((size_t)clustersize, (size_t)(filesize - offs)); expect_read(ino, offs, len, len, contents + offs); diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index 55a552e28eeb..831ded0c0815 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -130,8 +130,7 @@ class FuseEnv: public Environment { void FuseTest::SetUp() { const char *maxbcachebuf_node = "vfs.maxbcachebuf"; const char *maxphys_node = "kern.maxphys"; - int val = 0; - size_t size = sizeof(val); + size_t size; /* * XXX check_environment should be called from FuseEnv::SetUp, but @@ -141,12 +140,12 @@ void FuseTest::SetUp() { if (IsSkipped()) return; - ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &val, &size, NULL, 0)) - << strerror(errno); - m_maxbcachebuf = val; - ASSERT_EQ(0, sysctlbyname(maxphys_node, &val, &size, NULL, 0)) + size = sizeof(m_maxbcachebuf); + ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &m_maxbcachebuf, &size, + NULL, 0)) << strerror(errno); + size = sizeof(m_maxphys); + ASSERT_EQ(0, sysctlbyname(maxphys_node, &m_maxphys, &size, NULL, 0)) << strerror(errno); - m_maxphys = val; /* * Set the default max_write to a distinct value from MAXPHYS to catch * bugs that confuse the two. diff --git a/tests/sys/fs/fusefs/utils.hh b/tests/sys/fs/fusefs/utils.hh index 383f01ea4bfe..506e8a985212 100644 --- a/tests/sys/fs/fusefs/utils.hh +++ b/tests/sys/fs/fusefs/utils.hh @@ -77,7 +77,7 @@ class FuseTest : public ::testing::Test { public: int m_maxbcachebuf; - int m_maxphys; + unsigned long m_maxphys; FuseTest(): m_maxreadahead(0), diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index f931f350a7c3..336ec79c8fec 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -184,7 +184,7 @@ virtual void SetUp() { if (m_maxphys < 2 * DFLTPHYS) GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS" << " for this test"; - if (m_maxphys < 2 * m_maxbcachebuf) + if (m_maxphys < 2 * (unsigned long )m_maxbcachebuf) GTEST_SKIP() << "MAXPHYS must be at least twice maxbcachebuf" << " for this test"; } @@ -860,7 +860,8 @@ TEST_F(WriteMaxWrite, write) ssize_t halfbufsize, bufsize; halfbufsize = m_mock->m_maxwrite; - if (halfbufsize >= m_maxbcachebuf || halfbufsize >= m_maxphys) + if (halfbufsize >= m_maxbcachebuf || + (unsigned long )halfbufsize >= m_maxphys) GTEST_SKIP() << "Must lower m_maxwrite for this test"; bufsize = halfbufsize * 2; contents = new int[bufsize / sizeof(int)]; From nobody Thu Jun 13 18:17:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Vxj10wsz5P6Px; Thu, 13 Jun 2024 18:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Vxj0NGSz4hFx; Thu, 13 Jun 2024 18:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbsfPdj0dA0R/M48LTAd1DoAbcYDmhCRZKj0AnrSlvk=; b=NIHwS1BJWjai04nylKfCtWHAJjSu2Nme//pYtJF7HMj6FxkUWyLYkXbuoZwbsstUyWDChX M7AdNI26EpT1Zs7tDtA7Ph9JFwqS5t7MYjU55r/geiCwF6KUl4+rJBUGD0SGLi509pcvet YAl7afjv9brEDAJjFTNjDhK9CHNsAaG8dsFG6Man9tiKa3HKmGnNsxs95DMvntn3DBTN+5 MxGIFDvM7INdoAKUpSY93787/9UeDPrbrHIXcKUJ8Rj8VkURhjQMNPB4RlA5eFzhVaZ7z5 OqMfeCYg+KJLV0vxAJlfPDSlRu80e0uZQkwVaeIsKQ6Vfj55qNAsNANAdomdAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718302649; a=rsa-sha256; cv=none; b=gTqvPgRV7jPzqIDwBV6h/++CMYYrJS5+OtZ4K2e0B7bXY4KWVNO7FZLzQaCJ3kkb1xtDVv ObeD13Z2o+IbXZUtYCkt4qQHpbomS+TDlJQaYRjeWbdlSBF6PTwUuLZm59ihdMuP+HXB2d +AFO9nyHBmhJa7NApebx985ctnsKy1bxiXy8mmxieqphlhNBzZCciMXzq4MWtosHQicTpI o7Yy5kjHtd2USM8NdGQoAx4ScWkJMzVzH+mHt8XJRhHBN13SxjwakzpqwKh+jXLqZXFbWT 3p9NqBYT8RD6evC75UBniRs25m5kBXHv+4hc8xni8t1tw2fRi+uUiTi+DqOwMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbsfPdj0dA0R/M48LTAd1DoAbcYDmhCRZKj0AnrSlvk=; b=GcAhNHmehQ+ZQMnbiX509eM/TkHRLNRks+b1OSQRPm0bAn4OXYHcGdBc2KMZ+RDL6Mq4z5 eRVaPhzZ//AQurHPaCi3JtHkmDDcfBOiBaHarZxPALB6QSPVzuOo3mE1jVG2YTAxdDtPn/ xSIEKBEXeKEDHPwIAtOOMWDtvUTUKmgakf/JYd2hui8sP3f4Y/VvOeGSaEjr7p+zjtAHCn clDHTozzOeW4PoIIg8AJJUk8y5wXhYVHLUtIXJOP5y8yilGG3uZGoRHRIRPXntM/M9c5gf WUHV6NPveTjCMjAe/saMCGl4PFxwZYR1WOd3QjfkHqojdqhiKzSNb9d4SG1XQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Vxh74Y8znZB; Thu, 13 Jun 2024 18:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIHSVJ038156; Thu, 13 Jun 2024 18:17:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIHSFo038153; Thu, 13 Jun 2024 18:17:28 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:17:28 GMT Message-Id: <202406131817.45DIHSFo038153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 27b195425080 - stable/14 - fusefs: make the tests more robust to changes to maxphys List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 27b1954250802b8f2db4328c962bc6587a4ee3a9 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=27b1954250802b8f2db4328c962bc6587a4ee3a9 commit 27b1954250802b8f2db4328c962bc6587a4ee3a9 Author: Alan Somers AuthorDate: 2024-05-09 14:40:21 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:15:58 +0000 fusefs: make the tests more robust to changes to maxphys Remove assumptions in two test cases that maxphys won't be huge. Reported by: kib Sponsored by: Axcient (cherry picked from commit b2792a300ddb8d8334b234fe7744f5141cc96103) --- tests/sys/fs/fusefs/bmap.cc | 17 +++++++++++++---- tests/sys/fs/fusefs/write.cc | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index 48c9c7d038ed..30612079657d 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -77,8 +77,6 @@ class BmapEof: public Bmap, public WithParamInterface {}; /* * Test FUSE_BMAP - * XXX The FUSE protocol does not include the runp and runb variables, so those - * must be guessed in-kernel. */ TEST_F(Bmap, bmap) { @@ -105,8 +103,19 @@ TEST_F(Bmap, bmap) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, pbn); - EXPECT_EQ((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf - 1); + /* + * XXX The FUSE protocol does not include the runp and runb variables, + * so those must be guessed in-kernel. There's no "right" answer, so + * just check that they're within reasonable limits. + */ + EXPECT_LE(arg.runb, lbn); + EXPECT_LE((unsigned long)arg.runb, m_maxreadahead / m_maxbcachebuf); + EXPECT_LE((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf); + EXPECT_GT(arg.runb, 0); + EXPECT_LE(arg.runp, filesize / m_maxbcachebuf - lbn); + EXPECT_LE((unsigned long)arg.runp, m_maxreadahead / m_maxbcachebuf); + EXPECT_LE((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf); + EXPECT_GT(arg.runp, 0); leak(fd); } diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 336ec79c8fec..1fe2e3cc522d 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -179,7 +179,7 @@ class WriteCluster: public WriteBack { public: virtual void SetUp() { m_async = true; - m_maxwrite = 1 << 25; // Anything larger than MAXPHYS will suffice + m_maxwrite = UINT32_MAX; // Anything larger than MAXPHYS will suffice WriteBack::SetUp(); if (m_maxphys < 2 * DFLTPHYS) GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS" From nobody Thu Jun 13 18:24:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0W5K47v4z5P6sc; Thu, 13 Jun 2024 18:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0W5K2Mw0z4kB6; Thu, 13 Jun 2024 18:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kD01sr6xAhE0JdgIGgOC+T1sSVnGuYzclsT4P0vxTKY=; b=d13o86vRffNI06S65Ooqtdkp3uyn8vbo/Op+Zqm/E8jkVEThe1Vx92ShRkJGNWSwiK2Hh4 YLLMcF2+MS/QqCBDmp4wn9yG2aj8Eom+TJvdO0SFPBA+uaR0e2WzEj3DkGV8aEkPlxgRpc AkYW/QGPdbJPaR2qVY+YqEtnrpG4KU4sNREIXnbg5mJYe2TFxY6Lh7vy6hcSp5r6mKv1ju 6NZr1gXC4mY79+0piExNRZNZZ/uzaczmn8TncAUfx5hg1kOXaMpMOj2+ssUMryjDZD8gaW WElOBVF2w7tnqeq/IV0Q9cIgexQYLe3lW+8GG0rQ5bDB9s6G1Xcm/5qAWTyzHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303045; a=rsa-sha256; cv=none; b=TDOfwokohLOwY6+jW4DjYDt7MS9YvMTJ77OVCV1BIufphz1zGOwZFYQAO1jT7NLDvS/q1m zf0tIBhDYGH1vFRrU4miegFTVYBYlXM0CWrwNMSQxvNmj5Rcl4Xp2F/mDIx/W40LgRhrel v41BLBArBM2aLaEKmBHq40047QAcLUTBc8BI29PhvTulbUrvdUxyNA1GEf4M2merfQy5w9 WqhF/T1IEsH1CTvKh+xn4wByeAH7vRnVy6JCgLqYNZIBU88jK/LIBkyX203GurYuqw+B50 THcqBVxy4Kd2DsdcrPtl16SYdcgTZDzP4VfJbxEDcRz2wDLukgDZ+8A9fh9tTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kD01sr6xAhE0JdgIGgOC+T1sSVnGuYzclsT4P0vxTKY=; b=UBRa27w/b7gwEsDn/lWeNwKdLoPL3jfHKf1gpkH23SNaUYTuTUhmyi6XNhZxgrYhNKX4T3 euFiDNi3Q8CGr9MR776b/dRtUQyCKktFni85c2aWavoXNvdaXG7CTEUe1bSQs5/7ntEcj3 aCQalBkrEKbfhvo9gUkgz2csneBhHP/uiGLxonkWGzCLl9Fel4ZEn3gpZHyhOf++FzbNcO /mOx6kPy6dBJcg2H4Dq24oZASnOtr6M13abxCdRgp1V/SYqT+KVe6cHJUPUVOpF6PIccXo F4wkZa9rfhdh5/70Kpo4bFFwfo5GFJ9j3o9GPO9W7uYvmXrJ9OzX34dcqUsGWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0W5K1zLWznb3; Thu, 13 Jun 2024 18:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIO5Jf054290; Thu, 13 Jun 2024 18:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIO5kY054287; Thu, 13 Jun 2024 18:24:05 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:24:05 GMT Message-Id: <202406131824.45DIO5kY054287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 055df035b564 - stable/14 - rc.conf.5: remove obsolete advice about kld_list List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 055df035b564a137563204e74987e497131731f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=055df035b564a137563204e74987e497131731f4 commit 055df035b564a137563204e74987e497131731f4 Author: Alan Somers AuthorDate: 2024-05-18 14:25:10 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:23:38 +0000 rc.conf.5: remove obsolete advice about kld_list Loading modules via kld_list is no longer substantially faster than via loader.conf. [skip ci] Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45242 (cherry picked from commit 3bb5428ad643e38dd755c8d66c8ac2ae8f7575b5) --- share/man/man5/rc.conf.5 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index a76cb1a04e0a..5a8e4e2c1c5b 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 18, 2023 +.Dd May 18, 2024 .Dt RC.CONF 5 .Os .Sh NAME @@ -334,10 +334,6 @@ A whitespace-separated list of kernel modules to load right after the local disks are mounted, without any .Pa .ko extension or path. -Loading modules at this point in the boot process is -much faster than doing it via -.Pa /boot/loader.conf -for those modules not necessary for mounting local disks. .It Va kldxref_enable .Pq Vt bool Set to From nobody Thu Jun 13 18:24:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0W621hKnz5P7Gp; Thu, 13 Jun 2024 18:24:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0W6217j5z4kYY; Thu, 13 Jun 2024 18:24:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dh+Clq9gHjkUvCBU5D2tAj0Sjc6qd+NiByHeu/Vek60=; b=VC5oPai0SbzuDQ29sLLFmEDy7o+VCUo+Sq/OSJ2I5CRtR1p+n1JD6sTjnv5/fcrsRZ/OXe o+M8scHrKu8yRZpW+s8noDhwregCA5M7q8BZYjPnT7ydcIwKJ+YpjQtAufSuABPFbORsKZ pjDzCMwWcWmeK9PslJFBoNgwlNeJoTKrpF7AEa+2nTBnufROOz5cfxYE73xLBxW8uHBQ/S 7gEsy4QqjsUI1+qIsRCg5iP6WzhyR9GDTaO+ADYsNirdYmoBBSfnzd7ZKgkN8ktsvzBqhk c/0Q10hiICodG7cjEMsfKB1RjTiPOKCyawQT27o/6LF15aL8d5xnX6SHgE1pTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303082; a=rsa-sha256; cv=none; b=YjEamruoBd5FXFiX1RHiUQ6qGs/eFiatQQizvhvc313z9e0Ij/usdCkGCYRigrr/pNa4xi 1dxwxBCrcYyxso11vZFrEvg8K6iESRz/ji3/TXMpuVYdw0AU1OssNqkaM2uBE4tPshZpzr iwB3mDjadDYAeF5nh0IsVyLVdaJ3cUYauxVjI7vUeXHd2tyzPNBHasHlNDgD0ejff8ifiD sFPm7WZMucuz4Y091i0xf6sEbQbbrO0Vpkx5CW+Wd+6QqqozAkUBJE9wnth2bdWh4u2fIf gWFqh9AkQxeZeJAszITOjXsj5+jn7+rfGZE3hShOctlsAw4rhdglCoZ5hLzdoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dh+Clq9gHjkUvCBU5D2tAj0Sjc6qd+NiByHeu/Vek60=; b=FfWxBCxtTlsVhkyBPHqybBjx3aKUpcrUVrfZ70OUucHPBWDogyD+iOmi1sPLRndmlL23+6 xvFrA9LnMzhLkVMEh5Qs8K5x2WTdKzQicuUFGtKsvaD2oLndUqZqHQT2kElg55ikgbUeD6 7pXTMkSIIBTWSoygH1/K/kK5Bf4Fvc3FupBZAEDmZz0RYay/RNfy3WrMgNUTSPlgzub76q yOjfY+klpJbN6ZCwI8tTHXsn/TaYJokE48ZXtbclcjWV1furVKoZxhAb3CzH8D9sVdCrr6 xS1Rc7quOsabwb4WKE5vfI0XpFIaBESpZcfFX0V2LxGdbumhFl8Vs5lV4qIALA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0W620gK2znXp; Thu, 13 Jun 2024 18:24:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIOftF054492; Thu, 13 Jun 2024 18:24:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIOfsV054489; Thu, 13 Jun 2024 18:24:41 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:24:41 GMT Message-Id: <202406131824.45DIOfsV054489@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 454319f12e5d - stable/14 - vfs_getopt(9): fix typo List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 454319f12e5db203c452f8c6b61be9cbe0236df3 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=454319f12e5db203c452f8c6b61be9cbe0236df3 commit 454319f12e5db203c452f8c6b61be9cbe0236df3 Author: Alan Somers AuthorDate: 2024-05-19 15:49:03 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:24:21 +0000 vfs_getopt(9): fix typo [skip ci] Reported by: Claudiu (cherry picked from commit 3cc1b35bc1bdcdee279b3ee7d0e0946b684df898) --- share/man/man9/vfs_getopt.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man9/vfs_getopt.9 b/share/man/man9/vfs_getopt.9 index 0e68655f540f..ff0f027314c7 100644 --- a/share/man/man9/vfs_getopt.9 +++ b/share/man/man9/vfs_getopt.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 31, 2011 +.Dd May 19, 2024 .Dt VFS_GETOPT 9 .Os .Sh NAME @@ -46,7 +46,7 @@ .Fa "struct vfsoptlist *opts" "const char *name" "void **buf" "int *len" .Fc .Ft "char *" -.Fn vfs_getops "struct vfsoptlist *opts" "const char *name" "int *error" +.Fn vfs_getopts "struct vfsoptlist *opts" "const char *name" "int *error" .Ft int .Fo vfs_flagopt .Fa "struct vfsoptlist *opts" "const char *name" "uint64_t *flags" "uint64_t flag" @@ -177,7 +177,7 @@ function returns 0 if the option was found; otherwise, is returned. .Pp The -.Fn vfs_getops +.Fn vfs_getopts function returns the specified option if it is found, and is .Dv NUL terminated. From nobody Thu Jun 13 18:26:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0W7Z6K3Bz5P7RH; Thu, 13 Jun 2024 18:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0W7Z5q12z4knM; Thu, 13 Jun 2024 18:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lGEcrBK9iwbEGplJ0DgHzLN6hatry9Zi666sx7NGeCs=; b=MkOybhonx9u/O+jEBkMrQt/EzcNbLA+/Q+NzuFn8CwUXUXzFyni9vChKtsmk0i/VrEqg7z e6KeEwnPVLcl8tkepDKj3/QtNZtT48YgCjydt5fhCSbqrJHZ8TaKHThekmmnE0086vsicd OPoQXSiEalcX+xJvagr22peMXbtxdN0UWvwqvWs2na0LpmfK/Ot/mBG30NEvaBm/2Il4GX L0JmrZ4NiRrpWbeMIoy3u5jDQc2ujRqRZpLUUGVY1u2tBfkBfhpTlBnmGjHRzpLw4/gtNb b+8SoDNsLb12pKjZXxDOKIDDr8fbtVSQEBYDAMkFFd+MvenJUFiIfcNOl1ZJGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303162; a=rsa-sha256; cv=none; b=Knuf0oBpOwrh4H2Mbnmav8v7AlqpvMWpM4Kv4MqscNsG8cAOt0efma1XeMj0rCICBQxw0M VdaY1x3TB+a2j0VlKLJOPLU8baMwySzH++iL5wQ+Hi26GfmXHME3/OdLsSKe3bVDBglhO4 KDip0gnFELWb/qCCcecWjdW9MUNzm597978HDf+6reiRS+pso/GcGuX7beBILVjWB+6qko fQB278HO6Po7Jpc85lZ3oXYThbJmM2ugGfIF5qxUsYQ7htAtvyU4ueX8wy9vof26sVHKUx BtcVJnbKFIzCkXfPVemYxvP+muSj/rJVaAYyn49AKJBaL6CcJk1VqZtbCDompw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lGEcrBK9iwbEGplJ0DgHzLN6hatry9Zi666sx7NGeCs=; b=F+LWgntTxbUFLxR1Sr9bNQOcC0DkbX71AxrPDcLnCMtGhfX0WdDrwdVwoe/PUHYMZzu34q noHt5+E0fViJHCpQzwLDI+oPPurv/wxJLOLc9jLDlsOTCxfjXtBJw9NSOfQJSe8ZLNCIvy NBGgaJQ+M0TRKnEbzfLDSIiwbPQFJK+66udjtEbab5um/2KY4X2IgfpUZdZX+bPeEy9+at dF933PIrKw5lFie5Innp8Y8AnebYc32oU50pAHZd/dHapk0phYOOEfKXo+we6XGFn9hVHq /QSEbhkK4FVdMhR0jIDfsdCL6blRVQy+zQnl/20/hW6QzLECZPETZiWw2bP8Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0W7Z5LN5znJW; Thu, 13 Jun 2024 18:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIQ2nK054807; Thu, 13 Jun 2024 18:26:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIQ24m054804; Thu, 13 Jun 2024 18:26:02 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:26:02 GMT Message-Id: <202406131826.45DIQ24m054804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 6b4c5030b68f - stable/14 - mdconfig: fix cleanup in the attach_size_rounddown test List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6b4c5030b68f970c66653b6ae5c5d6b760435da5 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=6b4c5030b68f970c66653b6ae5c5d6b760435da5 commit 6b4c5030b68f970c66653b6ae5c5d6b760435da5 Author: Alan Somers AuthorDate: 2024-05-31 21:18:25 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:25:24 +0000 mdconfig: fix cleanup in the attach_size_rounddown test Sponsored by: Axcient (cherry picked from commit d1bd097d52cb5f8b0484e1f22c5506846f4ed304) --- sbin/mdconfig/tests/mdconfig_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mdconfig/tests/mdconfig_test.sh b/sbin/mdconfig/tests/mdconfig_test.sh index 9aaf724206b1..655b7fd63b40 100755 --- a/sbin/mdconfig/tests/mdconfig_test.sh +++ b/sbin/mdconfig/tests/mdconfig_test.sh @@ -291,7 +291,7 @@ attach_size_rounddown_body() -x "mdconfig -r -u ${md#md} -s ${ms2}b" check_diskinfo "$md" 16384 2 $ss } -attach_size_rounddown() +attach_size_rounddown_cleanup() { cleanup_common } From nobody Thu Jun 13 18:30:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0WDc2YHpz5P7mf; Thu, 13 Jun 2024 18:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0WDc22Vdz4l7h; Thu, 13 Jun 2024 18:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kYPRC/kt4JIEjKOwuT4o9OZ8ObSiQCXgiprygxf5xQ=; b=yzhQBDGDAPF2UEow12f30qmjcc0xfYVfMOjzqpmw7bKcUqGesah6SRlKhkGM2qI029DMJz 7FG5qe4uuSwpcySYBei4PiUSkXk6DFMqQqPRTfAtGX2pca8gD1L4Y/1JqmRmTro53tg4bE uT+sImBUqFWGmgD4C708TmPh9G1bY5WUOS6BW5KhzgCwn+MqTI9Wat8G6fZxzFjJaWA+Os Tf3UqRVo5eRnw2tEaNWKMwm7WQUgOWt/ZvE+rWeP2n9WPiztSiPwR+w1ex6vDAXrnlaPfV CV0Y6q8HDXPFAN4eRfzrW6KWHB9KWaHwlJ+k13dCPNVQumZDubM5bi56PKRn5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303424; a=rsa-sha256; cv=none; b=SAwBUViwuG2/D6Y/y1Q7Z11AfaVKrbib5L9bO50SPMvOVr3sDw0aSSxqFiIiymxTzcCFMI RIM1SJ5XrLof9PWk9p2Mg0uQ4yEEoxIIpZmTFlTV2XnZWNTmr+GldGRfmE5bjpcZ0y3/+n QDTJrB9ixct+ze/wVJMbOEtcTtvDFqdgKE7I93cFtIIU4sZNCL0ojxaSKKPhC+aiAigo+g u/laXHwVucrN2ZBvagUHL0HRLIdhkAY2HVAHnarsPq8Hj4unMlwSg0lVNijnXUaxxSTnKZ wrhpe9rr7rc64RKH7pNEE0KCK334lVDZBpr5Jh00maapUVihwoJqMQgRCNLaow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kYPRC/kt4JIEjKOwuT4o9OZ8ObSiQCXgiprygxf5xQ=; b=I0Nnpy1UCXPWJ5aQHJK9BOL7/iy0lDIuudUeVSThTSMcO8B2qoRfGZ5lADcBMKDl0MpWuR vlezXfj3pXQvcSYrFYlWdeJ+BRLdb3lnZnv/BNWXuwiINO0ihBh8lIW6lTsYvq1YPpxydH G++v+iIFp7F8gldSA+79aN2Y+UkxWFM3hJWorKwIWseRvx9qjs0hvODY938xSwhgOV9/As MDD3UElkgw58zgjIo/LrCi3g+PSRghmEC7PzCkzif08WQJzKPmzvo4cxsZ/462tFB34E8Q krnrWK/tbeGtV5lNH1qs5Ji2szON7y1IBQk1zSlcMSbibUoHwE9uG6TKKzXfCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0WDc1KR2znVk; Thu, 13 Jun 2024 18:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIUO43064021; Thu, 13 Jun 2024 18:30:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIUO6R064018; Thu, 13 Jun 2024 18:30:24 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:30:24 GMT Message-Id: <202406131830.45DIUO6R064018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 20ac2dc15f03 - stable/13 - find: add SIGINFO handler List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 20ac2dc15f03c885a7d9b8f5bc1facd3074c40a8 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=20ac2dc15f03c885a7d9b8f5bc1facd3074c40a8 commit 20ac2dc15f03c885a7d9b8f5bc1facd3074c40a8 Author: Goran Mekić AuthorDate: 2024-01-11 22:35:25 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:29:45 +0000 find: add SIGINFO handler Print number of files processed and path currently being processed on SIGINFO. Reviewed by: des, asomers Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D43380 (cherry picked from commit d06a00963b7f724b6fdd7d7cdcbed57c534196a9) --- usr.bin/find/extern.h | 1 + usr.bin/find/find.c | 9 +++++++++ usr.bin/find/main.c | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 3436f8cf07bf..323b9bfdfb93 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -126,3 +126,4 @@ extern int exitstatus; extern time_t now; extern int dotfd; extern FTS *tree; +extern volatile sig_atomic_t showinfo; diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 3bff4982b4b6..57225e8fa23f 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -172,6 +172,7 @@ find_execute(PLAN *plan, char *paths[]) { FTSENT *entry; PLAN *p; + size_t counter = 0; int e; tree = fts_open(paths, ftsoptions, (issort ? find_compare : NULL)); @@ -213,6 +214,14 @@ find_execute(PLAN *plan, char *paths[]) continue; #endif /* FTS_W */ } + + if (showinfo) { + fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); + fprintf(stderr, "Scanned: %lu\n\n", counter); + showinfo = 0; + } + ++counter; + #define BADCH " \t\n\\'\"" if (isxargs && strpbrk(entry->fts_path, BADCH)) { (void)fflush(stdout); diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 9ed1d1d4e29b..295e0f966362 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -68,8 +68,10 @@ int isxargs; /* don't permit xargs delimiting chars */ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */ int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/ int exitstatus; +volatile sig_atomic_t showinfo = 0; static void usage(void); +static void siginfo_handler(int sig __unused); int main(int argc, char *argv[]) @@ -81,6 +83,8 @@ main(int argc, char *argv[]) (void)time(&now); /* initialize the time-of-day */ + (void)signal(SIGINFO, siginfo_handler); + p = start = argv; Hflag = Lflag = 0; ftsoptions = FTS_NOSTAT | FTS_PHYSICAL; @@ -161,3 +165,9 @@ usage(void) " find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]"); exit(1); } + +static void +siginfo_handler(int sig __unused) +{ + showinfo = 1; +} From nobody Thu Jun 13 19:01:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Wvx5wllz5P9k0; Thu, 13 Jun 2024 19:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Wvx5SBBz4p2D; Thu, 13 Jun 2024 19:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71XO1bHob0aPIwgm9dudBxyTssHfVhOdQDSuo/ui0g8=; b=OwJfcmrwgg2eAD0aZOYfkGm0XLHiSDzItFSQmGtn9gajSQjkX1COX0Xadc1jyOXQiadZ8X uzzt++T43fwVjkIGIAv17CWnIMswKBIyVmaBu08oEuEasD82R47jaULqb6dZpEGouKazpO Fl8RCot3jfwR0Jx9P0YMKDCiHvK2OV0Mqr1z6XBV10KghB5Qwuz/HuT7+370duSBDvcr2f qU7it3TVbte0nYDMogKfBHGSypG2suv3TyLz38gKxxEVyxn14PkMgqx5jda+vF+aC3Casb k+fdwKVGsRiCGtLJyk354M2j3zkKVvJmrkzWUOLbk1b2mNTuFG3KZx+wxw7ZwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718305261; a=rsa-sha256; cv=none; b=B9h5pC8IPDY8dZGrdjfFHZBqZIFhm8/lUNbr6CmlJ3LxMnmh+DWJuGAr3YW2QelikQ1rGF G/dIKC2xZCfAMKVUwDr9sqctauXL2iSIZ9gK/OBcNXqG0iA120EQQ2UicdIL7PoINq315u +D9IGTDrhmw7Hb+5g7pLitkQ8LRqHlB7BHkgISYBa3bEgil9Xv2kSVcO5onhbW7z5V8+w4 +iTd4/KwLX69tOp6aNo0LiByGNCVm2N2138DDtcKXymLwQf4cQ/Jy/Xg7jeLCFIleqHH/c bAAlllFx2zqH+cHsPfD8ZBlyRN900t5mbfux6Wqat+cARoEgc0ZZPh6wkT/WPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71XO1bHob0aPIwgm9dudBxyTssHfVhOdQDSuo/ui0g8=; b=wvpxHz7h6kNGLrONmHfUXg/SMSJoBnEdQUw5NU+YNMaAHz3fn/Q/HIL+Gdo/yLIpbG82hR JjE53lsu6lZfqeYSUe5Nr6br9pQYrJbkwnSMn8zd10zdLTlxOiSRbLwhAfTUYp1SZpwzwM fJLKjdtegvHwuWUiyjWU+h7DAIonYB7LkfU7iBQkSmOajqx3Idk45mjsC8p73MZd+qnrBt 7gO93hjnZbaUyVCKKD1MFjbJjNqfmsvDv/SPBPMJJ/2xkc1p5q+oFV/nxOVR/TgiRgjLS4 eOmLNblwZ9qSHw3GqIfbBF5K7AMbKbzeOfNUjOPiMrunbq5b8Y+sI1Eds69QVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Wvx53HZzpJw; Thu, 13 Jun 2024 19:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJ110b018214; Thu, 13 Jun 2024 19:01:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJ11qT018211; Thu, 13 Jun 2024 19:01:01 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:01:01 GMT Message-Id: <202406131901.45DJ11qT018211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 7e9f5bcdc4fc - stable/13 - find: fix build on 32bits List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7e9f5bcdc4fcde5ba700359f1e3fe007dcfa4398 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=7e9f5bcdc4fcde5ba700359f1e3fe007dcfa4398 commit 7e9f5bcdc4fcde5ba700359f1e3fe007dcfa4398 Author: Baptiste Daroussin AuthorDate: 2024-01-12 06:34:28 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:00:40 +0000 find: fix build on 32bits --- usr.bin/find/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 57225e8fa23f..46f0e9b3c38b 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -217,7 +217,7 @@ find_execute(PLAN *plan, char *paths[]) if (showinfo) { fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); - fprintf(stderr, "Scanned: %lu\n\n", counter); + fprintf(stderr, "Scanned: %zu\n\n", counter); showinfo = 0; } ++counter; From nobody Thu Jun 13 19:02:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0WxF47Tmz5PB7k; Thu, 13 Jun 2024 19:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0WxF3QC8z4qFq; Thu, 13 Jun 2024 19:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NVAEXTSV/mySR94p+BJ6tDcKqhk+xZB+ewJjXKpLZ2A=; b=jLtP3ODb4S4i9XaUn8xkM1tIGiSXMSNR/cItP1eq7b4opkeFFXcIJKUEqk5piKof+/Bfyg xE+OphsqX+PD/jGwU5gDtL12JpAgAmpqSRyScDdVy5ZDm34Obv2OjM8NxIrl/tuEZynCXh vbnMO9JrwNl17CKnNcv1+rYVXxcfcsMa+HwMaQ0SnqiZvBQ3GmltIburxPT7RKl3bdEXm/ uVjNVlJp18qbK9c4rjXVb/6cdopENep4r7d+wg3V5lpnHrYbf4ZKDSb0eUiIApesHJ7t7H SqmUasdIpeDdejIRJouZy8hGfeb5BAfgfR1XSjyqVK40XPGuwwY2MueiKhaM6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718305329; a=rsa-sha256; cv=none; b=S1Rkke17IuLuoeVzMz5BA+boqB9zHFdlvBrZS+P3rDkGQeEDPALd7xnY1C6FcRnf7bxCNU vSohDgofsqctsHZNf/uOsB8xCSUduMuGi3RoXZicQ2F8B689sAP78Y3Jz7IarK4NR/ASp5 w1KqD4u/Pwt9aN1H7GMZm4tdWybUPp1LWdXayN8xJ45IGLmPBSV7jaqx1f7w6wyYGkF0Wl etxco9pKIKOKZCwmC8iDXKumwJmG2+53IrYiMnzu0on+dCc5oQeAdiqY1+Gqn1jYOvN/tX mla5W4+cLt4hc/H4zopZ1nrwMWJry9xo7qIRlUQaf0CDBTGfYtf1VWB8jgLcBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NVAEXTSV/mySR94p+BJ6tDcKqhk+xZB+ewJjXKpLZ2A=; b=dbY5YMKmOFiLehfFF9qcxEzP6Br+T8bbVUbBQQ7c8BuX1AagbYd9amDxN7eawalgn6I1qf uudh4Hdb0v5Fa5gn1L421EwwZw9AjpYb8XPU2w4JwIF/RB+N8Iw4kMaQFS35L/R1Nfl/8s hqkmgEpvxIHt+tjuhxMlrFNThxS7ohGnVEWOKAtDd/lakXNtWJ1OTst4WcRW3i5Y4H2h+R CEXbeM0z82jdb0xZcLFKUshF3x681XpymExqMiAUWypAYCvzFgqs+UqK5mJJKO+lzGXmNt AbqUDAMlbryeGHKBEM6OTI94aZ7X0BeJxlQHJ1v5yzEJ7+6So1wJCQm320EMkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0WxF31svzpkK; Thu, 13 Jun 2024 19:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJ295w022573; Thu, 13 Jun 2024 19:02:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJ29ZH022570; Thu, 13 Jun 2024 19:02:09 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:02:09 GMT Message-Id: <202406131902.45DJ29ZH022570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 61827ea82189 - stable/14 - find: fix build on 32bits List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 61827ea821894947844fb13e9950dce554af350c Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=61827ea821894947844fb13e9950dce554af350c commit 61827ea821894947844fb13e9950dce554af350c Author: Baptiste Daroussin AuthorDate: 2024-01-12 06:34:28 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:01:56 +0000 find: fix build on 32bits --- usr.bin/find/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 57225e8fa23f..46f0e9b3c38b 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -217,7 +217,7 @@ find_execute(PLAN *plan, char *paths[]) if (showinfo) { fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); - fprintf(stderr, "Scanned: %lu\n\n", counter); + fprintf(stderr, "Scanned: %zu\n\n", counter); showinfo = 0; } ++counter; From nobody Thu Jun 13 19:41:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Xpl1ZZRz5PDkj; Thu, 13 Jun 2024 19:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Xpl1BHNz4tYY; Thu, 13 Jun 2024 19:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoG7L94LpQzfes6VufGhrawMvDpQfEm+2Rlk6wXc+0U=; b=Pjg+rzOAKsmH1SqHAe4CgTUSxccVmDFZmCDvZb6E4lgXV16lNPaUdy6G3R6gitGKPbnCjr QZ1mFGSwwvSMY0i7qib/6Wp7e4pjN3foUNMQp+ocMXkQTUimsvDySISqauK20MTey8GA5R a/ucFFkAnef11dwzB6++hyPZcW1MztWIhGR685ssg1Vs6IoJxCp5v1TDqp+j8hBMRZvuhi MMJFPysaBPS4dTlvlZNiyvKTTHZy1xutta9f/qzsMBKjgPFf8txx7vCJc3xq+Te0Y1TPl1 BvChThe3DGSB3EIMhER7tTzR30CwuGtiX/IIoSe/jEZiajGlt9UmKDpuAinyZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718307695; a=rsa-sha256; cv=none; b=WgTjhe1CDFVzxYcqpuAfhZtH9+te5D9kdapWr0aYLDqIzYFriV1Ica6pjrl4CiKazxlEn2 BhapIgTjPAYuaxqHQZbaSpa89kVlFvrTvAyi36Vk2eaITBqzVWfytpQubuOc4wDYJbrPRz Fh3NlT3El6XJFK6dNz7pVisVqRU4p8V0SJVVcThfKvElTTj2PgGSTCM9M8zJm3NXvdTkEJ AQNftsQ0HmBFNyoOaC3o/ltfuAPwfZmYU0GugAv5FFBKkDwZ1WdXgC6majzx5xUtuVfmKc nkR/4SlIZ3swteoqDQofi4yGAaFbRfzYPTSw57ggyKh99063dUiNM4IyuJ1nGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoG7L94LpQzfes6VufGhrawMvDpQfEm+2Rlk6wXc+0U=; b=c3ImPwnx+cc+MdMcgcDtzV28Dw1g7fq9tOMjltNvMRvN2b2I4cwWkQg7wPmMnlN8AbySUh 4ZjRGoT7A65Kw+8INdRgKb9sYS5z2lRLQfJHH8QxcPKye3RgeTh1KJdWuvkO//917HFMv2 XjWnr6wTsNToVUDmBMD0CsIkogszwTC25l01eZ+cJXDu9uDaTFtMFGVZ8Ox3cbaJxxIBgM Z52S4RyG6xIMMQyJWZgAwuHBp5pmfkgysCWzfT8RKabYjvzA52jXXCeqjsxsH/bvwnxZK6 bxVledEg451E57+0C2y4KpSoOrJMGwIYWzKXnlzeGsFrKlh6h5AQVs2ld4ZmSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Xpl0nf9zqDs; Thu, 13 Jun 2024 19:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJfZaa086959; Thu, 13 Jun 2024 19:41:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJfZmk086956; Thu, 13 Jun 2024 19:41:35 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:41:35 GMT Message-Id: <202406131941.45DJfZmk086956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: c7fc7a4b9c45 - stable/13 - fusefs: prefer new/delete over malloc/free List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c7fc7a4b9c4508e813209bad692fdac63d02846d Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c7fc7a4b9c4508e813209bad692fdac63d02846d commit c7fc7a4b9c4508e813209bad692fdac63d02846d Author: Alan Somers AuthorDate: 2024-01-15 23:49:47 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:40:53 +0000 fusefs: prefer new/delete over malloc/free Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43464 (cherry picked from commit 8bae22bbbe6571da9259e0d43ffa8a56f4b3e171) --- tests/sys/fs/fusefs/bmap.cc | 5 +- tests/sys/fs/fusefs/copy_file_range.cc | 22 ++++---- tests/sys/fs/fusefs/io.cc | 30 +++++------ tests/sys/fs/fusefs/read.cc | 14 +++-- tests/sys/fs/fusefs/setattr.cc | 23 ++++----- tests/sys/fs/fusefs/write.cc | 94 +++++++++++++++------------------- 6 files changed, 82 insertions(+), 106 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index cefbbc472825..fae5aabee471 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -188,7 +188,7 @@ TEST_P(BmapEof, eof) const off_t filesize = 2 * m_maxbcachebuf; const ino_t ino = 42; mode_t mode = S_IFREG | 0644; - void *buf; + char *buf; int fd; int ngetattrs; @@ -243,11 +243,12 @@ TEST_P(BmapEof, eof) out.body.attr.attr.size = filesize / 2; }))); - buf = calloc(1, filesize); + buf = new char[filesize](); fd = open(FULLPATH, O_RDWR); ASSERT_LE(0, fd) << strerror(errno); read(fd, buf, filesize); + delete[] buf; leak(fd); } diff --git a/tests/sys/fs/fusefs/copy_file_range.cc b/tests/sys/fs/fusefs/copy_file_range.cc index 17b21b888736..806ecf3c3653 100644 --- a/tests/sys/fs/fusefs/copy_file_range.cc +++ b/tests/sys/fs/fusefs/copy_file_range.cc @@ -197,7 +197,7 @@ TEST_F(CopyFileRange, evicts_cache) const char RELPATH1[] = "src.txt"; const char FULLPATH2[] = "mountpoint/dst.txt"; const char RELPATH2[] = "dst.txt"; - void *buf0, *buf1, *buf; + char *buf0, *buf1, *buf; const uint64_t ino1 = 42; const uint64_t ino2 = 43; const uint64_t fh1 = 0xdeadbeef1a7ebabe; @@ -209,7 +209,7 @@ TEST_F(CopyFileRange, evicts_cache) ssize_t len = m_maxbcachebuf; int fd1, fd2; - buf0 = malloc(m_maxbcachebuf); + buf0 = new char[m_maxbcachebuf]; memset(buf0, 42, m_maxbcachebuf); expect_lookup(RELPATH1, ino1, S_IFREG | 0644, fsize1, 1); @@ -240,7 +240,7 @@ TEST_F(CopyFileRange, evicts_cache) fd2 = open(FULLPATH2, O_RDWR); // Prime cache - buf = malloc(m_maxbcachebuf); + buf = new char[m_maxbcachebuf]; ASSERT_EQ(m_maxbcachebuf, pread(fd2, buf, m_maxbcachebuf, start2)) << strerror(errno); EXPECT_EQ(0, memcmp(buf0, buf, m_maxbcachebuf)); @@ -249,7 +249,7 @@ TEST_F(CopyFileRange, evicts_cache) ASSERT_EQ(len, copy_file_range(fd1, &start1, fd2, &start2, len, 0)); // Read again. This should bypass the cache and read direct from server - buf1 = malloc(m_maxbcachebuf); + buf1 = new char[m_maxbcachebuf]; memset(buf1, 69, m_maxbcachebuf); start2 -= len; expect_read(ino2, start2, m_maxbcachebuf, m_maxbcachebuf, buf1, -1, @@ -258,9 +258,9 @@ TEST_F(CopyFileRange, evicts_cache) << strerror(errno); EXPECT_EQ(0, memcmp(buf1, buf, m_maxbcachebuf)); - free(buf1); - free(buf0); - free(buf); + delete[] buf1; + delete[] buf0; + delete[] buf; leak(fd1); leak(fd2); } @@ -343,8 +343,8 @@ TEST_F(CopyFileRange, mmap_write) int fd; const mode_t mode = 0644; - fbuf = (uint8_t*)calloc(1, fsize); - wbuf = (uint8_t*)malloc(wsize); + fbuf = new uint8_t[fsize](); + wbuf = new uint8_t[wsize]; memset(wbuf, 1, wsize); expect_lookup(RELPATH, ino, S_IFREG | mode, fsize, 1); @@ -383,8 +383,8 @@ TEST_F(CopyFileRange, mmap_write) r = copy_file_range(fd, &offset2_in, fd, &offset2_out, copysize, 0); ASSERT_EQ(copysize, (size_t)r) << strerror(errno); - free(wbuf); - free(fbuf); + delete[] wbuf; + delete[] fbuf; } diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index 77df0ceede64..84c6e3c0161b 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -283,7 +283,8 @@ void do_ftruncate(off_t offs) void do_mapread(off_t offs, ssize_t size) { - void *control_buf, *p; + char *control_buf; + void *p; off_t pg_offset, page_mask; size_t map_size; @@ -295,8 +296,7 @@ void do_mapread(off_t offs, ssize_t size) offs - pg_offset); ASSERT_NE(p, MAP_FAILED) << strerror(errno); - control_buf = malloc(size); - ASSERT_NE(nullptr, control_buf) << strerror(errno); + control_buf = new char[size]; ASSERT_EQ(size, pread(m_control_fd, control_buf, size, offs)) << strerror(errno); @@ -304,18 +304,16 @@ void do_mapread(off_t offs, ssize_t size) compare((void*)((char*)p + pg_offset), control_buf, offs, size); ASSERT_EQ(0, munmap(p, map_size)) << strerror(errno); - free(control_buf); + delete[] control_buf; } void do_read(off_t offs, ssize_t size) { - void *test_buf, *control_buf; + char *test_buf, *control_buf; ssize_t r; - test_buf = malloc(size); - ASSERT_NE(nullptr, test_buf) << strerror(errno); - control_buf = malloc(size); - ASSERT_NE(nullptr, control_buf) << strerror(errno); + test_buf = new char[size]; + control_buf = new char[size]; errno = 0; r = pread(m_test_fd, test_buf, size, offs); @@ -327,8 +325,8 @@ void do_read(off_t offs, ssize_t size) compare(test_buf, control_buf, offs, size); - free(control_buf); - free(test_buf); + delete[] control_buf; + delete[] test_buf; } void do_mapwrite(off_t offs, ssize_t size) @@ -343,8 +341,7 @@ void do_mapwrite(off_t offs, ssize_t size) pg_offset = offs & page_mask; map_size = pg_offset + size; - buf = (char*)malloc(size); - ASSERT_NE(nullptr, buf) << strerror(errno); + buf = new char[size]; for (i=0; i < size; i++) buf[i] = random(); @@ -364,7 +361,7 @@ void do_mapwrite(off_t offs, ssize_t size) ASSERT_EQ(size, pwrite(m_control_fd, buf, size, offs)) << strerror(errno); - free(buf); + delete[] buf; ASSERT_EQ(0, munmap(p, map_size)) << strerror(errno); } @@ -373,8 +370,7 @@ void do_write(off_t offs, ssize_t size) char *buf; long i; - buf = (char*)malloc(size); - ASSERT_NE(nullptr, buf) << strerror(errno); + buf = new char[size]; for (i=0; i < size; i++) buf[i] = random(); @@ -384,7 +380,7 @@ void do_write(off_t offs, ssize_t size) << strerror(errno); m_filesize = std::max(m_filesize, offs + size); - free(buf); + delete[] buf; } }; diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 5beb59e9f3be..90516a2f7c8a 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -1216,8 +1216,7 @@ TEST_F(Read, cache_block) char buf[bufsize]; const char *contents1 = CONTENTS0 + bufsize; - contents = (char*)calloc(1, filesize); - ASSERT_NE(nullptr, contents); + contents = new char[filesize](); memmove(contents, CONTENTS0, strlen(CONTENTS0)); expect_lookup(RELPATH, ino, filesize); @@ -1235,7 +1234,7 @@ TEST_F(Read, cache_block) ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); ASSERT_EQ(0, memcmp(buf, contents1, bufsize)); leak(fd); - free(contents); + delete[] contents; } /* Reading with sendfile should work (though it obviously won't be 0-copy) */ @@ -1332,10 +1331,9 @@ TEST_P(ReadAhead, readahead) { char *rbuf, *contents; off_t offs; - contents = (char*)malloc(filesize); - ASSERT_NE(nullptr, contents); + contents = new char[filesize]; memset(contents, 'X', filesize); - rbuf = (char*)calloc(1, bufsize); + rbuf = new char[bufsize](); expect_lookup(RELPATH, ino, filesize); expect_open(ino, 0, 1); @@ -1357,8 +1355,8 @@ TEST_P(ReadAhead, readahead) { ASSERT_EQ(0, memcmp(rbuf, contents, bufsize)); leak(fd); - free(rbuf); - free(contents); + delete[] rbuf; + delete[] contents; } INSTANTIATE_TEST_CASE_P(RA, ReadAhead, diff --git a/tests/sys/fs/fusefs/setattr.cc b/tests/sys/fs/fusefs/setattr.cc index 2502286c3f03..79559db33b12 100644 --- a/tests/sys/fs/fusefs/setattr.cc +++ b/tests/sys/fs/fusefs/setattr.cc @@ -448,7 +448,7 @@ TEST_F(Setattr, truncate) { TEST_F(Setattr, truncate_discards_cached_data) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; - void *w0buf, *r0buf, *r1buf, *expected; + char *w0buf, *r0buf, *r1buf, *expected; off_t w0_offset = 0; size_t w0_size = 0x30000; off_t r0_offset = 0; @@ -463,18 +463,13 @@ TEST_F(Setattr, truncate_discards_cached_data) { int fd, r; bool should_have_data = false; - w0buf = malloc(w0_size); - ASSERT_NE(nullptr, w0buf) << strerror(errno); + w0buf = new char[w0_size]; memset(w0buf, 'X', w0_size); - r0buf = malloc(r0_size); - ASSERT_NE(nullptr, r0buf) << strerror(errno); - r1buf = malloc(r1_size); - ASSERT_NE(nullptr, r1buf) << strerror(errno); + r0buf = new char[r0_size]; + r1buf = new char[r1_size]; - expected = malloc(r1_size); - ASSERT_NE(nullptr, expected) << strerror(errno); - memset(expected, 0, r1_size); + expected = new char[r1_size](); expect_lookup(RELPATH, ino, mode, 0, 1); expect_open(ino, O_RDWR, 1); @@ -558,10 +553,10 @@ TEST_F(Setattr, truncate_discards_cached_data) { r = memcmp(expected, r1buf, r1_size); ASSERT_EQ(0, r); - free(expected); - free(r1buf); - free(r0buf); - free(w0buf); + delete[] expected; + delete[] r1buf; + delete[] r0buf; + delete[] w0buf; leak(fd); } diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 9a795f8e3a10..9412d68603de 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -311,10 +311,8 @@ TEST_F(Write, append_to_cached) uint64_t oldsize = m_maxbcachebuf / 2; int fd; - oldcontents = (char*)calloc(1, oldsize); - ASSERT_NE(nullptr, oldcontents) << strerror(errno); - oldbuf = (char*)malloc(oldsize); - ASSERT_NE(nullptr, oldbuf) << strerror(errno); + oldcontents = new char[oldsize](); + oldbuf = new char[oldsize]; expect_lookup(RELPATH, ino, oldsize); expect_open(ino, 0, 1); @@ -332,8 +330,8 @@ TEST_F(Write, append_to_cached) /* Write the new data. There should be no more read operations */ ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno); leak(fd); - free(oldbuf); - free(oldcontents); + delete[] oldbuf; + delete[] oldcontents; } TEST_F(Write, append_direct_io) @@ -659,7 +657,7 @@ TEST_P(WriteEofDuringVnopStrategy, eof_during_vop_strategy) const char RELPATH[] = "some_file.txt"; Sequence seq; const off_t filesize = 2 * m_maxbcachebuf; - void *contents; + char *contents; uint64_t ino = 42; uint64_t attr_valid = 0; uint64_t attr_valid_nsec = 0; @@ -668,7 +666,7 @@ TEST_P(WriteEofDuringVnopStrategy, eof_during_vop_strategy) int ngetattrs; ngetattrs = GetParam(); - contents = calloc(1, filesize); + contents = new char[filesize](); EXPECT_LOOKUP(FUSE_ROOT_ID, RELPATH) .WillRepeatedly(Invoke( @@ -742,14 +740,12 @@ TEST_F(Write, mmap) void *p; uint64_t offset = 10; size_t len; - void *zeros, *expected; + char *zeros, *expected; len = getpagesize(); - zeros = calloc(1, len); - ASSERT_NE(nullptr, zeros); - expected = calloc(1, len); - ASSERT_NE(nullptr, expected); + zeros = new char[len](); + expected = new char[len](); memmove((uint8_t*)expected + offset, CONTENTS, bufsize); expect_lookup(RELPATH, ino, len); @@ -774,8 +770,8 @@ TEST_F(Write, mmap) ASSERT_EQ(0, munmap(p, len)) << strerror(errno); close(fd); // Write mmap'd data on close - free(expected); - free(zeros); + delete[] expected; + delete[] zeros; leak(fd); } @@ -867,8 +863,7 @@ TEST_F(WriteMaxWrite, write) if (halfbufsize >= m_maxbcachebuf || halfbufsize >= m_maxphys) GTEST_SKIP() << "Must lower m_maxwrite for this test"; bufsize = halfbufsize * 2; - contents = (int*)malloc(bufsize); - ASSERT_NE(nullptr, contents); + contents = new int[bufsize / sizeof(int)]; for (int i = 0; i < (int)bufsize / (int)sizeof(i); i++) { contents[i] = i; } @@ -885,7 +880,7 @@ TEST_F(WriteMaxWrite, write) ASSERT_EQ(bufsize, write(fd, contents, bufsize)) << strerror(errno); leak(fd); - free(contents); + delete[] contents; } TEST_F(Write, write_nothing) @@ -966,15 +961,13 @@ TEST_F(WriteCluster, clustering) const char RELPATH[] = "some_file.txt"; uint64_t ino = 42; int i, fd; - void *wbuf, *wbuf2x; + char *wbuf, *wbuf2x; ssize_t bufsize = m_maxbcachebuf; off_t filesize = 5 * bufsize; - wbuf = malloc(bufsize); - ASSERT_NE(nullptr, wbuf) << strerror(errno); + wbuf = new char[bufsize]; memset(wbuf, 'X', bufsize); - wbuf2x = malloc(2 * bufsize); - ASSERT_NE(nullptr, wbuf2x) << strerror(errno); + wbuf2x = new char[2 * bufsize]; memset(wbuf2x, 'X', 2 * bufsize); expect_lookup(RELPATH, ino, filesize); @@ -997,8 +990,8 @@ TEST_F(WriteCluster, clustering) << strerror(errno); } close(fd); - free(wbuf2x); - free(wbuf); + delete[] wbuf2x; + delete[] wbuf; } /* @@ -1015,12 +1008,11 @@ TEST_F(WriteCluster, cluster_write_err) const char RELPATH[] = "some_file.txt"; uint64_t ino = 42; int i, fd; - void *wbuf; + char *wbuf; ssize_t bufsize = m_maxbcachebuf; off_t filesize = 4 * bufsize; - wbuf = malloc(bufsize); - ASSERT_NE(nullptr, wbuf) << strerror(errno); + wbuf = new char[bufsize]; memset(wbuf, 'X', bufsize); expect_lookup(RELPATH, ino, filesize); @@ -1042,7 +1034,7 @@ TEST_F(WriteCluster, cluster_write_err) << strerror(errno); } close(fd); - free(wbuf); + delete[] wbuf; } /* @@ -1179,11 +1171,11 @@ TEST_F(WriteBack, mmap_direct_io) int fd; size_t len; ssize_t bufsize = strlen(CONTENTS); - void *p, *zeros; + char *zeros; + void *p; len = getpagesize(); - zeros = calloc(1, len); - ASSERT_NE(nullptr, zeros); + zeros = new char[len](); expect_lookup(RELPATH, ino, len); expect_open(ino, FOPEN_DIRECT_IO, 1); @@ -1203,7 +1195,7 @@ TEST_F(WriteBack, mmap_direct_io) ASSERT_EQ(0, munmap(p, len)) << strerror(errno); close(fd); // Write mmap'd data on close - free(zeros); + delete[] zeros; } /* @@ -1252,10 +1244,9 @@ TEST_F(WriteBackAsync, direct_io_ignores_unrelated_cached) ssize_t bufsize = strlen(CONTENTS0) + 1; ssize_t fsize = 2 * m_maxbcachebuf; char readbuf[bufsize]; - void *zeros; + char *zeros; - zeros = calloc(1, m_maxbcachebuf); - ASSERT_NE(nullptr, zeros); + zeros = new char[m_maxbcachebuf](); expect_lookup(RELPATH, ino, fsize); expect_open(ino, 0, 1); @@ -1282,7 +1273,7 @@ TEST_F(WriteBackAsync, direct_io_ignores_unrelated_cached) ASSERT_STREQ(readbuf, CONTENTS0); leak(fd); - free(zeros); + delete[] zeros; } /* @@ -1298,20 +1289,15 @@ TEST_F(WriteBackAsync, direct_io_partially_overlaps_cached_block) int fd; off_t bs = m_maxbcachebuf; ssize_t fsize = 3 * bs; - void *readbuf, *zeros, *ones, *zeroones, *onezeros; - - readbuf = malloc(bs); - ASSERT_NE(nullptr, readbuf) << strerror(errno); - zeros = calloc(1, 3 * bs); - ASSERT_NE(nullptr, zeros); - ones = calloc(1, 2 * bs); - ASSERT_NE(nullptr, ones); + char *readbuf, *zeros, *ones, *zeroones, *onezeros; + + readbuf = new char[bs]; + zeros = new char[3 * bs](); + ones = new char[2 * bs]; memset(ones, 1, 2 * bs); - zeroones = calloc(1, bs); - ASSERT_NE(nullptr, zeroones); + zeroones = new char[bs](); memset((uint8_t*)zeroones + bs / 2, 1, bs / 2); - onezeros = calloc(1, bs); - ASSERT_NE(nullptr, onezeros); + onezeros = new char[bs](); memset(onezeros, 1, bs / 2); expect_lookup(RELPATH, ino, fsize); @@ -1356,11 +1342,11 @@ TEST_F(WriteBackAsync, direct_io_partially_overlaps_cached_block) EXPECT_EQ(0, memcmp(ones, readbuf, bs / 2)); leak(fd); - free(zeroones); - free(onezeros); - free(ones); - free(zeros); - free(readbuf); + delete[] zeroones; + delete[] onezeros; + delete[] ones; + delete[] zeros; + delete[] readbuf; } /* From nobody Thu Jun 13 19:41:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Xpm49Hlz5PDxJ; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Xpm1x0gz4tbf; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B81q4zBjRw4OSZta0ieWPs++qp98Qrvbjw5jBQrp2Fs=; b=UxM2jXx36qF+Dcw081jVcXOV8v/sYt9NsLgbmBCTgj+oxYOSTNUsSezgHFDw9bPgPUMWD8 YgBygYvfBrSWRULpnOnK9NeIq/9jgeQJ+BeQfc2hMr2EhPJusY1u/4mc0We9Hy8glWNu7M vfyH/Z7UTmo6MjXZX9XCfeconFzPxDENGhvrfTOpG1M6ZXB7/P0k0KV0Oj6VhQaO7Mxx2d bYFeKet6Nxbu72m9sP+uljruYl/Su+9DUVDTPhSJbl/4ubNmBCfGSUEO4prsny/f3mEbC1 S81buQLLIeWKWUxAbdFYOsCtxLBvgYP3fzGAVV5HJWYQveAmI8dAVVi7DtUWYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718307696; a=rsa-sha256; cv=none; b=suNPRu2iF0uxwhoHY4fUixL6uhVgCVf9oll4dBjfSerrWxw3Wulhe/SwnVPz4lG++JQQye LzpF9/YhtArijhu6wvsqTX98KQ5YIPCdx/x3t/zrIUUNWQ7YQe6qoYU+8UqPYDJeaO5yke EhTfxqvcMbYyeq/pRWru2Yv01IDMjArOSCVgr06DME7YPqkjFnxj5ziJpjEEnOpLI7UMqE LKuHgGYbNkL3paWXXxbnyE5ym94paTcqUGnfq+6StPmab0VXKRx/2BEGtqVu2+Nk3GpFBb goAGM4oEhiFanTd3umXdaLUhokrFz2sYtDLU4HMQlvrWgSJs8shd83ZWG54EHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B81q4zBjRw4OSZta0ieWPs++qp98Qrvbjw5jBQrp2Fs=; b=brOwqgBmAxiukYy1DxVGZWPRM5cfvgHeKdq+2vTCBMgSdYg8WUe8wA8N1ICOTKHRW3r+EM zEVLSzx7f8LF/V+6OM+XYX9T7kLIAClFwQLpOHm+oHxMSoh6IKQNGqdiqzFRsuAiPVgtny 2O013hbfPV8ybXz7qe8FfEIbwd6CB593KmJaCs7QH4/uYPdPu4WybfiagmNZKVf6YVtzQB s/SKfFmUpnJ2pUYqS9bdtPUntA5AaNfzIW+BuCaf2LUBQU2gQhc3eXR94fFZbXLCV0H4Qe CWGEaolvHFow0ebq7q1eFANPZet9NCOjXxR21G2KKPsPEoQ92dTl6PE/iGw9Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Xpm1P3hzq2k; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJfa6D087013; Thu, 13 Jun 2024 19:41:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJfagT087010; Thu, 13 Jun 2024 19:41:36 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:41:36 GMT Message-Id: <202406131941.45DJfagT087010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: f5f1f1115f5b - stable/13 - fusefs: fix some memory leaks in the tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 commit f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 Author: Alan Somers AuthorDate: 2024-01-17 21:13:05 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:40:59 +0000 fusefs: fix some memory leaks in the tests (cherry picked from commit 39f5d8dd1b2fea7cff0770efb0bc3d6e33e24279) --- tests/sys/fs/fusefs/fallocate.cc | 1 + tests/sys/fs/fusefs/mockfs.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/fallocate.cc b/tests/sys/fs/fusefs/fallocate.cc index 73717d6b5ce7..56ab4b698f2a 100644 --- a/tests/sys/fs/fusefs/fallocate.cc +++ b/tests/sys/fs/fusefs/fallocate.cc @@ -201,6 +201,7 @@ TEST_F(PosixFallocate, erofs) build_iovec(&iov, &iovlen, "fspath", (void*)statbuf.f_mntonname, -1); build_iovec(&iov, &iovlen, "from", __DECONST(void *, "/dev/fuse"), -1); ASSERT_EQ(0, nmount(iov, iovlen, newflags)) << strerror(errno); + free_iovec(&iov, &iovlen); EXPECT_EQ(EROFS, posix_fallocate(fd, offset, length)); diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 92fc0c0d97a1..bd7bd1b663f9 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -521,6 +521,7 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions, if (nmount(iov, iovlen, 0)) throw(std::system_error(errno, std::system_category(), "Couldn't mount filesystem")); + free_iovec(&iov, &iovlen); // Setup default handler ON_CALL(*this, process(_, _)) From nobody Thu Jun 13 19:50:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Y0V0XHvz5PFPs; Thu, 13 Jun 2024 19:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Y0V007rz3wg5; Thu, 13 Jun 2024 19:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=or+um3x5AjN4YCMtkq/EGET0sCb7LE0WhzsihCeR7Nc=; b=TWnRsTcdHbV2VeiL6xSjT48VSdmBki6uWvWJjzX0kEbpg9uohNvYltPleinXHm+3+X+kGP 8G/+7h7GKsA+QvwJILP/hejRtBe5gvRKDzDUl6yWPBfAICRfkU9UbsRhuHDNafgjo1aSmY 7Tl9jReq2RcRuSwk6SROa7+CRxWKm5zb/ZSKd4HezIw6IbGrBgHmX00hKFcg1JyMv9xCTf b7q4xyLbjuf5qqm8hPuxSm+QX6EsFWSeK+YaIWCcHWv31WtiJz6zZGiwjNNUiDG7UehZCd tVd3XS9tPtK2h37XFvUjYfOQbDcZpCJBGsk7UJPuUNYPru9OTuSWaDxltZl5fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718308202; a=rsa-sha256; cv=none; b=OMKK4W6/+ccn2AuUuKPxOT1Y7WSjPweDy4NPfLi3hJv97RDgyaTxPv8aB2vpOpL+Sa26Lj /npV3227pSgYIsaqvbIhA1b9vz1RQduu7FT6THbfCaMGvPOHUMRMb4uKS/1gM0RPdNCoGd o2g7GbJ45ltxDrbxDGNtl99IkLZThWY8vAU5wNdMSOt1gpmm1S65zx1OCrUFdDbQNMtHGQ zcWAAMsOTfkO4LiFaI5UtZRs5BMIQBpfQwrTkyLRXbrXv32WP2ze/qpGymsm0akWCymuPe 2UBYS0v8dIQrmoc92SsJRLxfESfrNziG+v3Sa0midFbBRq8rwFGIdS2rBbYd3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=or+um3x5AjN4YCMtkq/EGET0sCb7LE0WhzsihCeR7Nc=; b=jkCD8jAyCIHaHoiof9Q6CFfg2eS7l2xEyj/IKGiDZdVVzs8FEfkbibTKQF2a0AllHQ+BeL ihy67hI8f87/OSrO9Nr3MB4+JvrvwS7SubMtR4Rr7fVbFJQ67mHMUs8RsN2Eu4uYIq845r VekGpmN47+9OJqDZIIiqk+NSF4FQhQUDbN333JsD4vDF9HswkCpL6aIKRKUguz1DX69XRH 0rwIDp+nNm6SfKv7lwrpHcKL4OtWOC7F3niiZXMdYjJGgVfgMTE+JE/6UeSRRZIqGnTzw2 QuyTROJV8CR1CfGEfIUl3tBq1cn5Up8KmHPPHtZw0PrO0KFNHKXPFJ/clI8ayQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Y0T6hzmzqHR; Thu, 13 Jun 2024 19:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJo1VB092185; Thu, 13 Jun 2024 19:50:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJo1vB092180; Thu, 13 Jun 2024 19:50:01 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:50:01 GMT Message-Id: <202406131950.45DJo1vB092180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: bd11dd6fb9a0 - stable/13 - fusefs: only test for incoherency if FN_SIZECHANGE is set List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bd11dd6fb9a0e4daa04f0fa66ed38d44f716e919 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=bd11dd6fb9a0e4daa04f0fa66ed38d44f716e919 commit bd11dd6fb9a0e4daa04f0fa66ed38d44f716e919 Author: Emil Tsalapatis AuthorDate: 2024-02-08 01:13:43 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:46:01 +0000 fusefs: only test for incoherency if FN_SIZECHANGE is set FUSE emits spurious incoherency warnings in writethrough mode. The warnings are triggered by setattr calls generated by vnode truncation turning the cached va_size vattr stale, causing comparisons with the fresh version provided by the server to fail. Only validate the vnode's va_size vattr if the FN_SIZECHANGE flag is set. This is a part of the research work at RCSLab, University of Waterloo. Reviewed by: asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/1110 (cherry picked from commit 8758bf0aaec1d4b2ebcb429e8cabc691c2c95461) --- sys/fs/fuse/fuse_internal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index c851cb2e34f4..adf84d30e801 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -270,10 +270,10 @@ fuse_internal_cache_attrs(struct vnode *vp, struct fuse_attr *attr, if (vnode_isreg(vp) && fvdat->cached_attrs.va_size != VNOVAL && + fvdat->flag & FN_SIZECHANGE && attr->size != fvdat->cached_attrs.va_size) { - if ( data->cache_mode == FUSE_CACHE_WB && - fvdat->flag & FN_SIZECHANGE) + if (data->cache_mode == FUSE_CACHE_WB) { const char *msg; From nobody Thu Jun 13 19:51:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Y2N10QWz5PFyt; Thu, 13 Jun 2024 19:51:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Y2N0Bl3z3wtf; Thu, 13 Jun 2024 19:51:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ssRigyyHJnm0++WnhuKjmodx/dtUz6kMQoZT0ckkdIY=; b=so+a87RjhFm9SYOYVQXGPDg9zrlFk/4afIU8PyDklCyTU1h3aHp3TTyv8Ho1MPUCOKqaXz iHj2lUV/s3INmlmgNTBtwy5wUNYi7YigJbs1eBNgRlA5VA7uwUlezkvCY/yd63U36mu44R pFRjlx5EjFefmNzKXGay3uenkqwEh+PGcsIYQ5ZPlLDetLd6gpzvTsRBbjc9Dfsx//yw8V 7PVQpUQXCI2us/4JFMdKNBT9T4mQoB3yBGWAPRVMXDCfHFhgP+GCclhaO4+0m/xLLRJ7X5 pN/nBpMN0p6o7V28Kfq5rEP2sE6+4OvHhYuteHGY5r/HhSfdtq2QF9gJECEegg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718308300; a=rsa-sha256; cv=none; b=GfNHd60TVsRERkucbkMYatXKPnAv+pmuAcqgTwg8uM3Br0n6SQeoRc3tN0DOczX+9v9PvT 1oIlVhJ+bX84tr0nfVHAAa2RUiEBj5iQCsJRuWmGzA8KCLd7Gw0Q5cY5asFCsvV8ZFlsm+ aDrj3lXZu11BXmcQH1Qb2PGv5Nqz3/0fePzhiaJ8ZrJk1w3iahvkHWKU2X9PxpVH683Yq7 3yoJtrIYlFlCJaMte8JyaSlVpW1q5bUr7hSjvYQRYrhkWhXit2BWcrV5jx9ieaqgSw5dg5 VENvrlpvnOtIFa1WdJ2kUlH68xaDOkpzKegM9DwSWmv48OPe+hTnW+LXh0OlJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ssRigyyHJnm0++WnhuKjmodx/dtUz6kMQoZT0ckkdIY=; b=PLpa63yTB+K6WmebdbiVaRtPZ8eI/VS0XAPb5mSaHrTdhMSJIA2VcFLJSpaoy670dVtVD7 71BoT+vY8JWPfFH0hYzUexwmnzLySHAtId3vtnZ/hBmzhYjoIMKkyAIXIxs+qaSPm2gZt+ qxWVC8JaA72Sy2ITu4DKHXPVp6mThAZEN16i6iyZh97o8Gg6pWgrKbtqj+y1aktF3nDEOs 76PeSbfUiQrbRnQU9hFF3OwgFODkjgAlzHtjERBWVo2K9k25Ufq4mp0RZvPJmrlMhA46VV MLf4k3hbbksysYPAf7QCgr+OGdTvwa/nkKgRunWvpIlZPuowOq5I6V+S0sD1rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Y2M6vf8zqkc; Thu, 13 Jun 2024 19:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJpdsm000954; Thu, 13 Jun 2024 19:51:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJpdcK000951; Thu, 13 Jun 2024 19:51:39 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:51:39 GMT Message-Id: <202406131951.45DJpdcK000951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: cb3c40b43049 - stable/13 - fusefs: correct a comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cb3c40b430496aed7b567a03e6b0da8b67077e19 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=cb3c40b430496aed7b567a03e6b0da8b67077e19 commit cb3c40b430496aed7b567a03e6b0da8b67077e19 Author: Alan Somers AuthorDate: 2024-04-04 20:18:56 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:51:08 +0000 fusefs: correct a comment [skip ci] Sponsored by: Axcient (cherry picked from commit c1326c01df81dd06739ddf1946e1968ddaba0c8e) --- sys/fs/fuse/fuse_node.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 52bd2d92f4da..e3448e6fa42f 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -113,14 +113,15 @@ SYSCTL_COUNTER_U64(_vfs_fusefs_stats, OID_AUTO, node_count, CTLFLAG_RD, int fuse_data_cache_mode = FUSE_CACHE_WT; /* - * DEPRECATED - * This sysctl is no longer needed as of fuse protocol 7.23. Individual + * OBSOLETE + * This sysctl is no longer needed as of fuse protocol 7.23. Now, individual * servers can select the cache behavior they need for each mountpoint: * - writethrough: the default * - writeback: set FUSE_WRITEBACK_CACHE in fuse_init_out.flags * - uncached: set FOPEN_DIRECT_IO for every file - * The sysctl is retained primarily for use by jails supporting older FUSE - * protocols. It may be removed entirely once FreeBSD 11.3 and 12.0 are EOL. + * The sysctl is retained primarily due to the enduring popularity of libfuse2, + * which is frozen at protocol version 7.19. As of 4-April-2024, 90% of + * FreeBSD ports that use libfuse still bind to libfuse2. */ SYSCTL_PROC(_vfs_fusefs, OID_AUTO, data_cache_mode, CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, From nobody Fri Jun 14 16:58:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W157d3kfdz5P9Xd; Fri, 14 Jun 2024 16:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W157d368Nz3wmS; Fri, 14 Jun 2024 16:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718384285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tssy7seHY0ZkKoEybYUGeYYr45CiBsnUAKCf301BUo=; b=Csx6GQ3emDWkA/hxOBw6wdJaP8YiChyGQZD+OSwifaVZ0pcpC6h7epIqyx8/L/vU5f2364 UpXd1CmtJuIDqCTBzjmqhT0kOQmdMmx6XTA/oD6rJAqoxAtrQO7Y+Il/OjwMXrREbq2ASj 1k1B9u0d6iMTOmmmpS69c6GdjHuusQwtyWBq6DoJGgUTVJeh90Urpv5pP6OHV6PCnoCzt/ 4UXt+r74yP7+BSQN6pGE27op9yPpE/rEMGi0VfBEWqn6EiGQq8f4raQwqwje7juiTiyjh3 q9ElbNbSEMGsBNK5Hjm5CI5M/UgkWDdcEo+5ePfOP1kGYnEAfL7h+Sld4gppmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718384285; a=rsa-sha256; cv=none; b=wtXVa+uKj9+z3xyk97nnTR2tMwlnFkXsH+/JgWkM6ZV8SJSJCE3nvHd8J2Wr93G61VUbaR KhR/6u+/4RZbcy12zoPpMZ1Zaq61NnZhh7ZuE5+Ik0Er3FIhHtjx5AdHPetuk2sxwhuybn dtkrBBSeaGLpj/I9BrFBulBOKu9R+z6rTaQwohZGdwtoOlhlTJNFyrHU+PIx68/hDWOeQ1 N5p0bA/Z+UhtRw3SAFl5/YII4GJ9orCCjd40nEIHWY9wk4TjDp5CxBJA//cJBjb0FuhINP d+oo8eMbtsVyDj+MxGNW8KPHT1DGD2WrAbOXxAKdyAihygX/EZNUmqcLWLiQtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718384285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tssy7seHY0ZkKoEybYUGeYYr45CiBsnUAKCf301BUo=; b=rjEzRomaPoK4qjqe+obt0erPUordRoWLTfKGWZ+hAscSm4L2LEfuynLRa/3orRnAeJyP5E L5EYFwsfmOJzBpzOkMYMr/JKmsosHhCJGBbbaDy2g08AueQCT79rGmAoEeMLD+bsMryiVN OLkUuzmv6GR0CBa7JySPYGXvTrPffHEH8sUM8B6JXLP1dYeGiD+AWc4aBErToH1QU0D9J3 Rg3rnZgvOlOym9AsY1gUqVx7UdA0seeHB/djvbp0B1KBUBk7euh5X1gPWEcC+Wa1dPuHTk lF/KJDd+aeBRPkywXUDsgi7OX+JuBC5yFyaazGNZGBhUkhng0lQy3oarYLL5Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W157d2ZlszSZK; Fri, 14 Jun 2024 16:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EGw5XK032959; Fri, 14 Jun 2024 16:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EGw5P3032956; Fri, 14 Jun 2024 16:58:05 GMT (envelope-from git) Date: Fri, 14 Jun 2024 16:58:05 GMT Message-Id: <202406141658.45EGw5P3032956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e6ecffccdec6 - stable/14 - sound: Include sound(4) channel information in sndstat nvlist List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e6ecffccdec60420c9e3654b8c9c4408e2fe4537 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e6ecffccdec60420c9e3654b8c9c4408e2fe4537 commit e6ecffccdec60420c9e3654b8c9c4408e2fe4537 Author: Christos Margiolis AuthorDate: 2024-06-09 15:30:22 +0000 Commit: Christos Margiolis CommitDate: 2024-06-14 16:57:57 +0000 sound: Include sound(4) channel information in sndstat nvlist Extend SNDST_DSPS_PROVIDER_INFO for sound(4) to include information about each channel in a given device, similar to how cat'ing /dev/sndstat with hw.snd.verbose=2 works. While here, document all provider_info fields. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45501 (cherry picked from commit bbca3a75bb412f7106a569b82c616404103be084) --- share/man/man4/sndstat.4 | 140 +++++++++++++++++++++++++++++++++++++------- sys/dev/sound/pcm/sndstat.c | 115 +++++++++++++++++++++++++++++++++++- sys/sys/sndstat.h | 37 ++++++++++-- 3 files changed, 265 insertions(+), 27 deletions(-) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index ba130dacaecb..f638fc6834fe 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -29,7 +29,7 @@ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd April 15, 2021 +.Dd June 5, 2024 .Dt SNDSTAT 4 .Os .Sh NAME @@ -60,25 +60,55 @@ struct sndstioc_nv_arg { Here is an example of an nvlist object with explanations of the common fields: .Bd -literal -offset indent dsps (NVLIST ARRAY): 1 - from_user (BOOL): FALSE - nameunit (STRING): [pcm0] - devnode (STRING): [dsp0] - desc (STRING): [Generic (0x8086) (Analog Line-out)] - pchan (NUMBER): 1 (1) (0x1) - rchan (NUMBER): 0 (0) (0x0) - info_play (NVLIST): - min_rate (NUMBER): 48000 (48000) (0xbb80) - max_rate (NUMBER): 48000 (48000) (0xbb80) - formats (NUMBER): 16 (16) (0x10) - min_chn (NUMBER): 2 (2) (0x2) - max_chn (NUMBER): 2 (2) (0x2) - provider_info (NVLIST): - unit (NUMBER): 0 (0) (0x0) - bitperfect (BOOL): FALSE - pvchan (NUMBER): 1 (1) (0x1) - rvchan (NUMBER): 0 (0) (0x0) - provider (STRING): [sound(4)] - , + from_user (BOOL): FALSE + nameunit (STRING): [pcm0] + devnode (STRING): [dsp0] + desc (STRING): [Generic (0x8086) (Analog Line-out)] + pchan (NUMBER): 1 + rchan (NUMBER): 0 + info_play (NVLIST): + min_rate (NUMBER): 48000 + max_rate (NUMBER): 48000 + formats (NUMBER): 16 + min_chn (NUMBER): 2 + max_chn (NUMBER): 2 + provider_info (NVLIST): + unit (NUMBER): 0 + bitperfect (BOOL): FALSE + pvchan (NUMBER): 1 + rvchan (NUMBER): 0 + channel_info (NVLIST_ARRAY): 1 + name (STRING): pcm0:virtual_play:dsp0.vp0 + parentchan (STRING): pcm0:play:dsp0.p0 + unit (NUMBER): 1 + latency (NUMBER): 2 + rate (NUMBER): 48000 + format (NUMBER): 0x201000 + pid (NUMBER): 1234 + comm (STRING): mpv + interrupts (NUMBER): 0 + feedcount (NUMBER): 0 + xruns (NUMBER): 0 + left_volume (NUMBER): 45 + right_volume (NUMBER): 45 + hwbuf_fmt (NUMBER): 0x200010 + hwbuf_size (NUMBER): 0 + hwbuf_blksz (NUMBER): 0 + hwbuf_blkcnt (NUMBER): 0 + hwbuf_free (NUMBER): 0 + hwbuf_ready (NUMBER): 0 + swbuf_fmt (NUMBER): 0x201000 + swbuf_size (NUMBER): 16384 + swbuf_blksz (NUMBER): 2048 + swbuf_blkcnt (NUMBER): 8 + swbuf_free (NUMBER): 16384 + swbuf_ready (NUMBER): 0 + feederchain (STRING): + [userland -> + feeder_root(0x00201000) -> + feeder_format(0x00201000 -> 0x00200010) -> + feeder_volume(0x00200010) -> hardware] + provider (STRING): [sound(4)] .Ed .Bl -tag -width ".Dv provider_info" .It Dv from_user @@ -133,6 +163,76 @@ Provider-specific fields. This field may not exist if the PCM audio device is not provided by in-kernel interface. This field will not exist if the provider field is an empty string. +For the +.Xr sound 4 +provider, there are a number of name/value pairs inside this field: +.Bl -tag -width ".Dv channel_info" +.It Dv unit +Sound card unit. +.It Dv bitperfect +Whether the sound card has bit-perfect mode enabled. +.It Dv pvchan +Number of playback virtual channels. +.It Dv rvchan +Number of recording virtual channels. +.It Dv channel_info +Channel information. +There are a number of name/value pairs inside this field: +.Bl -tag -width ".Dv hwbuf_blkcnt" +.It Dv name +Channel name. +.It Dv parenchan +Parent channel name (e.g., in the case of virtual channels). +.It Dv unit +Channel unit. +.It Dv latency +Latency. +.It Dv rate +Sampling rate. +.It Dv format +Sampling format. +.It Dv pid +PID of the process consuming the channel. +.It Dv comm +Name of the process consuming the channel. +.It Dv interrupts +Number of interrupts since the channel has been opened. +.It Dv xruns +Number of overruns/underruns, depending on channel direction. +.It Dv feedcount +Number of read/written bytes since the channel has been opened. +.It Dv left_volume +Left volume. +.It Dv right_volume +Right volume. +.It Dv hwbuf_format +Hardware buffer format. +.It Dv hwbuf_size +Hardware buffer size. +.It Dv hwbuf_blksz +Hardware buffer block size. +.It Dv hwbuf_blkcnt +Hardware buffer block count. +.It Dv hwbuf_free +Free space in hardware buffer (in bytes). +.It Dv hwbuf_ready +Number of bytes ready to be read/written from hardware buffer. +.It Dv swbuf_format +Software buffer format. +.It Dv swbuf_size +Software buffer size. +.It Dv swbuf_blksz +Software buffer block size. +.It Dv swbuf_blkcnt +Software buffer block count. +.It Dv swbuf_free +Free space in software buffer (in bytes). +.It Dv swbuf_ready +Number of bytes ready to be read/written from software buffer. +.It Dv feederchain +Channel feeder chain. +.El +.El .It Dv provider A string specifying the provider of the PCm audio device. .El diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 6670a1e43aac..3be376e1da01 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -392,9 +392,12 @@ sndstat_create_diinfo_nv(uint32_t min_rate, uint32_t max_rate, uint32_t formats, static int sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) { + struct pcm_channel *c; + struct pcm_feeder *f; + struct sbuf sb; uint32_t maxrate, minrate, fmts, minchn, maxchn; - nvlist_t *di = NULL, *sound4di = NULL, *diinfo = NULL; - int err; + nvlist_t *di = NULL, *sound4di = NULL, *diinfo = NULL, *cdi = NULL; + int err, nchan; di = nvlist_create(0); if (di == NULL) { @@ -451,8 +454,116 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHAN, d->rvchancount); + + nchan = 0; + CHN_FOREACH(c, d, channels.pcm) { + sbuf_new(&sb, NULL, 4096, SBUF_AUTOEXTEND); + cdi = nvlist_create(0); + if (cdi == NULL) { + sbuf_delete(&sb); + PCM_RELEASE_QUICK(d); + err = ENOMEM; + goto done; + } + + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_NAME, c->name); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_PARENTCHAN, + c->parentchannel != NULL ? c->parentchannel->name : ""); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_UNIT, nchan++); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_LATENCY, + c->latency); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_RATE, c->speed); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_FORMAT, + c->format); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_PID, c->pid); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_COMM, c->comm); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_INTR, + c->interrupts); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_FEEDCNT, + c->feedcount); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_XRUNS, c->xruns); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_LEFTVOL, + CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FL)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_RIGHTVOL, + CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FR)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_FORMAT, + sndbuf_getfmt(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_SIZE, + sndbuf_getsize(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKSZ, + sndbuf_getblksz(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKCNT, + sndbuf_getblkcnt(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_FREE, + sndbuf_getfree(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_READY, + sndbuf_getready(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_FORMAT, + sndbuf_getfmt(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_SIZE, + sndbuf_getsize(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKSZ, + sndbuf_getblksz(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKCNT, + sndbuf_getblkcnt(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_FREE, + sndbuf_getfree(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_READY, + sndbuf_getready(c->bufsoft)); + + sbuf_printf(&sb, "[%s", + (c->direction == PCMDIR_REC) ? "hardware" : "userland"); + sbuf_printf(&sb, " -> "); + f = c->feeder; + while (f->source != NULL) + f = f->source; + while (f != NULL) { + sbuf_printf(&sb, "%s", f->class->name); + if (f->desc->type == FEEDER_FORMAT) { + sbuf_printf(&sb, "(0x%08x -> 0x%08x)", + f->desc->in, f->desc->out); + } else if (f->desc->type == FEEDER_MATRIX) { + sbuf_printf(&sb, "(%d.%d -> %d.%d)", + AFMT_CHANNEL(f->desc->in) - + AFMT_EXTCHANNEL(f->desc->in), + AFMT_EXTCHANNEL(f->desc->in), + AFMT_CHANNEL(f->desc->out) - + AFMT_EXTCHANNEL(f->desc->out), + AFMT_EXTCHANNEL(f->desc->out)); + } else if (f->desc->type == FEEDER_RATE) { + sbuf_printf(&sb, + "(0x%08x q:%d %d -> %d)", + f->desc->out, + FEEDER_GET(f, FEEDRATE_QUALITY), + FEEDER_GET(f, FEEDRATE_SRC), + FEEDER_GET(f, FEEDRATE_DST)); + } else { + sbuf_printf(&sb, "(0x%08x)", + f->desc->out); + } + sbuf_printf(&sb, " -> "); + f = f->parent; + } + sbuf_printf(&sb, "%s]", + (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + + sbuf_finish(&sb); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_FEEDERCHAIN, + sbuf_data(&sb)); + sbuf_delete(&sb); + + nvlist_append_nvlist_array(sound4di, + SNDST_DSPS_SOUND4_CHAN_INFO, cdi); + nvlist_destroy(cdi); + err = nvlist_error(sound4di); + if (err) { + PCM_RELEASE_QUICK(d); + goto done; + } + } nvlist_move_nvlist(di, SNDST_DSPS_PROVIDER_INFO, sound4di); sound4di = NULL; + PCM_RELEASE_QUICK(d); nvlist_add_string(di, SNDST_DSPS_PROVIDER, SNDST_DSPS_SOUND4_PROVIDER); diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index e0e403b1a72a..6fef6502ec89 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -68,11 +68,38 @@ struct sndstioc_nv_arg { /* * sound(4)-specific name/value pair names */ -#define SNDST_DSPS_SOUND4_PROVIDER "sound(4)" -#define SNDST_DSPS_SOUND4_UNIT "unit" -#define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" -#define SNDST_DSPS_SOUND4_PVCHAN "pvchan" -#define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +#define SNDST_DSPS_SOUND4_PROVIDER "sound(4)" +#define SNDST_DSPS_SOUND4_UNIT "unit" +#define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" +#define SNDST_DSPS_SOUND4_PVCHAN "pvchan" +#define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +#define SNDST_DSPS_SOUND4_CHAN_INFO "channel_info" +#define SNDST_DSPS_SOUND4_CHAN_NAME "name" +#define SNDST_DSPS_SOUND4_CHAN_PARENTCHAN "parentchan" +#define SNDST_DSPS_SOUND4_CHAN_UNIT "unit" +#define SNDST_DSPS_SOUND4_CHAN_LATENCY "latency" +#define SNDST_DSPS_SOUND4_CHAN_RATE "rate" +#define SNDST_DSPS_SOUND4_CHAN_FORMAT "format" +#define SNDST_DSPS_SOUND4_CHAN_PID "pid" +#define SNDST_DSPS_SOUND4_CHAN_COMM "comm" +#define SNDST_DSPS_SOUND4_CHAN_INTR "interrupts" +#define SNDST_DSPS_SOUND4_CHAN_FEEDCNT "feedcount" +#define SNDST_DSPS_SOUND4_CHAN_XRUNS "xruns" +#define SNDST_DSPS_SOUND4_CHAN_LEFTVOL "left_volume" +#define SNDST_DSPS_SOUND4_CHAN_RIGHTVOL "right_volume" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_FORMAT "hwbuf_format" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_SIZE "hwbuf_size" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKSZ "hwbuf_blksz" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKCNT "hwbuf_blkcnt" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_FREE "hwbuf_free" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_READY "hwbuf_ready" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_FORMAT "swbuf_format" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_SIZE "swbuf_size" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKSZ "swbuf_blksz" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKCNT "swbuf_blkcnt" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_FREE "swbuf_free" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_READY "swbuf_ready" +#define SNDST_DSPS_SOUND4_CHAN_FEEDERCHAIN "feederchain" /* * Maximum user-specified nvlist buffer size From nobody Fri Jun 14 18:43:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sk0r29z5PJyJ; Fri, 14 Jun 2024 18:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sk0KTVz4GHx; Fri, 14 Jun 2024 18:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHOzPUv1FmD/IuEwdio+RQA4VdB6K2ZIUlF/I+K48d0=; b=uwLiOlNnJjg5CYRmo8J7LSeGOSkb18tB+K8VeNE+w97AtzBJtC8QurEfKPTT3lT/TJqyY+ O134GlmBR3zR7ctiPDb0NmjG7GEz+1Ms+Dyx48WnlJajEYIj1D6XLtJ2t+DBsUyLDD6AWZ 0H1yOojBX1czgxpR6NfVtGl3h8Sdax7/BZI0Ahv+5/OnI1ajHJJAEMNeCMaOvF/kIl9AiY VLGac6aXZ+HOUo/EXgw+qaZxVCM1H5qBHHp5mbQHCFly/4UXNuJiveUBXdRSqtbi7be9K7 In7+IU0dMKgjjgo6pZe33vGzXiIBb4LGOcGqetzK8eiw09D5UhiPhSouhzHMLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390582; a=rsa-sha256; cv=none; b=FkBkoo55lKThKsJ87cEtvo5myEL4ldXFtmL+JPzyoguOwjDfc9Cof2IE4HCpTjg4UG9YsW VlKWflukQXT1VXtLZGcfxI84CCJ/mIgGXKRAFlD0F5OQst8GJMz46JMh2/5CowbRWGlBTF Lm78/O6L4werM8eg9Il+rvnN1qcgDVuPDzHAkYrFeUKl3xogW8qcimIgwb27/tifRWDVu0 yGgNpYtzOJFpJYB/9Aq8JbHgM3ZX4ODXkYWO+I0QAo5bTtYmLlYnAJxWTo7RkXS5G36STr TZ3LpC7euhExtYmZfW77WwXrpSRJfVmbBOOCDyyYOS2NYjt2kuunRz+H98U/MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHOzPUv1FmD/IuEwdio+RQA4VdB6K2ZIUlF/I+K48d0=; b=jccCLAhRiUhO0nDHg7TQNQQlDkYwUKNH40SdQRqWkKUZUAyePhQSHh64vErvlfO4+OZB8c 8oTkNbqvaaadyPbtfMiF6qDhYH3mw0XuW1RD8dW75MtjqXfysceuOqJLfm06SRbmdMvuD4 KWF/RyRQcRTVSTQV1cDTQWMz/3g62w5ofqGvSdvxOOZ1JU+Ht5Kxt/e6GcYldyxBEzwEC6 jWIadACCVG8/DvV8PFEhIIlShkAjbD4XXy/95QSeiB9diGbXRmte9+lYOItRhDSPnBGZYw 0gb/D0RzU2WKgOPUhqgFvHPyJOMq5i1IEuWBVhO+z8bqiY6s3L9xcvd205jdtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sj72ZRzXqR; Fri, 14 Jun 2024 18:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh1qR020432; Fri, 14 Jun 2024 18:43:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh14T020429; Fri, 14 Jun 2024 18:43:01 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:01 GMT Message-Id: <202406141843.45EIh14T020429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2a12368e7ced - stable/13 - LinuxKPI: 802.11: implement a deferred RX path List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a12368e7ced1c103d5be14e545f3e0f25edf947 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2a12368e7ced1c103d5be14e545f3e0f25edf947 commit 2a12368e7ced1c103d5be14e545f3e0f25edf947 Author: Bjoern A. Zeeb AuthorDate: 2024-02-12 16:03:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:15 +0000 LinuxKPI: 802.11: implement a deferred RX path Some calls, e.g., action frames cause us to call through all the way down to firmware from the RX path without any deferral in net80211. For LinuxKPI and iwlwifi this goes (with omissions) like this: lkpi_napi_task -> linuxkpi_ieee80211_rx -> ieee80211_input_mimo -> sta_input -> ht_recv_action_ba_addba_request -> lkpi_ic_ampdu_rx_start -> iwl_mvm_mac_ampdu_action -> iwl_trans_txq_send_hcmd. At that point we are waiting for an interrupt from the firmware but given the lkpi_napi_task has not finished (and may have more to dispatch based on budget and what was received) we will not see the new interrupt/fw response. With no answer from the firmware, the software timeout in the driver kills the command and the firmware and issues a complete restart. Implement the deferred RX path in LinuxKPI for the moment. At a later point we should carefully shift this into net80211. This fixes the hangs for (*ic_ampdu_rx_start)() calls with iwlwifi. PR: 276083 Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43968 (cherry picked from commit 759a996d610d9354aac5c48a6bdc9cedcba2f48b) --- sys/compat/linuxkpi/common/src/linux_80211.c | 134 ++++++++++++++++++++++++--- sys/compat/linuxkpi/common/src/linux_80211.h | 31 +++++++ 2 files changed, 154 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index df72495e68b6..ef4e22542b0f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -145,6 +145,7 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); static void lkpi_80211_txq_task(void *, int); +static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); #ifdef LKPI_80211_WME static int lkpi_wme_update(struct lkpi_hw *, struct ieee80211vap *, bool); @@ -4272,6 +4273,12 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) TAILQ_INIT(&lhw->scheduled_txqs[ac]); } + /* Deferred RX path. */ + LKPI_80211_LHW_RXQ_LOCK_INIT(lhw); + TASK_INIT(&lhw->rxq_task, 0, lkpi_80211_lhw_rxq_task, lhw); + mbufq_init(&lhw->rxq, IFQ_MAXLEN); + lhw->rxq_stopped = false; + /* * XXX-BZ TODO make sure there is a "_null" function to all ops * not initialized. @@ -4297,11 +4304,42 @@ void linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) { struct lkpi_hw *lhw; + struct mbuf *m; lhw = HW_TO_LHW(hw); free(lhw->ic, M_LKPI80211); lhw->ic = NULL; + /* + * Drain the deferred RX path. + */ + LKPI_80211_LHW_RXQ_LOCK(lhw); + lhw->rxq_stopped = true; + LKPI_80211_LHW_RXQ_UNLOCK(lhw); + + /* Drain taskq, won't be restarted due to rxq_stopped being set. */ + while (taskqueue_cancel(taskqueue_thread, &lhw->rxq_task, NULL) != 0) + taskqueue_drain(taskqueue_thread, &lhw->rxq_task); + + /* Flush mbufq (make sure to release ni refs!). */ + m = mbufq_dequeue(&lhw->rxq); + while (m != NULL) { + struct m_tag *mtag; + + mtag = m_tag_locate(m, MTAG_ABI_LKPI80211, LKPI80211_TAG_RXNI, NULL); + if (mtag != NULL) { + struct lkpi_80211_tag_rxni *rxni; + + rxni = (struct lkpi_80211_tag_rxni *)(mtag + 1); + ieee80211_free_node(rxni->ni); + } + m_freem(m); + m = mbufq_dequeue(&lhw->rxq); + } + KASSERT(mbufq_empty(&lhw->rxq), ("%s: lhw %p has rxq len %d != 0\n", + __func__, lhw, mbufq_len(&lhw->rxq))); + LKPI_80211_LHW_RXQ_LOCK_DESTROY(lhw); + /* Cleanup more of lhw here or in wiphy_free()? */ LKPI_80211_LHW_TXQ_LOCK_DESTROY(lhw); LKPI_80211_LHW_SCAN_LOCK_DESTROY(lhw); @@ -4796,6 +4834,66 @@ linuxkpi_ieee80211_scan_completed(struct ieee80211_hw *hw, return; } +static void +lkpi_80211_lhw_rxq_rx_one(struct lkpi_hw *lhw, struct mbuf *m) +{ + struct ieee80211_node *ni; + struct m_tag *mtag; + int ok; + + ni = NULL; + mtag = m_tag_locate(m, MTAG_ABI_LKPI80211, LKPI80211_TAG_RXNI, NULL); + if (mtag != NULL) { + struct lkpi_80211_tag_rxni *rxni; + + rxni = (struct lkpi_80211_tag_rxni *)(mtag + 1); + ni = rxni->ni; + } + + if (ni != NULL) { + ok = ieee80211_input_mimo(ni, m); + ieee80211_free_node(ni); /* Release the reference. */ + if (ok < 0) + m_freem(m); + } else { + ok = ieee80211_input_mimo_all(lhw->ic, m); + /* mbuf got consumed. */ + } + +#ifdef LINUXKPI_DEBUG_80211 + if (linuxkpi_debug_80211 & D80211_TRACE_RX) + printf("TRACE %s: handled frame type %#0x\n", __func__, ok); +#endif +} + +static void +lkpi_80211_lhw_rxq_task(void *ctx, int pending) +{ + struct lkpi_hw *lhw; + struct mbufq mq; + struct mbuf *m; + + lhw = ctx; + +#ifdef LINUXKPI_DEBUG_80211 + if (linuxkpi_debug_80211 & D80211_TRACE_RX) + printf("%s:%d lhw %p pending %d mbuf_qlen %d\n", + __func__, __LINE__, lhw, pending, mbufq_len(&lhw->rxq)); +#endif + + mbufq_init(&mq, IFQ_MAXLEN); + + LKPI_80211_LHW_RXQ_LOCK(lhw); + mbufq_concat(&mq, &lhw->rxq); + LKPI_80211_LHW_RXQ_UNLOCK(lhw); + + m = mbufq_dequeue(&mq); + while (m != NULL) { + lkpi_80211_lhw_rxq_rx_one(lhw, m); + m = mbufq_dequeue(&mq); + } +} + /* For %list see comment towards the end of the function. */ void linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, @@ -5020,20 +5118,34 @@ skip_device_ts: } #endif + /* + * Attach meta-information to the mbuf for the deferred RX path. + * Currently this is best-effort. Should we need to be hard, + * drop the frame and goto err; + */ if (ni != NULL) { - ok = ieee80211_input_mimo(ni, m); - ieee80211_free_node(ni); - if (ok < 0) - m_freem(m); - } else { - ok = ieee80211_input_mimo_all(ic, m); - /* mbuf got consumed. */ + struct m_tag *mtag; + struct lkpi_80211_tag_rxni *rxni; + + mtag = m_tag_alloc(MTAG_ABI_LKPI80211, LKPI80211_TAG_RXNI, + sizeof(*rxni), IEEE80211_M_NOWAIT); + if (mtag != NULL) { + rxni = (struct lkpi_80211_tag_rxni *)(mtag + 1); + rxni->ni = ni; /* We hold a reference. */ + m_tag_prepend(m, mtag); + } } -#ifdef LINUXKPI_DEBUG_80211 - if (linuxkpi_debug_80211 & D80211_TRACE_RX) - printf("TRACE %s: handled frame type %#0x\n", __func__, ok); -#endif + LKPI_80211_LHW_RXQ_LOCK(lhw); + if (lhw->rxq_stopped) { + LKPI_80211_LHW_RXQ_UNLOCK(lhw); + m_freem(m); + goto err; + } + + mbufq_enqueue(&lhw->rxq, m); + taskqueue_enqueue(taskqueue_thread, &lhw->rxq_task); + LKPI_80211_LHW_RXQ_UNLOCK(lhw); IMPROVE(); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index d25614de56dc..b0156a5ade3f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -76,6 +76,18 @@ if (linuxkpi_debug_80211 & D80211_TRACE_MODE_HT) \ printf("%s:%d: XXX LKPI80211 IMPROVE_HT\n", __func__, __LINE__) +#define MTAG_ABI_LKPI80211 1707696513 /* LinuxKPI 802.11 KBI */ + +/* + * Deferred RX path. + * We need to pass *ni along (and possibly more in the future so + * we use a struct right from the start. + */ +#define LKPI80211_TAG_RXNI 0 /* deferred RX path */ +struct lkpi_80211_tag_rxni { + struct ieee80211_node *ni; /* MUST hold a reference to it. */ +}; + struct lkpi_radiotap_tx_hdr { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; @@ -192,6 +204,11 @@ struct lkpi_hw { /* name it mac80211_sc? */ uint32_t txq_generation[IEEE80211_NUM_ACS]; TAILQ_HEAD(, lkpi_txq) scheduled_txqs[IEEE80211_NUM_ACS]; + /* Deferred RX path. */ + struct task rxq_task; + struct mbufq rxq; + struct mtx rxq_mtx; + /* Scan functions we overload to handle depending on scan mode. */ void (*ic_scan_curchan)(struct ieee80211_scan_state *, unsigned long); @@ -240,6 +257,7 @@ struct lkpi_hw { /* name it mac80211_sc? */ bool update_mc; bool update_wme; + bool rxq_stopped; /* Must be last! */ struct ieee80211_hw hw __aligned(CACHE_LINE_SIZE); @@ -304,6 +322,19 @@ struct lkpi_wiphy { #define LKPI_80211_LHW_TXQ_UNLOCK_ASSERT(_lhw) \ mtx_assert(&(_lhw)->txq_mtx, MA_NOTOWNED) +#define LKPI_80211_LHW_RXQ_LOCK_INIT(_lhw) \ + mtx_init(&(_lhw)->rxq_mtx, "lhw-rxq", NULL, MTX_DEF | MTX_RECURSE); +#define LKPI_80211_LHW_RXQ_LOCK_DESTROY(_lhw) \ + mtx_destroy(&(_lhw)->rxq_mtx); +#define LKPI_80211_LHW_RXQ_LOCK(_lhw) \ + mtx_lock(&(_lhw)->rxq_mtx) +#define LKPI_80211_LHW_RXQ_UNLOCK(_lhw) \ + mtx_unlock(&(_lhw)->rxq_mtx) +#define LKPI_80211_LHW_RXQ_LOCK_ASSERT(_lhw) \ + mtx_assert(&(_lhw)->rxq_mtx, MA_OWNED) +#define LKPI_80211_LHW_RXQ_UNLOCK_ASSERT(_lhw) \ + mtx_assert(&(_lhw)->rxq_mtx, MA_NOTOWNED) + #define LKPI_80211_LHW_LVIF_LOCK(_lhw) sx_xlock(&(_lhw)->lvif_sx) #define LKPI_80211_LHW_LVIF_UNLOCK(_lhw) sx_xunlock(&(_lhw)->lvif_sx) From nobody Fri Jun 14 18:43:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sl1tz1z5PK57; Fri, 14 Jun 2024 18:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sl1HYMz4GD5; Fri, 14 Jun 2024 18:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XnO0hOPl+Ge3td10xH0NUS7HYVzH4ewrsMc/dGfvfRQ=; b=ht0VCWUkH1PpTqWU5QT/52Axj0wcNTnOpwafwdgGR05xS1eIIYRg9TSnBJN6Q9RX4DnJHA yu2TV6+U77fNFgWXLUxa10FOuwXgBNS9ehpL7U5BWEZBBml9zFObhDA0KnHGA7omoYx9ay JTT7eSVcbR/3BkVK7EScJEZOIszuoajlc9+bhlhhx10gW0DwA6bMoWgWqExBfBsHiQjaV+ jHwdX3IMg1YtjOPTTkzRmGFtfYK+Qnc4pINJW4tiBrG/3TUMU0y2tij2s0iT8Po8p8Kmzo 494AR1yEzfNb1oJ4akTyDus/N5cPvdLWrq24hA9ABnyt9eDFml5o+Bs7jkx9dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390583; a=rsa-sha256; cv=none; b=LYxxv5AzgdatEeWcWuNkZDsKgw1PiXrG5v4Dn5VXHl2iixdDSb/FuVcAUcp5pG1pctNVXw L0EWvU0X6Dd6o//y5UeL6HSbP0dlmgPvXINy2164fw4MaECaA9p/s4D/gmzsO33dvxSbQI TmheBz6ieBvUUeXNaTFILp8qgi5nxbiF2QYUg2RADNhq4GWSQqlzx7Kzl9/s9aQxpS7WxL Tl2R377CUX4W6pjfyYRmkXdpawpObzZXr/Z/Kssiy56DL3VPKb+GrqWecwq/Xio2DnaA32 ZsyXSx0qwahsI9nwrML2Fw7BvWFEobcn3jfefOG4mrBSX5H7dh84/vh7p2ohSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XnO0hOPl+Ge3td10xH0NUS7HYVzH4ewrsMc/dGfvfRQ=; b=TK/57V21hJozbCAXReBecUkeZX0AX4vkcKJXe5Xbom4CtF/NCOV+6T3tF0jR36GVAGPhwY wMPEIE7k4Iyr3uzDN0q91cmevAcscChjicxv7OanEGCjHCmeFkyvnvLAI0Pw82mcqf/9xM x4aI2tXMMucuZBSGlwpFUAHbeSCT5z3BnmAd/nVnfad0I2rkNHvIitTnPxH6YA62KxtGu4 WZp6/s0ceYNUzCKgE2oQ+xBrjmPSOTdUvFkv99DMNCwnzeljPUVe68zFjuz9qGAQyXXDi9 VbnAjXDvMrrqGLJECiDnvCPzEiUlK04yNr/wghfAVJ02ULMqBhFPhKolyjcL6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sl0vM1zXn2; Fri, 14 Jun 2024 18:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh3bJ020483; Fri, 14 Jun 2024 18:43:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh3SH020480; Fri, 14 Jun 2024 18:43:03 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:03 GMT Message-Id: <202406141843.45EIh3SH020480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 24cb6fe1589e - stable/13 - LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 24cb6fe1589e6f74d36792845c9e4fb7eb556aea Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=24cb6fe1589e6f74d36792845c9e4fb7eb556aea commit 24cb6fe1589e6f74d36792845c9e4fb7eb556aea Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 18:07:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one() Given we are passed the lsta in as a function argument there is no need to re-lookup the sta by ni and possibly not find it. We know the sta and ni from the lsta and whether it is uploaded to firmware or not we can check directly from the local lsta flag. Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43965 (cherry picked from commit ac867c20e67423e5019ab90148c387ea127eeffb) --- sys/compat/linuxkpi/common/src/linux_80211.c | 76 +++++++++++++--------------- 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ef4e22542b0f..1a5954de0250 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -142,8 +142,10 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { */ }; +#if 0 static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); +#endif static void lkpi_80211_txq_task(void *, int); static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); @@ -3584,6 +3586,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) struct ieee80211_tx_info *info; struct ieee80211_sta *sta; struct ieee80211_hdr *hdr; + struct lkpi_txq *ltxq; void *buf; uint8_t ac, tid; @@ -3694,54 +3697,45 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) #endif #endif - lsta = lkpi_find_lsta_by_ni(lvif, ni); - if (lsta != NULL) { - sta = LSTA_TO_STA(lsta); + sta = LSTA_TO_STA(lsta); #ifdef LKPI_80211_HW_CRYPTO - info->control.hw_key = lsta->kc; + info->control.hw_key = lsta->kc; #endif - } else { - sta = NULL; - } IMPROVE(); - if (sta != NULL) { - struct lkpi_txq *ltxq; - - ltxq = NULL; - if (!ieee80211_is_data_present(hdr->frame_control)) { - if (vif->type == NL80211_IFTYPE_STATION && - lsta->added_to_drv && - sta->txq[IEEE80211_NUM_TIDS] != NULL) - ltxq = TXQ_TO_LTXQ(sta->txq[IEEE80211_NUM_TIDS]); - } else if (lsta->added_to_drv && - sta->txq[skb->priority] != NULL) { - ltxq = TXQ_TO_LTXQ(sta->txq[skb->priority]); - } - if (ltxq == NULL) - goto ops_tx; + ltxq = NULL; + if (!ieee80211_is_data_present(hdr->frame_control)) { + if (vif->type == NL80211_IFTYPE_STATION && + lsta->added_to_drv && + sta->txq[IEEE80211_NUM_TIDS] != NULL) + ltxq = TXQ_TO_LTXQ(sta->txq[IEEE80211_NUM_TIDS]); + } else if (lsta->added_to_drv && + sta->txq[skb->priority] != NULL) { + ltxq = TXQ_TO_LTXQ(sta->txq[skb->priority]); + } + if (ltxq == NULL) + goto ops_tx; - KASSERT(ltxq != NULL, ("%s: lsta %p sta %p m %p skb %p " - "ltxq %p != NULL\n", __func__, lsta, sta, m, skb, ltxq)); + KASSERT(ltxq != NULL, ("%s: lsta %p sta %p m %p skb %p " + "ltxq %p != NULL\n", __func__, lsta, sta, m, skb, ltxq)); - LKPI_80211_LTXQ_LOCK(ltxq); - skb_queue_tail(<xq->skbq, skb); + LKPI_80211_LTXQ_LOCK(ltxq); + skb_queue_tail(<xq->skbq, skb); #ifdef LINUXKPI_DEBUG_80211 - if (linuxkpi_debug_80211 & D80211_TRACE_TX) - printf("%s:%d mo_wake_tx_queue :: %d %u lsta %p sta %p " - "ni %p %6D skb %p lxtq %p { qlen %u, ac %d tid %u } " - "WAKE_TX_Q ac %d prio %u qmap %u\n", - __func__, __LINE__, - curthread->td_tid, (unsigned int)ticks, - lsta, sta, ni, ni->ni_macaddr, ":", skb, ltxq, - skb_queue_len(<xq->skbq), ltxq->txq.ac, - ltxq->txq.tid, ac, skb->priority, skb->qmap); + if (linuxkpi_debug_80211 & D80211_TRACE_TX) + printf("%s:%d mo_wake_tx_queue :: %d %u lsta %p sta %p " + "ni %p %6D skb %p lxtq %p { qlen %u, ac %d tid %u } " + "WAKE_TX_Q ac %d prio %u qmap %u\n", + __func__, __LINE__, + curthread->td_tid, (unsigned int)ticks, + lsta, sta, ni, ni->ni_macaddr, ":", skb, ltxq, + skb_queue_len(<xq->skbq), ltxq->txq.ac, + ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif - LKPI_80211_LTXQ_UNLOCK(ltxq); - lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); - return; - } + LKPI_80211_LTXQ_UNLOCK(ltxq); + lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + return; ops_tx: #ifdef LINUXKPI_DEBUG_80211 @@ -3753,9 +3747,7 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; - lkpi_80211_mo_tx(hw, &control, skb); - return; } static void @@ -5226,6 +5218,7 @@ linuxkpi_ieee80211_frequency_to_channel(uint32_t freq, uint32_t flags __unused) return (ieee80211_mhz2ieee(freq, 0)); } +#if 0 static struct lkpi_sta * lkpi_find_lsta_by_ni(struct lkpi_vif *lvif, struct ieee80211_node *ni) { @@ -5242,6 +5235,7 @@ lkpi_find_lsta_by_ni(struct lkpi_vif *lvif, struct ieee80211_node *ni) return (NULL); } +#endif struct ieee80211_sta * linuxkpi_ieee80211_find_sta(struct ieee80211_vif *vif, const u8 *peer) From nobody Fri Jun 14 18:43:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sm479pz5PK11; Fri, 14 Jun 2024 18:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sm26STz4G73; Fri, 14 Jun 2024 18:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hdSbIrAjVUOZ1t2DtpXmRa2TnfgXvWeny4HY04GCDFI=; b=RjvCFuonSXSmJL+y2F1dmCHesmF79Csl8FpytkLvPiD3SlKPkhmectq6NsgwiMt/DSJixn n7NXmvN31xzTdfVobd/bdwmrspZxRlVSNDOFqpqZZO26w02miQRAuwfyBsEnzZGcMKzcC+ GoZZ/fEfdnM6qXDYeyrz/xtLl6m2eCJ3AvsU5sk/TXkhM18Npd+dKg9zTv8j3A5nBuwrXG 2xH76oN5+u2PLfwBC/SsdccT0Bu6n5nvFsYW9Gxz/R9cjSblMejI7O1PDOYppwNjAo4lTV 4D8UddRjBV+3KBuqENZwBs4K3SoIpVtQFat0/JiLyJ1Mj/YqjzJ/LZjJGwwoxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390584; a=rsa-sha256; cv=none; b=u2KnPvZA+zFuJHB3WdZ3rEj7NCyyEO6NZDG5pAh8KJ470aE3MoyPmESCpWP+hzl0EY2QEU icDhjyeilkTBqCgqgoBMVNcYTguCwF1I7JNsgTRQq+7v7mpPrOkymWP+H/TQRf0I7+HvZR NtoiqKRWEzcBtKUvSGaj/UJMwPZgQlrvKw9aT0WlA6eWLYn+jjDiEubrL+vWAZOEPGUaiB nrhCROF/RwP8Q95N62YKnABQhG6qnW0VhvvsJQ7BsL4p1/LHmnEcXax/neq0nHSGQFTP2E +YMaPQdE47C4AiBWcT0gY4+TaLcuwqR05BOAyMTdkMAQlKDgPZOQH3JZqUJvuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hdSbIrAjVUOZ1t2DtpXmRa2TnfgXvWeny4HY04GCDFI=; b=cVpaBaJPe+lk76ZmOgj0/DSbimKWEhobrZH1Ky+hKaaanHcouCBClo4OVfNV9HIDYF1rIT IDp8X8B4uBMY0EfncghQIxNU5tTlFDIs0dWxqpCq+sCOeNSSVdErYjD0Yei5YN+1Mx24Eq n4COvcH2+b45AWkvtdvahiNPg6eggFlImqlDcLnrg+8/V6XupeGEa2UTMolA/E1EpCUKUb +83sRG8o3s/VcOyLm9U0+Pk2elpiWYvspQ89LruUMuxWKflDV+vUcCAh7WroRjp/2uZFB0 PWv7ZxduBeqpWmuQBpKbwPx8mVD0o7UjhWMf0ym1eBmQ4xaw26sfMVDnSKJQYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sm1XqRzXKG; Fri, 14 Jun 2024 18:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh4lq020540; Fri, 14 Jun 2024 18:43:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh4hJ020537; Fri, 14 Jun 2024 18:43:04 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:04 GMT Message-Id: <202406141843.45EIh4hJ020537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b5e3a31ac050 - stable/13 - LinuxKPI: 802.11: disable early queue wakeup workaround; better classify List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b5e3a31ac050dd376d19682fe0e595692ec3379f Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e3a31ac050dd376d19682fe0e595692ec3379f commit b5e3a31ac050dd376d19682fe0e595692ec3379f Author: Bjoern A. Zeeb AuthorDate: 2024-02-16 21:14:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: disable early queue wakeup workaround; better classify We used to call lkpi_wake_tx_queues() for all queues early on in order to make sure they are ready. Turns out whatever logic in iwlwifi startup is working correctly these days under LinuxKPI so this is no longer needed. As the comment indicated the "workaround" did not always work. Disable it for now. The second part of the improvement is to properly classify Non-QOS non-data frames (mgmt and ctl frames for now, unless we have to be even more careful in the future about certain sub-types) as TID 7/VO. Contrary to net80211 we must not promote PAE frames. PR: 274382 Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43944 (cherry picked from commit 1665ef979d3adab05d178480077674ab5978e4f0) --- sys/compat/linuxkpi/common/src/linux_80211.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1a5954de0250..d90f89cdcbcd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1312,6 +1312,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); +#if 0 /* * Wakeup all queues now that sta is there so we have as much time to * possibly prepare the queue in the driver to be ready for the 1st @@ -1321,6 +1322,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int * for all queues. */ lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, false); +#endif /* Start mgd_prepare_tx. */ memset(&prep_tx_info, 0, sizeof(prep_tx_info)); @@ -3670,8 +3672,16 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) hdr = (void *)skb->data; tid = linuxkpi_ieee80211_get_tid(hdr, true); if (tid == IEEE80211_NONQOS_TID) { /* == IEEE80211_NUM_TIDS */ - skb->priority = 0; - ac = IEEE80211_AC_BE; + if (!ieee80211_is_data(hdr->frame_control)) { + /* MGMT and CTRL frames go on TID 7/VO. */ + skb->priority = 7; + ac = IEEE80211_AC_VO; + } else { + /* Other non-QOS traffic goes to BE. */ + /* Contrary to net80211 we MUST NOT promote M_EAPOL. */ + skb->priority = 0; + ac = IEEE80211_AC_BE; + } } else { skb->priority = tid & IEEE80211_QOS_CTL_TID_MASK; ac = ieee80211e_up_to_ac[tid & 7]; From nobody Fri Jun 14 18:43:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sn5Lbnz5PKP0; Fri, 14 Jun 2024 18:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sn2bfkz4GTp; Fri, 14 Jun 2024 18:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+aGR2hapBbRPQPk8iRJC4K9/Xdxr0b0huqKORt+Pj0=; b=KVy4FB5DOCK8MqoB3V7adqDvsL9Geo4ABHyki7MKehCCPDaa5wfwVyXw006rlxnaYWCQLM 0z2RwTqlj2/e6JLTFGY6PLOlESF9TNJ7A8PVQXy9QqpkWl8EGcfiC4XDkzpM6yaW4FT5Q/ QR4Mrb/veQuMeFS0fKDtaYsHUpzV024nKuHbge+uD0mtPxRPjvlyM9OlqRmWmtpdxTDMIV hZA5basVpd2JuZbUdLvflznLQOd8hwBRwdzeHY04/i1dVRi/tNAXXeJKzjxU3wuswaDcyK y6v1fSzk+DuEqJuHZF7OC6ZwCzdwrwGRd4NmqHjWN4bfNJf1dp5QR2Na/R1Kfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390585; a=rsa-sha256; cv=none; b=qF8aGOcyhaZoNkyqJwG0MTDmJtMeUtNFso2cIPpaTXDbOEW2kskjj8FJOrzw42F4gGo3jS Mg1fcBUNkEduRxT9lEjOwSaC+OP07xKL5NiPBOy5dKzvKAI6C3dr9LfcU+1fjJmPNRbX1P QDbesf7REPErZcS/94mpibmZ+3FZtANXk9r5mn5KHEQQQ8Dt5YkrY23tbRM6zGg/pdUN+5 LwnYr+Xfl9oYdgD3i+Yokad5kWZ9o8l5YWCnR7zQDc6yqm497wIZSgcq0erL8YwTuaziUE 6GJmJ/vhDnwWrA7TGBPEsPdP/MatqA9GVNbq61F21a2KTQNHaihXiph+n1DkQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+aGR2hapBbRPQPk8iRJC4K9/Xdxr0b0huqKORt+Pj0=; b=B7g40mCZoNvdv1ZJ8nST/Df8aS/HK8qSaGREZ3WQ6omuxDDH+vjA/yNuuHhjLTHMxoQG1c dCUARORnBxW/h6MHmYUfkP+PmC6cL8anMzfseg8ZxYRkNNm8AOV8/xjxTSDz3Rlp/1L9Cb Q2YAOMHy0qoOy3PcIVvhlf1t737abR1If7SW28LaDxZA8jyM4djGV/PwRFgXmCzp8yH425 yvXj4vg2/SgKXqfbhSCcjx3z34mg87k8yuyLnxQG7vBQxaCYcsNG7g1E626ImBtPPLMPhB CMXivXkBhQcf0vU/L6VlgWFUfpjleAmmJH38aQqhdRNkQp6zEEyYtywo/qrVlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sn2CFwzXLx; Fri, 14 Jun 2024 18:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh5h2020600; Fri, 14 Jun 2024 18:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh5LC020597; Fri, 14 Jun 2024 18:43:05 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:05 GMT Message-Id: <202406141843.45EIh5LC020597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: def43d8a4a3c - stable/13 - LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: def43d8a4a3c0a2868fe74ef6aefe16c435ea19c Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=def43d8a4a3c0a2868fe74ef6aefe16c435ea19c commit def43d8a4a3c0a2868fe74ef6aefe16c435ea19c Author: Bjoern A. Zeeb AuthorDate: 2024-05-22 02:24:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes While the previous order worked well for iwlwifi 22000 and later chipsets (AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes. Change the teardown order to avoid these problems. The inline comments in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new order and also the old problems we were seeing (too early sta removal or silent non-removal) leading to follow-up problems. There is a possible further problem still lingering but a lot harder to trigger (see comment in review) and likely related to some other doings so we'll track it separately. Sponsored by: The FreeBSD Foundation PR: 275255 Tested with: AX210, 8265 (bz); 9260 (Bakul Shah) Differential Revision: https://reviews.freebsd.org/D45293 (cherry picked from commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c) --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 ++++++++++++++++++---------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d90f89cdcbcd..632645a116b2 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -994,33 +994,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new) } } -static void +static enum ieee80211_bss_changed lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { + enum ieee80211_bss_changed changed; + + changed = 0; sta->aid = 0; if (vif->cfg.assoc) { - struct ieee80211_hw *hw; - enum ieee80211_bss_changed changed; lhw->update_mc = true; lkpi_update_mcast_filter(lhw->ic, true); - changed = 0; vif->cfg.assoc = false; vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; - /* - * This will remove the sta from firmware for iwlwifi. - * So confusing that they use state and flags and ... ^%$%#%$^. - */ IMPROVE(); - hw = LHW_TO_HW(lhw); - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, - changed); - lkpi_hw_conf_idle(hw, true); + /* + * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with + * assoc = false right away here will remove the sta from + * firmware for iwlwifi. + * We no longer do this but only return the BSS_CHNAGED value. + * The caller is responsible for removing the sta gong to + * IEEE80211_STA_NOTEXIST and then executing the + * bss_info_changed() update. + * See lkpi_sta_run_to_init() for more detailed comment. + */ } + + return (changed); } static void @@ -1460,6 +1464,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -1743,16 +1749,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* See comment in lkpi_sta_run_to_init(). */ + bss_changed = 0; + bss_changed |= lkpi_disassoc(sta, vif, lhw); - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST - * as otherwise drivers (iwlwifi at least) will silently not remove - * the sta from the firmware and when we will add a new one trigger - * a fw assert. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -1769,7 +1770,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; @@ -1802,6 +1802,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -2290,14 +2292,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + bss_changed = 0; /* + * Start updating bss info (bss_info_changed) (assoc, aid, ..). + * * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. + * See comment there; removes the sta from fw if not careful + * (bss_info_changed() change is executed right away). + * + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + * + * The order which works best so far avoiding early removal or silent + * non-removal seems to be (for iwlwifi::mld-mac80211.c cases; + * the iwlwifi:mac80211.c case still to be tested): + * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here) + * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST + * (removes the sta given assoc is false) + * 3) add the remaining BSS_CHANGED changes and call bss_info_changed() + * 4) call unassign_vif_chanctx + * 5) call lkpi_hw_conf_idle + * 6) call remove_chanctx */ - lkpi_disassoc(sta, vif, lhw); + bss_changed |= lkpi_disassoc(sta, vif, lhw); + + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -2311,15 +2332,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } + lkpi_lsta_remove(lsta, lvif); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.use_short_preamble = false; + vif->bss_conf.qos = false; + /* XXX BSS_CHANGED_???? */ lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); LKPI_80211_LVIF_LOCK(lvif); @@ -2327,7 +2352,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif->lvif_bss = NULL; lvif->lvif_bss_synched = false; LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); /* * The very last release the reference on the ni for the ni/lsta on * lvif->lvif_bss. Upon return from this both ni and lsta are invalid @@ -2347,6 +2371,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); From nobody Fri Jun 14 18:43:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sp52Fmz5PK14; Fri, 14 Jun 2024 18:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sp3KCqz4GMN; Fri, 14 Jun 2024 18:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhbBz6bk2zNPoPHBWPc6Al13a+ewSLwFFenUzp4Vchw=; b=Yyn8dfawrTsJUm0hC1+zztofzyWrbe4qczYRpuCgQZxxXsvao0OjwMmbbSnst583ksC7IO wN/8KLRWB7nCDjy25D1RaGWIldfIjPaJp9Bu+4QI+iG/S5lKEcUYMuHlUhd414qEox5m1s YgWYqJZXzaWjVOyxkk4Gf0dVVA/DP/Yx1AQQrFIGmTkixVpnbNa6sv20+cuhPw2aKIn8hC 2AB9Dl7ryztOe4F974qlcY3rNzoL1KO94YSfKurXo/iqMTnAjLM6hdVZQp2OQ9BikBQOCZ /FftxdPM6JmTAaEpvACh5g8I9yruRKx5v+CxmoLaXf7SVEuIFL+uS27GJkI31w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390586; a=rsa-sha256; cv=none; b=N1cZTYXSGdDqMJsXay5CxaFlKsqXZ5i9SeeFiNFMkdz7FxbSjLOcQLJwz6GUr0i4l6UfOe XIElhtUmUb2jXB9mGKhzczCoPNMXe+XXRgtrByiyMRaldzcIE+nftWCnkaPKdc5F/RFi2D 0Nu3KCm9nLqzcfJgpdZH0fZQm3hNPVZxF6SnQh6mHq8n/WpbL4YzJyUeOwG30fQcK7/wMg UPbRqCFBtoWQB+ZV9dLhjwX4fey922x5UWDHYrdl9mG9LA2BLYNpM/VAWI4PXt/c9U/sbN ugF8pyoOD8k29I9b2gy3AtchEvmrpX2X0M2f+/lsnpTC0cm4OiARpW8yJ8Frpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhbBz6bk2zNPoPHBWPc6Al13a+ewSLwFFenUzp4Vchw=; b=Vgn+fY5y7G5kiDU1qKjl180fxut6E3QMSkTvJmAFoPHHkESrPH/6KDs26BdDmpvioQDjwy gigP4leA8YvLFIioAmbNgk4isE3dSTwEbfZqLeXnazxC/yEh1AeKHRKxVU9q0fcqBoj04q 7XVvR8ETsSQD1hBufCJcCrVjLG6gw3Dn8Vq861xTn3mB69R9ncf2dL5WRdkjSSHdN7Psfe RAhS+kow7WojZNIlrKlDg5shR14iQ2G9XuZJkegoG66kR7Fmy+A+Nh2OP0CLq5cdO9DC/0 p5osE9hc4YsPJrCwLVyuqtsESVKgNjMRNHBJsib3mdWwKiy1uLT9HziWwdYArg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sp2xnQzXh6; Fri, 14 Jun 2024 18:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh6IP020655; Fri, 14 Jun 2024 18:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh6os020652; Fri, 14 Jun 2024 18:43:06 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:06 GMT Message-Id: <202406141843.45EIh6os020652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f70e21e70b1d - stable/13 - LinuxKPI: 802.11: rename chanctx_conf for consistency List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f70e21e70b1d2698b4b22942930c5db2ae603b31 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f70e21e70b1d2698b4b22942930c5db2ae603b31 commit f70e21e70b1d2698b4b22942930c5db2ae603b31 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45185 (cherry picked from commit d1af434d99941d32a09c48fb3ef77ef83e203d29) --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 632645a116b2..870c3414f19e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1079,7 +1079,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1145,54 +1145,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1218,14 +1218,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1236,26 +1236,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1457,9 +1457,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1467,8 +1467,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1795,9 +1795,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1805,8 +1805,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2364,9 +2364,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -2374,8 +2374,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4771,7 +4771,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops; From nobody Fri Jun 14 18:43:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sq5kMmz5PKB6; Fri, 14 Jun 2024 18:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sq4QFlz4GPq; Fri, 14 Jun 2024 18:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYdtql7e5GT7FXwe3D3MMoEMzGUV1dG60ZvhufyGaz4=; b=PYB8BkZlurnYQCN9toJclsaLjsTm4ps3gA5nK164HbccXDSbQ7WlBuS/GghA46eVgXpo3x Zoe/pkbS6yJdDMDVQmfTVHMiFTxul2bQF9Ds0R6iRFOQGF84QWkbIyv1RNmJ1xwcRWRUGY U05CHp8YBTltR5qvKNPRrfu8bLdb7uYPOaOnGMIcvDQ+4xt1M09sVfuTquIPvrrhPgJO/u SNkLVRpC+P77WOBQLfjLY/tFWC3KBATgK9cdvlkjdVIXt54PJJj+BHb3vjQ9hkTv0IoqAS m5Ov6VwufFWcNTr78Jev8VolYoYMg1kTqovu4013w4GiP+KbmUXgck28GDPcKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390587; a=rsa-sha256; cv=none; b=SSJ9K/qIdxxtHuOt8x0j3oHVeERnyZB1EwCXovfOtVb2ROrF7QM0mhVMe4Ya+wox3BrpBH tBwd4qO89iIRlR6T4+mxy7L2+Q2c8G0EWHQxoBzKK0EelUhe1ILZUF1JBEAOYGCmkkT9n/ SqfapvwtPJgLXlavmKVXtOlbpdxG1jMHzzriEus/w1YPUL7vxHAA7qkIcUpRpvLb99Xa3F 9mCwEnAP+5ghoyUWFWGCi0vTPdS6a6OpOEwemlyyEGsh0R+IgGdf51vxfq5xtJhjICT7iB 5ofJpvERlAbpNvlkK+s51lJV70rUadyKQ02/qxTr495QNHhe3tBa72SXJmzBlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYdtql7e5GT7FXwe3D3MMoEMzGUV1dG60ZvhufyGaz4=; b=Y9GYoV+rcpflkF5j8V2deYMfGen6KV4kGDOoSGrXeyidkEjGY/KjzDh1JjKMRGBvQPLnPC KeduCUOjmHO3tUa3Q8xfI+JvcoHXtHc2zZukLiNZ06JHx5gtm+hNOQJhNtnVy2P2V1x6Tq 9c4PQsfIm7hN91Wb9Ej23Wy8zPBco7u3eAhQy7JZBefouumB9bbbXMwdg45Sbu5Szshq3/ YzIg4DES8xo+AhOjwdG8IP4uXuyAJ9g/Ea3Y2OozgaO8It+U7bbydUDRMK7wG5gbdx9Fg/ aoAV25zrt4c6HBa090ueWCqIK0gCskzVnrhyc30qpcOHZoATUAvOhteaSC3lqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sq40yszXKH; Fri, 14 Jun 2024 18:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh7us020703; Fri, 14 Jun 2024 18:43:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh7HY020700; Fri, 14 Jun 2024 18:43:07 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:07 GMT Message-Id: <202406141843.45EIh7HY020700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 66627e5c1345 - stable/13 - LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 66627e5c1345aa46d0ea4cafb0280b942bbe86b4 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=66627e5c1345aa46d0ea4cafb0280b942bbe86b4 commit 66627e5c1345aa46d0ea4cafb0280b942bbe86b4 Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 21:07:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls Lock the two TX MO downcalls into driver/firmware in lkpi_80211_txq_tx_one() to make sure they cannot happen in the middle of other (net80211 triggered) updates calling down into the driver/firmware. Sponsored by: The FreeBSD Foundation (commit) Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43966 (cherry picked from commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 870c3414f19e..9a28e637c9fe 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3770,7 +3770,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif LKPI_80211_LTXQ_UNLOCK(ltxq); + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + LKPI_80211_LHW_UNLOCK(lhw); return; ops_tx: @@ -3783,7 +3785,9 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_tx(hw, &control, skb); + LKPI_80211_LHW_UNLOCK(lhw); } static void From nobody Fri Jun 14 18:43:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Ss005yz5PKDY; Fri, 14 Jun 2024 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sr5qLHz4GK0; Fri, 14 Jun 2024 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1yk3mCsabgVWbSIchfZzEmcJLLJimJcJnkODbZF/5I=; b=Xfy2Mf4U3IlRQTnySKT5HhVyyOM7EolhayCpFKS5FGu6C9mZmNCt3H7BpXkIKG647ffzXi TXc0yRurzsGR7t0lOhzH9f7oUFviqkHIGkSJsgQEFLWA1sjEmQjTkFm71kpFM4FCjUIuJU tdvkLa8aOqeXyrQPYxwfD2Zk8vbfu3SmUIC6ILY0P8v96TxYCp9n81RUitXSHv+DQ36Tea dgPqUdznCPfYX7ZNOtD12/mouiHQW5Y5AtN6UCX/Rhe4DuBNf6dxYXAYQKbNVTyuB2+QAu vjgA9/A3E2K1HtkOpru7hMh6KMFcg33hkygUrzM7esWg83HyNRTdlmmfbE24OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390588; a=rsa-sha256; cv=none; b=jhk+xcn1zdKRK+VENjk/UroG016b7/ww0sRx+gzEA6UFSIr1MVK99EfX1KrnkDNqZyijKJ SoaN5D6H5MOgnaMqAJ2K3UfyEr5H7Q4Y6+i0JoDmmf1+Dd9ipJRGWlRsmqNszhf3ufEVrh y5uOzR87NNQZS92PBte+Gdya0ITyXqnI1Wrdk6ykvJu1MvR6kLdOcpTawT1qN1S/YJQrbd eMxzBF2DR9H8Git2TXOTchmtAi3UEOIfPCH8SZLkM0tuZpgxGUqiXL6z72BqV4JKG3NSzq qCCEmoKSL2Z4T4aLBkTd3SfSdsXY8L3SDK/vmKWroqoXgC/lXqvyY3zzoWBenw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1yk3mCsabgVWbSIchfZzEmcJLLJimJcJnkODbZF/5I=; b=WCa35Djl5DI+Suczp3CHUU21UWYhBEiEDNngaeM+ZKTmyx7/BBtvg32Ud2xj/Pcz8RrQNb 7Xm58yyf5eRT9UFqRssPXjCEoau5xmtlhsjXfbrQ2I6VaFKSikMfCn2FlOrVEr99mGT5KU hxStgOX4527Tfb6eWDfLEmPnrrmFQbTzAper64KsymJEZPeQFr99CAPa1t7NYk5Yn5KUbO XdZnkzAPanreCKbKtO9l1MnUKRMY0+43HxAjI4m5CtsW9khvgfZWreyyo1QT4vT8NFF6Zd 2DwsEHk3RA6HQbu0A6pk6twBmGZusu7Q8qoIzXF6xBEaPe+fEJgtcOkUOftvag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sr5MFXzY1X; Fri, 14 Jun 2024 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh8Zc020748; Fri, 14 Jun 2024 18:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh8XY020745; Fri, 14 Jun 2024 18:43:08 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:08 GMT Message-Id: <202406141843.45EIh8XY020745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: cafefba48125 - stable/13 - LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cafefba481250d7b270bb9fa54a0aa255fea0289 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cafefba481250d7b270bb9fa54a0aa255fea0289 commit cafefba481250d7b270bb9fa54a0aa255fea0289 Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 20:57:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() We have to unlock the net80211 ic lock in order to be able to call sleepable downcalls to the driver/firmware; a 2nd thread may go through net80211::join1() and (*iv_update_bss)() after we checked and unlocked. Re-check status at the end of the function under the ic lock so that we do not accidentally set lvif_bss_synched to true again despite it no longer being true. This should fix a race where we lost the (*iv_update_bss)() state during startup where one SCAN->AUTH is followed by a (then) AUTH->AUTH and lkpi_sta_a_to_a() did the wrong thing. Once we re-consider net80211 state and allowing a second join on a different node or iv_bss update without previously tearing down the older node we can likely undo a lot of these extra checks and workarounds. Sponsored by: The FreeBSD Foundation (updated version) Tested by: emaste (on and off) Reviewd by: cc Differential Revision: https://reviews.freebsd.org/D43967 (cherry picked from commit 105b9df26ee0286f3a5a7d191075e068dee1c4a2) --- sys/compat/linuxkpi/common/src/linux_80211.c | 66 +++++++++++++++++++--------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9a28e637c9fe..7d3e70dea325 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1276,25 +1276,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta = ni->ni_drv_data; LKPI_80211_LVIF_LOCK(lvif); - /* Re-check given (*iv_update_bss) could have happened. */ - /* XXX-BZ KASSERT later? or deal as error? */ - if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL) - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched, ni, lsta); - - /* - * Reference the ni for this cache of lsta/ni on lvif->lvif_bss - * essentially out lsta version of the iv_bss. - * Do NOT use iv_bss here anymore as that may have diverged from our - * function local ni already and would lead to inconsistencies. - */ - ieee80211_ref_node(ni); - lvif->lvif_bss = lsta; - lvif->lvif_bss_synched = true; - /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); LKPI_80211_LVIF_UNLOCK(lvif); @@ -1343,11 +1324,56 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int * (ideally we'd do that on a callback for something else ...) */ + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(vap->iv_ic); + + LKPI_80211_LVIF_LOCK(lvif); + /* Re-check given (*iv_update_bss) could have happened while we were unlocked. */ + if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL || + lsta->ni != vap->iv_bss) + ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " + "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, + lvif, vap, vap->iv_bss, lvif->lvif_bss, + (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, + lvif->lvif_bss_synched, ni, lsta); + + /* + * Reference the "ni" for caching the lsta/ni in lvif->lvif_bss. + * Given we cache lsta we use lsta->ni instead of ni here (even though + * lsta->ni == ni) to be distinct from the rest of the code where we do + * assume that ni == vap->iv_bss which it may or may not be. + * So do NOT use iv_bss here anymore as that may have diverged from our + * function local ni already while ic was unlocked and would lead to + * inconsistencies. Go and see if we lost a race and do not update + * lvif_bss_synched in that case. + */ + ieee80211_ref_node(lsta->ni); + lvif->lvif_bss = lsta; + if (lsta->ni == vap->iv_bss) { + lvif->lvif_bss_synched = true; + } else { + /* Set to un-synched no matter what. */ + lvif->lvif_bss_synched = false; + /* + * We do not error as someone has to take us down. + * If we are followed by a 2nd, new net80211::join1() going to + * AUTH lkpi_sta_a_to_a() will error, lkpi_sta_auth_to_{scan,init}() + * will take the lvif->lvif_bss node down eventually. + * What happens with the vap->iv_bss node will entirely be up + * to net80211 as we never used the node beyond alloc()/free() + * and we do not hold an extra reference for that anymore given + * ni : lsta == 1:1. + */ + } + LKPI_80211_LVIF_UNLOCK(lvif); + goto out_relocked; + out: LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); +out_relocked: /* - * Release the reference that keop the ni stable locally + * Release the reference that kept the ni stable locally * during the work of this function. */ if (ni != NULL) From nobody Fri Jun 14 18:43:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17St0h6Lz5PK7n; Fri, 14 Jun 2024 18:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Ss6XJNz4G7t; Fri, 14 Jun 2024 18:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxE/xf68GvBjniKLNAxlaY9CU5IAwuTyACvF2QO1fg8=; b=JTLRkdgN15QQsHDqppEGqLiQuLNu61LTVdV5/dHCnoeQQMfyiFZT/jVtFIJS9vT6VAnoTm jwr2j5jTRZWCnFkrm3DjOaEU9Lmc5ux+nm88zXEHKKQo98SKONaBVnRrb2Q6fVa2/c7/O7 cnhfhAGyKp38nWNH+dEo6rzwcHFSrLbH55Dgcf6zF3LWjoFd1NtiYmYI9kI+ZG/aXtT4ER Jo/CuehDT0Q+mLbQhgdFoQ7v4fOOXKOWEV8Qn0CP43TiMrlg2wzeMUrK9qBm6IdnAIg4hi LN8+pcjQ+0h5paV89GRbjfL4tZWFPW9I3I6CBad2E3w5B6TC/XXxRhdK1ACpdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390589; a=rsa-sha256; cv=none; b=kwg120M6SzTzJ9uQCX4yEAkZV4LAQGw+p+4Dn5HQDYGO4lWIs3hhI7x03fOTpuywOCRzog 6e1TOMMeyOB3msme9T5q7OuJTw9Ohx9bGFHsUr7H0b/+9lgjT5UBdL7PRr7b7bab4BOFOK Am94a2xleEXnOkQ2o2J2lA7U/ByqHMLZgBYEllGNtX38Zpz0NRXrX8Ccl1TsQeh8lcRdNY 1SgGQOAOqaEUPw1ci6wzbismtyRAaSIU1GMe9pDg8c97+stakZNM+yFsiT4o6KzSkCKIE1 UfUfXoYZOg4w6bnZ0HHrO0gSbuUCnbc9HA/9osX0G8zHarXgXUbG/WpmclJogw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxE/xf68GvBjniKLNAxlaY9CU5IAwuTyACvF2QO1fg8=; b=TBawBqhIMhLQIiQJMUwB8IhWi2tSpUzrcF+jqbjBjXFADkne57vGz14H5N2bZfM0bilHk3 6V0jjfVe2cXA3OJW8Pbe0bzbQMpgbBIV7Rbs2H07+ZT9ZDe68rbu3TwDI49DpyX7ZPOepW V1/6VwrxIWENYVnNrDE6F1BE8HF6grnf4G2Q7C7IhfozMhj8zx0/Zlka6FKb0m+k2/CsCf igCM7UItqyRRyrD8ji0wGBqG5b88kGkI0EZaZaJIdlzsxEXsmKEoQzz/5rGpzxJtS1std3 obfcZ6o6k+Q1OA5W0dslUeg1nzeKXIr5edH8xdm7AM1lk/h2yySvGKzINTrOdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Ss68KJzY1Y; Fri, 14 Jun 2024 18:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh9mJ020811; Fri, 14 Jun 2024 18:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh99d020808; Fri, 14 Jun 2024 18:43:09 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:09 GMT Message-Id: <202406141843.45EIh99d020808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 07da0ad63aa5 - stable/13 - LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 07da0ad63aa52999c0a381440104122a770decb5 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=07da0ad63aa52999c0a381440104122a770decb5 commit 07da0ad63aa52999c0a381440104122a770decb5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:54:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames The "Invalid TXQ" error from iwlwifi seems to be triggered by a frame being sent for a sta which is no longer known to the driver/fw. While we make sure to trigger the sending of the frame in net80211 early enough (by calling (*iv_newstate)() early on rather than at the end), TX in LinuxKPI is run in a deferred task. When we drop the net80211 ic lock again and re-acquire the LHW lock the packet may not yet have made it to the driver. Work around this between the (ic and lhw) locks by making sure (a) no new packets get queued after we return from (*iv_newstate)(), and (b) the TX task has run or gets cancelled and we manually push any remaining packets out (or let lsta_free() clean them up). The disabled packet queuing now also needs to be re-enabled in scan_to_auth() in case an lsta is staying in service or gets re-used. Also make sure that any following lkpi_wake_tx_queues() calls no longer ignore queues which have not seen a prior dequeue. This former workaround "feature" (ltxq->seen_dequeue) should be fully garbage collected in a later change on its own. Sponsored by: The FreeBSD Foundation PR: 274382 Tested by: emaste, lwhsu, thj, rkoberman at gmail.com Accepted by: adrian Differential Revision: https://reviews.freebsd.org/D45508 (cherry picked from commit 886653492945f7e945eb9bdaf5bc2ae26df96236) --- sys/compat/linuxkpi/common/src/linux_80211.c | 95 +++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 7d3e70dea325..a33149353c75 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -146,6 +146,7 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); #endif +static void lkpi_80211_txq_tx_one(struct lkpi_sta *, struct mbuf *); static void lkpi_80211_txq_task(void *, int); static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); @@ -1062,6 +1063,51 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta, } } +/* + * On the way down from RUN -> ASSOC -> AUTH we may send a DISASSOC or DEAUTH + * packet. The problem is that the state machine functions tend to hold the + * LHW lock which will prevent lkpi_80211_txq_tx_one() from sending the packet. + * We call this after dropping the ic lock and before acquiring the LHW lock. + * we make sure no further packets are queued and if they are queued the task + * will finish or be cancelled. At the end if a packet is left we manually + * send it. scan_to_auth() would re-enable sending if the lsta would be + * re-used. + */ +static void +lkpi_80211_flush_tx(struct lkpi_hw *lhw, struct lkpi_sta *lsta) +{ + struct mbufq mq; + struct mbuf *m; + int len; + + LKPI_80211_LHW_UNLOCK_ASSERT(lhw); + + /* Do not accept any new packets until scan_to_auth or lsta_free(). */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = false; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + while (taskqueue_cancel(taskqueue_thread, &lsta->txq_task, NULL) != 0) + taskqueue_drain(taskqueue_thread, &lsta->txq_task); + + LKPI_80211_LSTA_TXQ_LOCK(lsta); + len = mbufq_len(&lsta->txq); + if (len <= 0) { + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + return; + } + + mbufq_init(&mq, IFQ_MAXLEN); + mbufq_concat(&mq, &lsta->txq); + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + m = mbufq_dequeue(&mq); + while (m != NULL) { + lkpi_80211_txq_tx_one(lsta, m); + m = mbufq_dequeue(&mq); + } +} + /* -------------------------------------------------------------------------- */ static int @@ -1275,6 +1321,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int __func__, ni, ni->ni_drv_data)); lsta = ni->ni_drv_data; + /* + * Make sure in case the sta did not change and we re-add it, + * that we can tx again. + */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = true; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + LKPI_80211_LVIF_LOCK(lvif); /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); @@ -1427,7 +1481,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -1585,7 +1639,7 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in } /* Wake tx queue to get packet out. */ - lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), true, true); + lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, true); /* * .. we end up in "assoc_to_run" @@ -1729,7 +1783,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); - /* Call iv_newstate first so we get potential DISASSOC packet out. */ + /* Call iv_newstate first so we get potential DEAUTH packet out. */ error = lvif->iv_newstate(vap, nstate, arg); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " @@ -1738,12 +1792,16 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2121,12 +2179,16 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2255,12 +2317,16 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -3596,7 +3662,7 @@ lkpi_ic_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, lsta = ni->ni_drv_data; LKPI_80211_LSTA_TXQ_LOCK(lsta); - if (!lsta->txq_ready) { + if (!lsta->added_to_drv || !lsta->txq_ready) { LKPI_80211_LSTA_TXQ_UNLOCK(lsta); /* * Free the mbuf (do NOT release ni ref for the m_pkthdr.rcvif! @@ -3822,6 +3888,7 @@ lkpi_80211_txq_task(void *ctx, int pending) struct lkpi_sta *lsta; struct mbufq mq; struct mbuf *m; + bool shall_tx; lsta = ctx; @@ -3837,9 +3904,19 @@ lkpi_80211_txq_task(void *ctx, int pending) LKPI_80211_LSTA_TXQ_LOCK(lsta); /* * Do not re-check lsta->txq_ready here; we may have a pending - * disassoc frame still. + * disassoc/deauth frame still. On the contrary if txq_ready is + * false we do not have a valid sta anymore in the firmware so no + * point to try to TX. + * We also use txq_ready as a semaphore and will drain the txq manually + * if needed on our way towards SCAN/INIT in the state machine. + */ + shall_tx = lsta->added_to_drv && lsta->txq_ready; + if (__predict_true(shall_tx)) + mbufq_concat(&mq, &lsta->txq); + /* + * else a state change will push the packets out manually or + * lkpi_lsta_free() will drain the lsta->txq and free the mbufs. */ - mbufq_concat(&mq, &lsta->txq); LKPI_80211_LSTA_TXQ_UNLOCK(lsta); m = mbufq_dequeue(&mq); From nobody Sat Jun 15 13:03:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1btb0n2Gz5NmWj; Sat, 15 Jun 2024 13:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1btb0DJRz4BN9; Sat, 15 Jun 2024 13:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718456615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0MBCcQk1TWb7tR0K7i+RWKm1ocXqHqDrAGbnjtmOBk=; b=euhJjmDqA/Gsq1zgvdfSngurz+zZSjMhmxR9xC9rHh8oH0M6jwGSf8VazAE6yjOmNSxrdu OQa6AnW1PSXgAkIdzYb5I57QpYiJjQpJaLXJlkBf4qzGIMDGsUzHJaSc8sfK72zWPDINyN q/sI76j4ZFJOrp8EqrEdKEXimvcyeQWTLRroERw8424x3ZzAGvBIoLgQi4Q8ZZ+5A53cfo ExZ0r6YVtuR344haIYSRm2GVJMM0y/A66Fhb5d5lHEL9TznqSkPPVTl3ZT+IgjI/IOvlMv Zz0X5hjtDBV5FRiyqCGREq8OQlsx6wfzsOXZQRlkpbCktfOMznsy1Ih4i+j4LQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718456615; a=rsa-sha256; cv=none; b=MxPW8xBTCR6Ew2GV6m2I2MV1lw0ngMqAxyQyJtoRLER5Ik/xq4rxYx5scZl3bOSS5OcR6m 2mfbmM50ZNDR1LePoV6HDr+phtkMrDAYaR76rPUmgUgkt2f3ar+B5T0bn85Ds1PLFjKWVF agv0N4G49ID9SDges1VluoJiEOy665CndaT07gYeQPDHaj1KKwKbB5eTlfouwcF+aCwZzV Xyf1+HuF3OWv/q1WD11Buwlb61pw0u14zIg7vF/v1et5iwhQVJmEdVedXyiE4BTPE8jKTT 96N3ZQ7dYUjs7qsSMjdybPchTQ973gyymMvAdNOJrZ9Pfze45cwpuEEHbu5DYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718456615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0MBCcQk1TWb7tR0K7i+RWKm1ocXqHqDrAGbnjtmOBk=; b=w5LzM2I3+EV2Z5Aswd4lmqf1Sgs/ZlREXT6DED67aKb5lY0M7a7MA+KT0IAwYxuqdwOXFT +G29/rUvQxKDhChPZB/sEnUWJIuD9zA/RTSiuJCRVgkSzbIW7PMz3bWULrleAUjFx/azpJ z73MYIeJH9vVBwknCM4Dmx0V2RlM+4NmbXRgDbAS0tVsq2JMox7KXf4h6Zwaju1EDXnQkC KLKIwdV7tMiB71M1Iz77y0MFbEfX60SeHg9YAruzSmHViBkRJe50Z2IoakkRNoIZT5l/0/ q5i4Jqo86bgku3HvkXX8drv7np9XPi5bjpkIPnIz2AN6kjA0lWInR5vRes9alQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1btZ6vFWz14v1; Sat, 15 Jun 2024 13:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FD3YZN083691; Sat, 15 Jun 2024 13:03:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FD3YBZ083688; Sat, 15 Jun 2024 13:03:34 GMT (envelope-from git) Date: Sat, 15 Jun 2024 13:03:34 GMT Message-Id: <202406151303.45FD3YBZ083688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 35e983028356 - stable/14 - md: round-trip the MUSTDEALLOC and RESERVE options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35e9830283561820a1fcb21b46b6f01e87700dec Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=35e9830283561820a1fcb21b46b6f01e87700dec commit 35e9830283561820a1fcb21b46b6f01e87700dec Author: Alan Somers AuthorDate: 2024-06-01 18:00:03 +0000 Commit: Alan Somers CommitDate: 2024-06-15 13:03:23 +0000 md: round-trip the MUSTDEALLOC and RESERVE options If those options are requested when the device is created, ensure that they will be reported by MDIOCQUERY. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1270 (cherry picked from commit 9d449caddd4f442ba4ebfd2edafa1aef4fcba4c8) --- sys/dev/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index a6f015962a24..1d531b88193f 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1351,7 +1351,7 @@ mdcreate_malloc(struct md_s *sc, struct md_req *mdr) sc->fwsectors = mdr->md_fwsectors; if (mdr->md_fwheads != 0) sc->fwheads = mdr->md_fwheads; - sc->flags = mdr->md_options & (MD_COMPRESS | MD_FORCE); + sc->flags = mdr->md_options & (MD_COMPRESS | MD_FORCE | MD_RESERVE); sc->indir = dimension(sc->mediasize / sc->sectorsize); sc->uma = uma_zcreate(sc->name, sc->sectorsize, NULL, NULL, NULL, NULL, 0x1ff, 0); @@ -1476,7 +1476,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) snprintf(sc->ident, sizeof(sc->ident), "MD-DEV%ju-INO%ju", (uintmax_t)vattr.va_fsid, (uintmax_t)vattr.va_fileid); sc->flags = mdr->md_options & (MD_ASYNC | MD_CACHE | MD_FORCE | - MD_VERIFY); + MD_VERIFY | MD_MUSTDEALLOC); if (!(flags & FWRITE)) sc->flags |= MD_READONLY; sc->vnode = nd.ni_vp; From nobody Sat Jun 15 15:26:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1g3F5XWFz5NyYC; Sat, 15 Jun 2024 15:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1g3F51Twz4Q1T; Sat, 15 Jun 2024 15:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718465177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeuWwHJQPMS66L0P5a6sELY60q7jaOwzDkr9vVaFX0E=; b=xhUqMYtSh8wxwK0wLPjSgHhSzTmxr/5Joh4SCSnho29HRashOOgXyt34czb0V/YklyTig6 yvx7tPDeMP2g2GUCm8lp1vDvfEurEHgrBRaJ3tpgyd/1LyBSGAByw0LvHFcqOsy7zziKs+ Nh/SMUhpKJ0mT+5JhJkm3g4rfgnmldZfbX3DNsj6gNYj/u8gZc2BfWO3KB4JlAEVw/0lxy QX12RFZjHHaVzN+Jnh1lbiTuzBI9rVXWOKYCuhx7bc2apzwgx5w4cZi3uZ9c2L92mO/riH oaxyi6wNDWYdje49pjqYZqnd0IIcVZibDJab6QUSeosGxmDwwmXnRIGCSoCH1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718465177; a=rsa-sha256; cv=none; b=PCaNz63a3HheJIuNWw/v8rb//qperA7yRg5ycDuVBbRfpdYe8rHfMpj5EvRXvAcTuoF+jB gFdmUQ8Ym4kkOkz9GNvTP6Vxq7Wxlkk0KzC/LAk+qFaiDxuKjqn/EY/yuYmZWHsNJwzren 3sUfKqIyTwsEByDpC25ffx0NQvF4O9DA8FoX4nsfHemQn+TIWDLAonCtD//8StOGW0WIYb PP7xWX7fbZ/nu0SBp2WmtaVz8kMnoa5Yg/t+rhEe4Q1PoS5JKj5HUDdpwCr6cbPjJGpuIk 68zAip0CQHYMWZJLMuLS3fOEzvO2VNToHR5QgFHmZ/XBXQJdTCpxT9nn6VtksQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718465177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeuWwHJQPMS66L0P5a6sELY60q7jaOwzDkr9vVaFX0E=; b=R74zWuKhQ6Ttr0bL2htGcp7TnFVWcDnSVV/cvRfzG8a8763wi82xZgW9y21m+Eu9nnIo0R gSlsC/pPq8Zje7vEOIL7F40plxkMyv6S9UycioU90XC71r6WIVdvvpwhPZwV0F6ZUDAvWn Od0nf0kpL+OT57yxVOzBsV4EltK7CtGB2bLmkuIwbkRz4c14xGLOBa8cMXv1UwF4f5OEHA eqN97PALSqqfG5Zm3eiAbAGIuMg8Mahtpo/UhrnLj+P9Ut7dmsr4pFXI1GojRtacL9Sei3 BZ34srPNexxOU8E3pVzJgvUaE75eLyr0qWuu+L6z6/893HuJLSR/iRXMrC/vFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1g3F4GQPz18hs; Sat, 15 Jun 2024 15:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FFQHxE020533; Sat, 15 Jun 2024 15:26:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FFQHcQ020530; Sat, 15 Jun 2024 15:26:17 GMT (envelope-from git) Date: Sat, 15 Jun 2024 15:26:17 GMT Message-Id: <202406151526.45FFQHcQ020530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Gmelin Subject: git: 048ad7a9ef9f - stable/14 - ifconfig: Fix default netmask calculation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 048ad7a9ef9fe15368ff287db5c705c8163f4e1c Auto-Submitted: auto-generated The branch stable/14 has been updated by grembo: URL: https://cgit.FreeBSD.org/src/commit/?id=048ad7a9ef9fe15368ff287db5c705c8163f4e1c commit 048ad7a9ef9fe15368ff287db5c705c8163f4e1c Author: Michael Gmelin AuthorDate: 2024-06-12 16:11:52 +0000 Commit: Michael Gmelin CommitDate: 2024-06-15 15:24:59 +0000 ifconfig: Fix default netmask calculation Reported by: phk Reviewed by: emaste, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45570 (cherry picked from commit 8a9f0fa42b1c6cffd45459bb552e138083b00369) --- sbin/ifconfig/af_inet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 5e3084165b33..e21956cfc4fd 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -440,7 +440,7 @@ in_exec_nl(if_ctx *ctx, unsigned long action, void *data) static void in_setdefaultmask_nl(void) { - struct in_px *px = sintab_nl[ADDR]; + struct in_px *px = sintab_nl[ADDR]; in_addr_t i = ntohl(px->addr.s_addr); @@ -451,11 +451,11 @@ in_setdefaultmask_nl(void) * we should return an error rather than warning. */ if (IN_CLASSA(i)) - px->plen = IN_CLASSA_NSHIFT; + px->plen = 32 - IN_CLASSA_NSHIFT; else if (IN_CLASSB(i)) - px->plen = IN_CLASSB_NSHIFT; + px->plen = 32 - IN_CLASSB_NSHIFT; else - px->plen = IN_CLASSC_NSHIFT; + px->plen = 32 - IN_CLASSC_NSHIFT; px->maskset = true; } #endif