[v2,17/17] event/cnxk: handle inbound out of place processing
Checks
Commit Message
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
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 <rkudurumalla@marvell.com>
---
drivers/event/cnxk/cn10k_eventdev.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
Comments
On Tue, Oct 1, 2024 at 11:33 AM Nithin Dabilpuram
<ndabilpuram@marvell.com> wrote:
>
> From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>
> 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 <rkudurumalla@marvell.com>
Updated the git commit with fixes, applied the following change and
applied series to dpdk-next-net-mrvl/for-main. Thanks
[for-main]dell[dpdk-next-net-mrvl] $ git diff
diff --git a/drivers/net/cnxk/rte_pmd_cnxk.h b/drivers/net/cnxk/rte_pmd_cnxk.h
index a20b4f277d..b186b529fa 100644
--- a/drivers/net/cnxk/rte_pmd_cnxk.h
+++ b/drivers/net/cnxk/rte_pmd_cnxk.h
@@ -56,7 +56,7 @@ enum rte_pmd_cnxk_cpt_q_stats_type {
*/
RTE_PMD_CNXK_CPT_Q_STATS_KERNEL,
/** Type to get CPT queue which is attached to ethdev statistics */
- RTE_PMD_CNXK_CPT_Q_STATS_ETHDEV = 2,
+ RTE_PMD_CNXK_CPT_Q_STATS_ETHDEV,
};
/** CPT queue hardware statistics */
@@ -617,7 +617,7 @@ union rte_pmd_cnxk_ipsec_hw_sa
*rte_pmd_cnxk_hw_session_base_get(uint16_t portid
* Determines the type of SA to be flushed, Inbound or Outbound.
*
* @return
- * 0 upon success, a negative errno value otherwise.
+ * 0 Upon success, a negative errno value otherwise.
*/
__rte_experimental
int rte_pmd_cnxk_sa_flush(uint16_t portid, union
rte_pmd_cnxk_ipsec_hw_sa *sess, bool inb);
@@ -663,7 +663,7 @@ uint16_t rte_pmd_cnxk_inl_dev_submit(struct
rte_pmd_cnxk_inl_dev_q *qptr, void *
* The index of the queue of a given type.
*
* @return
- * 0 upon success, a negative errno value otherwise.
+ * 0 Upon success, a negative errno value otherwise.
*/
__rte_experimental
int rte_pmd_cnxk_cpt_q_stats_get(uint16_t portid, enum
rte_pmd_cnxk_cpt_q_stats_type type,
[for-main]dell[dpdk-next-net-mrvl] $
@@ -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) {