Commit 3c40c02d authored by Prashant Bhole's avatar Prashant Bhole

examples:dns_matching: added pragma directive for loop unrolling

Loop unrolling was not working because of if-condition in the loop.
Added #pragma unroll directive.
Signed-off-by: default avatarPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
parent 07c21f0c
......@@ -84,7 +84,7 @@ int dns_matching(struct __sk_buff *skb)
u16 i = 0;
struct dns_char_t *c;
// This unroll worked not in latest BCC version.
#pragma unroll
for(i = 0; i<255;i++){
if (cursor == sentinel) goto end; c = cursor_advance(cursor, 1); key.p[i] = c->c;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment