Skip to content

Commit

Permalink
address code review
Browse files Browse the repository at this point in the history
Signed-off-by: Elazar Gershuni <[email protected]>
  • Loading branch information
elazarg committed Nov 6, 2024
1 parent 83dfee5 commit 8b84df5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/asm_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ static vector<T> vector_of(const ELFIO::section& sec) {
return vector_of<T>(sec.get_data(), sec.get_size());
}

int create_map_crab(const EbpfMapType& map_type, uint32_t key_size, uint32_t value_size, uint32_t max_entries,
ebpf_verifier_options_t) {
int create_map_crab(const EbpfMapType& map_type, const uint32_t key_size, const uint32_t value_size,
const uint32_t max_entries, ebpf_verifier_options_t) {
const EquivalenceKey equiv{map_type.value_type, key_size, value_size, map_type.is_array ? max_entries : 0};
if (!global_program_info->cache.contains(equiv)) {
// +1 so 0 is the null FD
Expand Down
2 changes: 1 addition & 1 deletion src/crab/add_bottom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AddBottom final {
AddBottom() {}

public:
explicit AddBottom(auto&& _dom) : dom{std::forward<decltype(dom)>(_dom)} {}
explicit AddBottom(auto&& _dom) : dom{std::forward<decltype(_dom)>(_dom)} {}
AddBottom(const AddBottom& other) = default;
AddBottom(AddBottom& other) = default;
AddBottom(AddBottom&& other) = default;
Expand Down
2 changes: 2 additions & 0 deletions src/spec_type_descriptors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ struct EbpfProgramType {

void print_map_descriptors(const std::vector<EbpfMapDescriptor>& descriptors, std::ostream& o);

// Represents the key characteristics that determine equivalence between eBPF maps.
// Used to cache and compare map configurations across the program.
struct EquivalenceKey {
EbpfMapValueType value_type;
uint32_t key_size;
Expand Down

0 comments on commit 8b84df5

Please sign in to comment.