DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Tiwei Bie <tiwei.bie@intel.com>, dev@dpdk.org
Cc: jianfeng.tan@intel.com, yliu@fridaylinux.org,
	zhihong.wang@intel.com, xiao.w.wang@intel.com,
	cunming.liang@intel.com, dan.daly@intel.com
Subject: Re: [dpdk-dev] [PATCH 2/3] vhost: support sending fds via send_vhost_message()
Date: Thu, 29 Mar 2018 14:23:20 +0200	[thread overview]
Message-ID: <52d27570-bf85-58bf-f5b1-7b9ad8857fcc@redhat.com> (raw)
In-Reply-To: <20180306104327.14470-3-tiwei.bie@intel.com>


On 03/06/2018 11:43 AM, Tiwei Bie wrote:
> This function will be used to send fds to QEMU via slave channel.
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

> ---
>   lib/librte_vhost/vhost_user.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index 8b07b6c43..e3a1dfbfb 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -1308,13 +1308,13 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
>   }
>   
>   static int
> -send_vhost_message(int sockfd, struct VhostUserMsg *msg)
> +send_vhost_message(int sockfd, struct VhostUserMsg *msg, int *fds, int fd_num)
>   {
>   	if (!msg)
>   		return 0;
>   
>   	return send_fd_message(sockfd, (char *)msg,
> -		VHOST_USER_HDR_SIZE + msg->size, NULL, 0);
> +		VHOST_USER_HDR_SIZE + msg->size, fds, fd_num);
>   }
>   
>   static int
> @@ -1328,7 +1328,7 @@ send_vhost_reply(int sockfd, struct VhostUserMsg *msg)
>   	msg->flags |= VHOST_USER_VERSION;
>   	msg->flags |= VHOST_USER_REPLY_MASK;
>   
> -	return send_vhost_message(sockfd, msg);
> +	return send_vhost_message(sockfd, msg, NULL, 0);
>   }
>   
>   /*
> @@ -1643,7 +1643,7 @@ vhost_user_iotlb_miss(struct virtio_net *dev, uint64_t iova, uint8_t perm)
>   		},
>   	};
>   
> -	ret = send_vhost_message(dev->slave_req_fd, &msg);
> +	ret = send_vhost_message(dev->slave_req_fd, &msg, NULL, 0);
>   	if (ret < 0) {
>   		RTE_LOG(ERR, VHOST_CONFIG,
>   				"Failed to send IOTLB miss message (%d)\n",
> 

  reply	other threads:[~2018-03-29 12:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 10:43 [dpdk-dev] [PATCH 0/3] Extend vhost to support VFIO based accelerator Tiwei Bie
2018-03-06 10:43 ` [dpdk-dev] [PATCH 1/3] vhost: do not generate signal when sendmsg fails Tiwei Bie
2018-03-29 12:19   ` Maxime Coquelin
2018-03-29 13:25     ` Tiwei Bie
2018-03-29 13:41       ` Maxime Coquelin
2018-03-29 13:46         ` Tiwei Bie
2018-03-29 13:46   ` Maxime Coquelin
2018-03-06 10:43 ` [dpdk-dev] [PATCH 2/3] vhost: support sending fds via send_vhost_message() Tiwei Bie
2018-03-29 12:23   ` Maxime Coquelin [this message]
2018-03-29 12:27   ` Maxime Coquelin
2018-03-06 10:43 ` [dpdk-dev] [PATCH 3/3] vhost: support VFIO based accelerator Tiwei Bie
2018-03-06 14:24   ` Maxime Coquelin
2018-03-07  8:59     ` Tiwei Bie
2018-04-18  5:49 ` [dpdk-dev] [PATCH v2] " Tiwei Bie

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=52d27570-bf85-58bf-f5b1-7b9ad8857fcc@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=cunming.liang@intel.com \
    --cc=dan.daly@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=tiwei.bie@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=yliu@fridaylinux.org \
    --cc=zhihong.wang@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).