Skip to content

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

Description

@liangwen12year
        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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions