Proceedings of NetDev 1.1: The Technical Conference on Linux - - PowerPoint PPT Presentation

proceedings of netdev 1 1 the technical conference on
SMART_READER_LITE
LIVE PREVIEW

Proceedings of NetDev 1.1: The Technical Conference on Linux - - PowerPoint PPT Presentation

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain) Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain) Proceedings of


slide-1
SLIDE 1

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-2
SLIDE 2

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-3
SLIDE 3

parser parse_ethernet { extract(ethernet); return switch(ethernet.ethertype) { 0x8100 : parse_vlan_tag; 0x0800 : parse_ipv4; 0x8847 : parse_mpls; default: ingress; } table port_table { … } control ingress { apply(port_table); if (l2_meta.vlan_tags == 0) { process_assign_vlan(); } } header_type ethernet_t { … } header_type l2_metadata_t { … } header ethernet_t ethernet; header vlan_tag_t vlan_tag[2]; metadata l2_metadata_t l2_meta;

Data Declarations Parser Program Control Flow Program

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-4
SLIDE 4

header_type ingress_metadata_t { fields { /* Inputs */ ingress_port : 9; /* Available prior to parsing */ packet_length : 16; /* Might not be always available */ instance_type : 2; /* Normal, clone, recirculated */ ingress_global_tstamp : 48; parser_status : 8; /* Parsing Error */ /* Outputs from Ingress Pipeline */ egress_spec : 16; queue_id : 9; } } metadata ingress_metadata_t ingress_metadata;

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-5
SLIDE 5

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-6
SLIDE 6

kernel user

eBPF

map1 map2

API bpf()

skbuff in skbuff out map

  • bjects

P4 code kernel helpers kernel hooks

ifc stats, etc.

module description insns

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-7
SLIDE 7

▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-8
SLIDE 8

– –

  • Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)
slide-9
SLIDE 9

p4toEbpf basic_routing.p4

  • o p4.c

clang::Rewriter => p4.c’ clang -c p4.c’ -o <memory> clang -c p4.c -o <memory> llvm MCJIT => p4.o bpf_prog_load()

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-10
SLIDE 10

routing.p4 (BPF) simple.p4 (BPF)

netdev A netdev B

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-11
SLIDE 11

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)

slide-12
SLIDE 12
  • Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)
slide-13
SLIDE 13

Proceedings of NetDev 1.1: The Technical Conference on Linux Networking (February 10th-12th 2016. Seville, Spain)