Skip to content

Commit 765244f

Browse files
committed
xdp-forward: Use DEVMAP_HASH map types
The DEVMAP map types used by xdp-forward prevents installing xdp-forward on ifindexes larger than the map size, because the ifindex is also used as the lookup key. Change to DEVMAP_HASH to avoid this. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
1 parent 88dc10f commit 765244f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

xdp-forward/xdp_flowtable.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#define BIT(x) (1 << (x))
2020

2121
struct {
22-
__uint(type, BPF_MAP_TYPE_DEVMAP);
22+
__uint(type, BPF_MAP_TYPE_DEVMAP_HASH);
2323
__uint(key_size, sizeof(int));
2424
__uint(value_size, sizeof(int));
2525
__uint(max_entries, 64);

xdp-forward/xdp_forward.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define IPV6_FLOWINFO_MASK bpf_htons(0x0FFFFFFF)
1414

1515
struct {
16-
__uint(type, BPF_MAP_TYPE_DEVMAP);
16+
__uint(type, BPF_MAP_TYPE_DEVMAP_HASH);
1717
__uint(key_size, sizeof(int));
1818
__uint(value_size, sizeof(int));
1919
__uint(max_entries, 64);

0 commit comments

Comments
 (0)