Skip to content

Commit 0bebaa3

Browse files
libpolycube: fix get_type() in basecube
get_type() was returning a local variable that was never set, so it always returned CubeType::TC, this causes a performance degradation in pcn-iptables because the fib_lookup kernel feature was never used. Fixes: 5a3e91e ("implement base datamodel handling in polycubed") Signed-off-by: Mauricio Vasquez B <mauriciovasquezbernal@gmail.com>
1 parent 8af01d1 commit 0bebaa3

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/libs/polycube/include/polycube/services/base_cube.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ class BaseCube {
9797

9898
std::shared_ptr<BaseCubeIface> cube_; // pointer to the cube in polycubed
9999
log_msg_cb handle_log_msg;
100-
CubeType type_;
101100
std::shared_ptr<spdlog::logger> logger_;
102101
std::atomic<bool> dismounted_;
103102

src/libs/polycube/src/base_cube.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const std::string BaseCube::getName() const {
116116
}
117117

118118
CubeType BaseCube::get_type() const {
119-
return type_;
119+
return cube_->get_type();
120120
}
121121

122122
std::shared_ptr<spdlog::logger> BaseCube::logger() {

0 commit comments

Comments
 (0)