Thread (2 messages) 2 messages, 2 authors, 2023-11-27

Re: [PATCH net-next v4] netlink: specs: devlink: add some(not all) missing attributes in devlink.yaml

From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-11-27 21:16:42
Also in: linux-kernel-mentees

On Sun, 26 Nov 2023 16:22:46 +0530 Swarup Laxman Kotiaklapudi wrote:
quoted hunk ↗ jump to hunk
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index b3c8383d342d..ddb689dd3d7e 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -248,7 +248,7 @@ enum devlink_param_reset_dev_on_drv_probe_value {
 	DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK,
 };
 
-enum {
+enum devlink_stats {
 	DEVLINK_ATTR_STATS_RX_PACKETS,		/* u64 */
 	DEVLINK_ATTR_STATS_RX_BYTES,		/* u64 */
 	DEVLINK_ATTR_STATS_RX_DROPPED,		/* u64 */
This change unfortunately breaks the kernel build. There's already
a struct called devlink_stats. You can change that later but that'd 
be a separate patch, after the spec changes are accepted.

For now just keep these enums unnamed.

If the C codegen tries to use them as named (which I don't see it doing
now, FWIW) you can add an empty enum-name: attribute to the appropriate
enum definition in the spec, this will make the C code generator use a
bare "int" to store the values.
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help