51f694dd40
The csum forward engine was becoming too complex to be used and extended (the next commits want to add the support of TSO): - no explaination about what the code does - code is not factorized, lots of code duplicated, especially between ipv4/ipv6 - user command line api: use of bitmasks that need to be calculated by the user - the user flags don't have the same semantic: - for legacy IP/UDP/TCP/SCTP, it selects software or hardware checksum - for other (vxlan), it selects between hardware checksum or no checksum - the code relies too much on flags set by the driver without software alternative (ex: PKT_RX_TUNNEL_IPV4_HDR). It is nice to be able to compare a software implementation with the hardware offload. This commit tries to fix these issues, and provide a simple definition of what is done by the forward engine: * Receive a burst of packets, and for supported packet types: * - modify the IPs * - reprocess the checksum in SW or HW, depending on testpmd command line * configuration * Then packets are transmitted on the output port. * * Supported packets are: * Ether / (vlan) / IP|IP6 / UDP|TCP|SCTP . * Ether / (vlan) / IP|IP6 / UDP / VxLAN / Ether / IP|IP6 / UDP|TCP|SCTP * * The network parser supposes that the packet is contiguous, which may * not be the case in real life. Signed-off-by: Olivier Matz <olivier.matz@6wind.com>