Skip to content

Commit

Permalink
net/dpaa2: fix checksum good flags
Browse files Browse the repository at this point in the history
[ upstream commit 7d83632b28db9f0b9bd36d974798aa14627f822b ]

Set check sum good flags when dpaa2 hardware set check result.

Fixes: d2ef05d ("net/dpaa2: optimize Rx/Tx path")
Fixes: 94d3154 ("net/dpaa2: support Rx checksum offload in slow parsing")

Signed-off-by: Tianli Lai <laitianli@tom.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
  • Loading branch information
laitianli authored and kevintraynor committed Jul 11, 2023
1 parent aae992c commit f297d86
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/net/dpaa2/dpaa2_rxtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,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 |
Expand Down Expand Up @@ -235,8 +239,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;
Expand Down

0 comments on commit f297d86

Please sign in to comment.