diff --git a/home/nipa/nipa_out/919161/ynl/old-code/ethtool-user.c b/home/nipa/nipa_out/919161/ynl/new-code/ethtool-user.c index 939d828baa41..2b430517e4fc 100644 --- a/home/nipa/nipa_out/919161/ynl/old-code/ethtool-user.c +++ b/home/nipa/nipa_out/919161/ynl/new-code/ethtool-user.c @@ -568,6 +568,8 @@ const struct ynl_policy_attr ethtool_rings_policy[ETHTOOL_A_RINGS_MAX + 1] = { [ETHTOOL_A_RINGS_RX_PUSH] = { .name = "rx-push", .type = YNL_PT_U8, }, [ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN] = { .name = "tx-push-buf-len", .type = YNL_PT_U32, }, [ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX] = { .name = "tx-push-buf-len-max", .type = YNL_PT_U32, }, + [ETHTOOL_A_RINGS_HDS_THRESH] = { .name = "hds-thresh", .type = YNL_PT_U32, }, + [ETHTOOL_A_RINGS_HDS_THRESH_MAX] = { .name = "hds-thresh-max", .type = YNL_PT_U32, }, }; const struct ynl_policy_nest ethtool_rings_nest = { @@ -3752,6 +3754,16 @@ int ethtool_rings_get_rsp_parse(const struct nlmsghdr *nlh, return YNL_PARSE_CB_ERROR; dst->_present.tx_push_buf_len_max = 1; dst->tx_push_buf_len_max = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_RINGS_HDS_THRESH) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.hds_thresh = 1; + dst->hds_thresh = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_RINGS_HDS_THRESH_MAX) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.hds_thresh_max = 1; + dst->hds_thresh_max = ynl_attr_get_u32(attr); } } @@ -3897,6 +3909,10 @@ int ethtool_rings_set(struct ynl_sock *ys, struct ethtool_rings_set_req *req) ynl_attr_put_u32(nlh, ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN, req->tx_push_buf_len); if (req->_present.tx_push_buf_len_max) ynl_attr_put_u32(nlh, ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX, req->tx_push_buf_len_max); + if (req->_present.hds_thresh) + ynl_attr_put_u32(nlh, ETHTOOL_A_RINGS_HDS_THRESH, req->hds_thresh); + if (req->_present.hds_thresh_max) + ynl_attr_put_u32(nlh, ETHTOOL_A_RINGS_HDS_THRESH_MAX, req->hds_thresh_max); err = ynl_exec(ys, nlh, &yrs); if (err < 0) diff --git a/home/nipa/nipa_out/919161/ynl/old-code/ethtool-user.h b/home/nipa/nipa_out/919161/ynl/new-code/ethtool-user.h index faba7498b32b..8c6f20caac97 100644 --- a/home/nipa/nipa_out/919161/ynl/old-code/ethtool-user.h +++ b/home/nipa/nipa_out/919161/ynl/new-code/ethtool-user.h @@ -2473,6 +2473,8 @@ struct ethtool_rings_get_rsp { __u32 rx_push:1; __u32 tx_push_buf_len:1; __u32 tx_push_buf_len_max:1; + __u32 hds_thresh:1; + __u32 hds_thresh_max:1; } _present; struct ethtool_header header; @@ -2491,6 +2493,8 @@ struct ethtool_rings_get_rsp { __u8 rx_push; __u32 tx_push_buf_len; __u32 tx_push_buf_len_max; + __u32 hds_thresh; + __u32 hds_thresh_max; }; void ethtool_rings_get_rsp_free(struct ethtool_rings_get_rsp *rsp); @@ -2595,6 +2599,8 @@ struct ethtool_rings_set_req { __u32 rx_push:1; __u32 tx_push_buf_len:1; __u32 tx_push_buf_len_max:1; + __u32 hds_thresh:1; + __u32 hds_thresh_max:1; } _present; struct ethtool_header header; @@ -2613,6 +2619,8 @@ struct ethtool_rings_set_req { __u8 rx_push; __u32 tx_push_buf_len; __u32 tx_push_buf_len_max; + __u32 hds_thresh; + __u32 hds_thresh_max; }; static inline struct ethtool_rings_set_req *ethtool_rings_set_req_alloc(void) @@ -2759,6 +2767,20 @@ ethtool_rings_set_req_set_tx_push_buf_len_max(struct ethtool_rings_set_req *req, req->_present.tx_push_buf_len_max = 1; req->tx_push_buf_len_max = tx_push_buf_len_max; } +static inline void +ethtool_rings_set_req_set_hds_thresh(struct ethtool_rings_set_req *req, + __u32 hds_thresh) +{ + req->_present.hds_thresh = 1; + req->hds_thresh = hds_thresh; +} +static inline void +ethtool_rings_set_req_set_hds_thresh_max(struct ethtool_rings_set_req *req, + __u32 hds_thresh_max) +{ + req->_present.hds_thresh_max = 1; + req->hds_thresh_max = hds_thresh_max; +} /* * Set ring params.