summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorbrakmo <brakmo@fb.com>2019-03-01 23:38:46 +0300
committerAlexei Starovoitov <ast@kernel.org>2019-03-02 21:48:27 +0300
commitf7c917ba11a67632a8452ea99fe132f626a7a2cc (patch)
tree6fd6f53d18bace334814e47970875eeea4ded599 /samples
parentb74e21ab7d438117a10d2d331bdfc275fcab2970 (diff)
downloadlinux-f7c917ba11a67632a8452ea99fe132f626a7a2cc.tar.xz
bpf: add bpf helper bpf_skb_ecn_set_ce
This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can be attached to the ingress and egress path. The helper is needed because his type of bpf_prog cannot modify the skb directly. This helper is used to set the ECN field of ECN capable IP packets to ce (congestion encountered) in the IPv6 or IPv4 header of the skb. It can be used by a bpf_prog to manage egress or ingress network bandwdith limit per cgroupv2 by inducing an ECN response in the TCP sender. This works best when using DCTCP. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions