diff options
author | Ting Xu <ting.xu@intel.com> | 2023-02-02 02:06:12 +0000 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2023-03-03 13:01:47 +0000 |
commit | 40225dbe1331aa4684375e9b58e059f2f28cb361 (patch) | |
tree | 2c9f431e4192630f9dce019f33394181637833fe /src/plugins | |
parent | 985d12d8c40ba556c2013cd462dd0e0cb1cfad2f (diff) |
avf: fix checksum offload configuration
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 <ting.xu@intel.com>
Change-Id: I55a916cc9ee6bef5b2074b5b6bb5f517fc2c178d
(cherry picked from commit 26d841870f5ad5d14883ec1b69c381f4b73cb279)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/avf/device.c | 2 | ||||
-rw-r--r-- | src/plugins/avf/output.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index b0f6244cdaf..c405d2e31d1 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -1763,7 +1763,7 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args) /* 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++) { diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c index 8cc76a6c47b..116b055d8a0 100644 --- a/src/plugins/avf/output.c +++ b/src/plugins/avf/output.c @@ -123,8 +123,6 @@ avf_tx_prepare_cksum (vlib_buffer_t * b, u8 is_tso) 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 |