[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1a25fd67586301a5d8e8fa91152e0cd07bc5ee0f.1516147540.git.sowmini.varadhan@oracle.com>
Date: Wed, 17 Jan 2018 04:20:02 -0800
From: Sowmini Varadhan <sowmini.varadhan@...cle.com>
To: netdev@...r.kernel.org, willemdebruijn.kernel@...il.com
Cc: davem@...emloft.net, rds-devel@....oracle.com,
sowmini.varadhan@...cle.com, santosh.shilimkar@...cle.com
Subject: [PATCH RFC net-next 4/6] sock: permit SO_ZEROCOPY on PF_RDS socket
allow the application to set SO_ZEROCOPY on the underlying sk
of a PF_RDS socket
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@...cle.com>
---
net/core/sock.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 4f52677..f0f44b0 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1049,6 +1049,13 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
break;
case SO_ZEROCOPY:
+ if (sk->sk_family == PF_RDS) {
+ if (val < 0 || val > 1)
+ ret = -EINVAL;
+ else
+ sock_valbool_flag(sk, SOCK_ZEROCOPY, valbool);
+ break;
+ }
if (sk->sk_family != PF_INET && sk->sk_family != PF_INET6)
ret = -ENOTSUPP;
else if (sk->sk_protocol != IPPROTO_TCP)
--
1.7.1
Powered by blists - more mailing lists