Skip to content

Commit

Permalink
sync to upstream 1148c4098e91 ("Merge branch 'selftests-net-groundwor…
Browse files Browse the repository at this point in the history
…k-for-ynl-based-tests'")

Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
kuba-moo committed Apr 4, 2024
1 parent 8649f9e commit 6906ebb
Show file tree
Hide file tree
Showing 6 changed files with 899 additions and 0 deletions.
14 changes: 14 additions & 0 deletions generated/ethtool-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ const char *ethtool_stringset_str(enum ethtool_stringset value)
return ethtool_stringset_strmap[value];
}

static const char * const ethtool_header_flags_strmap[] = {
[0] = "compact-bitsets",
[1] = "omit-reply",
[2] = "stats",
};

const char *ethtool_header_flags_str(int value)
{
value = ffs(value) - 1;
if (value < 0 || value >= (int)YNL_ARRAY_SIZE(ethtool_header_flags_strmap))
return NULL;
return ethtool_header_flags_strmap[value];
}

/* Policies */
struct ynl_policy_attr ethtool_header_policy[ETHTOOL_A_HEADER_MAX + 1] = {
[ETHTOOL_A_HEADER_DEV_INDEX] = { .name = "dev-index", .type = YNL_PT_U32, },
Expand Down
Loading

0 comments on commit 6906ebb

Please sign in to comment.