Skip to content

Commit bda50f7

Browse files
sstabellinijgross1
authored andcommitted
xen: update pvcalls_front_accept prototype
While currently there are no in-tree callers of these functions, it is best to keep them up-to-date with the latest network API. In addition, add the missing EXPORT_SYMBOL_GPL to the functions listed in pvcalls-front.h. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Reviewed-by: Juergen Gross <jgross@suse.com> Message-ID: <alpine.DEB.2.22.394.2501201537560.11086@ubuntu-linux-20-04-desktop> Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent 6d00234 commit bda50f7

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

drivers/xen/pvcalls-front.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ int pvcalls_front_socket(struct socket *sock)
341341
pvcalls_exit();
342342
return ret;
343343
}
344+
EXPORT_SYMBOL_GPL(pvcalls_front_socket);
344345

345346
static void free_active_ring(struct sock_mapping *map)
346347
{
@@ -486,6 +487,7 @@ int pvcalls_front_connect(struct socket *sock, struct sockaddr *addr,
486487
pvcalls_exit_sock(sock);
487488
return ret;
488489
}
490+
EXPORT_SYMBOL_GPL(pvcalls_front_connect);
489491

490492
static int __write_ring(struct pvcalls_data_intf *intf,
491493
struct pvcalls_data *data,
@@ -581,6 +583,7 @@ int pvcalls_front_sendmsg(struct socket *sock, struct msghdr *msg,
581583
pvcalls_exit_sock(sock);
582584
return tot_sent;
583585
}
586+
EXPORT_SYMBOL_GPL(pvcalls_front_sendmsg);
584587

585588
static int __read_ring(struct pvcalls_data_intf *intf,
586589
struct pvcalls_data *data,
@@ -666,6 +669,7 @@ int pvcalls_front_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
666669
pvcalls_exit_sock(sock);
667670
return ret;
668671
}
672+
EXPORT_SYMBOL_GPL(pvcalls_front_recvmsg);
669673

670674
int pvcalls_front_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
671675
{
@@ -719,6 +723,7 @@ int pvcalls_front_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
719723
pvcalls_exit_sock(sock);
720724
return 0;
721725
}
726+
EXPORT_SYMBOL_GPL(pvcalls_front_bind);
722727

723728
int pvcalls_front_listen(struct socket *sock, int backlog)
724729
{
@@ -768,8 +773,10 @@ int pvcalls_front_listen(struct socket *sock, int backlog)
768773
pvcalls_exit_sock(sock);
769774
return ret;
770775
}
776+
EXPORT_SYMBOL_GPL(pvcalls_front_listen);
771777

772-
int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int flags)
778+
int pvcalls_front_accept(struct socket *sock, struct socket *newsock,
779+
struct proto_accept_arg *arg)
773780
{
774781
struct pvcalls_bedata *bedata;
775782
struct sock_mapping *map;
@@ -788,7 +795,7 @@ int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int flags)
788795
return -EINVAL;
789796
}
790797

791-
nonblock = flags & SOCK_NONBLOCK;
798+
nonblock = arg->flags & SOCK_NONBLOCK;
792799
/*
793800
* Backend only supports 1 inflight accept request, will return
794801
* errors for the others
@@ -904,6 +911,7 @@ int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int flags)
904911
pvcalls_exit_sock(sock);
905912
return ret;
906913
}
914+
EXPORT_SYMBOL_GPL(pvcalls_front_accept);
907915

908916
static __poll_t pvcalls_front_poll_passive(struct file *file,
909917
struct pvcalls_bedata *bedata,
@@ -1004,6 +1012,7 @@ __poll_t pvcalls_front_poll(struct file *file, struct socket *sock,
10041012
pvcalls_exit_sock(sock);
10051013
return ret;
10061014
}
1015+
EXPORT_SYMBOL_GPL(pvcalls_front_poll);
10071016

10081017
int pvcalls_front_release(struct socket *sock)
10091018
{
@@ -1087,6 +1096,7 @@ int pvcalls_front_release(struct socket *sock)
10871096
pvcalls_exit();
10881097
return 0;
10891098
}
1099+
EXPORT_SYMBOL_GPL(pvcalls_front_release);
10901100

10911101
static const struct xenbus_device_id pvcalls_front_ids[] = {
10921102
{ "pvcalls" },

drivers/xen/pvcalls-front.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int pvcalls_front_bind(struct socket *sock,
1212
int pvcalls_front_listen(struct socket *sock, int backlog);
1313
int pvcalls_front_accept(struct socket *sock,
1414
struct socket *newsock,
15-
int flags);
15+
struct proto_accept_arg *arg);
1616
int pvcalls_front_sendmsg(struct socket *sock,
1717
struct msghdr *msg,
1818
size_t len);

0 commit comments

Comments
 (0)