[EXT] [RFC] lib: set/get max memzone segments
Ophir Munk
ophirmu at nvidia.com
Mon Apr 24 23:07:45 CEST 2023
Thank you Devendra Singh Rawat for your valuable comments.
> >+int ecore_mz_mapping_alloc(void)
> >+{
> >+ ecore_mz_mapping = rte_malloc("ecore_mz_map", 0,
> >+ rte_memzone_max_get() * sizeof(struct rte_memzone *));
>
> Second parameter of rte_malloc() should be size and Third parameter should
> be alignment 0 in this case.
>
> Check
> https://doc.dpdk.org/api/rte__malloc_8h.html#a247c99e8d36300c52729c9e
> e58c2b489
Ack
> >--- a/drivers/net/qede/qede_main.c
> >+++ b/drivers/net/qede/qede_main.c
> >@@ -78,6 +78,12 @@ qed_probe(struct ecore_dev *edev, struct
> >rte_pci_device *pci_dev,
> > return rc;
> > }
> >
> >+ rc = ecore_mz_mapping_alloc();
>
> ecore_mz_mapping_alloc() should be called prior to calling
> ecore_hw_prepare().
>
Ack
> >
> >@@ -721,6 +727,7 @@ static void qed_remove(struct ecore_dev *edev)
> > if (!edev)
> > return;
> >
> >+ ecore_mz_mapping_free();
> > ecore_hw_remove(edev);
> > }
>
> ecore_mz_mapping_free() should be called after ecore_hw_remove();
Ack
More information about the dev
mailing list