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 3B193425F3 for ; Wed, 20 Sep 2023 18:33:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 346B440691; Wed, 20 Sep 2023 18:33:03 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id E1838402E4; Wed, 20 Sep 2023 18:33:01 +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 38K9Fdjk016029; Wed, 20 Sep 2023 09:33:01 -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=zB6MBhLmpfdHOtroP6OLYm91gADAxQsEVMiyLMuolrY=; b=dJ/WxLAOa/TgqhwJdSUsbjMZbdOTEOOnTom5F1qMRVf2qjmfnH6I5S+vVtGjqTfSRiX0 fQZrqyxd/FaSJ8rVnli4Jd5R7maxpbdK0p54sMGDxOXKK2/Qum/cwOHO8lqEX/+SvA4d tOZd/N+9ohaiXVq10hVSgSmob/K0TNEYwVX4L9y+6OIQHyhxWRZ6iVajHLsMN8+tr9X1 8lE/WYbk0PBnkjVpSZUrw4I4SwPT3kYR6XwFsZH0LEe2xUSGQDG7JKLf38hY3cCW/Bw1 m6HgRP/sv8N1IUf4521g6+gMUSy07Sc8lkqSjqA8/Bjs6thXK1xg20RV8plDsz/C2drs rg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t7u4dak8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 09:33:00 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 20 Sep 2023 09:32:59 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 20 Sep 2023 09:32:59 -0700 Received: from localhost.localdomain (unknown [10.28.36.158]) by maili.marvell.com (Postfix) with ESMTP id 56DA63F7095; Wed, 20 Sep 2023 09:32:57 -0700 (PDT) From: Rahul Bhansali To: , Naga Harish K S V , "Jerin Jacob" , Ganapati Kundapura CC: Rahul Bhansali , Subject: [PATCH v2] eventdev/eth_rx: fix timestamp field register in mbuf Date: Wed, 20 Sep 2023 22:02:51 +0530 Message-ID: <20230920163252.1157519-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: yTwV-eJNOuYYXq-CRmhgVFwCRfu-K-Uv X-Proofpoint-GUID: yTwV-eJNOuYYXq-CRmhgVFwCRfu-K-Uv 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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 --- v2 changes: - addresses the review comment to have registration in rxa_init_service() lib/eventdev/rte_event_eth_rx_adapter.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c index 3ebfa5366d..ddab5a71d7 100644 --- a/lib/eventdev/rte_event_eth_rx_adapter.c +++ b/lib/eventdev/rte_event_eth_rx_adapter.c @@ -1932,6 +1932,14 @@ rxa_init_service(struct event_eth_rx_adapter *rx_adapter, uint8_t id) ret); goto err_done; } + + 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; + } + rx_adapter->event_port_id = rx_adapter_conf.event_port_id; rx_adapter->max_nb_rx = rx_adapter_conf.max_nb_rx; rx_adapter->service_inited = 1; @@ -2472,13 +2480,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; -- 2.25.1