You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2015/06/02 00:10:14 UTC
mesos git commit: Convert EGRESS_ROOT to constexpr Handle.
Repository: mesos
Updated Branches:
refs/heads/master 610d4fffd -> 0b9e6e67c
Convert EGRESS_ROOT to constexpr Handle.
Review: https://reviews.apache.org/r/34900
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0b9e6e67
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0b9e6e67
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0b9e6e67
Branch: refs/heads/master
Commit: 0b9e6e67c431d5b6ce17a50743c5aee36fac7271
Parents: 610d4ff
Author: Paul Brett <pa...@twopensource.com>
Authored: Mon Jun 1 15:09:47 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Jun 1 15:10:17 2015 -0700
----------------------------------------------------------------------
src/linux/routing/handle.hpp | 2 +-
src/linux/routing/queueing/fq_codel.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/0b9e6e67/src/linux/routing/handle.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/handle.hpp b/src/linux/routing/handle.hpp
index 52055d0..aed810e 100644
--- a/src/linux/routing/handle.hpp
+++ b/src/linux/routing/handle.hpp
@@ -83,7 +83,7 @@ protected:
//
// The parent of the root egress queueing discipline has an immutable
// handle.
-const inline Handle EGRESS_ROOT() { return Handle(TC_H_ROOT); }
+constexpr Handle EGRESS_ROOT(TC_H_ROOT);
} // namespace routing {
http://git-wip-us.apache.org/repos/asf/mesos/blob/0b9e6e67/src/linux/routing/queueing/fq_codel.cpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/queueing/fq_codel.cpp b/src/linux/routing/queueing/fq_codel.cpp
index 64b5c73..4dc2a9d 100644
--- a/src/linux/routing/queueing/fq_codel.cpp
+++ b/src/linux/routing/queueing/fq_codel.cpp
@@ -71,7 +71,7 @@ Try<Nothing> encode<fq_codel::Discipline>(
string(nl_geterror(error)));
}
- rtnl_tc_set_parent(TC_CAST(qdisc.get()), EGRESS_ROOT().get());
+ rtnl_tc_set_parent(TC_CAST(qdisc.get()), EGRESS_ROOT.get());
rtnl_tc_set_handle(TC_CAST(qdisc.get()), fq_codel::HANDLE.get());
// We don't set fq_codel parameters here, use the default:
@@ -95,7 +95,7 @@ Result<fq_codel::Discipline> decode<fq_codel::Discipline>(
const Netlink<struct rtnl_qdisc>& qdisc)
{
if (rtnl_tc_get_kind(TC_CAST(qdisc.get())) != string("fq_codel") ||
- rtnl_tc_get_parent(TC_CAST(qdisc.get())) != EGRESS_ROOT().get() ||
+ rtnl_tc_get_parent(TC_CAST(qdisc.get())) != EGRESS_ROOT.get() ||
rtnl_tc_get_handle(TC_CAST(qdisc.get())) != fq_codel::HANDLE.get()) {
return None();
}