Skip to content

Commit

Permalink
Merge pull request #8703 from mazdakn/cherry-pick-pr8693-releasev326
Browse files Browse the repository at this point in the history
[Release v3.26] eBPF: Update map definition in sockops program
  • Loading branch information
mazdakn authored Apr 8, 2024
2 parents 59a1fd5 + f81cb8e commit de7a20f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions felix/bpf-apache/sockops.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Tigera, Inc. All rights reserved.
// Copyright (c) 2019-2024 Tigera, Inc. All rights reserved.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -15,13 +15,13 @@
#include <linux/bpf.h>
#include "sockops.h"

struct bpf_map_def __attribute__((section("maps"))) calico_sk_endpoints = {
.type = BPF_MAP_TYPE_LPM_TRIE,
.key_size = sizeof(union ip4_bpf_lpm_trie_key),
.value_size = sizeof(__u32),
.max_entries = 65535,
.map_flags = BPF_F_NO_PREALLOC,
};
struct {
__uint(type, BPF_MAP_TYPE_LPM_TRIE);
__type(key, union ip4_bpf_lpm_trie_key);
__type(value, __u32);
__uint(max_entries, 65535);
__uint(map_flags, BPF_F_NO_PREALLOC);
} calico_sk_endpoints SEC(".maps");

__attribute__((section("calico_sockops_func")))
enum bpf_ret_code calico_sockops(struct bpf_sock_ops *skops)
Expand Down

0 comments on commit de7a20f

Please sign in to comment.