Skip to content

Conversation

@tk154
Copy link

@tk154 tk154 commented Sep 19, 2025

This series extends netifd with helper functions for ethtool
feature management and introduces a new rxhash device option.

Changes include:

  • Refactor ethtool_feature_value() to ethtool_get_feature_value()
    to query NIC features with error handling (-1 on error, 0/1 for disabled/enabled).
  • Add ethtool_set_feature_value() to enable or disable NIC features
    via ETHTOOL_SFEATURES.
  • Introduce rxhash option in network configuration to toggle
    Receive Side Scaling (RSS). This is useful on devices such as
    Marvell boards, where RSS support exists but isn't enabled by default.

Example configuration:

config device
    option name 'eth0'
    option rxhash '1'

Rename `ethtool_feature_value()` to `ethtool_get_feature_value()` and
change its return type from `bool` to `int` for clearer error handling.

- Return `-1` on error instead of `false`
- Return `0` to indicate the feature isn't enabled
- Return `1` to indicate the feature is enabled

Signed-off-by: Til Kaiser <mail@tk154.de>
Introduce `ethtool_set_feature_value()` to enable
or disable NIC features via `ETHTOOL_SFEATURES`.

Signed-off-by: Til Kaiser <mail@tk154.de>
Some devices (e.g. Marvell boards) support Receive Side Scaling (RSS)
but do not enable it by default. This change introduces a new `rxhash`
option in the device section of the network configuration to toggle
the feature, e.g.:

    config device
        option name 'eth0'
        option rxhash '1'

Signed-off-by: Til Kaiser <mail@tk154.de>
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.

1 participant