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

plugin_net: handle cqe-mode-rx ethtool option #736

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

rtzoeller
Copy link
Contributor

Parsing ethtool output has been broken for several years, since ethtool -c started producing a line resembling CQE mode RX: n/a TX: n/a. This prevents setting any [net] coalesce= options, which log tuned.plugins.plugin_net: unknown coalesce parameter(s): {'CQE mode RX'}.

Substituting cqe-mode-rx: for CQE mode RX: resolves the issue, although there is a conflict with the adaptive-tx workaround which prevents us from supporting cqe-mode-tx directly. Do not attempt to address that issue as part of this change.

Fixes #726.

Parsing ethtool output has been broken for several years, since `ethtool -c`
started producing a line resembling `CQE mode RX: n/a  TX: n/a`.
This prevents setting any [net] coalesce= options, which log
`tuned.plugins.plugin_net: unknown coalesce parameter(s): {'CQE mode RX'}`.

Substituting `cqe-mode-rx:` for `CQE mode RX:` resolves the issue,
although there is a conflict with the `adaptive-tx` workaround
which prevents us from supporting `cqe-mode-tx` directly.
Do not attempt to address that issue as part of this change.

Fixes redhat-performance#726.

Signed-off-by: Ryan Zoeller <[email protected]>
@rtzoeller
Copy link
Contributor Author

@yarda any chance of getting this (or a variant of it) into 2.25.0? It resolves an issue that's breaking documented configurations in plugin_net.

@yarda
Copy link
Contributor

yarda commented Jan 24, 2025

@yarda any chance of getting this (or a variant of it) into 2.25.0? It resolves an issue that's breaking documented configurations in plugin_net.

Thanks, LGTM, I am counting with it for the 2.25.0 release.

Regarding, the cqe-mode-tx, I think it will require two regex runs (if the current parsing is reused), e.g.:

value = re.sub(r"([^:\n]+)(\s+RX:\s+[^:]+\s+)TX:", "\\1\\2\n\\1 TX:", value)
value = self._cmd.multiple_re_replace({
    "Adaptive RX:": "adaptive-rx:",
    "Adaptive TX:": "adaptive-tx:",
    "CQE mode RX:":"cqe-mode-rx:",
    "CQE mode TX:":"cqe-mode-tx:",
...

@yarda yarda self-requested a review January 24, 2025 21:15
@yarda yarda merged commit 5452ada into redhat-performance:master Jan 29, 2025
14 checks passed
@rtzoeller rtzoeller deleted the cqe-mode-rx branch January 29, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants