DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Lunyuan Cui <lunyuanx.cui@intel.com>
Cc: dev@dpdk.org, Jingjing Wu <jingjing.wu@intel.com>,
	Qiming Yang <qiming.yang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/iavf: enable port reset
Date: Wed, 1 Apr 2020 11:38:41 +0800	[thread overview]
Message-ID: <20200401033841.GL29805@intel.com> (raw)
In-Reply-To: <20200325024758.132253-1-lunyuanx.cui@intel.com>

Hi, Lunyuan

On 03/25, Lunyuan Cui wrote:
>This patch is intended to add iavf_dev_reset ops, enable iavf to support
>"port reset all".
>
>Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
>---
> drivers/net/iavf/iavf_ethdev.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
>diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
>index 34913f9c4..01366bc3c 100644
>--- a/drivers/net/iavf/iavf_ethdev.c
>+++ b/drivers/net/iavf/iavf_ethdev.c
>@@ -32,6 +32,7 @@ static int iavf_dev_configure(struct rte_eth_dev *dev);
> static int iavf_dev_start(struct rte_eth_dev *dev);
> static void iavf_dev_stop(struct rte_eth_dev *dev);
> static void iavf_dev_close(struct rte_eth_dev *dev);
>+static int  iavf_dev_reset(struct rte_eth_dev *dev);
> static int iavf_dev_info_get(struct rte_eth_dev *dev,
> 			     struct rte_eth_dev_info *dev_info);
> static const uint32_t *iavf_dev_supported_ptypes_get(struct rte_eth_dev *dev);
>@@ -91,6 +92,7 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
> 	.dev_start                  = iavf_dev_start,
> 	.dev_stop                   = iavf_dev_stop,
> 	.dev_close                  = iavf_dev_close,
>+	.dev_reset		    = iavf_dev_reset,
> 	.dev_infos_get              = iavf_dev_info_get,
> 	.dev_supported_ptypes_get   = iavf_dev_supported_ptypes_get,
> 	.link_update                = iavf_dev_link_update,
>@@ -1416,6 +1418,23 @@ iavf_dev_uninit(struct rte_eth_dev *dev)
> 	return 0;
> }
> 
>+/*
>+ * Reset VF device only to re-initialize resources in PMD layer
>+ */
>+static int
>+iavf_dev_reset(struct rte_eth_dev *dev)
>+{
>+	int ret;
>+
>+	ret = iavf_dev_uninit(dev);
>+	if (ret)
>+		return ret;
>+
>+	ret = iavf_dev_init(dev);
>+
>+	return ret;

What about merging above 2 lines into

	return iavf_dev_init(dev);

Btw, this patch can't be applied to latest next-net-intel, could you rebase
and send a new version?

Thanks,
Xiaolong

>+}
>+
> static int eth_iavf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
> 			     struct rte_pci_device *pci_dev)
> {
>-- 
>2.17.1
>

  parent reply	other threads:[~2020-04-01  3:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  2:47 Lunyuan Cui
2020-03-26  3:26 ` Wu, Jingjing
2020-04-01  3:38 ` Ye Xiaolong [this message]
2020-04-01  7:12 ` [dpdk-dev] [PATCH v2] " Lunyuan Cui
2020-04-07  1:37   ` Chen, Zhaoyan
2020-04-08  6:47   ` Ye Xiaolong
     [not found] <20201217103608.234579-1-dapengx.yu@intel.com>
     [not found] ` <9da466c5a8155ce123e983ab07a25fa866873f15.camel@debian.org>
     [not found]   ` <5f219a97191f4064aa22f57160795737@intel.com>
2020-12-18  2:37     ` [dpdk-dev] [PATCH] " Xie, WeiX

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=20200401033841.GL29805@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=lunyuanx.cui@intel.com \
    --cc=qiming.yang@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).