From patchwork Wed Sep 20 16:48:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Bhansali X-Patchwork-Id: 131751 X-Patchwork-Delegate: jerinj@marvell.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 9D9F3425F3; Wed, 20 Sep 2023 18:48:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F216D40ED2; Wed, 20 Sep 2023 18:48:31 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 37A724029C; Wed, 20 Sep 2023 18:48:30 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38K9Ghuq017236; Wed, 20 Sep 2023 09:48:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=5+uCDw23gJjGcj3/uyjsFtM1fSRXmVoAokuwjLotdd8=; b=g0f1Z9Mo1GNY4K2IEW0xIndqLY8q7sruGfod/+QH+lc6+pw7IDrep0vlhMON6pNFJOcy OUxSkg0vwpu93xyZE81sYxtAJXH+QkYEcDzUm5HMbUS04cC3QNhIinKzM4U77RnVOQjE +NFwhtl14DLWijxXKIuTBcv/Gfhg7mo4YRHE1luUZ7kVQji5RCnizSEIAFhE382c0W0S f1jyGh2btjDRn+eVY6R2dr16ttRbjocw9RWbg0JxfFDmSg30LSO7o7akYqU/wxcEaZZp egCeGve0CZhCrPNDN9HtWB0FvoiABKPaCfUuuxeNaupUUpXq6V1VVce/cRYV16i564XN dQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t7u4dan4x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 09:48:29 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 20 Sep 2023 09:48:27 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 20 Sep 2023 09:48:27 -0700 Received: from localhost.localdomain (unknown [10.28.36.158]) by maili.marvell.com (Postfix) with ESMTP id 996A35B6926; Wed, 20 Sep 2023 09:48:25 -0700 (PDT) From: Rahul Bhansali To: , Naga Harish K S V , "Jerin Jacob" , Ganapati Kundapura CC: Rahul Bhansali , Subject: [PATCH v3] eventdev/eth_rx: fix timestamp field register in mbuf Date: Wed, 20 Sep 2023 22:18:22 +0530 Message-ID: <20230920164823.1164930-1-rbhansali@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230918082553.704859-1-rbhansali@marvell.com> References: <20230918082553.704859-1-rbhansali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: L5m4lMQUnyTqS418LosWQQ4k_Dw-kNAL X-Proofpoint-GUID: L5m4lMQUnyTqS418LosWQQ4k_Dw-kNAL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-20_06,2023-09-20_01,2023-05-22_02 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 For eventdev internal port, timestamp dynamic field registration in mbuf is not required as that will be done from net device. For SW eventdev, Rx timestamp field registration will be done during Rxa service initialization. Fixes: 83ab470d1259 ("eventdev/eth_rx: use timestamp as dynamic mbuf field") Cc: stable@dpdk.org Signed-off-by: Rahul Bhansali Acked-by: Naga Harish K S V --- v3 changes: - timestamp register move before other Rxa init config. v2 changes: - addresses the review comment to have registration in rxa_init_service() lib/eventdev/rte_event_eth_rx_adapter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.25.1 diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c index 3ebfa5366d..8df92247fa 100644 --- a/lib/eventdev/rte_event_eth_rx_adapter.c +++ b/lib/eventdev/rte_event_eth_rx_adapter.c @@ -1910,6 +1910,13 @@ rxa_init_service(struct event_eth_rx_adapter *rx_adapter, uint8_t id) if (rx_adapter->service_inited) return 0; + if (rte_mbuf_dyn_rx_timestamp_register( + &event_eth_rx_timestamp_dynfield_offset, + &event_eth_rx_timestamp_dynflag) != 0) { + RTE_EDEV_LOG_ERR("Error registering timestamp field in mbuf\n"); + return -rte_errno; + } + memset(&service, 0, sizeof(service)); snprintf(service.name, ETH_RX_ADAPTER_SERVICE_NAME_LEN, "rte_event_eth_rx_adapter_%d", id); @@ -2472,13 +2479,6 @@ rxa_create(uint8_t id, uint8_t dev_id, if (conf_cb == rxa_default_conf_cb) rx_adapter->default_cb_arg = 1; - if (rte_mbuf_dyn_rx_timestamp_register( - &event_eth_rx_timestamp_dynfield_offset, - &event_eth_rx_timestamp_dynflag) != 0) { - RTE_EDEV_LOG_ERR("Error registering timestamp field in mbuf\n"); - return -rte_errno; - } - rte_eventdev_trace_eth_rx_adapter_create(id, dev_id, conf_cb, conf_arg); return 0;