summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorbrakmo <brakmo@fb.com>2019-03-01 12:38:46 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-03-02 10:48:27 -0800
commitf7c917ba11a67632a8452ea99fe132f626a7a2cc (patch)
tree6fd6f53d18bace334814e47970875eeea4ded599 /tools
parentb74e21ab7d438117a10d2d331bdfc275fcab2970 (diff)
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 'tools')
0 files changed, 0 insertions, 0 deletions