net/dpaa2: set check sum good flags

Message ID 20230508105725.4559-1-laitianli@tom.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/dpaa2: set check sum good flags |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Tianli Lai May 8, 2023, 10:57 a.m. UTC
  set check sum good flags when dpaa2 hardware set check result.

Signed-off-by: Tianli Lai <laitianli@tom.com>
---
 drivers/net/dpaa2/dpaa2_rxtx.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
  

Comments

Sachin Saxena (OSS) May 10, 2023, 5:39 a.m. UTC | #1
On 5/8/2023 4:27 PM, Tianli Lai wrote:
> Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
> 
> 
> set check sum good flags when dpaa2 hardware set check result.
> 
> Signed-off-by: Tianli Lai <laitianli@tom.com>
> ---
>   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
> 

Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
  
Sachin Saxena (OSS) May 10, 2023, 5:50 a.m. UTC | #2
On 5/8/2023 4:27 PM, Tianli Lai wrote:
> Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
> 
> 
> set check sum good flags when dpaa2 hardware set check result.
> 
> Signed-off-by: Tianli Lai <laitianli@tom.com>
> ---
>   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
> 

Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
  
Ferruh Yigit May 12, 2023, 11:24 a.m. UTC | #3
On 5/10/2023 6:50 AM, Sachin Saxena (OSS) wrote:
> On 5/8/2023 4:27 PM, Tianli Lai wrote:
>> Caution: This is an external email. Please take care when clicking
>> links or opening attachments. When in doubt, report the message using
>> the 'Report this email' button
>>
>>
>> set check sum good flags when dpaa2 hardware set check result.
>>
>> Signed-off-by: Tianli Lai <laitianli@tom.com>
> 
> Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
> 


    Fixes: d2ef05d5c13e ("net/dpaa2: optimize Rx/Tx path")
    Fixes: 94d31549c380 ("net/dpaa2: support Rx checksum offload in slow
parsing")
    Cc: stable@dpdk.org


Applied to dpdk-next-net/main, thanks.
  

Patch

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;