[prev in list] [next in list] [prev in thread] [next in thread]
List: mesos-commits
Subject: (mesos) 04/04: [LIB UPDATE] Add preprocessor check for libnl3 >= 3.5 in HTB.
From: bmahler () apache ! org
Date: 2024-01-26 16:28:21
Message-ID: 20240126162817.E9D5B440792 () gitbox2-he-fi ! apache ! org
[Download RAW message or body]
This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit f09d6aca43f6bc8de95be24f25162350bd93698b
Author: Devin Leamy <dleamy@twitter.com>
AuthorDate: Wed Jan 24 19:42:28 2024 +0000
[LIB UPDATE] Add preprocessor check for libnl3 >= 3.5 in HTB.
HTB makes use of the libnl3 3.5 >= APIs:
```c
rtnl_htb_set_ceil64()
rtnl_htb_set_rate64()
```
This commit enforces the that the correct version is used where this
new 64 bit API is used.
---
src/linux/routing/queueing/htb.hpp | 6 ++++++
src/slave/containerizer/mesos/isolators/network/port_mapping.cpp | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/linux/routing/queueing/htb.hpp b/src/linux/routing/queueing/htb.hpp
index 74b408aa0..ea4fd9cc0 100644
--- a/src/linux/routing/queueing/htb.hpp
+++ b/src/linux/routing/queueing/htb.hpp
@@ -28,6 +28,12 @@
#include "linux/routing/handle.hpp"
+#include <netlink/version.h>
+
+#if LIBNL_VER_MAJ < 3 || (LIBNL_VER_MAJ == 3 && LIBNL_VER_MIN < 5)
+#error libnl3 >= 3.5 required. Please update your installed libnl3 version.
+#endif
+
namespace routing {
namespace queueing {
namespace htb {
diff --git a/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp \
b/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp index \
603825d4e..06f04d10f 100644
--- a/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
+++ b/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
@@ -5294,10 +5294,10 @@ string PortMappingIsolatorProcess::scripts(Info* info)
script << "tc class add dev " << eth0 << " parent "
<< CONTAINER_TX_HTB_HANDLE << " classid "
<< CONTAINER_TX_HTB_CLASS_ID << " htb rate "
- << static_cast<uint64_t>(info->egressConfig->rate) * 8 << "bit";
+ << info->egressConfig->rate * 8 << "bit";
if (info->egressConfig->ceil.isSome()) {
script << " ceil "
- << static_cast<uint64_t>(info->egressConfig->ceil.get()) * 8
+ << info->egressConfig->ceil.get() * 8
<< "bit";
if (info->egressConfig->burst.isSome()) {
// Use bytes here because tc command borks at bits.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic