diff --git a/home/nipa/nipa_out/931841/ynl/old-code/netdev-user.c b/home/nipa/nipa_out/931841/ynl/new-code/netdev-user.c index 2001cb743efb..efb687d55eeb 100644 --- a/home/nipa/nipa_out/931841/ynl/old-code/netdev-user.c +++ b/home/nipa/nipa_out/931841/ynl/new-code/netdev-user.c @@ -124,6 +124,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, }, @@ -191,6 +199,7 @@ const struct ynl_policy_attr netdev_queue_policy[NETDEV_A_QUEUE_MAX + 1] = { [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_IO_URING] = { .name = "io-uring", .type = YNL_PT_NEST, .nest = &netdev_io_uring_provider_info_nest, }, + [NETDEV_A_QUEUE_XSK] = { .name = "xsk", .type = YNL_PT_NEST, .nest = &netdev_xsk_info_nest, }, }; const struct ynl_policy_nest netdev_queue_nest = { @@ -320,6 +329,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) { } @@ -807,6 +826,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_io_uring_provider_info_free(&rsp->io_uring); + netdev_xsk_info_free(&rsp->xsk); free(rsp); } @@ -857,6 +877,15 @@ int netdev_queue_get_rsp_parse(const struct nlmsghdr *nlh, parg.data = &dst->io_uring; if (netdev_io_uring_provider_info_parse(&parg, attr)) return YNL_PARSE_CB_ERROR; + } 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; } } @@ -913,6 +942,7 @@ void netdev_queue_get_list_free(struct netdev_queue_get_list *rsp) next = rsp->next; netdev_io_uring_provider_info_free(&rsp->obj.io_uring); + netdev_xsk_info_free(&rsp->obj.xsk); free(rsp); } } diff --git a/home/nipa/nipa_out/931841/ynl/old-code/netdev-user.h b/home/nipa/nipa_out/931841/ynl/new-code/netdev-user.h index 4a9d4d0dd4e6..bb14a9c81982 100644 --- a/home/nipa/nipa_out/931841/ynl/old-code/netdev-user.h +++ b/home/nipa/nipa_out/931841/ynl/new-code/netdev-user.h @@ -37,6 +37,9 @@ struct netdev_page_pool_info { __u32 ifindex; }; +struct netdev_xsk_info { +}; + struct netdev_queue_id { struct { __u32 id:1; @@ -329,6 +332,7 @@ struct netdev_queue_get_rsp { __u32 ifindex:1; __u32 dmabuf:1; __u32 io_uring:1; + __u32 xsk:1; } _present; __u32 id; @@ -337,6 +341,7 @@ struct netdev_queue_get_rsp { __u32 ifindex; __u32 dmabuf; struct netdev_io_uring_provider_info io_uring; + struct netdev_xsk_info xsk; }; void netdev_queue_get_rsp_free(struct netdev_queue_get_rsp *rsp);