diff --git a/home/nipa/nipa_out/930551/ynl/old-code/netdev-user.c b/home/nipa/nipa_out/930551/ynl/new-code/netdev-user.c index 1d3877ce20bb..6a57170a627a 100644 --- a/home/nipa/nipa_out/930551/ynl/old-code/netdev-user.c +++ b/home/nipa/nipa_out/930551/ynl/new-code/netdev-user.c @@ -116,6 +116,14 @@ const struct ynl_policy_nest netdev_page_pool_info_nest = { .table = netdev_page_pool_info_policy, }; +const struct ynl_policy_attr netdev_xsk_info_policy[NETDEV_A_XSK_INFO_MAX + 1] = { +}; + +const struct ynl_policy_nest netdev_xsk_info_nest = { + .max_attr = NETDEV_A_XSK_INFO_MAX, + .table = netdev_xsk_info_policy, +}; + const struct ynl_policy_attr netdev_queue_id_policy[NETDEV_A_QUEUE_MAX + 1] = { [NETDEV_A_QUEUE_ID] = { .name = "id", .type = YNL_PT_U32, }, [NETDEV_A_QUEUE_TYPE] = { .name = "type", .type = YNL_PT_U32, }, @@ -181,6 +189,7 @@ const struct ynl_policy_attr netdev_queue_policy[NETDEV_A_QUEUE_MAX + 1] = { [NETDEV_A_QUEUE_TYPE] = { .name = "type", .type = YNL_PT_U32, }, [NETDEV_A_QUEUE_NAPI_ID] = { .name = "napi-id", .type = YNL_PT_U32, }, [NETDEV_A_QUEUE_DMABUF] = { .name = "dmabuf", .type = YNL_PT_U32, }, + [NETDEV_A_QUEUE_XSK] = { .name = "xsk", .type = YNL_PT_NEST, .nest = &netdev_xsk_info_nest, }, }; const struct ynl_policy_nest netdev_queue_nest = { @@ -299,6 +308,16 @@ int netdev_page_pool_info_parse(struct ynl_parse_arg *yarg, return 0; } +void netdev_xsk_info_free(struct netdev_xsk_info *obj) +{ +} + +int netdev_xsk_info_parse(struct ynl_parse_arg *yarg, + const struct nlattr *nested) +{ + return 0; +} + void netdev_queue_id_free(struct netdev_queue_id *obj) { } @@ -771,6 +790,7 @@ void netdev_queue_get_req_free(struct netdev_queue_get_req *req) void netdev_queue_get_rsp_free(struct netdev_queue_get_rsp *rsp) { + netdev_xsk_info_free(&rsp->xsk); free(rsp); } @@ -779,8 +799,10 @@ int netdev_queue_get_rsp_parse(const struct nlmsghdr *nlh, { struct netdev_queue_get_rsp *dst; const struct nlattr *attr; + struct ynl_parse_arg parg; dst = yarg->data; + parg.ys = yarg->ys; ynl_attr_for_each(attr, nlh, yarg->ys->family->hdr_len) { unsigned int type = ynl_attr_type(attr); @@ -810,6 +832,15 @@ int netdev_queue_get_rsp_parse(const struct nlmsghdr *nlh, return YNL_PARSE_CB_ERROR; dst->_present.dmabuf = 1; dst->dmabuf = ynl_attr_get_u32(attr); + } else if (type == NETDEV_A_QUEUE_XSK) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.xsk = 1; + + parg.rsp_policy = &netdev_xsk_info_nest; + parg.data = &dst->xsk; + if (netdev_xsk_info_parse(&parg, attr)) + return YNL_PARSE_CB_ERROR; } } @@ -865,6 +896,7 @@ void netdev_queue_get_list_free(struct netdev_queue_get_list *rsp) rsp = next; next = rsp->next; + netdev_xsk_info_free(&rsp->obj.xsk); free(rsp); } } diff --git a/home/nipa/nipa_out/930551/ynl/old-code/netdev-user.h b/home/nipa/nipa_out/930551/ynl/new-code/netdev-user.h index bc103e532cb3..76cdbf1d7ba8 100644 --- a/home/nipa/nipa_out/930551/ynl/old-code/netdev-user.h +++ b/home/nipa/nipa_out/930551/ynl/new-code/netdev-user.h @@ -34,6 +34,9 @@ struct netdev_page_pool_info { __u32 ifindex; }; +struct netdev_xsk_info { +}; + struct netdev_queue_id { struct { __u32 id:1; @@ -323,6 +326,7 @@ struct netdev_queue_get_rsp { __u32 napi_id:1; __u32 ifindex:1; __u32 dmabuf:1; + __u32 xsk:1; } _present; __u32 id; @@ -330,6 +334,7 @@ struct netdev_queue_get_rsp { __u32 napi_id; __u32 ifindex; __u32 dmabuf; + struct netdev_xsk_info xsk; }; void netdev_queue_get_rsp_free(struct netdev_queue_get_rsp *rsp);