Skip to content

Commit

Permalink
unix: add missing ETHTOOL_FLAG_ constants
Browse files Browse the repository at this point in the history
Some constants were removed in CL 600516 that included changes for the
Linux kernel 6.10.

This kernel version moved C defines to an enum ethtool_header_flags that
was not picked up by the mkall.sh script.

For enums, there is a perl script that needs to be run manually, and the
output must be added by hand to the list of constants in unix/linux/types.go.

See https://elixir.bootlin.com/linux/v6.10.3/source/include/uapi/linux/ethtool_netlink.h#L120

Fixes golang/go#68761

Change-Id: Idb189886d257d0fe66a4e832757a469e17f86c34
GitHub-Last-Rev: 08b8ef5
GitHub-Pull-Request: #212
Reviewed-on: https://go-review.googlesource.com/c/sys/+/604098
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
mauri870 authored and gopherbot committed Aug 7, 2024
1 parent 4c7077e commit 914deed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions unix/linux/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3551,8 +3551,8 @@ const (

// ethtool and its netlink interface, generated using:
//
// perl -nlE '/^\s*(ETHTOOL_\w+)/ && say "$1 = C.$1"' ethtool.h
// perl -nlE '/^\s*(ETHTOOL_\w+)/ && say "$1 = C.$1"' ethtool_netlink.h
// perl -nlE '/^\s*(ETHTOOL_\w+)/ && say "$1 = C.$1"' /usr/include/linux/ethtool.h
// perl -nlE '/^\s*(ETHTOOL_\w+)/ && say "$1 = C.$1"' /usr/include/linux/ethtool_netlink.h
//
// Note that a couple of constants produced by this command will be duplicated
// by mkerrors.sh, so some manual pruning was necessary.
Expand Down Expand Up @@ -3787,6 +3787,9 @@ const (
ETHTOOL_MSG_PSE_GET_REPLY = C.ETHTOOL_MSG_PSE_GET_REPLY
ETHTOOL_MSG_RSS_GET_REPLY = C.ETHTOOL_MSG_RSS_GET_REPLY
ETHTOOL_MSG_KERNEL_MAX = C.ETHTOOL_MSG_KERNEL_MAX
ETHTOOL_FLAG_COMPACT_BITSETS = C.ETHTOOL_FLAG_COMPACT_BITSETS
ETHTOOL_FLAG_OMIT_REPLY = C.ETHTOOL_FLAG_OMIT_REPLY
ETHTOOL_FLAG_STATS = C.ETHTOOL_FLAG_STATS
ETHTOOL_A_HEADER_UNSPEC = C.ETHTOOL_A_HEADER_UNSPEC
ETHTOOL_A_HEADER_DEV_INDEX = C.ETHTOOL_A_HEADER_DEV_INDEX
ETHTOOL_A_HEADER_DEV_NAME = C.ETHTOOL_A_HEADER_DEV_NAME
Expand Down
3 changes: 3 additions & 0 deletions unix/ztypes_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 914deed

Please # to comment.