diff --git a/home/nipa/nipa_out/993912/ynl/old-code/ethtool-user.c b/home/nipa/nipa_out/993912/ynl/new-code/ethtool-user.c index 397701e52a10..cbdb358b55f1 100644 --- a/home/nipa/nipa_out/993912/ynl/old-code/ethtool-user.c +++ b/home/nipa/nipa_out/993912/ynl/new-code/ethtool-user.c @@ -69,6 +69,7 @@ static const char * const ethtool_op_strmap[] = { [51] = "rss-create-act", [52] = "rss-create-ntf", [53] = "rss-delete-ntf", + [54] = "mse-get", }; const char *ethtool_op_str(int op) @@ -238,6 +239,43 @@ const char *ethtool_rxfh_fields_str(int value) return ethtool_rxfh_fields_strmap[value]; } +static const char * const ethtool_phy_mse_capability_strmap[] = { + [0] = "avg", + [1] = "peak", + [2] = "worst-peak", + [3] = "channel-a", + [4] = "channel-b", + [5] = "channel-c", + [6] = "channel-d", + [7] = "worst-channel", + [8] = "link", +}; + +const char * +ethtool_phy_mse_capability_str(enum ethtool_phy_mse_capability value) +{ + value = ffs(value) - 1; + if (value < 0 || value >= (int)YNL_ARRAY_SIZE(ethtool_phy_mse_capability_strmap)) + return NULL; + return ethtool_phy_mse_capability_strmap[value]; +} + +static const char * const ethtool_phy_mse_channel_strmap[] = { + [0] = "a", + [1] = "b", + [2] = "c", + [3] = "d", + [4] = "link", + [5] = "worst", +}; + +const char *ethtool_phy_mse_channel_str(enum ethtool_phy_mse_channel value) +{ + if (value < 0 || value >= (int)YNL_ARRAY_SIZE(ethtool_phy_mse_channel_strmap)) + return NULL; + return ethtool_phy_mse_channel_strmap[value]; +} + /* Policies */ const struct ynl_policy_attr ethtool_header_policy[ETHTOOL_A_HEADER_MAX + 1] = { [ETHTOOL_A_HEADER_UNSPEC] = { .name = "unspec", .type = YNL_PT_REJECT, }, @@ -376,6 +414,19 @@ const struct ynl_policy_nest ethtool_mm_stat_nest = { .table = ethtool_mm_stat_policy, }; +const struct ynl_policy_attr ethtool_mse_snapshot_policy[ETHTOOL_A_MSE_SNAPSHOT_MAX + 1] = { + [ETHTOOL_A_MSE_SNAPSHOT_UNSPEC] = { .name = "unspec", .type = YNL_PT_REJECT, }, + [ETHTOOL_A_MSE_SNAPSHOT_CHANNEL] = { .name = "channel", .type = YNL_PT_U32, }, + [ETHTOOL_A_MSE_SNAPSHOT_AVERAGE_MSE] = { .name = "average-mse", .type = YNL_PT_U32, }, + [ETHTOOL_A_MSE_SNAPSHOT_PEAK_MSE] = { .name = "peak-mse", .type = YNL_PT_U32, }, + [ETHTOOL_A_MSE_SNAPSHOT_WORST_PEAK_MSE] = { .name = "worst-peak-mse", .type = YNL_PT_U32, }, +}; + +const struct ynl_policy_nest ethtool_mse_snapshot_nest = { + .max_attr = ETHTOOL_A_MSE_SNAPSHOT_MAX, + .table = ethtool_mse_snapshot_policy, +}; + const struct ynl_policy_attr ethtool_irq_moderation_policy[ETHTOOL_A_IRQ_MODERATION_MAX + 1] = { [ETHTOOL_A_IRQ_MODERATION_UNSPEC] = { .name = "unspec", .type = YNL_PT_REJECT, }, [ETHTOOL_A_IRQ_MODERATION_USEC] = { .name = "usec", .type = YNL_PT_U32, }, @@ -501,6 +552,21 @@ const struct ynl_policy_nest ethtool_bitset_nest = { .table = ethtool_bitset_policy, }; +const struct ynl_policy_attr ethtool_mse_config_policy[ETHTOOL_A_MSE_CONFIG_MAX + 1] = { + [ETHTOOL_A_MSE_CONFIG_UNSPEC] = { .name = "unspec", .type = YNL_PT_REJECT, }, + [ETHTOOL_A_MSE_CONFIG_MAX_AVERAGE_MSE] = { .name = "max-average-mse", .type = YNL_PT_U32, }, + [ETHTOOL_A_MSE_CONFIG_MAX_PEAK_MSE] = { .name = "max-peak-mse", .type = YNL_PT_U32, }, + [ETHTOOL_A_MSE_CONFIG_REFRESH_RATE_PS] = { .name = "refresh-rate-ps", .type = YNL_PT_U64, }, + [ETHTOOL_A_MSE_CONFIG_NUM_SYMBOLS] = { .name = "num-symbols", .type = YNL_PT_U64, }, + [ETHTOOL_A_MSE_CONFIG_SUPPORTED_CAPS] = { .name = "supported-caps", .type = YNL_PT_NEST, .nest = ðtool_bitset_nest, }, + [ETHTOOL_A_MSE_CONFIG_PAD] = { .name = "pad", .type = YNL_PT_IGNORE, }, +}; + +const struct ynl_policy_nest ethtool_mse_config_nest = { + .max_attr = ETHTOOL_A_MSE_CONFIG_MAX, + .table = ethtool_mse_config_policy, +}; + const struct ynl_policy_attr ethtool_stringset_policy[ETHTOOL_A_STRINGSET_MAX + 1] = { [ETHTOOL_A_STRINGSET_UNSPEC] = { .name = "unspec", .type = YNL_PT_REJECT, }, [ETHTOOL_A_STRINGSET_ID] = { .name = "id", .type = YNL_PT_U32, }, @@ -600,6 +666,9 @@ const struct ynl_policy_attr ethtool_linkstate_policy[ETHTOOL_A_LINKSTATE_MAX + [ETHTOOL_A_LINKSTATE_EXT_STATE] = { .name = "ext-state", .type = YNL_PT_U8, }, [ETHTOOL_A_LINKSTATE_EXT_SUBSTATE] = { .name = "ext-substate", .type = YNL_PT_U8, }, [ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT] = { .name = "ext-down-cnt", .type = YNL_PT_U32, }, + [ETHTOOL_A_LINKSTATE_MSE_VALUE] = { .name = "mse-value", .type = YNL_PT_U32, }, + [ETHTOOL_A_LINKSTATE_MSE_MAX] = { .name = "mse-max", .type = YNL_PT_U32, }, + [ETHTOOL_A_LINKSTATE_MSE_CHANNEL] = { .name = "mse-channel", .type = YNL_PT_U32, }, }; const struct ynl_policy_nest ethtool_linkstate_nest = { @@ -1035,6 +1104,19 @@ const struct ynl_policy_nest ethtool_pse_ntf_nest = { .table = ethtool_pse_ntf_policy, }; +const struct ynl_policy_attr ethtool_mse_policy[ETHTOOL_A_MSE_MAX + 1] = { + [ETHTOOL_A_MSE_UNSPEC] = { .name = "unspec", .type = YNL_PT_REJECT, }, + [ETHTOOL_A_MSE_HEADER] = { .name = "header", .type = YNL_PT_NEST, .nest = ðtool_header_nest, }, + [ETHTOOL_A_MSE_CHANNEL] = { .name = "channel", .type = YNL_PT_U32, }, + [ETHTOOL_A_MSE_CONFIG] = { .name = "config", .type = YNL_PT_NEST, .nest = ðtool_mse_config_nest, }, + [ETHTOOL_A_MSE_SNAPSHOT] = { .name = "snapshot", .type = YNL_PT_NEST, .nest = ðtool_mse_snapshot_nest, }, +}; + +const struct ynl_policy_nest ethtool_mse_nest = { + .max_attr = ETHTOOL_A_MSE_MAX, + .table = ethtool_mse_policy, +}; + /* Common nested types */ void ethtool_header_free(struct ethtool_header *obj) { @@ -1609,6 +1691,45 @@ int ethtool_mm_stat_parse(struct ynl_parse_arg *yarg, return 0; } +void ethtool_mse_snapshot_free(struct ethtool_mse_snapshot *obj) +{ +} + +int ethtool_mse_snapshot_parse(struct ynl_parse_arg *yarg, + const struct nlattr *nested) +{ + struct ethtool_mse_snapshot *dst = yarg->data; + const struct nlattr *attr; + + ynl_attr_for_each_nested(attr, nested) { + unsigned int type = ynl_attr_type(attr); + + if (type == ETHTOOL_A_MSE_SNAPSHOT_CHANNEL) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.channel = 1; + dst->channel = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_MSE_SNAPSHOT_AVERAGE_MSE) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.average_mse = 1; + dst->average_mse = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_MSE_SNAPSHOT_PEAK_MSE) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.peak_mse = 1; + dst->peak_mse = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_MSE_SNAPSHOT_WORST_PEAK_MSE) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.worst_peak_mse = 1; + dst->worst_peak_mse = ynl_attr_get_u32(attr); + } + } + + return 0; +} + void ethtool_irq_moderation_free(struct ethtool_irq_moderation *obj) { } @@ -2180,6 +2301,58 @@ int ethtool_bitset_parse(struct ynl_parse_arg *yarg, return 0; } +void ethtool_mse_config_free(struct ethtool_mse_config *obj) +{ + ethtool_bitset_free(&obj->supported_caps); +} + +int ethtool_mse_config_parse(struct ynl_parse_arg *yarg, + const struct nlattr *nested) +{ + struct ethtool_mse_config *dst = yarg->data; + const struct nlattr *attr; + struct ynl_parse_arg parg; + + parg.ys = yarg->ys; + + ynl_attr_for_each_nested(attr, nested) { + unsigned int type = ynl_attr_type(attr); + + if (type == ETHTOOL_A_MSE_CONFIG_MAX_AVERAGE_MSE) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.max_average_mse = 1; + dst->max_average_mse = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_MSE_CONFIG_MAX_PEAK_MSE) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.max_peak_mse = 1; + dst->max_peak_mse = ynl_attr_get_u32(attr); + } else if (type == ETHTOOL_A_MSE_CONFIG_REFRESH_RATE_PS) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.refresh_rate_ps = 1; + dst->refresh_rate_ps = ynl_attr_get_u64(attr); + } else if (type == ETHTOOL_A_MSE_CONFIG_NUM_SYMBOLS) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.num_symbols = 1; + dst->num_symbols = ynl_attr_get_u64(attr); + } else if (type == ETHTOOL_A_MSE_CONFIG_SUPPORTED_CAPS) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.supported_caps = 1; + + parg.rsp_policy = ðtool_bitset_nest; + parg.data = &dst->supported_caps; + if (ethtool_bitset_parse(&parg, attr)) + return YNL_PARSE_CB_ERROR; + } + } + + return 0; +} + void ethtool_stringset_free(struct ethtool_stringset_ *obj) { unsigned int i; @@ -8234,6 +8407,179 @@ int ethtool_rss_delete_act(struct ynl_sock *ys, return 0; } +/* ============== ETHTOOL_MSG_MSE_GET ============== */ +/* ETHTOOL_MSG_MSE_GET - do */ +void ethtool_mse_get_req_free(struct ethtool_mse_get_req *req) +{ + ethtool_header_free(&req->header); + free(req); +} + +void ethtool_mse_get_rsp_free(struct ethtool_mse_get_rsp *rsp) +{ + unsigned int i; + + ethtool_header_free(&rsp->header); + ethtool_mse_config_free(&rsp->config); + for (i = 0; i < rsp->_count.snapshot; i++) + ethtool_mse_snapshot_free(&rsp->snapshot[i]); + free(rsp->snapshot); + free(rsp); +} + +int ethtool_mse_get_rsp_parse(const struct nlmsghdr *nlh, + struct ynl_parse_arg *yarg) +{ + struct ethtool_mse_get_rsp *dst; + unsigned int n_snapshot = 0; + const struct nlattr *attr; + struct ynl_parse_arg parg; + int i; + + dst = yarg->data; + parg.ys = yarg->ys; + + if (dst->snapshot) + return ynl_error_parse(yarg, "attribute already present (mse.snapshot)"); + + ynl_attr_for_each(attr, nlh, yarg->ys->family->hdr_len) { + unsigned int type = ynl_attr_type(attr); + + if (type == ETHTOOL_A_MSE_HEADER) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.header = 1; + + parg.rsp_policy = ðtool_header_nest; + parg.data = &dst->header; + if (ethtool_header_parse(&parg, attr)) + return YNL_PARSE_CB_ERROR; + } else if (type == ETHTOOL_A_MSE_CONFIG) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.config = 1; + + parg.rsp_policy = ðtool_mse_config_nest; + parg.data = &dst->config; + if (ethtool_mse_config_parse(&parg, attr)) + return YNL_PARSE_CB_ERROR; + } else if (type == ETHTOOL_A_MSE_SNAPSHOT) { + n_snapshot++; + } + } + + if (n_snapshot) { + dst->snapshot = calloc(n_snapshot, sizeof(*dst->snapshot)); + dst->_count.snapshot = n_snapshot; + i = 0; + parg.rsp_policy = ðtool_mse_snapshot_nest; + ynl_attr_for_each(attr, nlh, yarg->ys->family->hdr_len) { + if (ynl_attr_type(attr) == ETHTOOL_A_MSE_SNAPSHOT) { + parg.data = &dst->snapshot[i]; + if (ethtool_mse_snapshot_parse(&parg, attr)) + return YNL_PARSE_CB_ERROR; + i++; + } + } + } + + return YNL_PARSE_CB_OK; +} + +struct ethtool_mse_get_rsp * +ethtool_mse_get(struct ynl_sock *ys, struct ethtool_mse_get_req *req) +{ + struct ynl_req_state yrs = { .yarg = { .ys = ys, }, }; + struct ethtool_mse_get_rsp *rsp; + struct nlmsghdr *nlh; + int err; + + nlh = ynl_gemsg_start_req(ys, ys->family_id, ETHTOOL_MSG_MSE_GET, 1); + ys->req_policy = ðtool_mse_nest; + ys->req_hdr_len = ys->family->hdr_len; + yrs.yarg.rsp_policy = ðtool_mse_nest; + + if (req->_present.header) + ethtool_header_put(nlh, ETHTOOL_A_MSE_HEADER, &req->header); + if (req->_present.channel) + ynl_attr_put_u32(nlh, ETHTOOL_A_MSE_CHANNEL, req->channel); + + rsp = calloc(1, sizeof(*rsp)); + yrs.yarg.data = rsp; + yrs.cb = ethtool_mse_get_rsp_parse; + yrs.rsp_cmd = 54; + + err = ynl_exec(ys, nlh, &yrs); + if (err < 0) + goto err_free; + + return rsp; + +err_free: + ethtool_mse_get_rsp_free(rsp); + return NULL; +} + +/* ETHTOOL_MSG_MSE_GET - dump */ +void ethtool_mse_get_req_dump_free(struct ethtool_mse_get_req_dump *req) +{ + ethtool_header_free(&req->header); + free(req); +} + +void ethtool_mse_get_list_free(struct ethtool_mse_get_list *rsp) +{ + struct ethtool_mse_get_list *next = rsp; + + while ((void *)next != YNL_LIST_END) { + unsigned int i; + + rsp = next; + next = rsp->next; + + ethtool_header_free(&rsp->obj.header); + ethtool_mse_config_free(&rsp->obj.config); + for (i = 0; i < rsp->obj._count.snapshot; i++) + ethtool_mse_snapshot_free(&rsp->obj.snapshot[i]); + free(rsp->obj.snapshot); + free(rsp); + } +} + +struct ethtool_mse_get_list * +ethtool_mse_get_dump(struct ynl_sock *ys, struct ethtool_mse_get_req_dump *req) +{ + struct ynl_dump_state yds = {}; + struct nlmsghdr *nlh; + int err; + + yds.yarg.ys = ys; + yds.yarg.rsp_policy = ðtool_mse_nest; + yds.yarg.data = NULL; + yds.alloc_sz = sizeof(struct ethtool_mse_get_list); + yds.cb = ethtool_mse_get_rsp_parse; + yds.rsp_cmd = 54; + + nlh = ynl_gemsg_start_dump(ys, ys->family_id, ETHTOOL_MSG_MSE_GET, 1); + ys->req_policy = ðtool_mse_nest; + ys->req_hdr_len = ys->family->hdr_len; + + if (req->_present.header) + ethtool_header_put(nlh, ETHTOOL_A_MSE_HEADER, &req->header); + if (req->_present.channel) + ynl_attr_put_u32(nlh, ETHTOOL_A_MSE_CHANNEL, req->channel); + + err = ynl_exec_dump(ys, nlh, &yds); + if (err < 0) + goto free_list; + + return yds.first; + +free_list: + ethtool_mse_get_list_free(yds.first); + return NULL; +} + /* ETHTOOL_MSG_CABLE_TEST_NTF - event */ int ethtool_cable_test_ntf_rsp_parse(const struct nlmsghdr *nlh, struct ynl_parse_arg *yarg) diff --git a/home/nipa/nipa_out/993912/ynl/old-code/ethtool-user.h b/home/nipa/nipa_out/993912/ynl/new-code/ethtool-user.h index 72ad01e33930..9137480dd089 100644 --- a/home/nipa/nipa_out/993912/ynl/old-code/ethtool-user.h +++ b/home/nipa/nipa_out/993912/ynl/new-code/ethtool-user.h @@ -32,6 +32,9 @@ const char *ethtool_hwtstamp_source_str(enum hwtstamp_source value); const char *ethtool_pse_event_str(enum ethtool_pse_event value); const char *ethtool_input_xfrm_str(int value); const char *ethtool_rxfh_fields_str(int value); +const char * +ethtool_phy_mse_capability_str(enum ethtool_phy_mse_capability value); +const char *ethtool_phy_mse_channel_str(enum ethtool_phy_mse_channel value); /* Common nested types */ struct ethtool_header { @@ -198,6 +201,20 @@ struct ethtool_mm_stat { __u64 hold_count; }; +struct ethtool_mse_snapshot { + struct { + __u32 channel:1; + __u32 average_mse:1; + __u32 peak_mse:1; + __u32 worst_peak_mse:1; + } _present; + + enum ethtool_phy_mse_channel channel; + __u32 average_mse; + __u32 peak_mse; + __u32 worst_peak_mse; +}; + struct ethtool_irq_moderation { struct { __u32 usec:1; @@ -420,6 +437,22 @@ struct ethtool_bitset { void *mask; }; +struct ethtool_mse_config { + struct { + __u32 max_average_mse:1; + __u32 max_peak_mse:1; + __u32 refresh_rate_ps:1; + __u32 num_symbols:1; + __u32 supported_caps:1; + } _present; + + __u32 max_average_mse; + __u32 max_peak_mse; + __u64 refresh_rate_ps; + __u64 num_symbols; + struct ethtool_bitset supported_caps; +}; + struct ethtool_stringset_ { struct { __u32 id:1; @@ -8108,6 +8141,160 @@ ethtool_rss_delete_act_req_set_context(struct ethtool_rss_delete_act_req *req, int ethtool_rss_delete_act(struct ynl_sock *ys, struct ethtool_rss_delete_act_req *req); +/* ============== ETHTOOL_MSG_MSE_GET ============== */ +/* ETHTOOL_MSG_MSE_GET - do */ +struct ethtool_mse_get_req { + struct { + __u32 header:1; + __u32 channel:1; + } _present; + + struct ethtool_header header; + enum ethtool_phy_mse_channel channel; +}; + +static inline struct ethtool_mse_get_req *ethtool_mse_get_req_alloc(void) +{ + return calloc(1, sizeof(struct ethtool_mse_get_req)); +} +void ethtool_mse_get_req_free(struct ethtool_mse_get_req *req); + +static inline void +ethtool_mse_get_req_set_header_dev_index(struct ethtool_mse_get_req *req, + __u32 dev_index) +{ + req->_present.header = 1; + req->header._present.dev_index = 1; + req->header.dev_index = dev_index; +} +static inline void +ethtool_mse_get_req_set_header_dev_name(struct ethtool_mse_get_req *req, + const char *dev_name) +{ + req->_present.header = 1; + free(req->header.dev_name); + req->header._len.dev_name = strlen(dev_name); + req->header.dev_name = malloc(req->header._len.dev_name + 1); + memcpy(req->header.dev_name, dev_name, req->header._len.dev_name); + req->header.dev_name[req->header._len.dev_name] = 0; +} +static inline void +ethtool_mse_get_req_set_header_flags(struct ethtool_mse_get_req *req, + __u32 flags) +{ + req->_present.header = 1; + req->header._present.flags = 1; + req->header.flags = flags; +} +static inline void +ethtool_mse_get_req_set_header_phy_index(struct ethtool_mse_get_req *req, + __u32 phy_index) +{ + req->_present.header = 1; + req->header._present.phy_index = 1; + req->header.phy_index = phy_index; +} +static inline void +ethtool_mse_get_req_set_channel(struct ethtool_mse_get_req *req, + enum ethtool_phy_mse_channel channel) +{ + req->_present.channel = 1; + req->channel = channel; +} + +struct ethtool_mse_get_rsp { + struct { + __u32 header:1; + __u32 config:1; + } _present; + struct { + __u32 snapshot; + } _count; + + struct ethtool_header header; + struct ethtool_mse_config config; + struct ethtool_mse_snapshot *snapshot; +}; + +void ethtool_mse_get_rsp_free(struct ethtool_mse_get_rsp *rsp); + +/* + * Get PHY MSE measurement data and configuration. + */ +struct ethtool_mse_get_rsp * +ethtool_mse_get(struct ynl_sock *ys, struct ethtool_mse_get_req *req); + +/* ETHTOOL_MSG_MSE_GET - dump */ +struct ethtool_mse_get_req_dump { + struct { + __u32 header:1; + __u32 channel:1; + } _present; + + struct ethtool_header header; + enum ethtool_phy_mse_channel channel; +}; + +static inline struct ethtool_mse_get_req_dump * +ethtool_mse_get_req_dump_alloc(void) +{ + return calloc(1, sizeof(struct ethtool_mse_get_req_dump)); +} +void ethtool_mse_get_req_dump_free(struct ethtool_mse_get_req_dump *req); + +static inline void +ethtool_mse_get_req_dump_set_header_dev_index(struct ethtool_mse_get_req_dump *req, + __u32 dev_index) +{ + req->_present.header = 1; + req->header._present.dev_index = 1; + req->header.dev_index = dev_index; +} +static inline void +ethtool_mse_get_req_dump_set_header_dev_name(struct ethtool_mse_get_req_dump *req, + const char *dev_name) +{ + req->_present.header = 1; + free(req->header.dev_name); + req->header._len.dev_name = strlen(dev_name); + req->header.dev_name = malloc(req->header._len.dev_name + 1); + memcpy(req->header.dev_name, dev_name, req->header._len.dev_name); + req->header.dev_name[req->header._len.dev_name] = 0; +} +static inline void +ethtool_mse_get_req_dump_set_header_flags(struct ethtool_mse_get_req_dump *req, + __u32 flags) +{ + req->_present.header = 1; + req->header._present.flags = 1; + req->header.flags = flags; +} +static inline void +ethtool_mse_get_req_dump_set_header_phy_index(struct ethtool_mse_get_req_dump *req, + __u32 phy_index) +{ + req->_present.header = 1; + req->header._present.phy_index = 1; + req->header.phy_index = phy_index; +} +static inline void +ethtool_mse_get_req_dump_set_channel(struct ethtool_mse_get_req_dump *req, + enum ethtool_phy_mse_channel channel) +{ + req->_present.channel = 1; + req->channel = channel; +} + +struct ethtool_mse_get_list { + struct ethtool_mse_get_list *next; + struct ethtool_mse_get_rsp obj __attribute__((aligned(8))); +}; + +void ethtool_mse_get_list_free(struct ethtool_mse_get_list *rsp); + +struct ethtool_mse_get_list * +ethtool_mse_get_dump(struct ynl_sock *ys, struct ethtool_mse_get_req_dump *req); + /* ETHTOOL_MSG_CABLE_TEST_NTF - event */ struct ethtool_cable_test_ntf_rsp { struct {