From: "Wang, Xiao W" <xiao.w.wang@intel.com>
To: "Ye, Xiaolong" <xiaolong.ye@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/ifc: invoke ifcvf HW init function in probe
Date: Thu, 11 Oct 2018 04:39:50 +0000 [thread overview]
Message-ID: <B7F2E978279D1D49A3034B7786DACF407A45A042@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20181010132235.70579-1-xiaolong.ye@intel.com>
Hi,
> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Wednesday, October 10, 2018 9:23 PM
> To: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Wang, Xiao W <xiao.w.wang@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>
> Subject: [PATCH] net/ifc: invoke ifcvf HW init function in probe
>
> As ifcvf_init_hw is independent with ifcvf_vfio_setup, it's better to
> invoke it directly in probe func.
>
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
> drivers/net/ifc/ifcvf_vdpa.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c
> index 9d5594678..adc8f4166 100644
> --- a/drivers/net/ifc/ifcvf_vdpa.c
> +++ b/drivers/net/ifc/ifcvf_vdpa.c
> @@ -112,7 +112,6 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)
> struct rte_pci_device *dev = internal->pdev;
> char devname[RTE_DEV_NAME_MAX_LEN] = {0};
> int iommu_group_num;
> - int ret = 0;
> int i;
>
> internal->vfio_dev_fd = -1;
> @@ -146,9 +145,8 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)
> internal->hw.mem_resource[i].len =
> internal->pdev->mem_resource[i].len;
> }
> - ret = ifcvf_init_hw(&internal->hw, internal->pdev);
>
> - return ret;
> + return 0;
>
> err:
> rte_vfio_container_destroy(internal->vfio_container_fd);
> @@ -758,6 +756,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv
> __rte_unused,
> if (ifcvf_vfio_setup(internal) < 0)
> return -1;
>
> + if (ifcvf_init_hw(&internal->hw, internal->pdev) < 0)
> + return -1;
> +
> internal->max_queues = IFCVF_MAX_QUEUES;
> features = ifcvf_get_features(&internal->hw);
> internal->features = (features &
> --
> 2.17.1
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
BRs,
Xiao
next prev parent reply other threads:[~2018-10-11 4:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 13:22 Xiaolong Ye
2018-10-11 4:39 ` Wang, Xiao W [this message]
2018-10-11 5:21 ` Zhang, Qi Z
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=B7F2E978279D1D49A3034B7786DACF407A45A042@SHSMSX101.ccr.corp.intel.com \
--to=xiao.w.wang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@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).