-
Notifications
You must be signed in to change notification settings - Fork 156
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
issue: 4223310 VMA support for kernel 6.10 #1100
base: master
Are you sure you want to change the base?
Conversation
c378d85
to
27880eb
Compare
55fa392
to
7a2cf7f
Compare
__log_err("NL socket Connection: "); | ||
nl_socket_free(m_sock); | ||
} | ||
|
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.
formatting
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.
please consider m_sock = nullptr;
and following
if (nl_connect(m_sock, NETLINK_ROUTE) < 0) {
__log_err("NL socket Connection: ");
nl_socket_free(m_sock);
m_sock = nullptr;
return;
}
to be consistent and return at the end just in case good flow.
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.
super right. fixed. Thanks :)
src/vma/proto/netlink_socket_mgr.h
Outdated
*p_ent_num = entry_cnt; | ||
}, &iterator_context); | ||
|
||
m_tab.entries_num = entry_cnt; |
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.
using this approach probably it is better insert sanity check inside this function
if (m_tab.entries_num >= MAX_TABLE_SIZE) {
__log_warn("reached the maximum route table size");
}
so that initialization and verification are performed in one place
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.
That's a good idea. fixed
char *oif_name = rtnl_rule_get_oif(rule); | ||
if (oif_name) { | ||
p_val->set_oif_name(oif_name); | ||
} |
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.
please consider adapting your IDE for product format style.
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.
Thanks! didn't have clang format applied for this repo. not a native dev here :D
went through all the files and applied formatting
7a2cf7f
to
acee972
Compare
Kernel 6.10 netlink has breaked VMA functionality. Transitioned to libnl - an abstraction that wraps netlink. Signed-off-by: Tomer Cabouly <[email protected]>
c9c3905
to
0389fda
Compare
git patch of this PR: |
Kernel 6.10 netlink has breaked VMA functionality.
Transitioned to libnl - an abstraction that wraps netlink.
This both solves the issue and makes us more robust.
What
Build routing and rules table using libnl instead of netlink.
removed protocol field in rule_val as:
rtnl_rule_get_protocol
isn't available in sles on the CI.Why ?
solves https://redmine.mellanox.com/issues/4223310
How ?
Tested on kernel 5.21 and kernel 6.10.
Change type
What kind of change does this PR introduce?
Check list