K 10 svn:author V 2 mw K 8 svn:date V 27 2022-02-24T13:05:32.516735Z K 7 svn:log V 1097 ena: properly handle IPv6 L4 checksum offload ena_tx_csum function did not check if IPv6 checksum offload was requested it only checked checksum offloading flags for IPv4 packets. Because of that, when encountering CSUM_IP6_* flags, the function simply returned without actually setting checksum offloading in ena_ctx. Check CUSM_IP6_* flags to enable IPv6 checksum offload. Additionally, only IPv4 header was being parsed regardless of EtherType field, because of that, value of L4 protocol read when actually trying to send IPv6 packets was wrong. Use ip6_lasthdr function to get length of all IPv6 headers and payload protocol. Set the DF flag to 1 in order to allow the device to offload the IPv6 checksum calculation and achieve optimal performance. Add CSUM6_OFFLOAD and CSUM_OFFLOAD definitions into ena_datapath.h. Submitted by: Dawid Gorecki Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 2bbef9d95dc10a69a3c5813a517f6e8fe583539a) Git Hash: 126a30da9cfffb5c8df029297a0219bf56b6fb53 Git Author: dgr@semihalf.com END