From patchwork Thu Jan 28 03:53:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh A P X-Patchwork-Id: 87455 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 345CBA09E4; Thu, 28 Jan 2021 04:30:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A90C41410B3; Thu, 28 Jan 2021 04:30:53 +0100 (CET) Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.232.172]) by mails.dpdk.org (Postfix) with ESMTP id F39561410B2 for ; Thu, 28 Jan 2021 04:30:52 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 66AF580F8; Wed, 27 Jan 2021 19:30:51 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 66AF580F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1611804652; bh=fG5xaJ5xckX1bhkFGRAuYKp20cQb44ueHG1Bee2JD90=; h=From:To:Cc:Subject:Date:From; b=OEW3olrmtMT3syhVgiDUHar0HJgw6yqejY61N4HZXgp9KCjhOGaP9XtRb1hYBo7TX rC827bZtHTKhIpnauBpHQCp6Gfl4Vf6yv7vQXjxkYahaNxuut/2lje8yHtDoGOpXFF N0z0VVp75zfj8VmdgGDfNDIffHRfQV0u5dmCRsBE= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Thu, 28 Jan 2021 09:23:30 +0530 Message-Id: <20210128035330.27049-1-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 Subject: [dpdk-dev] [PATCH] net/bnxt: fix mbuf flags for PTP packets 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 Sender: "dev" From: Kalesh AP 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 Reviewed-by: Ajit Kumar Khaparde --- 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) {