Re: [Patch net] mlx5: fixup checksum for ethernet padding
From: Cong Wang <hidden>
Date: 2018-11-28 10:23:33
From: Cong Wang <hidden>
Date: 2018-11-28 10:23:33
On Tue, Nov 27, 2018 at 3:21 PM Cong Wang [off-list ref] wrote:
+ if (proto == htons(ETH_P_IP)) {
+ struct iphdr *ipv4 = ip_p;
+
+ pad_offset = network_depth + be16_to_cpu(ipv4->tot_len);
+ } else if (proto == htons(ETH_P_IPV6)) {
+ struct ipv6hdr *ipv6 = ip_p;
+
+ pad_offset = network_depth + sizeof(struct ipv6hdr) +
+ be16_to_cpu(ipv6->payload_len);
+ }
+Should return here for other protocols... Will fix this in v2.