Skip to content

Commit bc0c6b0

Browse files
committed
devlink: add reserved fields to devlink_*_ops
JIRA: https://issues.redhat.com/browse/RHEL-111906 Upstream Status: RHEL-only Structures devlink_*_ops are protected by kABI, add reserved fields to them to make them extensible. Signed-off-by: Petr Oros <[email protected]>
1 parent 253fc23 commit bc0c6b0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

include/net/devlink.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ struct devlink_linecard_ops {
216216
void (*types_get)(struct devlink_linecard *linecard,
217217
void *priv, unsigned int index, const char **type,
218218
const void **type_priv);
219+
220+
RH_KABI_RESERVE(1)
221+
RH_KABI_RESERVE(2)
219222
};
220223

221224
struct devlink_sb_pool_info {
@@ -393,6 +396,9 @@ struct devlink_dpipe_table_ops {
393396
struct devlink_dpipe_dump_ctx *dump_ctx);
394397
int (*counters_set_update)(void *priv, bool enable);
395398
u64 (*size_get)(void *priv);
399+
400+
RH_KABI_RESERVE(1)
401+
RH_KABI_RESERVE(2)
396402
};
397403

398404
/**
@@ -510,6 +516,9 @@ struct devlink_param {
510516
int (*validate)(struct devlink *devlink, u32 id,
511517
union devlink_param_value val,
512518
struct netlink_ext_ack *extack);
519+
520+
RH_KABI_RESERVE(1)
521+
RH_KABI_RESERVE(2)
513522
};
514523

515524
struct devlink_param_item {
@@ -712,6 +721,9 @@ struct devlink_region_ops {
712721
struct netlink_ext_ack *extack,
713722
u64 offset, u32 size, u8 *data);
714723
void *priv;
724+
725+
RH_KABI_RESERVE(1)
726+
RH_KABI_RESERVE(2)
715727
};
716728

717729
/**
@@ -740,6 +752,9 @@ struct devlink_port_region_ops {
740752
struct netlink_ext_ack *extack,
741753
u64 offset, u32 size, u8 *data);
742754
void *priv;
755+
756+
RH_KABI_RESERVE(1)
757+
RH_KABI_RESERVE(2)
743758
};
744759

745760
struct devlink_fmsg;
@@ -773,6 +788,9 @@ struct devlink_health_reporter_ops {
773788
struct netlink_ext_ack *extack);
774789
int (*test)(struct devlink_health_reporter *reporter,
775790
struct netlink_ext_ack *extack);
791+
792+
RH_KABI_RESERVE(1)
793+
RH_KABI_RESERVE(2)
776794
};
777795

778796
/**
@@ -1720,6 +1738,15 @@ struct devlink_port_ops {
17201738
int (*port_fn_max_io_eqs_set)(struct devlink_port *devlink_port,
17211739
u32 max_eqs,
17221740
struct netlink_ext_ack *extack);
1741+
1742+
RH_KABI_RESERVE(1)
1743+
RH_KABI_RESERVE(2)
1744+
RH_KABI_RESERVE(3)
1745+
RH_KABI_RESERVE(4)
1746+
RH_KABI_RESERVE(5)
1747+
RH_KABI_RESERVE(6)
1748+
RH_KABI_RESERVE(7)
1749+
RH_KABI_RESERVE(8)
17231750
};
17241751

17251752
void devlink_port_init(struct devlink *devlink,

0 commit comments

Comments
 (0)