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

Potential bug about configuring coalesce setting in NM/Network role #388

Open
liangwen12year opened this issue May 2, 2021 · 0 comments

Comments

@liangwen12year
Copy link
Collaborator

liangwen12year commented May 2, 2021

        for coalesce, setting in ethtool_coalesce.items():
            if setting is not None:
                if isinstance(setting, bool):
                    setting = int(setting)
                configured_coalesce.append(
                    "%s %s" % (coalesce.replace("_", "-"), setting)
                )   # ^^^ code about configuring coalesce setting in Network role

Some people suggested to remove the normalization - setting = int(setting). I do not think we should remove if isinstance(setting, bool): setting = int(setting) for coalesce setting. Because the data type for adaptive_rx and adaptive_tx in Network role is bool, see

                ArgValidatorBool("adaptive_rx", default_value=None),
                ArgValidatorBool("adaptive_tx", default_value=None),

But In NetworkManager[1], we have to set it to either 0 or 1 when modify the ethtool.coalesce-adaptive-rx and ethtool.coalesce-adaptive-tx setting.

[root@localhost ~]# nmcli connection modify testnic1 ethtool.coalesce-adaptive-rx True
Error: failed to modify ethtool.coalesce-adaptive-rx: 'True' is out of range [0, 4294967295].# Is anything wrong with the error msg?
[root@localhost ~]# nmcli connection modify testnic1 ethtool.coalesce-adaptive-rx 1

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/libnm-core-impl/nm-setting-ethtool.c#L312

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

No branches or pull requests

1 participant