|
|
cd1737 |
From c560900fc16eeac064cc7c43a96c5343fe68ae76 Mon Sep 17 00:00:00 2001
|
|
|
cd1737 |
From: Hangbin Liu <haliu@redhat.com>
|
|
|
cd1737 |
Date: Wed, 8 Nov 2017 14:39:11 +0800
|
|
|
cd1737 |
Subject: [PATCH] iplink: double the buffer size also in iplink_get()
|
|
|
cd1737 |
|
|
|
cd1737 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1380803
|
|
|
cd1737 |
Upstream Status: iproute2.git commit 460c03f3f3cc
|
|
|
cd1737 |
|
|
|
cd1737 |
commit 460c03f3f3cc436ff4673d75722ba68a6ec9343d
|
|
|
cd1737 |
Author: Michal Kubecek <mkubecek@suse.cz>
|
|
|
cd1737 |
Date: Fri Sep 1 18:39:16 2017 +0200
|
|
|
cd1737 |
|
|
|
cd1737 |
iplink: double the buffer size also in iplink_get()
|
|
|
cd1737 |
|
|
|
cd1737 |
Commit 72b365e8e0fd ("libnetlink: Double the dump buffer size") increased
|
|
|
cd1737 |
the buffer size for "ip link show" command to 32 KB to handle NICs with
|
|
|
cd1737 |
large number of VFs. With "dev" filter, a different code path is taken and
|
|
|
cd1737 |
iplink_get() still uses only 16 KB buffer.
|
|
|
cd1737 |
|
|
|
cd1737 |
The size of 32768 is not very future-proof as NICs supporting 120-128 VFs
|
|
|
cd1737 |
are already in use so that single RTM_NEWLINK message in the dump can
|
|
|
cd1737 |
exceed 30000 bytes. But it's what rtnl_talk() and rtnl_dump_filter_l() use
|
|
|
cd1737 |
so let's be consistent. Once this proves insufficient, all three sizes
|
|
|
cd1737 |
should be increased.
|
|
|
cd1737 |
|
|
|
cd1737 |
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
|
cd1737 |
|
|
|
cd1737 |
Signed-off-by: Hangbin Liu <haliu@redhat.com>
|
|
|
cd1737 |
---
|
|
|
cd1737 |
ip/iplink.c | 2 +-
|
|
|
cd1737 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
cd1737 |
|
|
|
cd1737 |
diff --git a/ip/iplink.c b/ip/iplink.c
|
|
|
d30c09 |
index 2b2421f9a2281..5afbadf0ce383 100644
|
|
|
cd1737 |
--- a/ip/iplink.c
|
|
|
cd1737 |
+++ b/ip/iplink.c
|
|
|
cd1737 |
@@ -1015,7 +1015,7 @@ int iplink_get(unsigned int flags, char *name, __u32 filt_mask)
|
|
|
cd1737 |
};
|
|
|
cd1737 |
struct {
|
|
|
cd1737 |
struct nlmsghdr n;
|
|
|
cd1737 |
- char buf[16384];
|
|
|
cd1737 |
+ char buf[32768];
|
|
|
cd1737 |
} answer;
|
|
|
cd1737 |
|
|
|
cd1737 |
if (name) {
|
|
|
cd1737 |
--
|
|
|
d30c09 |
2.21.0
|
|
|
cd1737 |
|