[pcap-ng-format] representing checksum offload in pcapng

Stephen Hemminger stephen at networkplumber.org
Tue Oct 15 19:44:19 UTC 2019


On Tue, 15 Oct 2019 12:27:25 -0700
Guy Harris <guy at alum.mit.edu> wrote:

> On Oct 15, 2019, at 10:02 AM, Stephen Hemminger <stephen at networkplumber.org> wrote:
> 
> > Is there any proposed option for representing checksum offload
> > in an enhanced packet block?  
> 
> There isn't one yet.
> 
> > This matters when packet is truncated by snap length.  
> 
> This also matters when the packet *isn't* truncated by the snapshot length.
> 
> > Maybe something that has ability to indicate good and bad checksum
> > for TCP, UDP, and SCTP.  
> 
> And IP.

Less of a worry, doing IPv4 checksum in SW is trivial and the header is almost
always present.

> 
> > Could even do inner/outer checksums.
> > The default should be that if option is not present, that
> > means no checksum offload information is available and
> > the checksum status is unknown.  
> 
> Should there be an Interface Description Block option to indicate whether the adapter offloads IP/TCP/UDP/SCTP checksums?
> 
> If so, is there a need for a per-EPB option to indicate whether the checksum was offloaded - i.e., does an adapter that does offloading either 1) only do offloading in one direction or 2) not do it for all packets?

That could be there as well, but then you get into GRO, TSO, LRO, tunnels and other offloads.
I was just trying to reach parity with what AF_PACKET provides already.

> If an adapter does offloading, can it be put into a mode where it doesn't drop incoming packets with a bad checksum, but provides them to the host either to indicate the error or to provide the packets to sniffers?  If so, then, yes, a per-packet option to indicate the bad checksums would be useful.

Most adapters defer what to do with bad checksums to the upper layers (OS).


More information about the pcap-ng-format mailing list