Skip to content

Commit

Permalink
Do not use static inline for extern definition if we generate a decla…
Browse files Browse the repository at this point in the history
…ration.
  • Loading branch information
fruffy committed Apr 30, 2024
1 parent 4986811 commit a033738
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion testdata/extern_modules/extern-checksum-ebpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @param iphdr Structure representing IP header. The IP header is generated by the P4 compiler and defined in test.h.
* @return True if checksum is correct.
*/
static inline u8 verify_ipv4_checksum(const struct IPv4_h iphdr)
u8 verify_ipv4_checksum(const struct IPv4_h iphdr)
{
u8 correct = 0;
u32 checksum = bpf_htons(((u16) iphdr.version << 12) | ((u16) iphdr.ihl << 8) | (u16) iphdr.diffserv);
Expand Down
2 changes: 1 addition & 1 deletion testdata/extern_modules/extern-conntrack-ebpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ REGISTER_START()
REGISTER_TABLE(tcp_reg, BPF_MAP_TYPE_HASH, sizeof(u32), sizeof(struct connInfo), MAX_ENTRIES)
REGISTER_END()

static inline u8 tcp_conntrack(struct Headers_t hdrs)
u8 tcp_conntrack(struct Headers_t hdrs)
{
u32 saddr = hdrs.ipv4.srcAddr;
u32 daddr = hdrs.ipv4.dstAddr;
Expand Down

0 comments on commit a033738

Please sign in to comment.