> -----Original Message-----
> From: David Marchand <[email protected]>
> Sent: Monday, September 20, 2021 15:25
> To: Yunjian Wang <[email protected]>; Wang, Haiyue
> <[email protected]>; Yigit, Ferruh
> <[email protected]>
> Cc: dev <[email protected]>; Xing, Beilei <[email protected]>; Yang, Qiming
> <[email protected]>;
> Zhang, Qi Z <[email protected]>; [email protected]; Renata Saiakhova
> <[email protected]>
> Subject: Re: [dpdk-dev] [PATCH v2 0/4] delete HW rings when releasing queues
> for some drivers
>
> On Sat, Sep 18, 2021 at 10:34 AM Yunjian Wang <[email protected]> wrote:
> >
> > This series for deleting HW rings when releasing queues for
> > igb, ixgbe, i40e, ice & em drivers.
> >
> > ---
> > v2:
> > * Update commit log
> >
> > Yunjian Wang (4):
> > net/e1000: delete HW rings when releasing queues
> > net/ice: delete HW rings when releasing queues
> > net/i40e: delete HW rings when releasing queues
> > net/ixgbe: delete HW rings when releasing queues
> >
> > drivers/net/e1000/em_rxtx.c | 8 ++++++--
> > drivers/net/e1000/igb_rxtx.c | 9 +++++++--
> > drivers/net/i40e/i40e_fdir.c | 3 ---
> > drivers/net/i40e/i40e_rxtx.c | 8 ++++++--
> > drivers/net/i40e/i40e_rxtx.h | 2 ++
> > drivers/net/ice/ice_rxtx.c | 6 ++++--
> > drivers/net/ice/ice_rxtx.h | 2 ++
> > drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++++--
> > drivers/net/ixgbe/ixgbe_rxtx.h | 2 ++
> > 9 files changed, 33 insertions(+), 13 deletions(-)
> >
>
> - In net/ice (at least), the fdir rxq/txq memzones can be aligned on
> the same scheme.
> Looking at the remaining drivers (net/cnxk, net/cxgbe and
> net/octeontx2), we could apply the same principle of keeping a
> reference to mz in internal driver structures.
> Afterwards, I see no need to keep rte_eth_dma_zone_free() (it's
> internal, so we can remove and it's easy to re-add if a need arises).
>
> Wdyt?
Yes, this makes dma_zone management clean. And good for hotplug design.
Then the function 'rte_eth_dma_zone_reserve' can also be simplified, no
need to lookup and check, just call 'rte_memzone_reserve_aligned' directly ?
mz = rte_memzone_lookup(z_name);
if (mz) {
if ((socket_id != SOCKET_ID_ANY && socket_id != mz->socket_id)
||
size > mz->len ||
((uintptr_t)mz->addr & (align - 1)) != 0) {
RTE_ETHDEV_LOG(ERR,
"memzone %s does not justify the requested
attributes\n",
mz->name);
return NULL;
}
return mz;
}
>
>
> - Is this worth backporting to stable branches?
>
+1
>
> --
> David Marchand