diff --git a/tmp/ynl_build-tmp.hjXYZE/old-code/ethtool-user.c b/tmp/ynl_build-tmp.hjXYZE/new-code/ethtool-user.c index 161544ca083f..00b0bb93f8e8 100644 --- a/tmp/ynl_build-tmp.hjXYZE/old-code/ethtool-user.c +++ b/tmp/ynl_build-tmp.hjXYZE/new-code/ethtool-user.c @@ -771,6 +771,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 = { @@ -4931,6 +4933,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); } } @@ -5115,6 +5127,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.hjXYZE/old-code/ethtool-user.h b/tmp/ynl_build-tmp.hjXYZE/new-code/ethtool-user.h index 43e10c5f442b..16f4e41d6997 100644 --- a/tmp/ynl_build-tmp.hjXYZE/old-code/ethtool-user.h +++ b/tmp/ynl_build-tmp.hjXYZE/new-code/ethtool-user.h @@ -3490,6 +3490,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; @@ -3522,6 +3524,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); @@ -3641,6 +3645,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; @@ -3673,6 +3679,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 * @@ -3934,6 +3942,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.