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 A305AA0547; Thu, 29 Apr 2021 11:19:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8372E41194; Thu, 29 Apr 2021 11:19:00 +0200 (CEST) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id AE67841125 for ; Thu, 29 Apr 2021 11:18:59 +0200 (CEST) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FW8xJ4HkRzPvJk for ; Thu, 29 Apr 2021 17:15:48 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Thu, 29 Apr 2021 17:18:54 +0800 From: "Min Hu (Connor)" To: CC: Date: Thu, 29 Apr 2021 17:19:03 +0800 Message-ID: <1619687943-50507-1-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] net/hns3: fix IEEE 1588 PTP 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" When jumbo frame is enabled, Rx function will choose 'Scalar Scattered' function which has no PTP handling. This patche fixed it by add PTP handling in 'Scalar Scattered' function. Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP") Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 3881a72..5b22c6c 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2654,6 +2654,9 @@ hns3_recv_scattered_pkts(void *rx_queue, continue; } + if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B))) + hns3_rx_ptp_timestamp_handle(rxq, first_seg, rxdp); + /* * The last buffer of the received packet. packet len from * buffer description may contains CRC len, packet len should @@ -2704,6 +2707,9 @@ hns3_recv_scattered_pkts(void *rx_queue, first_seg->packet_type = hns3_rx_calc_ptype(rxq, l234_info, ol_info); + if (first_seg->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC) + rxm->ol_flags |= PKT_RX_IEEE1588_PTP; + hns3_rxd_to_vlan_tci(rxq, first_seg, l234_info, &rxd); /* Increment bytes counter */ -- 2.7.4