Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
bonifaido authored Sep 22, 2023
2 parents 989c28a + 74f7614 commit 4457568
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions proxywasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* modified, or distributed except according to those terms.
*/

#include <linux/uaccess.h>
#include <linux/hashtable.h>
#include <linux/xxhash.h>

Expand All @@ -22,20 +23,20 @@
#define hash_for_each_possible(name, obj, member, key, bits) \
hlist_for_each_entry(obj, &name[hash_min(key, bits)], member)

#define FOR_ALL_FILTERS(CALL) \
wasm_vm_result result; \
proxywasm_filter *f; \
for (f = p->filters; f != NULL; f = f->next) \
{ \
printk("wasm: calling %s "#CALL, f->name); \
result = CALL; \
if (result.err != NULL) \
{ \
pr_err("wasm: calling %s "#CALL" error: %s\n", f->name, result.err); \
return result; \
} \
printk("wasm: result of calling %s "#CALL": %d", f->name, result.data->i32); \
} \
#define FOR_ALL_FILTERS(CALL) \
wasm_vm_result result; \
proxywasm_filter *f; \
for (f = p->filters; f != NULL; f = f->next) \
{ \
printk("wasm: calling %s " #CALL, f->name); \
result = CALL; \
if (result.err != NULL) \
{ \
pr_err("wasm: calling %s " #CALL " error: %s\n", f->name, result.err); \
return result; \
} \
printk("wasm: result of calling %s " #CALL ": %d", f->name, result.data->i32); \
} \
return result;

typedef struct property_h_node
Expand Down Expand Up @@ -186,7 +187,7 @@ proxywasm_context *proxywasm_get_context(proxywasm *p)

m3ApiRawFunction(proxy_log)
{
m3ApiReturnType(i32)
m3ApiReturnType(i32);

m3ApiGetArg(i32, log_level);
m3ApiGetArgMem(char *, message_data);
Expand Down

0 comments on commit 4457568

Please sign in to comment.