DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix mbuf flags for PTP packets
@ 2021-01-28  3:53 Kalesh A P
  2021-01-29  2:14 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Kalesh A P @ 2021-01-28  3:53 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Commit "899f06130724" broke the update of mbuf flags for PTP packets.
"mbuf->ol_flags" is overwritten in bnxt_set_ol_flags() function.

Fixes: 899f06130724 ("net/bnxt: add Rx logic for 58818 chips")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 969cae1..9fc03ae 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -589,6 +589,12 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
 		ol_flags |= PKT_RX_RSS_HASH;
 	}
 
+#ifdef RTE_LIBRTE_IEEE1588
+	if (unlikely((flags_type & RX_PKT_CMPL_FLAGS_MASK) ==
+		     RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP))
+		ol_flags |= PKT_RX_IEEE1588_PTP | PKT_RX_IEEE1588_TMST;
+#endif
+
 	mbuf->ol_flags = ol_flags;
 }
 
@@ -842,10 +848,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 #ifdef RTE_LIBRTE_IEEE1588
 	if (unlikely((rte_le_to_cpu_16(rxcmp->flags_type) &
 		      RX_PKT_CMPL_FLAGS_MASK) ==
-		      RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP)) {
-		mbuf->ol_flags |= PKT_RX_IEEE1588_PTP | PKT_RX_IEEE1588_TMST;
+		     RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP))
 		bnxt_get_rx_ts_p5(rxq->bp, rxcmp1->reorder);
-	}
 #endif
 
 	if (cmp_type == CMPL_BASE_TYPE_RX_L2_V2) {
-- 
2.10.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: fix mbuf flags for PTP packets
  2021-01-28  3:53 [dpdk-dev] [PATCH] net/bnxt: fix mbuf flags for PTP packets Kalesh A P
@ 2021-01-29  2:14 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2021-01-29  2:14 UTC (permalink / raw)
  To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit

[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]

On Wed, Jan 27, 2021 at 7:30 PM Kalesh A P
<kalesh-anakkur.purayil@broadcom.com> wrote:
>
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> Commit "899f06130724" broke the update of mbuf flags for PTP packets.
> "mbuf->ol_flags" is overwritten in bnxt_set_ol_flags() function.
>
> Fixes: 899f06130724 ("net/bnxt: add Rx logic for 58818 chips")
>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Patch applied to dpdk-next-net-brcm/for-next-net. Thanks

> ---
>  drivers/net/bnxt/bnxt_rxr.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index 969cae1..9fc03ae 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -589,6 +589,12 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
>                 ol_flags |= PKT_RX_RSS_HASH;
>         }
>
> +#ifdef RTE_LIBRTE_IEEE1588
> +       if (unlikely((flags_type & RX_PKT_CMPL_FLAGS_MASK) ==
> +                    RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP))
> +               ol_flags |= PKT_RX_IEEE1588_PTP | PKT_RX_IEEE1588_TMST;
> +#endif
> +
>         mbuf->ol_flags = ol_flags;
>  }
>
> @@ -842,10 +848,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
>  #ifdef RTE_LIBRTE_IEEE1588
>         if (unlikely((rte_le_to_cpu_16(rxcmp->flags_type) &
>                       RX_PKT_CMPL_FLAGS_MASK) ==
> -                     RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP)) {
> -               mbuf->ol_flags |= PKT_RX_IEEE1588_PTP | PKT_RX_IEEE1588_TMST;
> +                    RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP))
>                 bnxt_get_rx_ts_p5(rxq->bp, rxcmp1->reorder);
> -       }
>  #endif
>
>         if (cmp_type == CMPL_BASE_TYPE_RX_L2_V2) {
> --
> 2.10.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-29  2:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28  3:53 [dpdk-dev] [PATCH] net/bnxt: fix mbuf flags for PTP packets Kalesh A P
2021-01-29  2:14 ` Ajit Khaparde

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git