1、Unifying P4 with eBPF and DPDK via XDP2Tom Herbert Founder XDPnet Background in host data center networking Intel,Facebook,Google,Nvidia Inventor of several industry transforming technologies including eXpress DataPath(XDP)and a myriad of features in Linux networking My blog: Tom HerbertThe Grand Un
2、ificationXDP2 is the programming model for the datapath User writes their datapath in a language thats convenient for them Their code compiles into a variety of target Its a type of convergence layerXDP2XDP2Write once,run anywhere,run well!New flexibility,options,and extensibility for usersP4:fronte
3、nd and/or backend in XDP2state parse_tcp packet.extract(headers.tcp);local_metadata.l4_sport=headers.tcp.sport;local_metadata.l4_dport=headers.tcp.dport;transition accept;name:parse_tcp,min-hdr-length:20,metadata:ents:name:l4_sport,type:extract,md-off:82,hdr-src-off:0,length:2 ,name:l4_dport,type:ex
4、tract,md-off:4,hdr-src-off:2,length:2 Parser IRModified P4CXDP-2 compiler Kernel offloads are a major disappointment Only checksum offload,RSS,TSO are ubiquitous Problem:kernel doesnt trust NIC P4TC:valiant effort,but long shot from start 10K LOC,shunned eBPFOpportunity:Fixing kernel offloads User w
5、rite one program Compile to XDP/eBPF and P4 Run eBPF in kernel Run P4 in device Kernel and NIC running same code!Trust can be established Complex offloads are viable Effect:extend kernel to P4 HWSolution:“P4 in the kernel”XDP2 is on GitHub:xdp2-dev/xdp2 POC of P4C and backend compilers xdp2-dev/p4c:Early development Seeking collaborators for“P4 in the kernel”Couple 100 LOC in kernel Everything else compilers outside of kernelFuturesThank you!