X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Ftap%2Ftap_bpf_program.c;h=1cb73822f3990d06415caae092714fd9cf42811d;hb=1168a4fd193c3bf981c4889cba150a7bb4c1d169;hp=848c50b6592d09dd5c51568f574005df5df6b0fd;hpb=cdc07e83bb2499e5ba535784cb8ff821ac76193f;p=dpdk.git diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c index 848c50b659..1cb73822f3 100644 --- a/drivers/net/tap/tap_bpf_program.c +++ b/drivers/net/tap/tap_bpf_program.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 - * Copyright 2017 Mellanox Technologies, Ltd. + * Copyright 2017 Mellanox Technologies, Ltd */ #include @@ -28,10 +28,10 @@ ((b) & 0xff)) /* - * The queue number is offset by 1, to distinguish packets that have - * gone through this rule (skb->cb[1] != 0) from others. + * The queue number is offset by a unique QUEUE_OFFSET, to distinguish + * packets that have gone through this rule (skb->cb[1] != 0) from others. */ -#define QUEUE_OFFSET 1 +#define QUEUE_OFFSET 0x7cafe800 #define PIN_GLOBAL_NS 2 #define KEY_IDX 0 @@ -63,6 +63,9 @@ match_q(struct __sk_buff *skb) if (queue != match_queue) return TC_ACT_OK; + + /* queue match */ + skb->cb[1] = 0; return TC_ACT_UNSPEC; } @@ -81,7 +84,7 @@ struct ipv6_l3_l4_tuple { __u16 sport; } __attribute__((packed)); -static const __u8 def_rss_key[] = { +static const __u8 def_rss_key[TAP_RSS_HASH_KEY_SIZE] = { 0xd1, 0x81, 0xc6, 0x2c, 0xf7, 0xf4, 0xdb, 0x5b, 0x19, 0x83, 0xa2, 0xfc,