On Thu, May 14, 2020 at 04:51:26AM -0700, Joe Perches wrote:
> > Mostly to keep it symmetric with the sockopt. I could probably remove
> > a few arguments in the series if we want to be strict.
>
> My preference would use strict and add
> arguments only when necessary.
In a few cases that would
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/net.h | 2 --
net/socket.c| 31 ---
2 files changed, 33 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index 74ef5d7315f70..e10f378194a59 100644
--- a/include/linux/net.h
Add a helper to directly set the IPV6_V6ONLY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h| 11 +++
net/ipv6/ip6_udp_tunnel.c | 5 +
net/sunrpc/svcsock.c | 6 +-
3 files changed, 13
The SCTP protocol allows to bind multiple address to a socket. That
feature is currently only exposed as a socket option. Add a bind_add
method struct proto that allows to bind additional addresses, and
switch the dlm code to use the method instead of going through the
socket option from kernel
Add a helper to directly set the SCTP_NODELAY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 10 ++
include/net/sctp/sctp.h | 7 +++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 7 +++
net/sunrpc/svcsock.c | 10 ++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git
Add a helper to directly set the IP_FREEBIND sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
drivers/target/iscsi/iscsi_target_login.c | 13 +++--
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c
Add a helper to directly set the IP_RECVERR sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Reviewed-by: David Howells
---
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c | 8
net/rxrpc/local_object.c | 8 +---
3 files
Add a helper to directly set the TCP_KEEPCNT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/linux/tcp.h | 1 +
net/ipv4/tcp.c| 12
net/rds/tcp.h | 2 +-
net/rds/tcp_listen.c | 17 +++--
Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from
kernel space without going through a fake uaccess.
Thanks to David Howells for the documentation updates.
Signed-off-by: Christoph Hellwig
---
Documentation/networking/rxrpc.rst | 13 +++--
fs/afs/rxrpc.c
Add a helper to directly set the IPV6_ADD_PREFERENCES sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 67
net/ipv6/ipv6_sockglue.c | 59 +--
Avoid using kernel_setsockopt for the TIPC_IMPORTANCE option when we can
just use the internal helper. The only change needed is to pass a struct
sock instead of tipc_sock, which is private to socket.c
Signed-off-by: Christoph Hellwig
---
net/tipc/socket.c | 18 +-
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/linux/tcp.h | 1 +
net/ipv4/tcp.c| 12
net/rds/tcp_listen.c | 4 +---
net/sunrpc/xprtsock.c | 3 +--
4 files
Add a helper to directly set the IP_PKTINFO sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c | 8
net/sunrpc/svcsock.c | 5 ++---
3 files changed, 11 insertions(+), 3 deletions(-)
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/ocfs2/cluster/tcp.c | 22 ++
include/linux/tcp.h| 1 +
net/ipv4/tcp.c | 8
net/sunrpc/xprtsock.c
Add a helper to directly set the IP_MTU_DISCOVER sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Reviewed-by: David Howells [rxrpc bits]
---
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c | 11 +++
net/rxrpc/local_object.c |
Add a helper to directly set the IP_TOS sockopt from kernel space without
going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 14 +++---
drivers/nvme/target/tcp.c | 10 ++
include/net/ip.h | 2 ++
Add a helper to directly enable timestamps instead of setting the
SO_TIMESTAMP* sockopts from kernel space and going through a fake
uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h | 1 +
net/core/sock.c | 47 +---
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 7 --
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/net.h | 2 --
net/socket.c| 34 --
2 files changed, 36 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index 6451425e828f5..74ef5d7315f70 100644
---
Add a helper to directly set the TCP_SYNCNT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 9 +
include/linux/tcp.h | 1 +
net/ipv4/tcp.c | 12
3 files
Add a helper to directly set the TCP_CORK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 14
Add a helper to directly set the SO_PRIORITY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 12 ++--
drivers/nvme/target/tcp.c | 18 --
include/net/sock.h|
Add a helper to directly set the SO_BINDTOIFINDEX sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h| 1 +
net/core/sock.c | 21 +++--
net/ipv4/udp_tunnel.c | 4 +---
On Wed, May 20, 2020 at 09:55:07PM +0200, Christoph Hellwig wrote:
> Add a helper to directly set the SCTP_NODELAY sockopt from kernel space
> without going through a fake uaccess.
>
> Signed-off-by: Christoph Hellwig
> ---
> fs/dlm/lowcomms.c | 10 ++
> include/net/sctp/sctp.h |
From: Marcelo Ricardo Leitner
Date: Wed, 20 May 2020 20:10:01 -0300
> The duplication with sctp_setsockopt_nodelay() is quite silly/bad.
> Also, why have the 'true' hardcoded? It's what dlm uses, yes, but the
> API could be a bit more complete than that.
The APIs are being designed based upon
The only difference between a few missing fixes applied to the SCTP
one is that TCP uses ->getpeername to get the remote address, while
SCTP uses kernel_getsockopt(.. SCTP_PRIMARY_ADDR). But given that
getpeername is defined to return the primary address for sctp, there
doesn't seem to be any
Add a helper to directly set the SO_REUSEPORT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h| 1 +
net/core/sock.c | 8
net/sunrpc/xprtsock.c | 17 +
3 files changed, 10 insertions(+),
Add a helper to directly set the SO_SNDTIMEO_NEW sockopt from kernel
space without going through a fake uaccess. The interface is
simplified to only pass the seconds value, as that is the only
thing needed at the moment.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 8 ++--
Add a helper to directly set the TCP_NODELAY sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
Acked-by: Jason Gunthorpe
---
Add a helper to directly set the SO_RCVBUFFORCE sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 7 +-
include/net/sock.h | 1 +
net/core/sock.c| 59 +-
3 files
Add a helper to directly set the SO_LINGER sockopt from kernel space
with onoff set to true and a linger time of 0 without going through a
fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 9 +
drivers/nvme/target/tcp.c | 6 +-
Add a helper to directly set the SO_KEEPALIVE sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 6 +-
include/net/sock.h| 1 +
net/core/sock.c | 10 ++
net/rds/tcp_listen.c | 6 +-
On Wed, May 20, 2020 at 04:23:55PM -0700, David Miller wrote:
> From: Marcelo Ricardo Leitner
> Date: Wed, 20 May 2020 20:10:01 -0300
>
> > The duplication with sctp_setsockopt_nodelay() is quite silly/bad.
> > Also, why have the 'true' hardcoded? It's what dlm uses, yes, but the
> > API could
34 matches
Mail list logo