This patch fixes unstable LACP negotiation when bonding is configured in
passive mode (`lacp_active=off`).
Previously, the actor would stop sending LACPDUs after initial negotiation
succeeded, leading to the partner timing out and restarting the negotiation
cycle. This resulted in continuous LACP state flapping.
The fix ensures the passive actor starts sending periodic LACPDUs after
receiving the first LACPDU from the partner, in accordance with IEEE
802.1AX-2020 section 6.4.1.
v3:
a) const bond_params for ad_initialize_port (Paolo Abeni)
b) add comment about why we need to sleep in test script (Paolo Abeni)
v2:
a) Split the patch in to 2 parts. One for lacp_active setting.
One for passive mode negotiation flapping issue. (Nikolay Aleksandrov)
b) Update fixes tags and some comments (Nikolay Aleksandrov)
c) Update selftest to pass on normal kernel (Jakub Kicinski)
Hangbin Liu (3):
bonding: update LACP activity flag after setting lacp_active
bonding: send LACPDUs periodically in passive mode after receiving
partner's LACPDU
selftests: bonding: add test for passive LACP mode
drivers/net/bonding/bond_3ad.c | 67 ++++++++---
drivers/net/bonding/bond_options.c | 1 +
include/net/bond_3ad.h | 1 +
.../selftests/drivers/net/bonding/Makefile | 3 +-
.../drivers/net/bonding/bond_passive_lacp.sh | 105 ++++++++++++++++++
.../selftests/drivers/net/bonding/config | 1 +
6 files changed, 159 insertions(+), 19 deletions(-)
create mode 100755 tools/testing/selftests/drivers/net/bonding/bond_passive_lacp.sh
--
2.50.1
Signed-off-by: Abhishek Jadhav <abhijadhav.dev(a)gmail.com>
---
tools/testing/selftests/amd-pstate/gitsource.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/amd-pstate/gitsource.sh b/tools/testing/selftests/amd-pstate/gitsource.sh
index 4cde62f90468..9b7323b1d0a6 100755
--- a/tools/testing/selftests/amd-pstate/gitsource.sh
+++ b/tools/testing/selftests/amd-pstate/gitsource.sh
@@ -121,7 +121,7 @@ parse_gitsource()
en_sum=$(awk 'BEGIN {sum=0};{sum += $1};END {print sum}' $OUTFILE_GIT-energy-$1-$2.log)
printf "Gitsource-$1-#$2 power consumption(J): $en_sum\n" | tee -a $OUTFILE_GIT.result
- # Permance is the number of run gitsource per second, denoted 1/t, where 1 is the number of run gitsource in t
+ # Performance is the number of run gitsource per second, denoted 1/t, where 1 is the number of run gitsource in t
# seconds. It is well known that P=E/t, where P is power measured in watts(W), E is energy measured in joules(J),
# and t is time measured in seconds(s). This means that performance per watt becomes
# 1/t 1/t 1
@@ -179,7 +179,7 @@ gather_gitsource()
avg_en=$(awk 'BEGIN {sum=0};{sum += $1};END {print sum/'$LOOP_TIMES'}' $OUTFILE_GIT-energy-$1.log)
printf "Gitsource-$1 avg power consumption(J): $avg_en\n" | tee -a $OUTFILE_GIT.result
- # Permance is the number of run gitsource per second, denoted 1/t, where 1 is the number of run gitsource in t
+ # Performance is the number of run gitsource per second, denoted 1/t, where 1 is the number of run gitsource in t
# seconds. It is well known that P=E/t, where P is power measured in watts(W), E is energy measured in joules(J),
# and t is time measured in seconds(s). This means that performance per watt becomes
# 1/t 1/t 1
--
2.50.1
This series adds ONE_REG interface for SBI FWFT extension implemented
by KVM RISC-V. This was missed out in accepted SBI FWFT patches for
KVM RISC-V.
These patches can also be found in the riscv_kvm_fwft_one_reg_v1 branch
at: https://github.com/avpatel/linux.git
Anup Patel (6):
RISC-V: KVM: Set initial value of hedeleg in kvm_arch_vcpu_create()
RISC-V: KVM: Introduce feature specific reset for SBI FWFT
RISC-V: KVM: Introduce optional ONE_REG callbacks for SBI extensions
RISC-V: KVM: Move copy_sbi_ext_reg_indices() to SBI implementation
RISC-V: KVM: Implement ONE_REG interface for SBI FWFT state
KVM: riscv: selftests: Add SBI FWFT to get-reg-list test
arch/riscv/include/asm/kvm_vcpu_sbi.h | 23 +-
arch/riscv/include/uapi/asm/kvm.h | 14 ++
arch/riscv/kvm/vcpu.c | 3 +-
arch/riscv/kvm/vcpu_onereg.c | 60 +-----
arch/riscv/kvm/vcpu_sbi.c | 172 ++++++++++++---
arch/riscv/kvm/vcpu_sbi_fwft.c | 199 ++++++++++++++++--
arch/riscv/kvm/vcpu_sbi_sta.c | 64 ++++--
.../selftests/kvm/riscv/get-reg-list.c | 28 +++
8 files changed, 436 insertions(+), 127 deletions(-)
--
2.43.0
Fixed multiple typos in powerpc/tm reported by Codespell
Signed-off-by: Rakuram Eswaran <rakuram.e96(a)gmail.com>
---
tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c | 2 +-
tools/testing/selftests/powerpc/tm/tm-signal-stack.c | 4 ++--
tools/testing/selftests/powerpc/tm/tm-sigreturn.c | 2 +-
tools/testing/selftests/powerpc/tm/tm-tar.c | 2 +-
tools/testing/selftests/powerpc/tm/tm-tmspr.c | 2 +-
tools/testing/selftests/powerpc/tm/tm-trap.c | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c b/tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c
index 4a61e9bd12b4..8aee18819603 100644
--- a/tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c
+++ b/tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c
@@ -42,7 +42,7 @@ void signal_usr1(int signum, siginfo_t *info, void *uc)
#else
ucp->uc_mcontext.uc_regs->gregs[PT_MSR] |= (7ULL);
#endif
- /* Should segv on return becuase of invalid context */
+ /* Should segv on return because of invalid context */
segv_expected = 1;
}
diff --git a/tools/testing/selftests/powerpc/tm/tm-signal-stack.c b/tools/testing/selftests/powerpc/tm/tm-signal-stack.c
index 68807aac8dd3..e793b5d97c48 100644
--- a/tools/testing/selftests/powerpc/tm/tm-signal-stack.c
+++ b/tools/testing/selftests/powerpc/tm/tm-signal-stack.c
@@ -2,7 +2,7 @@
/*
* Copyright 2015, Michael Neuling, IBM Corp.
*
- * Test the kernel's signal delievery code to ensure that we don't
+ * Test the kernel's signal delivery code to ensure that we don't
* trelaim twice in the kernel signal delivery code. This can happen
* if we trigger a signal when in a transaction and the stack pointer
* is bogus.
@@ -52,7 +52,7 @@ int tm_signal_stack()
/*
* The flow here is:
- * 1) register a signal handler (so signal delievery occurs)
+ * 1) register a signal handler (so signal delivery occurs)
* 2) make stack pointer (r1) = NULL
* 3) start transaction
* 4) cause segv
diff --git a/tools/testing/selftests/powerpc/tm/tm-sigreturn.c b/tools/testing/selftests/powerpc/tm/tm-sigreturn.c
index ffe4e5515f33..4dfb25409393 100644
--- a/tools/testing/selftests/powerpc/tm/tm-sigreturn.c
+++ b/tools/testing/selftests/powerpc/tm/tm-sigreturn.c
@@ -5,7 +5,7 @@
*
* Test the kernel's signal returning code to check reclaim is done if the
* sigreturn() is called while in a transaction (suspended since active is
- * already dropped trough the system call path).
+ * already dropped through the system call path).
*
* The kernel must discard the transaction when entering sigreturn, since
* restoring the potential TM SPRS from the signal frame is requiring to not be
diff --git a/tools/testing/selftests/powerpc/tm/tm-tar.c b/tools/testing/selftests/powerpc/tm/tm-tar.c
index f2a9137f3c1e..ea420caa3961 100644
--- a/tools/testing/selftests/powerpc/tm/tm-tar.c
+++ b/tools/testing/selftests/powerpc/tm/tm-tar.c
@@ -50,7 +50,7 @@ int test_tar(void)
"bne 2b;"
"tend.;"
- /* Transaction sucess! TAR should be 3 */
+ /* Transaction success! TAR should be 3 */
"mfspr 7, %[tar];"
"ori %[res], 7, 4;" // res = 3|4 = 7
"b 4f;"
diff --git a/tools/testing/selftests/powerpc/tm/tm-tmspr.c b/tools/testing/selftests/powerpc/tm/tm-tmspr.c
index dd5ddffa28b7..e2c3ae7c9035 100644
--- a/tools/testing/selftests/powerpc/tm/tm-tmspr.c
+++ b/tools/testing/selftests/powerpc/tm/tm-tmspr.c
@@ -9,7 +9,7 @@
* - TFIAR - stores address of location of transaction failure
* - TFHAR - stores address of software failure handler (if transaction
* fails)
- * - TEXASR - lots of info about the transacion(s)
+ * - TEXASR - lots of info about the transaction(s)
*
* (1) create more threads than cpus
* (2) in each thread:
diff --git a/tools/testing/selftests/powerpc/tm/tm-trap.c b/tools/testing/selftests/powerpc/tm/tm-trap.c
index 97cb74768e30..99acb7c78403 100644
--- a/tools/testing/selftests/powerpc/tm/tm-trap.c
+++ b/tools/testing/selftests/powerpc/tm/tm-trap.c
@@ -91,9 +91,9 @@ void trap_signal_handler(int signo, siginfo_t *si, void *uc)
* LE endianness does in effect nothing, instruction (2)
* is then executed again as 'trap', generating a second
* trap event (note that in that case 'trap' is caught
- * not in transacional mode). On te other hand, if after
+ * not in transactional mode). On the other hand, if after
* the return from the signal handler the endianness in-
- * advertently flipped, instruction (1) is tread as a
+ * advertently flipped, instruction (1) is thread as a
* branch instruction, i.e. b .+8, hence instruction (3)
* and (4) are executed (tbegin.; trap;) and we get sim-
* ilaly on the trap signal handler, but now in TM mode.
--
2.43.0
This series updates crc_kunit to use the same interrupt context testing
strategy that I used in the crypto KUnit tests. I.e., test CRC
computation in hardirq, softirq, and task context concurrently. This
detect issues related to use of the FPU/SIMD/vector registers.
To allow lib/crc/tests/ and lib/crypto/tests/ to share code, move the
needed helper function to include/kunit/run-in-irq-context.h.
include/kunit/ seems like the most relevant location for this sort of
thing, but let me know if there is any other preference.
The third patch replaces the calls to crypto_simd_usable() in lib/crc/
with calls to the underlying functions, now that we have a better
solution that doesn't rely on the test injecting values. (Note that
crc_kunit wasn't actually using the injection solution, anyway.)
I'd like to take this series via crc-next.
Eric Biggers (3):
kunit, lib/crypto: Move run_irq_test() to common header
lib/crc: crc_kunit: Test CRC computation in interrupt contexts
lib/crc: Use underlying functions instead of crypto_simd_usable()
include/kunit/run-in-irq-context.h | 129 ++++++++++++++++++++++++++
lib/crc/arm/crc-t10dif.h | 6 +-
lib/crc/arm/crc32.h | 6 +-
lib/crc/arm64/crc-t10dif.h | 6 +-
lib/crc/arm64/crc32.h | 11 ++-
lib/crc/powerpc/crc-t10dif.h | 5 +-
lib/crc/powerpc/crc32.h | 5 +-
lib/crc/tests/crc_kunit.c | 62 +++++++++++--
lib/crc/x86/crc-pclmul-template.h | 3 +-
lib/crc/x86/crc32.h | 2 +-
lib/crypto/tests/hash-test-template.h | 123 +-----------------------
11 files changed, 206 insertions(+), 152 deletions(-)
create mode 100644 include/kunit/run-in-irq-context.h
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
--
2.50.1
Even with slowwait used to avoid system sleep in the preferred_lft test,
failures can still occur after long runtimes.
Print the device address info when the test fails to provide better
troubleshooting data.
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
---
tools/testing/selftests/net/rtnetlink.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
index d6c00efeb664..91b0f6cae04d 100755
--- a/tools/testing/selftests/net/rtnetlink.sh
+++ b/tools/testing/selftests/net/rtnetlink.sh
@@ -313,6 +313,8 @@ kci_test_addrlft()
slowwait 5 check_addr_not_exist "$devdummy" "10.23.11."
if [ $? -eq 1 ]; then
+ # troubleshoot the reason for our failure
+ run_cmd ip addr show dev "$devdummy"
check_err 1
end_test "FAIL: preferred_lft addresses remaining"
return
--
2.50.1
Hello,
kernel test robot noticed "kernel-selftests.filelock.ofdlocks.fail" on:
commit: e5f8cea6cbc538442951308fa36559ae0044d1f9 ("kselftest/filelock: Report each test in oftlocks separately")
https://git.kernel.org/cgit/linux/kernel/git/broonie/ci.git selftest-filelock-ktap
in testcase: kernel-selftests
version: kernel-selftests-x86_64-8d561baae505-1_20250817
with following parameters:
group: filelock
config: x86_64-rhel-9.4-kselftests
compiler: gcc-12
test machine: 36 threads 1 sockets Intel(R) Core(TM) i9-9980XE CPU @ 3.00GHz (Skylake) with 32G memory
(please refer to attached dmesg/kmsg for entire log/backtrace)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang(a)intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202508211022.50b4caaf-lkp@intel.com
# timeout set to 300
# selftests: filelock: ofdlocks
# TAP version 13
# 1..4
# # opened fds 5 6
# ok 1 set OFD read lock on first fd
# ok 2 read and write locks conflicted
# ok 3 F_OFD_GETLK with F_UNLCK returned lock info
# # F_UNLCK test returns: locked, type 0 pid -1 len 3
# ok 4 F_UNLCK with len==0 returned the same
# ok 5 F_OFD_GETLK with F_UNLCK return lock info from another fd
# # Planned tests != run tests (4 != 5)
# # Totals: pass:5 fail:0 xfail:0 xpass:0 skip:0 error:0
not ok 1 selftests: filelock: ofdlocks # exit=1
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250821/202508211022.50b4caaf-lkp@…
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki