Repository: mesos Updated Branches: refs/heads/master 3b16439be -> f3ed959ae
Fixed a few style issues in traffic control Handle class. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f3ed959a Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f3ed959a Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f3ed959a Branch: refs/heads/master Commit: f3ed959aeba58f7eb2c3d7f6068f2298c55431ad Parents: 3b16439 Author: Jie Yu <[email protected]> Authored: Mon Jun 1 11:11:28 2015 -0700 Committer: Jie Yu <[email protected]> Committed: Mon Jun 1 11:11:28 2015 -0700 ---------------------------------------------------------------------- src/linux/routing/handle.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/f3ed959a/src/linux/routing/handle.hpp ---------------------------------------------------------------------- diff --git a/src/linux/routing/handle.hpp b/src/linux/routing/handle.hpp index 4ce1588..52055d0 100644 --- a/src/linux/routing/handle.hpp +++ b/src/linux/routing/handle.hpp @@ -38,21 +38,21 @@ class Handle public: explicit constexpr Handle(uint32_t _handle) : handle(_handle) {} - constexpr Handle(uint16_t primary, uint16_t secondary) : - handle((((uint32_t)primary) << 16) + secondary) {} + constexpr Handle(uint16_t primary, uint16_t secondary) + : handle((((uint32_t) primary) << 16) + secondary) {} // NOTE: This is used to construct a classid. The higher 16 bits of // the given 'parent' will be the primary and the lower 16 bits is // specified by the given 'id'. - constexpr Handle(const Handle& parent, uint16_t id) : - handle((((uint32_t)parent.primary()) << 16) + id) {} + constexpr Handle(const Handle& parent, uint16_t id) + : handle((((uint32_t) parent.primary()) << 16) + id) {} - constexpr bool operator==(const Handle& that) const + constexpr bool operator == (const Handle& that) const { return handle == that.handle; } - constexpr bool operator!=(const Handle& that) const + constexpr bool operator != (const Handle& that) const { return handle != that.handle; } @@ -65,6 +65,7 @@ protected: uint32_t handle; }; + // Packets flowing from the device driver to the network stack are // called ingress traffic, and packets flowing from the network stack // to the device driver are called egress traffic (shown below).
