[PATCH] net/iavf: fix checksum offloading
Eelco Chaudron
echaudro at redhat.com
Mon Aug 21 10:03:11 CEST 2023
On 18 Aug 2023, at 11:03, David Marchand wrote:
> 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.
> Check that RTE_MBUF_F_TX_IP_CKSUM or others flags have been set.
>
> Fixes: 1e728b01120c ("net/iavf: rework Tx path")
> Cc: stable at dpdk.org
Thanks for fixing this David! I tested and reviewed this change and it works now.
Tested-by: Eelco Chaudron <echaudro at redhat.com>
Acked-by: Eelco Chaudron <echaudro at redhat.com>
> Signed-off-by: David Marchand <david.marchand at 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
More information about the stable
mailing list