Skip to content

Commit 1379ef8

Browse files
committed
Merge branch 'bpf-sockmap-ingress'
John Fastabend says: ==================== This series adds the BPF_F_INGRESS flag support to the redirect APIs. Bringing the sockmap API in-line with the cls_bpf redirect APIs. We add it to both variants of sockmap programs, the first patch adds support for tx ulp hooks and the third patch adds support for the recv skb hooks. Patches two and four add tests for the corresponding ingress redirect hooks. Follow on patches can address busy polling support, but next series from me will move the sockmap sample program into selftests. v2: added static to function definition caught by kbuild bot v3: fixed an error branch with missing mem_uncharge in recvmsg op moved receive_queue check outside of RCU region ==================== Signed-off-by: Daniel Borkmann <[email protected]>
2 parents 2252743 + 2e3f6c5 commit 1379ef8

File tree

8 files changed

+430
-37
lines changed

8 files changed

+430
-37
lines changed

include/linux/filter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@ struct sk_msg_buff {
521521
__u32 key;
522522
__u32 flags;
523523
struct bpf_map *map;
524+
struct sk_buff *skb;
525+
struct list_head list;
524526
};
525527

526528
/* Compute the linear packet data range [data, data_end) which

include/net/sock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,7 @@ struct proto {
10851085
#endif
10861086

10871087
bool (*stream_memory_free)(const struct sock *sk);
1088+
bool (*stream_memory_read)(const struct sock *sk);
10881089
/* Memory pressure */
10891090
void (*enter_memory_pressure)(struct sock *sk);
10901091
void (*leave_memory_pressure)(struct sock *sk);

0 commit comments

Comments
 (0)