diff --git a/tmp/ynl_build-tmp.BOjAN3/old-code/ethtool-user.c b/tmp/ynl_build-tmp.BOjAN3/new-code/ethtool-user.c index 161544ca083f..456bda5f66f8 100644 --- a/tmp/ynl_build-tmp.BOjAN3/old-code/ethtool-user.c +++ b/tmp/ynl_build-tmp.BOjAN3/new-code/ethtool-user.c @@ -259,6 +259,7 @@ const struct ynl_policy_attr ethtool_pause_stat_policy[ETHTOOL_A_PAUSE_STAT_MAX [ETHTOOL_A_PAUSE_STAT_PAD] = { .name = "pad", .type = YNL_PT_IGNORE, }, [ETHTOOL_A_PAUSE_STAT_TX_FRAMES] = { .name = "tx-frames", .type = YNL_PT_U64, }, [ETHTOOL_A_PAUSE_STAT_RX_FRAMES] = { .name = "rx-frames", .type = YNL_PT_U64, }, + [ETHTOOL_A_PAUSE_STAT_TX_PAUSE_STORM_EVENTS] = { .name = "tx-pause-storm-events", .type = YNL_PT_U64, }, }; const struct ynl_policy_nest ethtool_pause_stat_nest = { @@ -1169,6 +1170,8 @@ int ethtool_pause_stat_put(struct nlmsghdr *nlh, unsigned int attr_type, ynl_attr_put_u64(nlh, ETHTOOL_A_PAUSE_STAT_TX_FRAMES, obj->tx_frames); if (obj->_present.rx_frames) ynl_attr_put_u64(nlh, ETHTOOL_A_PAUSE_STAT_RX_FRAMES, obj->rx_frames); + if (obj->_present.tx_pause_storm_events) + ynl_attr_put_u64(nlh, ETHTOOL_A_PAUSE_STAT_TX_PAUSE_STORM_EVENTS, obj->tx_pause_storm_events); ynl_attr_nest_end(nlh, nest); return 0; @@ -1193,6 +1196,11 @@ int ethtool_pause_stat_parse(struct ynl_parse_arg *yarg, return YNL_PARSE_CB_ERROR; dst->_present.rx_frames = 1; dst->rx_frames = ynl_attr_get_u64(attr); + } else if (type == ETHTOOL_A_PAUSE_STAT_TX_PAUSE_STORM_EVENTS) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.tx_pause_storm_events = 1; + dst->tx_pause_storm_events = ynl_attr_get_u64(attr); } } diff --git a/tmp/ynl_build-tmp.BOjAN3/old-code/ethtool-user.h b/tmp/ynl_build-tmp.BOjAN3/new-code/ethtool-user.h index 43e10c5f442b..a585b27bf6dd 100644 --- a/tmp/ynl_build-tmp.BOjAN3/old-code/ethtool-user.h +++ b/tmp/ynl_build-tmp.BOjAN3/new-code/ethtool-user.h @@ -55,10 +55,12 @@ struct ethtool_pause_stat { struct { __u32 tx_frames:1; __u32 rx_frames:1; + __u32 tx_pause_storm_events:1; } _present; __u64 tx_frames; __u64 rx_frames; + __u64 tx_pause_storm_events; }; struct ethtool_ts_stat { @@ -4190,6 +4192,14 @@ ethtool_pause_set_req_set_stats_rx_frames(struct ethtool_pause_set_req *req, req->stats.rx_frames = rx_frames; } static inline void +ethtool_pause_set_req_set_stats_tx_pause_storm_events(struct ethtool_pause_set_req *req, + __u64 tx_pause_storm_events) +{ + req->_present.stats = 1; + req->stats._present.tx_pause_storm_events = 1; + req->stats.tx_pause_storm_events = tx_pause_storm_events; +} +static inline void ethtool_pause_set_req_set_stats_src(struct ethtool_pause_set_req *req, __u32 stats_src) {