netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC patch 1/1] large netlink dumps
@ 2017-04-15 17:07 Jamal Hadi Salim
  2017-04-16  3:08 ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: Jamal Hadi Salim @ 2017-04-15 17:07 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Johannes Berg, Pablo Neira Ayuso, David Miller,
	netdev@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]

Eric,

How does attached look instead of the 32K?
I found it helps to let user space suggest something
larger.

cheers,
jamal

[-- Attachment #2: patch-netlink-large-dump --]
[-- Type: text/plain, Size: 566 bytes --]

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7b73c7c..bc982ef 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1849,7 +1849,7 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
 	/* Record the max length of recvmsg() calls for future allocations */
 	nlk->max_recvmsg_len = max(nlk->max_recvmsg_len, len);
 	nlk->max_recvmsg_len = min_t(size_t, nlk->max_recvmsg_len,
-				     SKB_WITH_OVERHEAD(32768));
+				     sk->sk_rcvbuf / 4);
 
 	copied = data_skb->len;
 	if (len < copied) {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-16 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-15 17:07 [RFC patch 1/1] large netlink dumps Jamal Hadi Salim
2017-04-16  3:08 ` Eric Dumazet
2017-04-16 13:03   ` Jamal Hadi Salim
2017-04-16 16:37     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).