-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libteam: Set buffer size of netlink cli sockets #2442
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
src/libteam/0006-libteam-Set-buffer-size-of-netlink-cli-sockets.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 12528607db866fe84b870127de64d40efb0a98a0 Mon Sep 17 00:00:00 2001 | ||
From: Shu0T1an ChenG <shuche@microsoft.com> | ||
Date: Mon, 14 Jan 2019 16:58:36 -0800 | ||
Subject: [PATCH] Set buffer size of netlink cli sockets | ||
|
||
Set both netlink cli sock and netlink cli event sock receive buffer | ||
size to 98304. | ||
|
||
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com> | ||
--- | ||
libteam/libteam.c | 11 +++++++++++ | ||
1 file changed, 11 insertions(+) | ||
|
||
diff --git a/libteam/libteam.c b/libteam/libteam.c | ||
index 106e5cf..f7010b9 100644 | ||
--- a/libteam/libteam.c | ||
+++ b/libteam/libteam.c | ||
@@ -600,6 +600,17 @@ int team_init(struct team_handle *th, uint32_t ifindex) | ||
return -nl2syserr(err); | ||
} | ||
|
||
+ err = nl_socket_set_buffer_size(th->nl_cli.sock, 98304, 0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this value? a magic number? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Set buffer size failed on my DUT. Does this value rely on certain sysctl setting? |
||
+ if (err) { | ||
+ err(th, "Failed to set buffer size of netlink cli sock."); | ||
+ return -nl2syserr(err); | ||
+ } | ||
+ err = nl_socket_set_buffer_size(th->nl_cli.sock_event, 98304, 0); | ||
+ if (err) { | ||
+ err(th, "Failed to set buffer size of netlink cli event sock."); | ||
+ return -nl2syserr(err); | ||
+ } | ||
+ | ||
th->family = genl_ctrl_resolve(th->nl_sock, TEAM_GENL_NAME); | ||
if (th->family < 0) { | ||
err(th, "Failed to resolve netlink family."); | ||
-- | ||
2.1.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you decribe the problem trying to address in this patch?