diff options
| author | David S. Miller <davem@davemloft.net> | 2019-07-03 13:51:54 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-07-03 13:51:54 -0700 |
| commit | e227701c4583f0408cac33eca0fa96ac4b8ff7d9 (patch) | |
| tree | 6e69af0ce25e7e72a67b17d98fc57015c93fa127 /include | |
| parent | 2559d7c4dd0eb17e6454fc7f52f9c5ea63a272df (diff) | |
| parent | 6f24080e8a1e5572045067507c7905cbe6bc64cc (diff) | |
| download | cachepc-linux-e227701c4583f0408cac33eca0fa96ac4b8ff7d9.tar.gz cachepc-linux-e227701c4583f0408cac33eca0fa96ac4b8ff7d9.zip | |
Merge branch 'net-ICW-sendmsg-recvmsg'
Paolo Abeni says:
====================
net: use ICW for sk_proto->{send,recv}msg
This series extends ICW usage to one of the few remaining spots in fast-path
still hitting per packet retpoline overhead, namely the sk_proto->{send,recv}msg
calls.
The first 3 patches in this series refactor the existing code so that applying
the ICW macros is straight-forward: we demux inet_{recv,send}msg in ipv4 and
ipv6 variants so that each of them can easily select the appropriate TCP or UDP
direct call. While at it, a new helper is created to avoid excessive code
duplication, and the current ICWs for inet_{recv,send}msg are adjusted
accordingly.
The last 2 patches really introduce the new ICW use-case, respectively for the
ipv6 and the ipv4 code path.
This gives up to 5% performance improvement under UDP flood, and smaller but
measurable gains for TCP RR workloads.
v1 -> v2:
- drop inet6_{recv,send}msg declaration from header file,
prefer ICW macro instead
- avoid unneeded reclaration for udp_sendmsg, as suggested by Willem
====================
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/inet_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index 975901a95c0f..ae2ba897675c 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h @@ -25,6 +25,7 @@ int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags); int inet_accept(struct socket *sock, struct socket *newsock, int flags, bool kern); +int inet_send_prepare(struct sock *sk); int inet_sendmsg(struct socket *sock, struct msghdr *msg, size_t size); ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags); |
