BPFProgTable: allow to remove elements
It is allowed in the kernel from some time ago:
@@ -287,6 +287,12 @@ public:
return StatusTuple(-1, "Error updating value: %s", std::strerror(errno));
return StatusTuple(0);
}
+
+ StatusTuple remove_value(const int& index) {
+ if (!this->remove(const_cast<int*>(&index)))
+ return StatusTuple(-1, "Error removing value: %s", std::strerror(errno));
+ return StatusTuple(0);
+ }
};
} // namespace ebpf
