Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kenlig committed Oct 19, 2024
1 parent a16889a commit 55e8ca8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/src/bpf_map/map_common_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
#ifndef _MAP_COMMON_DEF_HPP
#define _MAP_COMMON_DEF_HPP
#include "linux/bpf.h"
#include "spdlog/spdlog.h"
#include <boost/container_hash/hash.hpp>
#include <cinttypes>
Expand Down Expand Up @@ -69,9 +68,11 @@ struct bytes_vec_hasher {
return seed;
}
};

static inline bool check_update_flags(uint64_t flags)
{
if (flags != BPF_ANY && flags != BPF_NOEXIST && flags != BPF_EXIST) {
if (flags != 0 /*BPF_ANY*/ && flags != 1 /*BPF_NOEXIST*/ &&
flags != 2 /*BPF_EXIST*/) {
errno = EINVAL;
return false;
}
Expand Down

0 comments on commit 55e8ca8

Please sign in to comment.