Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Brought to you by
Using eBPF for
High-Performance
Networking in Cilium
Liz Rice @lizrice
Chief Open Source Officer at Isovalent
Hi, I’m Liz 👋
Chief Open Source Officer at Isovalent
■ Previously chair of CNCF’s Technical Oversight Committee
■ Early career: writing networking code
■ Containers / security / eBPF / cloud native
■ Often found on a bike or playing music
eBPF-based high-performance
networking: XDP
@lizrice
host
eth0
Bad packet
��
@lizrice
host
eth0
Bad packet
Discard?
XDP
@lizrice
host
eth0
Bad packet
Discard?
XDP
eBPF Packet Drop
SEC("xdp")
int goodbye_ping(struct xdp_md *ctx)
{
...
if (iph->protocol == IPPROTO_ICMP)
return XDP_DROP;
return XDP_PASS;
}
Cilium - eBPF-based networking for
distributed systems
https://www.reddit.com/r/networkingmemes/comments/8u7jyz/container_networking/
iptables
Todo! Example iptables output - possibly live as demo
$ kubectl -n kube-system delete ds kube-proxy
host
pod app
socket
veth
veth
eth0
iptables
conntrack
iptables INPUT
Linux routing
iptables
PREROUTING
mangle
iptables
conntrack
iptables
FORWARD
Linux routing
iptables
PREROUTING
nat
iptables
POSTROUTING
mangle
iptables
PREROUTING
mangle
iptables
POSTROUTING
nat
Network Path
host
pod app
socket
veth
veth
eth0
iptables
conntrack
iptables INPUT
Linux routing
iptables
PREROUTING
mangle
Network Path
Linux routing
host
pod app
socket
veth
veth
eth0
iptables
conntrack
iptables INPUT
Linux routing
iptables
PREROUTING
mangle
Network Security
Linux routing Policy checks
userspace kernel
JIT
native code
eth0
eBPF
verifier
bpf(BPF_PROG_LOAD, …)
eBPF loader
SEC(“to_netdev”)
int handle(struct sk_buff *skb) {
…
if (tcp->dport == 80)
redirect(lxc0);
return DROP_PACKET;
}
foo.o
clang -target bpf [...]
agent BPF
maps
lxc0
@lizrice
https://cilium.io/blog/2021/05/11/cni-benchmark
Cilium eBPF (receive path)
@lizrice
kube-proxy replacement performance
Brought to you by
Liz Rice
@lizrice | cilium.io | ebpf.io
Thank you

More Related Content

Using eBPF for High-Performance Networking in Cilium