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 AC27D45A74; Tue, 1 Oct 2024 08:03:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F7DC40E17; Tue, 1 Oct 2024 08:01:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 922C540E17 for ; Tue, 1 Oct 2024 08:01:57 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49102pvQ023192 for ; Mon, 30 Sep 2024 23:01:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=0 15ex7vDnADA8dFNbUQz1HgtNQadWeQtd813lGPNiZQ=; b=E942SRlg4aexCjz8L /sovyekMmrd1Rk7N9BDrgiRqeTvMUghiKyEmzgT5QZtT8AND9jIye41ZIoTA/oAd m6r6yP1hVXTumuj00Xg8ugR1qg+I4CdsTiIBmhu+kS1qQEKR+o64N2PPBBrehdTc +TJcUKHH84C3vMlKTV9EX8LZxid9RRPOuZdU7sTCY1zWM3/SrhTYWXIkg8MZFqLk fOmPyfFPi+Fj/grA3J2GlPhPynWnyL/VCRSsinjA0npWm5d6ixcm/FIa2vbeTyST Osy5cl9TJrku99dPWrxcokakBtszTv4aa0p4/hc8v2zqgODIDL8XiPxFG2Lq9gY6 noBJA== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 41yt6gbxrv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Sep 2024 23:01:56 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 30 Sep 2024 23:01:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 30 Sep 2024 23:01:55 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id C3D6C3F7066; Mon, 30 Sep 2024 23:01:52 -0700 (PDT) From: Nithin Dabilpuram To: , Pavan Nikhilesh , "Shijith Thotton" CC: , Rakesh Kudurumalla Subject: [PATCH v2 17/17] event/cnxk: handle inbound out of place processing Date: Tue, 1 Oct 2024 11:30:55 +0530 Message-ID: <20241001060055.3747591-17-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241001060055.3747591-1-ndabilpuram@marvell.com> References: <20241001060055.3747591-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: HJsncMcru9ChEa5n0bf468HykoewjNUA X-Proofpoint-ORIG-GUID: HJsncMcru9ChEa5n0bf468HykoewjNUA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 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 From: Rakesh Kudurumalla update event device with NIX_RX_REAS_F to handle out of place processing for boards that does not support reassembly as cn10k driver process OOP with NIX_RX_REAS_F enabled. Signed-off-by: Rakesh Kudurumalla --- drivers/event/cnxk/cn10k_eventdev.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c index 229d7a03fe..4e2968f91e 100644 --- a/drivers/event/cnxk/cn10k_eventdev.c +++ b/drivers/event/cnxk/cn10k_eventdev.c @@ -826,7 +826,7 @@ cn10k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem) } static void -eventdev_fops_tstamp_update(struct rte_eventdev *event_dev) +eventdev_fops_update(struct rte_eventdev *event_dev) { struct rte_event_fp_ops *fp_op = rte_event_fp_ops + event_dev->data->dev_id; @@ -849,7 +849,20 @@ cn10k_sso_tstamp_hdl_update(uint16_t port_id, uint16_t flags, bool ptp_en) else evdev->tstamp[port_id] = NULL; cn10k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev); - eventdev_fops_tstamp_update(event_dev); + eventdev_fops_update(event_dev); +} + +static void +cn10k_sso_rx_offload_cb(uint16_t port_id, uint64_t flags) +{ + struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + struct cnxk_eth_dev *cnxk_eth_dev = dev->data->dev_private; + struct rte_eventdev *event_dev = cnxk_eth_dev->evdev_priv; + struct cnxk_sso_evdev *evdev = cnxk_sso_pmd_priv(event_dev); + + evdev->rx_offloads |= flags; + cn10k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev); + eventdev_fops_update(event_dev); } static int @@ -1224,6 +1237,7 @@ cn10k_sso_init(struct rte_eventdev *event_dev) return rc; } + cnxk_ethdev_rx_offload_cb_register(cn10k_sso_rx_offload_cb); event_dev->dev_ops = &cn10k_sso_dev_ops; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) { -- 2.34.1