Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netdev/upper: Fix wrong CPU when RSS is disabled #15333

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

wengzhe
Copy link
Contributor

@wengzhe wengzhe commented Dec 25, 2024

Summary

When CONFIG_NETDEV_RSS is disabled, NETDEV_THREAD_COUNT will be 1, and we should not access upper->sem[cpu] with cpu > 0.

Impact

Netdev upperhalf with CONFIG_NETDEV_RSS=n and SMP enabled.

Testing

QEMU with virtio-net and SMP, which may randomly block on sending without this patch.

When `CONFIG_NETDEV_RSS` is disabled, `NETDEV_THREAD_COUNT` will be 1,
and we should not access `upper->sem[cpu]` with `cpu > 0`.

Signed-off-by: Zhe Weng <[email protected]>
@github-actions github-actions bot added Area: Networking Effects networking subsystem Size: XS The size of the change in this PR is very small labels Dec 25, 2024
@xiaoxiang781216 xiaoxiang781216 merged commit 286de7d into apache:master Dec 25, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Networking Effects networking subsystem Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants