Common hash function for kernel and user space in XDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,
We are trying to implement L2 forwarding in xdp and we need to convert the mac-address to a hash value. Thus far, we have tried using crc32 functions from <linux/crc32.h> for kernel space but it can't be used in user space. We need a common crc hash function for both kernel and user space.

   The kernel crc function causes the following error:

invalid relo for insn[24].code 0x85
bpf_load_program() err=22
0: (61) r2 = *(u32 *)(r1 +4)
1: (61) r1 = *(u32 *)(r1 +0)
.
.
.
23: (b7) r3 = 6
24: (85) call unknown#-1
BPF_CALL uses reserved fields


   Can you please point to some examples or references?
   We would be highly grateful.

Thanks,
Sincerely,




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux