DPDK patches and discussions
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: Andy Pei <andy.pei@intel.com>
Cc: dev@dpdk.org, rosen.xu@intel.com, xiaolong.ye@intel.com,
	tiwei.bie@intel.com, xiao.w.wang@intel.com
Subject: Re: [dpdk-dev] [PATCH 1/4] vhost: introduce new API to get the active vring number
Date: Fri, 06 Sep 2019 09:25:45 -0400	[thread overview]
Message-ID: <f7ttv9po8ti.fsf@dhcp-25.97.bos.redhat.com> (raw)
In-Reply-To: <1567740051-367172-1-git-send-email-andy.pei@intel.com> (Andy Pei's message of "Fri, 6 Sep 2019 11:20:48 +0800")

Andy Pei <andy.pei@intel.com> writes:

> It's useful for hardware vhost backend (like vDPA devices) to set
> multiqueue configuration accordingly.
>
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---

I think there's something wrong with this patch - I see the following
error after all the patches are applied:

   drivers/a715181@@tmp_rte_pmd_ifc@sta/net_ifc_ifcvf_vdpa.c.o: In function `ifcvf_set_vring_state':
   ifcvf_vdpa.c:(.text+0x1157): undefined reference to `rte_vhost_get_active_vring_num'

Looking at the linker line, I see that librte_vhost is being included.

Is it possible that you need to make an export for this?

Travis build:

   https://travis-ci.com/ovsrobot/dpdk/jobs/231687745

Possibly, this is because the robot needs to call the right script to
apply to a -next tree.  I'd be a little surprised, though.

>  lib/librte_vhost/rte_vhost.h | 12 ++++++++++++
>  lib/librte_vhost/vhost.c     | 19 +++++++++++++++++++
>  2 files changed, 31 insertions(+)
>
> diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
> index 7fb1729..28811b0 100644
> --- a/lib/librte_vhost/rte_vhost.h
> +++ b/lib/librte_vhost/rte_vhost.h
> @@ -525,6 +525,18 @@ int rte_vhost_driver_callback_register(const char *path,
>  uint16_t rte_vhost_get_vring_num(int vid);
>  
>  /**
> + * Get the number of active vrings of the device.
> + *
> + * @param vid
> + *  vhost device ID
> + *
> + * @return
> + *  The number of active vrings, 0 on failure
> + */
> +uint16_t
> +rte_vhost_get_active_vring_num(int vid);
> +
> +/**
>   * Get the virtio net device's ifname, which is the vhost-user socket
>   * file path.
>   *
> diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
> index 981837b..c714818 100644
> --- a/lib/librte_vhost/vhost.c
> +++ b/lib/librte_vhost/vhost.c
> @@ -674,6 +674,25 @@
>  	return dev->nr_vring;
>  }
>  
> +uint16_t
> +rte_vhost_get_active_vring_num(int vid)
> +{
> +	struct virtio_net *dev = get_device(vid);
> +	struct vhost_virtqueue *vq;
> +	uint16_t qid;
> +
> +	if (dev == NULL)
> +		return 0;
> +
> +	for (qid = 0; qid < dev->nr_vring; qid++) {
> +		vq = dev->virtqueue[qid];
> +		if (!vq->enabled)
> +			break;
> +	}
> +
> +	return qid;
> +}
> +
>  int
>  rte_vhost_get_ifname(int vid, char *buf, size_t len)
>  {

  parent reply	other threads:[~2019-09-06 13:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06  3:20 Andy Pei
2019-09-06  3:20 ` [dpdk-dev] [PATCH 2/4] net/ifcvf: add multiqueue configuration Andy Pei
2019-09-06  3:20 ` [dpdk-dev] [PATCH 3/4] vhost: call vDPA callback at the end of vring enable handler Andy Pei
2019-09-12  7:41   ` Wang, Xiao W
2019-09-17  7:29     ` Pei, Andy
2019-09-06  3:20 ` [dpdk-dev] [PATCH 4/4] net/ifcvf: enable mutliqueue support Andy Pei
2019-09-12  7:41   ` Wang, Xiao W
2019-09-06 13:25 ` Aaron Conole [this message]
2019-09-17  9:25   ` [dpdk-dev] [PATCH 1/4] vhost: introduce new API to get the active vring number Pei, Andy

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=f7ttv9po8ti.fsf@dhcp-25.97.bos.redhat.com \
    --to=aconole@redhat.com \
    --cc=andy.pei@intel.com \
    --cc=dev@dpdk.org \
    --cc=rosen.xu@intel.com \
    --cc=tiwei.bie@intel.com \
    --cc=xiao.w.wang@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).