DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xueming(Steven) Li" <xuemingl@nvidia.com>
To: "yisen.zhuang@huawei.com" <yisen.zhuang@huawei.com>,
	"oulijun@huawei.com" <oulijun@huawei.com>,
	"humin29@huawei.com" <humin29@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] Fwd: Re: [PATCH v5 2/2] ethdev: change queue release callback
Date: Wed, 29 Sep 2021 14:04:10 +0000	[thread overview]
Message-ID: <721b688c718b940f402ee200f2dc156430044f43.camel@nvidia.com> (raw)
In-Reply-To: <8e2c2f96265dc17af0564befb3918f1a8ea5154a.camel@nvidia.com>

Cc maillist for history record.

On Thu, 2021-09-23 at 23:34 +0800, Xueming Li wrote:

Hi Min,


On Thu, 2021-09-23 at 17:15 +0800, Min Hu (Connor) wrote:

Hi, Xueming,

        Not only "rte_eth_devices[(hw)->data->port_id]" exist in HNS3 PMD, but

also "rte_eth_devices[rxq->port_id]", so marco which will be

added may be:

        #define HNS3_DEV(port_id) &rte_eth_devices[port_id]

call it like this:

  - hns3_dev_rx_queue_release(&rte_eth_devices[hw->data->port_id], i);

  + hns3_dev_rx_queue_release(HNS3_DEV(hw->data->port_id), i);


But this seems a little wired, what do you think ?


From usage, most of them are hw, some are rxq or txq.

How about rename HNS3_DEV(hw) to HNS3_HW_DEV(hw)?

Later, if needed, add HNS3_Q_DEV(q).




在 2021/9/23 14:22, Xueming(Steven) Li 写道:

Hi HNS3 maintainers,


In my ethdev patch below that changing ethdev queue release API, some

minor changes are expected on HNS3 pmd as well.


Since &rte_eth_devices[hw->data->port_id] is used a lot, A macro is

planned to hide direct rte_eth_devices access, please confirm the

changes below:


In drivers/net/hns3/hns3_ethdev.h:

   #define HNS3_DEV(hw) &rte_eth_devices[(hw)->data->port_id]

Call it like this:

   - hns3_dev_rx_queue_release(&rte_eth_devices[hw->data->port_id], i);

   + hns3_dev_rx_queue_release(HNS3_DEV(hw), i);


There are more directly access to rte_eth_devices in hns3 PMD, you can

changes them later.


Please confirm or suggest if any.


Best Regards,

Xueming Li



-------- Forwarded Message --------

From: Ferruh Yigit <ferruh.yigit@intel.com<mailto:ferruh.yigit@intel.com>>

To: Xueming(Steven) Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>, yisen.zhuang@huawei.com<mailto:yisen.zhuang@huawei.com>

<yisen.zhuang@huawei.com<mailto:yisen.zhuang@huawei.com>>, oulijun@huawei.com<mailto:oulijun@huawei.com> <oulijun@huawei.com<mailto:oulijun@huawei.com>>,

dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>, humin29@huawei.com<mailto:humin29@huawei.com> <humin29@huawei.com<mailto:humin29@huawei.com>>,

spinler@cesnet.cz<mailto:spinler@cesnet.cz> <spinler@cesnet.cz<mailto:spinler@cesnet.cz>>

Cc: zhouguoyang@huawei.com<mailto:zhouguoyang@huawei.com> <zhouguoyang@huawei.com<mailto:zhouguoyang@huawei.com>>,

mczekaj@marvell.com<mailto:mczekaj@marvell.com> <mczekaj@marvell.com<mailto:mczekaj@marvell.com>>, radhac@marvell.com<mailto:radhac@marvell.com>

<radhac@marvell.com<mailto:radhac@marvell.com>>, sthotton@marvell.com<mailto:sthotton@marvell.com> <sthotton@marvell.com<mailto:sthotton@marvell.com>>,

Matan Azrad <matan@nvidia.com<mailto:matan@nvidia.com>>, kirankumark@marvell.com<mailto:kirankumark@marvell.com>

<kirankumark@marvell.com<mailto:kirankumark@marvell.com>>, rmody@marvell.com<mailto:rmody@marvell.com> <rmody@marvell.com<mailto:rmody@marvell.com>>,

beilei.xing@intel.com<mailto:beilei.xing@intel.com> <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>, chenbo.xia@intel.com<mailto:chenbo.xia@intel.com>

<chenbo.xia@intel.com<mailto:chenbo.xia@intel.com>>, vburru@marvell.com<mailto:vburru@marvell.com> <vburru@marvell.com<mailto:vburru@marvell.com>>,

somnath.kotur@broadcom.com<mailto:somnath.kotur@broadcom.com> <somnath.kotur@broadcom.com<mailto:somnath.kotur@broadcom.com>>,

jiawenwu@trustnetic.com<mailto:jiawenwu@trustnetic.com> <jiawenwu@trustnetic.com<mailto:jiawenwu@trustnetic.com>>, skori@marvell.com<mailto:skori@marvell.com>

<skori@marvell.com<mailto:skori@marvell.com>>, hemant.agrawal@nxp.com<mailto:hemant.agrawal@nxp.com> <hemant.agrawal@nxp.com<mailto:hemant.agrawal@nxp.com>>,

maxime.coquelin@redhat.com<mailto:maxime.coquelin@redhat.com> <maxime.coquelin@redhat.com<mailto:maxime.coquelin@redhat.com>>,

heinrich.kuhn@corigine.com<mailto:heinrich.kuhn@corigine.com> <heinrich.kuhn@corigine.com<mailto:heinrich.kuhn@corigine.com>>,

asomalap@amd.com<mailto:asomalap@amd.com> <asomalap@amd.com<mailto:asomalap@amd.com>>, andrew.rybchenko@oktetlabs.ru<mailto:andrew.rybchenko@oktetlabs.ru>

<andrew.rybchenko@oktetlabs.ru<mailto:andrew.rybchenko@oktetlabs.ru>>, yongwang@vmware.com<mailto:yongwang@vmware.com>

<yongwang@vmware.com<mailto:yongwang@vmware.com>>, ajit.khaparde@broadcom.com<mailto:ajit.khaparde@broadcom.com>

<ajit.khaparde@broadcom.com<mailto:ajit.khaparde@broadcom.com>>, hkalra@marvell.com<mailto:hkalra@marvell.com> <hkalra@marvell.com<mailto:hkalra@marvell.com>>,

shaibran@amazon.com<mailto:shaibran@amazon.com> <shaibran@amazon.com<mailto:shaibran@amazon.com>>, chas3@att.com<mailto:chas3@att.com>

<chas3@att.com<mailto:chas3@att.com>>, cloud.wangxiaoyun@huawei.com<mailto:cloud.wangxiaoyun@huawei.com>

<cloud.wangxiaoyun@huawei.com<mailto:cloud.wangxiaoyun@huawei.com>>, sthemmin@microsoft.com<mailto:sthemmin@microsoft.com>

<sthemmin@microsoft.com<mailto:sthemmin@microsoft.com>>, jerinj@marvell.com<mailto:jerinj@marvell.com> <jerinj@marvell.com<mailto:jerinj@marvell.com>>,

qiming.yang@intel.com<mailto:qiming.yang@intel.com> <qiming.yang@intel.com<mailto:qiming.yang@intel.com>>, pnalla@marvell.com<mailto:pnalla@marvell.com>

<pnalla@marvell.com<mailto:pnalla@marvell.com>>, NBU-Contact-Thomas Monjalon

<thomas@monjalon.net<mailto:thomas@monjalon.net>>, mk@semihalf.com<mailto:mk@semihalf.com> <mk@semihalf.com<mailto:mk@semihalf.com>>,

srinivasan@marvell.com<mailto:srinivasan@marvell.com> <srinivasan@marvell.com<mailto:srinivasan@marvell.com>>, mw@semihalf.com<mailto:mw@semihalf.com>

<mw@semihalf.com<mailto:mw@semihalf.com>>, keith.wiles@intel.com<mailto:keith.wiles@intel.com> <keith.wiles@intel.com<mailto:keith.wiles@intel.com>>,

xiao.w.wang@intel.com<mailto:xiao.w.wang@intel.com> <xiao.w.wang@intel.com<mailto:xiao.w.wang@intel.com>>, xuanziyang2@huawei.com<mailto:xuanziyang2@huawei.com>

<xuanziyang2@huawei.com<mailto:xuanziyang2@huawei.com>>, mtetsuyah@gmail.com<mailto:mtetsuyah@gmail.com> <mtetsuyah@gmail.com<mailto:mtetsuyah@gmail.com>>,

qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com> <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>>, g.singh@nxp.com<mailto:g.singh@nxp.com>

<g.singh@nxp.com<mailto:g.singh@nxp.com>>, aboyer@pensando.io<mailto:aboyer@pensando.io> <aboyer@pensando.io<mailto:aboyer@pensando.io>>,

steven.webster@windriver.com<mailto:steven.webster@windriver.com> <steven.webster@windriver.com<mailto:steven.webster@windriver.com>>,

evgenys@amazon.com<mailto:evgenys@amazon.com> <evgenys@amazon.com<mailto:evgenys@amazon.com>>, johndale@cisco.com<mailto:johndale@cisco.com>

<johndale@cisco.com<mailto:johndale@cisco.com>>, irusskikh@marvell.com<mailto:irusskikh@marvell.com> <irusskikh@marvell.com<mailto:irusskikh@marvell.com>>,

dsinghrawat@marvell.com<mailto:dsinghrawat@marvell.com> <dsinghrawat@marvell.com<mailto:dsinghrawat@marvell.com>>, shshaikh@marvell.com<mailto:shshaikh@marvell.com>

<shshaikh@marvell.com<mailto:shshaikh@marvell.com>>, lironh@marvell.com<mailto:lironh@marvell.com> <lironh@marvell.com<mailto:lironh@marvell.com>>, Slava

Ovsiienko <viacheslavo@nvidia.com<mailto:viacheslavo@nvidia.com>>, aman.deep.singh@intel.com<mailto:aman.deep.singh@intel.com>

<aman.deep.singh@intel.com<mailto:aman.deep.singh@intel.com>>, sachin.saxena@oss.nxp.com<mailto:sachin.saxena@oss.nxp.com>

<sachin.saxena@oss.nxp.com<mailto:sachin.saxena@oss.nxp.com>>, rahul.lakkireddy@chelsio.com<mailto:rahul.lakkireddy@chelsio.com>

<rahul.lakkireddy@chelsio.com<mailto:rahul.lakkireddy@chelsio.com>>, matt.peters@windriver.com<mailto:matt.peters@windriver.com>

<matt.peters@windriver.com<mailto:matt.peters@windriver.com>>, jianwang@trustnetic.com<mailto:jianwang@trustnetic.com>

<jianwang@trustnetic.com<mailto:jianwang@trustnetic.com>>, skoteshwar@marvell.com<mailto:skoteshwar@marvell.com>

<skoteshwar@marvell.com<mailto:skoteshwar@marvell.com>>, zr@semihalf.com<mailto:zr@semihalf.com> <zr@semihalf.com<mailto:zr@semihalf.com>>, NBU-

Contact-longli <longli@microsoft.com<mailto:longli@microsoft.com>>, jingjing.wu@intel.com<mailto:jingjing.wu@intel.com>

<jingjing.wu@intel.com<mailto:jingjing.wu@intel.com>>, igorch@amazon.com<mailto:igorch@amazon.com> <igorch@amazon.com<mailto:igorch@amazon.com>>,

grive@u256.net<mailto:grive@u256.net> <grive@u256.net<mailto:grive@u256.net>>, haiyue.wang@intel.com<mailto:haiyue.wang@intel.com>

<haiyue.wang@intel.com<mailto:haiyue.wang@intel.com>>, jgrajcia@cisco.com<mailto:jgrajcia@cisco.com> <jgrajcia@cisco.com<mailto:jgrajcia@cisco.com>>,

hyonkim@cisco.com<mailto:hyonkim@cisco.com> <hyonkim@cisco.com<mailto:hyonkim@cisco.com>>, ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>

<ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>

Subject: Re: [PATCH v5 2/2] ethdev: change queue release callback

Date: Wed, 22 Sep 2021 11:57:54 +0100


<...>


@@ -1536,7 +1536,8 @@ hns3_fake_rx_queue_config(struct hns3_hw *hw, uint16_t nb_queues)

                /* re-configure */

                rxq = hw->fkq_data.rx_queues;

                for (i = nb_queues; i < old_nb_queues; i++)

-                       hns3_dev_rx_queue_release(rxq[i]);

+                       hns3_dev_rx_queue_release

+                               (&rte_eth_devices[hw->data->port_id], i);


I think this should be done without driver accesing the global 'rte_eth_devices'

array. This may require more help from driver maintainer, and perhaps wrapper

functions can be used for the driver for now and maintainer can update it later,

if agreed with the driver maintainer.


There are about 20 direct accessing to the global 'rte_eth_devices',


I already made similar comment to the driver previously, but lets just not add

more usage.


I'm afraid adding more patches to improve PMD drivers might make this

patcheset over complex.



Agree to not complex this patch for it.


Huawei maintainers, could you please address Ferruh's suggestion? just

a clean up whith simple macro.


@Min Hu (Connor) <humin29@huawei.com<mailto:humin29@huawei.com>>

@Yisen Zhuang <yisen.zhuang@huawei.com<mailto:yisen.zhuang@huawei.com>>

@Lijun Ou <oulijun@huawei.com<mailto:oulijun@huawei.com>>






  parent reply	other threads:[~2021-09-29 14:04 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  3:41 [dpdk-dev] [RFC] " Xueming Li
2021-07-28  7:40 ` Andrew Rybchenko
2021-08-09 14:39   ` Singh, Aman Deep
2021-08-09 15:31     ` Ferruh Yigit
2021-08-10  8:03       ` Xueming(Steven) Li
2021-08-10  8:54         ` Ferruh Yigit
2021-08-10  9:07           ` Xueming(Steven) Li
2021-08-11 11:57             ` Ferruh Yigit
2021-08-11 12:13               ` Xueming(Steven) Li
2021-08-12 14:29                 ` Xueming(Steven) Li
2021-09-26 11:25               ` Xueming(Steven) Li
2021-08-11 13:45 ` [dpdk-dev] [PATCH v1] " Xueming Li
2021-09-15 13:02 ` [dpdk-dev] [PATCH v2] " Xueming Li
2021-09-15 13:36   ` Xueming(Steven) Li
2021-09-16  8:09   ` Thomas Monjalon
2021-09-16 15:43     ` Xueming(Steven) Li
2021-09-16 15:50       ` Thomas Monjalon
2021-09-17  9:40         ` Xueming(Steven) Li
2021-09-17  9:39 ` [dpdk-dev] [PATCH v3 0/2] " Xueming Li
2021-09-17  9:39   ` [dpdk-dev] [PATCH v3 1/2] ethdev: queue release callback optional Xueming Li
2021-09-17 11:29     ` Andrew Rybchenko
2021-09-17 11:53       ` Andrew Rybchenko
2021-09-17 14:33         ` Xueming(Steven) Li
2021-09-17  9:39   ` [dpdk-dev] [PATCH v3 2/2] ethdev: change queue release callback Xueming Li
2021-09-17 11:49     ` Andrew Rybchenko
2021-09-17 14:31       ` Xueming(Steven) Li
2021-09-17 14:28 ` [dpdk-dev] [PATCH v4 0/2] " Xueming Li
2021-09-17 14:28   ` [dpdk-dev] [PATCH v4 1/2] ethdev: make queue release callback optional Xueming Li
2021-09-18  6:44     ` Andrew Rybchenko
2021-10-05 22:00       ` Thomas Monjalon
2021-09-17 14:28   ` [dpdk-dev] [PATCH v4 2/2] ethdev: change queue release callback Xueming Li
2021-09-18  6:50     ` Andrew Rybchenko
2021-09-18 12:39       ` Xueming(Steven) Li
2021-09-18 12:35 ` [dpdk-dev] [PATCH v5 0/2] " Xueming Li
2021-09-18 12:35   ` [dpdk-dev] [PATCH v5 1/2] ethdev: make queue release callback optional Xueming Li
2021-09-21 16:23     ` Ferruh Yigit
2021-09-18 12:35   ` [dpdk-dev] [PATCH v5 2/2] ethdev: change queue release callback Xueming Li
2021-09-21 18:13     ` Ferruh Yigit
2021-09-22  9:35       ` Xueming(Steven) Li
2021-09-22 10:57         ` Ferruh Yigit
2021-09-22 12:54           ` Xueming(Steven) Li
2021-09-29 13:57             ` Xueming(Steven) Li
2021-10-05 16:38               ` Ferruh Yigit
2021-10-06  7:55                 ` Xueming(Steven) Li
2021-10-06  8:04                   ` Ferruh Yigit
2021-10-06 11:19                     ` Xueming(Steven) Li
     [not found]           ` <2d2e9329b076c022418efd7b38ff280cf3ed1af4.camel@nvidia.com>
     [not found]             ` <56f7537a-bfc0-e4b8-72e8-c382ef0e2dbd@huawei.com>
     [not found]               ` <8e2c2f96265dc17af0564befb3918f1a8ea5154a.camel@nvidia.com>
2021-09-29 14:04                 ` Xueming(Steven) Li [this message]
2021-09-30 15:17 ` [dpdk-dev] [PATCH v6 0/2] " Xueming Li
2021-09-30 15:17   ` [dpdk-dev] [PATCH v6 1/2] ethdev: make queue release callback optional Xueming Li
2021-10-05 22:04     ` Thomas Monjalon
2021-09-30 15:17   ` [dpdk-dev] [PATCH v6 2/2] ethdev: change queue release callback Xueming Li
2021-10-03  7:38     ` Matan Azrad
2021-10-03 21:00       ` Ajit Khaparde
2021-10-06 10:21     ` Somnath Kotur
2021-10-06 11:18 ` [dpdk-dev] [PATCH v7 0/2] " Xueming Li
2021-10-06 11:18   ` [dpdk-dev] [PATCH v7 1/2] ethdev: make queue release callback optional Xueming Li
2021-10-06 15:38     ` Hemant Agrawal
2021-10-08  8:16     ` Xu, Rosen
2021-10-06 11:18   ` [dpdk-dev] [PATCH v7 2/2] ethdev: change queue release callback Xueming Li
2021-10-06 17:20     ` Ferruh Yigit
2021-10-11  8:28     ` Thomas Monjalon
2021-10-11 13:11       ` Ferruh Yigit
2021-10-06 17:25   ` [dpdk-dev] [PATCH v7 0/2] " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=721b688c718b940f402ee200f2dc156430044f43.camel@nvidia.com \
    --to=xuemingl@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.com \
    --cc=oulijun@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).