@@ -424,6 +424,9 @@ int zc_receive_check(struct tcp_zerocopy_receive *zc, int *lenp,
int zc_receive_update(struct sock *sk, struct tcp_zerocopy_receive *zc, int len,
char __user *optval, struct scm_timestamping_internal *tss,
int err);
+int tcp_zerocopy_receive(struct sock *sk,
+ struct tcp_zerocopy_receive *zc,
+ struct scm_timestamping_internal *tss);
#endif
void tcp_parse_options(const struct net *net, const struct sk_buff *skb,
struct tcp_options_received *opt_rx,
@@ -2066,9 +2066,9 @@ static void tcp_zc_finalize_rx_tstamp(struct sock *sk,
}
#define TCP_ZEROCOPY_PAGE_BATCH_SIZE 32
-static int tcp_zerocopy_receive(struct sock *sk,
- struct tcp_zerocopy_receive *zc,
- struct scm_timestamping_internal *tss)
+int tcp_zerocopy_receive(struct sock *sk,
+ struct tcp_zerocopy_receive *zc,
+ struct scm_timestamping_internal *tss)
{
u32 length = 0, offset, vma_len, avail_len, copylen = 0;
unsigned long address = (unsigned long)zc->address;
Remove static for tcp_zerocopy_receive() since we are going to reference it in io_uring. Signed-off-by: Hao Xu <haoxu@linux.alibaba.com> --- include/net/tcp.h | 3 +++ net/ipv4/tcp.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-)