diff --git a/tmp/ynl_build-tmp.ZYna22/old-code/ethtool-user.c b/tmp/ynl_build-tmp.ZYna22/new-code/ethtool-user.c index 456bda5f66f8..69af993e32b6 100644 --- a/tmp/ynl_build-tmp.ZYna22/old-code/ethtool-user.c +++ b/tmp/ynl_build-tmp.ZYna22/new-code/ethtool-user.c @@ -772,6 +772,8 @@ const struct ynl_policy_attr ethtool_coalesce_policy[ETHTOOL_A_COALESCE_MAX + 1] [ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS] = { .name = "tx-aggr-time-usecs", .type = YNL_PT_U32, }, [ETHTOOL_A_COALESCE_RX_PROFILE] = { .name = "rx-profile", .type = YNL_PT_NEST, .nest = ðtool_profile_nest, }, [ETHTOOL_A_COALESCE_TX_PROFILE] = { .name = "tx-profile", .type = YNL_PT_NEST, .nest = ðtool_profile_nest, }, + [ETHTOOL_A_COALESCE_RX_CQE_FRAMES] = { .name = "rx-cqe-frames", .type = YNL_PT_U32, }, + [ETHTOOL_A_COALESCE_RX_CQE_NSECS] = { .name = "rx-cqe-nsecs", .type = YNL_PT_U32, }, }; const struct ynl_policy_nest ethtool_coalesce_nest = { @@ -4939,6 +4941,16 @@ int ethtool_coalesce_get_rsp_parse(const struct nlmsghdr *nlh, parg.data = &dst->tx_profile; if (ethtool_profile_parse(&parg, attr)) return YNL_PARSE_CB_ERROR; + } else if (type == ETHTOOL_A_COALESCE_RX_CQE_FRAMES) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.rx_cqe_frames = 1; + dst->rx_cqe_frames = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_COALESCE_RX_CQE_NSECS) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.rx_cqe_nsecs = 1; + dst->rx_cqe_nsecs = ynl_attr_get_u32(attr); } } @@ -5123,6 +5135,10 @@ int ethtool_coalesce_set(struct ynl_sock *ys, ethtool_profile_put(nlh, ETHTOOL_A_COALESCE_RX_PROFILE, &req->rx_profile); if (req->_present.tx_profile) ethtool_profile_put(nlh, ETHTOOL_A_COALESCE_TX_PROFILE, &req->tx_profile); + if (req->_present.rx_cqe_frames) + ynl_attr_put_u32(nlh, ETHTOOL_A_COALESCE_RX_CQE_FRAMES, req->rx_cqe_frames); + if (req->_present.rx_cqe_nsecs) + ynl_attr_put_u32(nlh, ETHTOOL_A_COALESCE_RX_CQE_NSECS, req->rx_cqe_nsecs); err = ynl_exec(ys, nlh, &yrs); if (err < 0) diff --git a/tmp/ynl_build-tmp.ZYna22/old-code/ethtool-user.h b/tmp/ynl_build-tmp.ZYna22/new-code/ethtool-user.h index a585b27bf6dd..c0e79cacf192 100644 --- a/tmp/ynl_build-tmp.ZYna22/old-code/ethtool-user.h +++ b/tmp/ynl_build-tmp.ZYna22/new-code/ethtool-user.h @@ -3492,6 +3492,8 @@ struct ethtool_coalesce_get_rsp { __u32 tx_aggr_time_usecs:1; __u32 rx_profile:1; __u32 tx_profile:1; + __u32 rx_cqe_frames:1; + __u32 rx_cqe_nsecs:1; } _present; struct ethtool_header header; @@ -3524,6 +3526,8 @@ struct ethtool_coalesce_get_rsp { __u32 tx_aggr_time_usecs; struct ethtool_profile rx_profile; struct ethtool_profile tx_profile; + __u32 rx_cqe_frames; + __u32 rx_cqe_nsecs; }; void ethtool_coalesce_get_rsp_free(struct ethtool_coalesce_get_rsp *rsp); @@ -3643,6 +3647,8 @@ struct ethtool_coalesce_set_req { __u32 tx_aggr_time_usecs:1; __u32 rx_profile:1; __u32 tx_profile:1; + __u32 rx_cqe_frames:1; + __u32 rx_cqe_nsecs:1; } _present; struct ethtool_header header; @@ -3675,6 +3681,8 @@ struct ethtool_coalesce_set_req { __u32 tx_aggr_time_usecs; struct ethtool_profile rx_profile; struct ethtool_profile tx_profile; + __u32 rx_cqe_frames; + __u32 rx_cqe_nsecs; }; static inline struct ethtool_coalesce_set_req * @@ -3936,6 +3944,20 @@ __ethtool_coalesce_set_req_set_tx_profile_irq_moderation(struct ethtool_coalesce req->tx_profile.irq_moderation = irq_moderation; req->tx_profile._count.irq_moderation = n_irq_moderation; } +static inline void +ethtool_coalesce_set_req_set_rx_cqe_frames(struct ethtool_coalesce_set_req *req, + __u32 rx_cqe_frames) +{ + req->_present.rx_cqe_frames = 1; + req->rx_cqe_frames = rx_cqe_frames; +} +static inline void +ethtool_coalesce_set_req_set_rx_cqe_nsecs(struct ethtool_coalesce_set_req *req, + __u32 rx_cqe_nsecs) +{ + req->_present.rx_cqe_nsecs = 1; + req->rx_cqe_nsecs = rx_cqe_nsecs; +} /* * Set coalesce params.