From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2F5F43095; Fri, 18 Aug 2023 11:04:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD52640ED9; Fri, 18 Aug 2023 11:04:03 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 589A640395 for ; Fri, 18 Aug 2023 11:04:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692349441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pig7RIbpiOU3kjpi5bVMaCouY4vvybb3C3jQ7u2bGjQ=; b=P39FKGRs6N+r16wo+Asq7lX/t8JS32jdScxF+se2hbQjzggVpaPcbMR5dceV7MS3PEzoUc ai5uei7gbJu4Bjd/jZA+sy9YUrIufXttWnR766ArIfJv6rJmeu4p2iKeyNpDRKpcUT0Lgi 51v/D5fE02G8RjkIiTfy+JcUV0Dt8V0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-253-1V_5uNTwMe2I4xYeFREc5A-1; Fri, 18 Aug 2023 05:03:58 -0400 X-MC-Unique: 1V_5uNTwMe2I4xYeFREc5A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D64B858EED; Fri, 18 Aug 2023 09:03:58 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.226.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6781C621B7; Fri, 18 Aug 2023 09:03:56 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: echaudro@redhat.com, mkp@redhat.com, stable@dpdk.org, Jingjing Wu , Beilei Xing , Declan Doherty , Abhijit Sinha , Radu Nicolau Subject: [PATCH] net/iavf: fix checksum offloading Date: Fri, 18 Aug 2023 11:03:51 +0200 Message-ID: <20230818090351.2402519-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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@dpdk.org Signed-off-by: David Marchand --- 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