Commit Graph

6 Commits

Author SHA1 Message Date
Ghanan Gowripalan bdf4e41c86 Always parse Transport headers
..including ICMP headers before delivering them to the
TransportDispatcher.

Updates #3810.

PiperOrigin-RevId: 404404002
2021-10-19 17:25:55 -07:00
Ting-Yu Wang 84f04cc858 Migrate PacketBuffer to use pkg/buffer
Benchmark iperf3:
                    Before      After
native->runsc       5.14        5.01    (Gbps)
runsc->native       4.15        4.07    (Gbps)

It did introduce overhead, mainly at the bridge between pkg/buffer and
VectorisedView, the ExtractVV method. Once endpoints start migrating away from
VV, this overhead will be gone.

Updates #2404

PiperOrigin-RevId: 373651666
2021-05-13 13:56:16 -07:00
Ting-Yu Wang 1cd76d958a Make dedicated methods for data operations in PacketBuffer
One of the preparation to decouple underlying buffer implementation.
There are still some methods that tie to VectorisedView, and they will be
changed gradually in later CLs.

This CL also introduce a new ICMPv6ChecksumParams to replace long list of
parameters when calling ICMPv6Checksum, aiming to be more descriptive.

PiperOrigin-RevId: 360778149
2021-03-03 16:05:16 -08:00
Toshi Kikuchi 758e45618f Clean up fragmentation.Process
- Pass a PacketBuffer directly instead of releaseCB
- No longer pass a VectorisedView, which is included in the PacketBuffer
- Make it an error if data size is not equal to (last - first + 1)
- Set the callback for the reassembly timeout on NewFragmentation

PiperOrigin-RevId: 342702432
2020-11-16 13:06:38 -08:00
Kevin Krakauer 3ef549b67f Set transport protocol number during parsing
PiperOrigin-RevId: 334535896
2020-09-29 23:21:46 -07:00
Ghanan Gowripalan 360006d894 Use common parsing utilities when sniffing
Extract parsing utilities so they can be used by the sniffer.

Fixes #3930

PiperOrigin-RevId: 332401880
2020-09-18 00:48:09 -07:00