mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
core/linux-espressobin to 5.10.12-2
This commit is contained in:
parent
ead3b98d3b
commit
5e99d60d1e
2 changed files with 124 additions and 1 deletions
|
@ -0,0 +1,118 @@
|
|||
From f66376f242adb380ee86f594da933c20d78cc9a4 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Mon, 1 Feb 2021 17:11:35 -0700
|
||||
Subject: [PATCH] Revert "SUNRPC: Handle TCP socket sends with
|
||||
kernel_sendpage() again"
|
||||
|
||||
This reverts commit 00ee972739fb2526d3936f1e7ccfc8c91d250c60.
|
||||
---
|
||||
net/sunrpc/svcsock.c | 86 +-------------------------------------------
|
||||
1 file changed, 1 insertion(+), 85 deletions(-)
|
||||
|
||||
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
|
||||
index 4404c491eb38..c2752e2b9ce3 100644
|
||||
--- a/net/sunrpc/svcsock.c
|
||||
+++ b/net/sunrpc/svcsock.c
|
||||
@@ -1062,90 +1062,6 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp)
|
||||
return 0; /* record not complete */
|
||||
}
|
||||
|
||||
-static int svc_tcp_send_kvec(struct socket *sock, const struct kvec *vec,
|
||||
- int flags)
|
||||
-{
|
||||
- return kernel_sendpage(sock, virt_to_page(vec->iov_base),
|
||||
- offset_in_page(vec->iov_base),
|
||||
- vec->iov_len, flags);
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- * kernel_sendpage() is used exclusively to reduce the number of
|
||||
- * copy operations in this path. Therefore the caller must ensure
|
||||
- * that the pages backing @xdr are unchanging.
|
||||
- *
|
||||
- * In addition, the logic assumes that * .bv_len is never larger
|
||||
- * than PAGE_SIZE.
|
||||
- */
|
||||
-static int svc_tcp_sendmsg(struct socket *sock, struct msghdr *msg,
|
||||
- struct xdr_buf *xdr, rpc_fraghdr marker,
|
||||
- unsigned int *sentp)
|
||||
-{
|
||||
- const struct kvec *head = xdr->head;
|
||||
- const struct kvec *tail = xdr->tail;
|
||||
- struct kvec rm = {
|
||||
- .iov_base = &marker,
|
||||
- .iov_len = sizeof(marker),
|
||||
- };
|
||||
- int flags, ret;
|
||||
-
|
||||
- *sentp = 0;
|
||||
- xdr_alloc_bvec(xdr, GFP_KERNEL);
|
||||
-
|
||||
- msg->msg_flags = MSG_MORE;
|
||||
- ret = kernel_sendmsg(sock, msg, &rm, 1, rm.iov_len);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
- *sentp += ret;
|
||||
- if (ret != rm.iov_len)
|
||||
- return -EAGAIN;
|
||||
-
|
||||
- flags = head->iov_len < xdr->len ? MSG_MORE | MSG_SENDPAGE_NOTLAST : 0;
|
||||
- ret = svc_tcp_send_kvec(sock, head, flags);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
- *sentp += ret;
|
||||
- if (ret != head->iov_len)
|
||||
- goto out;
|
||||
-
|
||||
- if (xdr->page_len) {
|
||||
- unsigned int offset, len, remaining;
|
||||
- struct bio_vec *bvec;
|
||||
-
|
||||
- bvec = xdr->bvec;
|
||||
- offset = xdr->page_base;
|
||||
- remaining = xdr->page_len;
|
||||
- flags = MSG_MORE | MSG_SENDPAGE_NOTLAST;
|
||||
- while (remaining > 0) {
|
||||
- if (remaining <= PAGE_SIZE && tail->iov_len == 0)
|
||||
- flags = 0;
|
||||
- len = min(remaining, bvec->bv_len);
|
||||
- ret = kernel_sendpage(sock, bvec->bv_page,
|
||||
- bvec->bv_offset + offset,
|
||||
- len, flags);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
- *sentp += ret;
|
||||
- if (ret != len)
|
||||
- goto out;
|
||||
- remaining -= len;
|
||||
- offset = 0;
|
||||
- bvec++;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (tail->iov_len) {
|
||||
- ret = svc_tcp_send_kvec(sock, tail, 0);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
- *sentp += ret;
|
||||
- }
|
||||
-
|
||||
-out:
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* svc_tcp_sendto - Send out a reply on a TCP socket
|
||||
* @rqstp: completed svc_rqst
|
||||
@@ -1173,7 +1089,7 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp)
|
||||
mutex_lock(&xprt->xpt_mutex);
|
||||
if (svc_xprt_is_dead(xprt))
|
||||
goto out_notconn;
|
||||
- err = svc_tcp_sendmsg(svsk->sk_sock, &msg, xdr, marker, &sent);
|
||||
+ err = xprt_sock_sendmsg(svsk->sk_sock, &msg, xdr, 0, marker, &sent);
|
||||
xdr_free_bvec(xdr);
|
||||
trace_svcsock_tcp_send(xprt, err < 0 ? err : sent);
|
||||
if (err < 0 || sent != (xdr->len + sizeof(marker)))
|
||||
--
|
||||
2.30.0
|
||||
|
|
@ -8,7 +8,7 @@ _srcname=linux-5.10
|
|||
_kernelname=${pkgbase#linux}
|
||||
_desc="Globalscale ESPRESSOBin"
|
||||
pkgver=5.10.12
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('aarch64')
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
|
@ -16,6 +16,7 @@ makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
|
|||
options=('!strip')
|
||||
source=("http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
|
||||
"http://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz"
|
||||
'0001-Revert-SUNRPC-Handle-TCP-socket-sends-with-kernel_se.patch'
|
||||
'config'
|
||||
'linux.preset'
|
||||
'60-linux.hook'
|
||||
|
@ -23,6 +24,7 @@ source=("http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
|
|||
'91-linux.hook')
|
||||
md5sums=('753adc474bf799d569dec4f165ed92c3'
|
||||
'd08e416054060a5a61f75c6a711a756c'
|
||||
'c2b0f7840a29d22c27ffdb58f5058851'
|
||||
'91db2c2612382a535c851169c5873612'
|
||||
'86d4a35722b5410e3b29fc92dae15d4b'
|
||||
'ce6c81ad1ad1f8b333fd6077d47abdaf'
|
||||
|
@ -35,6 +37,9 @@ prepare() {
|
|||
# add upstream patch
|
||||
git apply --whitespace=nowarn ../patch-${pkgver}
|
||||
|
||||
# ALARM patches
|
||||
git apply ../0001-Revert-SUNRPC-Handle-TCP-socket-sends-with-kernel_se.patch
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
# add pkgrel to extraversion
|
||||
|
|
Loading…
Reference in a new issue