summaryrefslogtreecommitdiff
path: root/tools/net
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-06-08 14:11:56 -0700
committerJakub Kicinski <kuba@kernel.org>2023-06-09 14:40:31 -0700
commitd0915d64c3a636f73065dbb7e5aab78eb7e75f0d (patch)
tree228a51ad8c7c36cb05f2dfb5d7916f8550475899 /tools/net
parentf2ba1e5e22081e3279fd248677f53ce719fdc23d (diff)
tools: ynl: regen: stop generating common notification handlers
Remove unused notification handlers. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net')
-rw-r--r--tools/net/ynl/generated/handshake-user.c45
-rw-r--r--tools/net/ynl/generated/handshake-user.h3
-rw-r--r--tools/net/ynl/generated/netdev-user.c47
-rw-r--r--tools/net/ynl/generated/netdev-user.h3
4 files changed, 0 insertions, 98 deletions
diff --git a/tools/net/ynl/generated/handshake-user.c b/tools/net/ynl/generated/handshake-user.c
index 3a0392b3355e..7c67765daf90 100644
--- a/tools/net/ynl/generated/handshake-user.c
+++ b/tools/net/ynl/generated/handshake-user.c
@@ -315,51 +315,6 @@ int handshake_done(struct ynl_sock *ys, struct handshake_done_req *req)
return 0;
}
-/* --------------- Common notification parsing --------------- */
-struct ynl_ntf_base_type *handshake_ntf_parse(struct ynl_sock *ys)
-{
- struct ynl_parse_arg yarg = { .ys = ys, };
- struct ynl_ntf_base_type *rsp;
- struct genlmsghdr *genlh;
- struct nlmsghdr *nlh;
- mnl_cb_t parse;
- int len, err;
-
- len = mnl_socket_recvfrom(ys->sock, ys->rx_buf, MNL_SOCKET_BUFFER_SIZE);
- if (len < (ssize_t)(sizeof(*nlh) + sizeof(*genlh)))
- return NULL;
-
- nlh = (struct nlmsghdr *)ys->rx_buf;
- genlh = mnl_nlmsg_get_payload(nlh);
-
- switch (genlh->cmd) {
- case HANDSHAKE_CMD_READY:
- rsp = calloc(1, sizeof(struct handshake_accept_ntf));
- parse = handshake_accept_rsp_parse;
- yarg.rsp_policy = &handshake_accept_nest;
- rsp->free = (void *)handshake_accept_ntf_free;
- break;
- default:
- ynl_error_unknown_notification(ys, genlh->cmd);
- return NULL;
- }
-
- yarg.data = rsp->data;
-
- err = mnl_cb_run2(ys->rx_buf, len, 0, 0, parse, &yarg,
- ynl_cb_array, NLMSG_MIN_TYPE);
- if (err < 0)
- goto err_free;
-
- rsp->family = nlh->nlmsg_type;
- rsp->cmd = genlh->cmd;
- return rsp;
-
-err_free:
- free(rsp);
- return NULL;
-}
-
static const struct ynl_ntf_info handshake_ntf_info[] = {
[HANDSHAKE_CMD_READY] = {
.alloc_sz = sizeof(struct handshake_accept_ntf),
diff --git a/tools/net/ynl/generated/handshake-user.h b/tools/net/ynl/generated/handshake-user.h
index 38e0844f2efd..47646bb91cea 100644
--- a/tools/net/ynl/generated/handshake-user.h
+++ b/tools/net/ynl/generated/handshake-user.h
@@ -142,7 +142,4 @@ __handshake_done_req_set_remote_auth(struct handshake_done_req *req,
*/
int handshake_done(struct ynl_sock *ys, struct handshake_done_req *req);
-/* --------------- Common notification parsing --------------- */
-struct ynl_ntf_base_type *handshake_ntf_parse(struct ynl_sock *ys);
-
#endif /* _LINUX_HANDSHAKE_GEN_H */
diff --git a/tools/net/ynl/generated/netdev-user.c b/tools/net/ynl/generated/netdev-user.c
index 12069784637e..4eb8aefef0cd 100644
--- a/tools/net/ynl/generated/netdev-user.c
+++ b/tools/net/ynl/generated/netdev-user.c
@@ -172,53 +172,6 @@ void netdev_dev_get_ntf_free(struct netdev_dev_get_ntf *rsp)
free(rsp);
}
-/* --------------- Common notification parsing --------------- */
-struct ynl_ntf_base_type *netdev_ntf_parse(struct ynl_sock *ys)
-{
- struct ynl_parse_arg yarg = { .ys = ys, };
- struct ynl_ntf_base_type *rsp;
- struct genlmsghdr *genlh;
- struct nlmsghdr *nlh;
- mnl_cb_t parse;
- int len, err;
-
- len = mnl_socket_recvfrom(ys->sock, ys->rx_buf, MNL_SOCKET_BUFFER_SIZE);
- if (len < (ssize_t)(sizeof(*nlh) + sizeof(*genlh)))
- return NULL;
-
- nlh = (struct nlmsghdr *)ys->rx_buf;
- genlh = mnl_nlmsg_get_payload(nlh);
-
- switch (genlh->cmd) {
- case NETDEV_CMD_DEV_ADD_NTF:
- case NETDEV_CMD_DEV_DEL_NTF:
- case NETDEV_CMD_DEV_CHANGE_NTF:
- rsp = calloc(1, sizeof(struct netdev_dev_get_ntf));
- parse = netdev_dev_get_rsp_parse;
- yarg.rsp_policy = &netdev_dev_nest;
- rsp->free = (void *)netdev_dev_get_ntf_free;
- break;
- default:
- ynl_error_unknown_notification(ys, genlh->cmd);
- return NULL;
- }
-
- yarg.data = rsp->data;
-
- err = mnl_cb_run2(ys->rx_buf, len, 0, 0, parse, &yarg,
- ynl_cb_array, NLMSG_MIN_TYPE);
- if (err < 0)
- goto err_free;
-
- rsp->family = nlh->nlmsg_type;
- rsp->cmd = genlh->cmd;
- return rsp;
-
-err_free:
- free(rsp);
- return NULL;
-}
-
static const struct ynl_ntf_info netdev_ntf_info[] = {
[NETDEV_CMD_DEV_ADD_NTF] = {
.alloc_sz = sizeof(struct netdev_dev_get_ntf),
diff --git a/tools/net/ynl/generated/netdev-user.h b/tools/net/ynl/generated/netdev-user.h
index d146bc4b2112..5554dc69bb9c 100644
--- a/tools/net/ynl/generated/netdev-user.h
+++ b/tools/net/ynl/generated/netdev-user.h
@@ -82,7 +82,4 @@ struct netdev_dev_get_ntf {
void netdev_dev_get_ntf_free(struct netdev_dev_get_ntf *rsp);
-/* --------------- Common notification parsing --------------- */
-struct ynl_ntf_base_type *netdev_ntf_parse(struct ynl_sock *ys);
-
#endif /* _LINUX_NETDEV_GEN_H */