From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Hajnoczi Subject: [PATCH 6/8] vhost: fix msg->payload union typo in vhost_user_set_vring_addr() Date: Mon, 5 Feb 2018 12:16:40 +0000 Message-ID: <20180205121642.26428-7-stefanha@redhat.com> References: <20180205121642.26428-1-stefanha@redhat.com> Cc: Maxime Coquelin , Yuanhan Liu , Stefan Hajnoczi To: dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 951041B364 for ; Mon, 5 Feb 2018 13:17:26 +0100 (CET) In-Reply-To: <20180205121642.26428-1-stefanha@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" vhost_user_set_vring_addr() uses the msg->payload.addr union member, not msg->payload.state. Luckily the offset of the 'index' field is identical in both structs, so there was never any buggy behavior. Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index fd47404ce..3a58d1082 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -516,7 +516,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, VhostUserMsg *msg) if (vq->enabled && (dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) { - dev = translate_ring_addresses(dev, msg->payload.state.index); + dev = translate_ring_addresses(dev, msg->payload.addr.index); if (!dev) return -1; -- 2.14.3