Testing QUIC with packetdrill Vidhi Goel , Rui Paulo, Christoph - - PowerPoint PPT Presentation

testing quic with packetdrill
SMART_READER_LITE
LIVE PREVIEW

Testing QUIC with packetdrill Vidhi Goel , Rui Paulo, Christoph - - PowerPoint PPT Presentation

Testing QUIC with packetdrill Vidhi Goel , Rui Paulo, Christoph Paasch Apple Inc SIGCOMM EPIQ August 14 2020 Is QUIC ready to ship? Unit testing Inter-op testing between ~20 implementations Performance sanity of HTTP/3 vs HTTP/2


slide-1
SLIDE 1

SIGCOMM EPIQ

August 14 2020

Testing QUIC with packetdrill

Vidhi Goel, Rui Paulo, Christoph Paasch

Apple Inc

slide-2
SLIDE 2

Is QUIC ready to ship?

  • Unit testing
  • Inter-op testing between ~20 implementations
  • Performance sanity of HTTP/3 vs HTTP/2
  • Initial deployment for experimentation
  • Is the industry ready?
slide-3
SLIDE 3

Transport protocols are complex

  • Header and packet protection
  • Authenticated handshake
  • Multiple streams within a connection
  • Large set of transport parameters and frames
  • Built-in mobility; and more …

Connection lifecycle Flow Control Loss Recovery Congestion Control

QUIC is even harder

slide-4
SLIDE 4

Testing Methods

  • Interoperability / Performance testing
  • Protocol fuzzing
  • Failure testing
  • Conformance testing
  • Longevity / Stress testing
  • Reproducible integration testing
slide-5
SLIDE 5

Reproducible & precise Integration testing

send

Transport protocol stack

pkt time T time (T + X) pkt ack

slide-6
SLIDE 6

packetdrill

  • Scripting tool developed by Google
  • Specify a set of events with timestamps
  • system calls, packets, shell commands, python script
  • Write precise, reproducible and automated scripts
  • Easy integration of new protocol options
slide-7
SLIDE 7

packetdrill for QUIC

Socket API UDP / IP Local Interface

packetdrill

read Initial inject Initial

QUIC library

quic_connect()

TLS library

slide-8
SLIDE 8

Example script for QUIC handshake

+0 quic_create (…, IPPROTO_QUIC) = 3 +0 quic_connect (3, …, …) = 0

QUIC library packetdrill

+0 > quic (initial, dcid=0x1, pn=0 [,…]) +0 < quic (handshake, dcid=0x02, pn = 0 [,…]) +0 < quic (handshake, dcid=0x02, pn = 1 [,…]) +0 > quic (application, dcid=0x1, pn=0) +0.1 < quic (initial, dcid=0x2, pn=0 [,…]) +0 > quic (handshake, dcid=0x1, pn=0 [,…])

slide-9
SLIDE 9

Integrating QUIC into packetdrill

QUIC packet grammar TLS handshake Packet parsing and verification Packet injection

slide-10
SLIDE 10

QUIC packet grammar

packet packet_prefix QUIC ( q_header ): q_frame_list q_header q_packet_type, header_field1=<value> [,…] q_frame_list q_frame [; q_frame[…]] q_frame q_frame_type [field1=<value> [,…]]

slide-11
SLIDE 11

QUIC packet examples

// Client Initial packet

+0 > quic (initial, dcid=0x1, scid=0x2, pn=0): CRYPTO[offset=0, length=512]; PADDING[length=640]

// Injected server initial, transport params are specified in CRYPTO frame

+0.1 < quic (initial, dcid=0x2, scid=0x1, pn=0): CRYPTO[offset=0, length=122, initial_max_stream_data_bidi_remote=5000]; ACK[largest=0, delay=10, range_count=0, range0=0]

slide-12
SLIDE 12

TLS handshake

Packet Protection TLS library Handshake Module QUIC library Local Interface

quic_connect( )

👌 👌 👌

slide-13
SLIDE 13

Packet parsing and verification

Packet Parser Verifier Local Interface

PADDING CRYPTO

Packet Protection QUIC library

=

+0 > quic (initial … )

Script packet QUIC library packet

dcid, scid, packet number

slide-14
SLIDE 14

Packet injection

Local Interface Packet Protection QUIC library Packet mapping Wait for specified time

Script packet QUIC library packet

+0 < quic (initial … )

slide-15
SLIDE 15

QUIC test scripts

  • Over 50 scripts and growing
  • Scripts for handshake, flow control, streams, loss recovery,

congestion control, PMTU discovery…

  • Continuous integration and automation testing
  • Use during development, regression testing & troubleshooting
slide-16
SLIDE 16

Adopting a second QUIC library

Send / receive abstraction

Socket API UDP / IP Local Interface

packetdrill

read Initial inject Initial

QUIC library

QUICHE library quiche_connect() TLS library Timer

slide-17
SLIDE 17

Experience with QUICHE

  • Easy to integrate, less than 300 lines of source code
  • Reuse same test scripts for a different library
  • Found issues and worked with Cloudflare to fix them
slide-18
SLIDE 18
  • Multiple draft versions

Continue to add support for newer draft

Specify ALPN through QUIC library API to set client version

Challenges

  • CPU time for TLS handshake may be variable

Variance introduces instability in test results

Use tolerance and time intervals

  • Script MUST start with QUIC handshake

QUIC handshake is lengthy to write - can create inconsistencies Include a handshake template

slide-19
SLIDE 19

Conclusion

  • Packetdrill provides us an opportunity to test the

complex protocol state machines.

  • Reuse code & scripts for any QUIC library
  • Testing QUIC with packetdrill will help us achieve

higher quality for our QUIC implementations

slide-20
SLIDE 20

Thank You!

Any questions ?