Fix some configurations of avf checksum offload to get the correct
udp and tcp checksum. Change Tx checksum offload capability since
avf supports ipv4, tcp and udp offload all. Remove the operation to
swap bit of checksum.
Type: fix
Signed-off-by: Ting Xu <[email protected]>
Change-Id: I55a916cc9ee6bef5b2074b5b6bb5f517fc2c178d
(cherry picked from commit
26d841870f5ad5d14883ec1b69c381f4b73cb279)
/* set hw interface caps */
vnet_hw_if_set_caps (vnm, ad->hw_if_index,
VNET_HW_IF_CAP_INT_MODE | VNET_HW_IF_CAP_MAC_FILTER |
- VNET_HW_IF_CAP_L4_TX_CKSUM | VNET_HW_IF_CAP_TCP_GSO);
+ VNET_HW_IF_CAP_TX_CKSUM | VNET_HW_IF_CAP_TCP_GSO);
for (i = 0; i < ad->n_rx_queues; i++)
{
sum = ~clib_ip_csum ((u8 *) &psh, sizeof (psh));
}
- /* ip_csum does a byte swap for some reason... */
- sum = clib_net_to_host_u16 (sum);
if (is_tcp)
tcp->checksum = sum;
else