Skip to content

qdisc: use an SFQ quantum the kernel keeps in TestSfqAddDel - #1241

Merged
aboch merged 1 commit into
vishvananda:mainfrom
DefinedNet:fix-sfq-quantum-test
Nov 19, 2026
Merged

aboch merged 1 commit into
vishvananda:mainfrom
DefinedNet:fix-sfq-quantum-test

Conversation

@JackDoan

@JackDoan JackDoan commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

TestSfqAddDel fails on the current ubuntu-latest runner, which is now ubuntu-26.04 with kernel 7.0:

qdisc_test.go:172: Quantum doesn't match

Newer kernels raise any SFQ quantum below 256 bytes to 256. The test sets a quantum of 2, so it reads back as 256. The same thing happens with tc directly, here on kernel 7.3:

$ tc qdisc add dev foo root handle 1: sfq quantum 2
$ tc qdisc show dev foo
qdisc sfq 1: root refcnt 2 limit 127p quantum 256b depth 127 divisor 1024

Values of 257 and up are kept as given.

This change sets the quantum to 1000. That value is above the floor and is not the MTU-derived default, so the test still checks that the value round-trips.

The failure first showed up in CI on #1222, which doesn't touch qdisc code. main will hit it on its next run.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated the SFQ test to use a quantum value accepted consistently by newer kernels.

Newer kernels raise any SFQ quantum below 256 bytes to 256, so the
test's quantum of 2 reads back as 256 and the comparison fails. This
shows up on the ubuntu-26.04 GitHub runner (kernel 7.0) and on 7.3.

Use 1000, which is above that floor and differs from the MTU-derived
default, so the check still proves the value round-trips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This pull request updates one SFQ test case. It changes the configured quantum value and adds a note about newer kernel handling for low quantum values. The round-trip assertion remains in place.

Changes: SFQ test adjustment

Layer / File(s) Summary
SFQ quantum expectation
qdisc_test.go
TestSfqAddDel now configures quantum 1000 instead of 2. The test comments state that newer kernels raise values below 256 bytes. The test still verifies the listed qdisc quantum value.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: imilchev

Merge Risk: Minimal · up to 1c6f6

This updates a single SFQ test value so it passes on newer kernels that raise small quantum values to 256. It does not change runtime behavior, and the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the SFQ quantum change and the TestSfqAddDel test, which matches the raw summary (quantum changed from 2 to 1000 in TestSfqAddDel). It states the reason, that the kernel keeps the valu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the SFQ quantum change and the TestSfqAddDel test, which matches the raw summary (quantum changed from 2 to 1000 in TestSfqAddDel). It states the reason, that the kernel keeps the value, which the objectives describe as the kernel raising quantums below 256 bytes. The title is specific and does not include file lists or vague terms. It is slightly dense, but it still identifies the primary change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 68de13e2-27fa-4774-8a7a-2130cac00dfc
Commits

Reviewing files that changed from the base of the PR and between 5a89637 and 1c6f6cf.

Files selected for processing: 1

  • qdisc_test.go

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@JackDoan

Copy link
Copy Markdown
Contributor Author

@aboch this fixes CI, which has moved to Linux 7.x+ since the last merge 😭

@aboch

aboch commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Thank you @JackDoan

@aboch

aboch commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

LGTM

@aboch
aboch merged commit 86d560a into vishvananda:main Nov 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants