> -----Original Message-----
> From: David Marchand <david.march...@redhat.com>
> Sent: Friday, August 18, 2023 5:04 PM
> To: dev@dpdk.org
> Cc: echau...@redhat.com; m...@redhat.com; sta...@dpdk.org; Wu, Jingjing
> <jingjing...@intel.com>; Xing, Beilei <beilei.x...@intel.com>; Doherty, Declan
> <declan.dohe...@intel.com>; Sinha, Abhijit <abhijit.si...@intel.com>; Nicolau,
> Radu <radu.nico...@intel.com>
> Subject: [PATCH] net/iavf: fix checksum offloading
> 
> The only presence of RTE_MBUF_F_TX_IPV4 can't be used as an indicator that
> a checksum offload has been requested by an application.

According to current implementation, actually the only presence of 
RTE_MBUF_F_TX_IPV4 will cause IIPT = 10b, this scenario corresponds to an 'IPv4 
packet with no IP checksum offload,' according to datasheet.
So, I assume in this situation, the PMD  continues to operate under the 
assumption that the application has not requested checksum offloading.

Could you share more insight what is the failure,  maybe we can perform a more 
comprehensive investigation?

Thanks
Qi



> Check that RTE_MBUF_F_TX_IP_CKSUM or others flags have been set. 
> 
> Fixes: 1e728b01120c ("net/iavf: rework Tx path")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: David Marchand <david.march...@redhat.com>
> ---
>  drivers/net/iavf/iavf_rxtx.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index
> f7df4665d1..b9e2879764 100644
> --- a/drivers/net/iavf/iavf_rxtx.c
> +++ b/drivers/net/iavf/iavf_rxtx.c
> @@ -2652,6 +2652,9 @@ iavf_build_data_desc_cmd_offset_fields(volatile
> uint64_t *qw1,
>               offset |= (m->l2_len >> 1)
>                       << IAVF_TX_DESC_LENGTH_MACLEN_SHIFT;
> 
> +     if ((m->ol_flags & IAVF_TX_CKSUM_OFFLOAD_MASK) == 0)
> +             goto skip_cksum;
> +
>       /* Enable L3 checksum offloading inner */
>       if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
>               if (m->ol_flags & RTE_MBUF_F_TX_IPV4) { @@ -2702,6
> +2705,7 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
>               break;
>       }
> 
> +skip_cksum:
>       *qw1 = rte_cpu_to_le_64((((uint64_t)command <<
>               IAVF_TXD_DATA_QW1_CMD_SHIFT) &
> IAVF_TXD_DATA_QW1_CMD_MASK) |
>               (((uint64_t)offset << IAVF_TXD_DATA_QW1_OFFSET_SHIFT) &
> --
> 2.41.0

Reply via email to