mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
traffic-pacing-edt: playing with hash initval
It didn't help kept the original value. Signed-off-by: Jesper D. Brouer <netoptimizer@brouer.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include <bpf/compiler.h>
|
||||
|
||||
#define INITVAL 15485863
|
||||
//#define INITVAL 2654435761
|
||||
|
||||
#include "hash_func01.h" /* SuperFastHash */
|
||||
|
||||
#include <bpf/bpf_helpers.h>
|
||||
@@ -29,7 +31,7 @@ static __always_inline
|
||||
__u32 extract_vlan_key(struct collect_vlans *vlans)
|
||||
{
|
||||
/* Combine inner and outer VLAN as a key */
|
||||
__u32 vlan_key = (vlans->id[1] << 16) | vlans->id[0];
|
||||
__u32 vlan_key = (vlans->id[1] << 16) | vlans->id[0];
|
||||
return vlan_key;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user