mbox series

[v2,0/4] delete HW rings when releasing queues for some drivers

Message ID cover.1631953295.git.wangyunjian@huawei.com (mailing list archive)
Headers show
Series delete HW rings when releasing queues for some drivers | expand

Message

Yunjian Wang Sept. 18, 2021, 8:33 a.m. UTC
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(-)

Comments

David Marchand Sept. 20, 2021, 7:25 a.m. UTC | #1
On Sat, Sep 18, 2021 at 10:34 AM Yunjian Wang <wangyunjian@huawei.com> 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?


- Is this worth backporting to stable branches?
Wang, Haiyue Sept. 21, 2021, 9:21 a.m. UTC | #2
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Monday, September 20, 2021 15:25
> To: Yunjian Wang <wangyunjian@huawei.com>; Wang, Haiyue <haiyue.wang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Cc: dev <dev@dpdk.org>; Xing, Beilei <beilei.xing@intel.com>; Yang, Qiming <qiming.yang@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>; dingxiaoxiong@huawei.com; Renata Saiakhova
> <Renata.Saiakhova@ekinops.com>
> 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 <wangyunjian@huawei.com> 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