From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Xiaolong Ye <xiaolong.ye@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1 1/2] net/af_xdp: remove resources when port is closed
Date: Tue, 30 Apr 2019 09:55:31 +0200 [thread overview]
Message-ID: <1886342.GR0dOcdeod@xps> (raw)
In-Reply-To: <aac8c509-c63a-9b02-d804-46b8e75365fb@intel.com>
30/04/2019 09:33, Ferruh Yigit:
> On 4/29/2019 11:34 PM, Thomas Monjalon wrote:
> > 30/04/2019 00:28, Ferruh Yigit:
> >> On 4/29/2019 9:14 PM, Thomas Monjalon wrote:
> >>> 29/04/2019 19:00, Ferruh Yigit:
> >>>> On 4/26/2019 6:09 AM, Xiaolong Ye wrote:
> >>>>> Since 18.11, it is suggested that driver should release all its private
> >>>>> resources at the dev_close routine. So all resources previously released
> >>>>> in remove routine are now released at the dev_close routine, and the
> >>>>> dev_close routine will be called in driver remove routine in order to
> >>>>> support removing a device without closing its ports.
> >>>>>
> >>>>> Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
> >>>>> flag during probe stage.
> >>>>>
> >>>>> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> >>>>
> >>>> <...>
> >>>>
> >>>>> @@ -936,14 +940,7 @@ rte_pmd_af_xdp_remove(struct rte_vdev_device *dev)
> >>>>> if (eth_dev == NULL)
> >>>>> return -1;
> >>>>>
> >>>>> - internals = eth_dev->data->dev_private;
> >>>>> -
> >>>>> - rte_ring_free(internals->umem->buf_ring);
> >>>>> - rte_memzone_free(internals->umem->mz);
> >>>>> - rte_free(internals->umem);
> >>>>> -
> >>>>> - rte_eth_dev_release_port(eth_dev);
> >>>>
> >>>> I thinks we should keep 'rte_eth_dev_release_port()' in '.remove()' path,
> >>>> the 'RTE_ETH_DEV_CLOSE_REMOVE' flag will take care of this in
> >>>> 'rte_eth_dev_close()' but still needed in '.remove()' path.
> >>>
> >>> I don't understand your comment.
> >>> Calling the close function looks the right thing to do in "remove".
> >>
> >> No concern on calling the 'close'.
> >> My comment was to keep 'rte_eth_dev_release_port()' which this patch removes.
> >
> > rte_eth_dev_release_port() is called in eth_dev_close(), isn't it?
>
> No, 'eth_dev_close()' is local 'dev_close()' ops, the one to clear driver
> private resources.
> I assume it is confused with 'rte_eth_dev_close()' ...
>
> >>>>> -
> >>>>> + eth_dev_close(eth_dev);
Ah yes, I overlooked it.
Why not calling rte_eth_dev_close()?
next prev parent reply other threads:[~2019-04-30 7:55 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 5:09 [dpdk-dev] [PATCH v1 0/2] support RTE_ETH_DEV_CLOSE_REMOVE flag for AF_XDP Xiaolong Ye
2019-04-26 5:09 ` Xiaolong Ye
2019-04-26 5:09 ` [dpdk-dev] [PATCH v1 1/2] net/af_xdp: remove resources when port is closed Xiaolong Ye
2019-04-26 5:09 ` Xiaolong Ye
2019-04-29 17:00 ` Ferruh Yigit
2019-04-29 17:00 ` Ferruh Yigit
2019-04-29 20:14 ` Thomas Monjalon
2019-04-29 20:14 ` Thomas Monjalon
2019-04-29 22:28 ` Ferruh Yigit
2019-04-29 22:28 ` Ferruh Yigit
2019-04-29 22:34 ` Thomas Monjalon
2019-04-29 22:34 ` Thomas Monjalon
2019-04-30 7:33 ` Ferruh Yigit
2019-04-30 7:33 ` Ferruh Yigit
2019-04-30 7:55 ` Thomas Monjalon [this message]
2019-04-30 7:55 ` Thomas Monjalon
2019-04-30 8:10 ` Ferruh Yigit
2019-04-30 8:10 ` Ferruh Yigit
2019-04-30 2:06 ` Ye Xiaolong
2019-04-30 2:06 ` Ye Xiaolong
2019-04-30 7:35 ` Ferruh Yigit
2019-04-30 7:35 ` Ferruh Yigit
2019-04-30 8:37 ` Ye Xiaolong
2019-04-30 8:37 ` Ye Xiaolong
2019-04-26 5:09 ` [dpdk-dev] [PATCH v1 2/2] net/af_xdp: set MAC addrs field to NULL Xiaolong Ye
2019-04-26 5:09 ` Xiaolong Ye
2019-04-29 17:02 ` Ferruh Yigit
2019-04-29 17:02 ` Ferruh Yigit
2019-04-30 2:04 ` Ye Xiaolong
2019-04-30 2:04 ` Ye Xiaolong
2019-04-30 8:39 ` [dpdk-dev] [PATCH v3] net/af_xdp: remove resources when port is closed Xiaolong Ye
2019-04-30 8:39 ` Xiaolong Ye
2019-04-30 11:02 ` Ferruh Yigit
2019-04-30 11:02 ` 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=1886342.GR0dOcdeod@xps \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=xiaolong.ye@intel.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).