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 0814242A90; Mon, 8 May 2023 04:58:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8483140DDC; Mon, 8 May 2023 04:58:28 +0200 (CEST) Received: from smtp.tom.com (smtprz25.163.net [106.38.219.110]) by mails.dpdk.org (Postfix) with ESMTP id A160D40A84 for ; Mon, 8 May 2023 04:58:27 +0200 (CEST) Received: from my-app02.tom.com (my-app02.tom.com [127.0.0.1]) by freemail02.tom.com (Postfix) with ESMTP id 96417B00D33 for ; Mon, 8 May 2023 10:58:26 +0800 (CST) Received: from my-app02.tom.com (HELO smtp.tom.com) ([127.0.0.1]) by my-app02 (TOM SMTP Server) with SMTP ID 1338097646 for ; Mon, 08 May 2023 10:58:26 +0800 (CST) Received: from antispam1.tom.com (unknown [172.25.16.55]) by freemail02.tom.com (Postfix) with ESMTP id 88680B00CBF for ; Mon, 8 May 2023 10:58:26 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=201807; t=1683514706; bh=4SaiGmBDHpFgyahQccV1/mOvR7w0AA/RvNSWa5dJkFQ=; h=From:To:Cc:Subject:Date:From; b=Gl/JRsVJE/9DIAD8wcl98FKdO162dLgRflanovfJyS1zgS9fgdkVxJyogfzTVwIT1 xaEkUCS+2+S1FJz6u1o7lGVu4QAQ+ehdyBmIti7WqIuD9M4SfGwE5MYaiRews5eSb1 gqfRS+3Mp6xAKWoBuJ5L0DrHVXlftOlhJSgeD1S0= Received: from antispam1.tom.com (antispam1.tom.com [127.0.0.1]) by antispam1.tom.com (Postfix) with ESMTP id 62002D416D0 for ; Mon, 8 May 2023 10:58:26 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at antispam1.tom.com Received: from antispam1.tom.com ([127.0.0.1]) by antispam1.tom.com (antispam1.tom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vXrLEV__1PGx for ; Mon, 8 May 2023 10:58:25 +0800 (CST) Received: from localhost.localdomain (unknown [113.87.163.63]) by antispam1.tom.com (Postfix) with ESMTPA id DD120D4166A; Mon, 8 May 2023 10:58:24 +0800 (CST) From: Tianli Lai To: dev@dpdk.org Cc: Hemant Agrawal , Sachin Saxena Subject: [PATCH] net/dpaa2: set check sum good flags Date: Mon, 8 May 2023 18:57:25 +0800 Message-Id: <20230508105725.4559-1-laitianli@tom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 set check sum good flags when dpaa2 hardware set check result. Signed-off-by: Tianli Lai --- drivers/net/dpaa2/dpaa2_rxtx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index f60e78e1fd..85910bbd8f 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -198,8 +198,12 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf, if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE)) mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD; - else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE)) + else + mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; + if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE)) mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; + else + mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_FIRST_FRAGMENT | L3_IP_1_MORE_FRAGMENT | @@ -241,8 +245,12 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr) if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE)) mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD; - else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE)) + else + mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; + if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE)) mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; + else + mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; if (dpaa2_enable_ts[mbuf->port]) { *dpaa2_timestamp_dynfield(mbuf) = annotation->word2; -- 2.27.0