From: Thomas Monjalon <thomas@monjalon.net>
To: Andrew Rybchenko <arybchenko@solarflare.com>
Cc: dev@dpdk.org, gaetan.rivet@6wind.com, ophirmu@mellanox.com,
qi.z.zhang@intel.com, ferruh.yigit@intel.com, "Ananyev,
Konstantin" <konstantin.ananyev@intel.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Subject: Re: [dpdk-dev] [PATCH v4 1/4] ethdev: rename memzones allocated for DMA
Date: Fri, 12 Oct 2018 19:21:17 +0200 [thread overview]
Message-ID: <8911296.15KZnjE6xt@xps> (raw)
In-Reply-To: <2096271.VzXizFIdQq@xps>
12/10/2018 19:18, Thomas Monjalon:
> 12/10/2018 18:46, Andrew Rybchenko:
> > On 10/12/18 7:42 PM, Andrew Rybchenko wrote:
> > > On 10/12/18 7:40 PM, Thomas Monjalon wrote:
> > >> 12/10/2018 09:53, Andrew Rybchenko:
> > >>> On 10/12/18 12:02 AM, Thomas Monjalon wrote:
> > >>>> The helper rte_eth_dma_zone_reserve() is called by PMDs
> > >>>> when probing a new port.
> > >>>> It creates a new memzone with an unique name.
> > >>>> The name of this memzone was using the name of the driver
> > >>>> doing the probe.
> > >>>>
> > >>>> In order to avoid assigning the driver before the end of the probing
> > >>>> (next patch), the driver name is removed from these memzone names.
> > >>>> The ethdev name (data->name) is not used because it may be too long
> > >>>> and may be not set at this stage of probing.
> > >>>>
> > >>>> Syntax of old name: <driver>_<ring>_<port>_<queue>
> > >>>> Syntax of new name: eth_p<port>_q<queue>_<ring>
> > >>>>
> > >>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > >>>> ---
> > >>>> lib/librte_ethdev/rte_ethdev.c | 5 ++---
> > >>>> 1 file changed, 2 insertions(+), 3 deletions(-)
> > >>>>
> > >>>> diff --git a/lib/librte_ethdev/rte_ethdev.c
> > >>>> b/lib/librte_ethdev/rte_ethdev.c
> > >>>> index ef99f7068..ec443def5 100644
> > >>>> --- a/lib/librte_ethdev/rte_ethdev.c
> > >>>> +++ b/lib/librte_ethdev/rte_ethdev.c
> > >>>> @@ -3441,9 +3441,8 @@ rte_eth_dma_zone_reserve(const struct
> > >>>> rte_eth_dev *dev, const char *ring_name,
> > >>>> char z_name[RTE_MEMZONE_NAMESIZE];
> > >>>> const struct rte_memzone *mz;
> > >>>> - snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
> > >>>> - dev->device->driver->name, ring_name,
> > >>>> - dev->data->port_id, queue_id);
> > >>>> + snprintf(z_name, sizeof(z_name), "eth_p%d_q%d_%s",
> > >>>> + dev->data->port_id, queue_id, ring_name);
> > >>>> mz = rte_memzone_lookup(z_name);
> > >>>> if (mz)
> > >>> LGTM, but I've found more places where the pattern is duplicate
> > >>> and testpmd frightens me:
> > >>> - app/test-pmd/config.c ring_dma_zone_lookup() which is used
> > >>> to look at descriptors (looks like Intel specific since has
> > >>> RTE_LIBRTE_I40E_16BYTE_RX_DESC conditional code)
> > >> >From what I see there is no access to rte_device.driver here,
> > >> except one in exit function.
> > >
> > > Yes, but testpmd will fail to find the memzone and command to
> > > take a look at descriptors will be broken.
> > >
> > > May be it is already broken etc. I think someone from Intel should
> > > comment it.
> >
> > Potentially the following drivers may use it:
> > $ git grep -w \"rx_ring\" drivers/net/
> > drivers/net/avf/avf_rxtx.c:380: mz = rte_eth_dma_zone_reserve(dev,
> > "rx_ring", queue_idx,
> > drivers/net/axgbe/axgbe_rxtx.c:91: dma =
> > rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx, size, 12
> > drivers/net/cxgbe/sge.c:1878: fwevtq ? "fwq_ring" : "rx_ring",
> > drivers/net/e1000/em_rxtx.c:1437: rz =
> > rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx, rsize,
> > drivers/net/e1000/igb_rxtx.c:1734: rz =
> > rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx, size,
> > drivers/net/fm10k/fm10k_ethdev.c:1878: mz =
> > rte_eth_dma_zone_reserve(dev, "rx_ring", queue_id,
> > drivers/net/i40e/i40e_rxtx.c:1853: rz =
> > rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx,
> > drivers/net/ixgbe/ixgbe_rxtx.c:2966: rz =
> > rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx,
> > drivers/net/nfp/nfp_net.c:1516: tz = rte_eth_dma_zone_reserve(dev,
> > "rx_ring", queue_idx,
>
> Excuse me, I really don't understand what you mean.
Oh, got it!
You mean the call to rte_memzone_lookup() must expect the new memzone name.
So I must update it here too, right?
next prev parent reply other threads:[~2018-10-12 17:21 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 23:09 [dpdk-dev] [RFC] eal: allow hotplug to skip an already probed device Thomas Monjalon
2018-09-13 6:29 ` Ophir Munk
2018-09-16 10:14 ` Ophir Munk
2018-09-28 16:40 ` [dpdk-dev] [PATCH v2 0/3] " Thomas Monjalon
2018-09-28 16:40 ` [dpdk-dev] [PATCH v2 1/3] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-09-28 16:40 ` [dpdk-dev] [PATCH v2 2/3] eal: add function to query device status Thomas Monjalon
2018-09-28 16:40 ` [dpdk-dev] [PATCH v2 3/3] eal: allow probing a device again Thomas Monjalon
2018-10-04 9:44 ` Doherty, Declan
2018-10-04 14:25 ` Thomas Monjalon
2018-10-07 22:09 ` [dpdk-dev] [PATCH v3 0/3] eal: allow hotplug to skip an already probed device Thomas Monjalon
2018-10-07 22:09 ` [dpdk-dev] [PATCH v3 1/3] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-10-08 8:05 ` Andrew Rybchenko
2018-10-11 10:53 ` Andrew Rybchenko
2018-10-11 11:45 ` Thomas Monjalon
2018-10-11 11:54 ` Andrew Rybchenko
2018-10-11 12:59 ` Thomas Monjalon
2018-10-11 13:15 ` Andrew Rybchenko
2018-10-11 15:29 ` Thomas Monjalon
2018-10-11 15:41 ` Andrew Rybchenko
2018-10-11 16:00 ` Thomas Monjalon
2018-10-07 22:09 ` [dpdk-dev] [PATCH v3 2/3] eal: add function to query device status Thomas Monjalon
2018-10-08 8:05 ` Andrew Rybchenko
2018-10-07 22:09 ` [dpdk-dev] [PATCH v3 3/3] eal: allow probing a device again Thomas Monjalon
2018-10-08 8:05 ` Andrew Rybchenko
2018-10-11 21:02 ` [dpdk-dev] [PATCH v4 0/4] eal: allow hotplug to skip an already probed device Thomas Monjalon
2018-10-11 21:02 ` [dpdk-dev] [PATCH v4 1/4] ethdev: rename memzones allocated for DMA Thomas Monjalon
2018-10-12 7:53 ` Andrew Rybchenko
2018-10-12 16:40 ` Thomas Monjalon
2018-10-12 16:42 ` Andrew Rybchenko
2018-10-12 16:46 ` Andrew Rybchenko
2018-10-12 17:18 ` Thomas Monjalon
2018-10-12 17:21 ` Thomas Monjalon [this message]
2018-10-12 17:51 ` Andrew Rybchenko
2018-10-11 21:02 ` [dpdk-dev] [PATCH v4 2/4] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-10-12 7:44 ` Andrew Rybchenko
2018-10-12 8:32 ` Jan Remeš
2018-10-12 10:45 ` Thomas Monjalon
2018-10-12 15:50 ` Thomas Monjalon
2018-10-11 21:02 ` [dpdk-dev] [PATCH v4 3/4] eal: add function to query device status Thomas Monjalon
2018-10-11 21:02 ` [dpdk-dev] [PATCH v4 4/4] eal: allow probing a device again Thomas Monjalon
2018-10-12 9:26 ` [dpdk-dev] [PATCH v4 0/4] eal: allow hotplug to skip an already probed device Andrew Rybchenko
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 0/7] " Thomas Monjalon
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 1/7] net/mlx5: remove useless driver name comparison Thomas Monjalon
2018-10-14 20:49 ` Thomas Monjalon
2018-10-15 5:53 ` Shahaf Shuler
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 2/7] ethdev: rename memzones allocated for DMA Thomas Monjalon
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 3/7] cryptodev: remove driver name from logs Thomas Monjalon
2018-10-15 8:51 ` Thomas Monjalon
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 4/7] compressdev: " Thomas Monjalon
2018-10-15 8:51 ` Thomas Monjalon
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 5/7] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-10-14 20:53 ` Thomas Monjalon
2018-10-15 6:11 ` Xu, Rosen
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 6/7] eal: add function to query device status Thomas Monjalon
2018-10-14 20:47 ` [dpdk-dev] [PATCH v5 7/7] eal: allow probing a device again Thomas Monjalon
2018-10-16 10:40 ` Shreyansh Jain
2018-10-17 11:37 ` [dpdk-dev] [PATCH v5 0/7] allow hotplug to skip an already probed device Thomas Monjalon
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=8911296.15KZnjE6xt@xps \
--to=thomas@monjalon.net \
--cc=ajit.khaparde@broadcom.com \
--cc=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=gaetan.rivet@6wind.com \
--cc=konstantin.ananyev@intel.com \
--cc=ophirmu@mellanox.com \
--cc=qi.z.zhang@intel.com \
--cc=rahul.lakkireddy@chelsio.com \
--cc=somnath.kotur@broadcom.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).