From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junjie Chen Subject: [PATCH] examples/vhost: fix sending arp packet to self Date: Fri, 29 Dec 2017 05:14:23 -0500 Message-ID: <1514542463-146522-1-git-send-email-junjie.j.chen@intel.com> Cc: dev@dpdk.org, Junjie Chen To: yliu@fridaylinux.org, maxime.coquelin@redhat.com Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AF9681B53 for ; Fri, 29 Dec 2017 03:34:00 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" ARP packets are not dropped when dest vdev is itself, which breaks RX ring inconspicuously. Signed-off-by: Junjie Chen --- examples/vhost/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 89a61f0..10a7f5d 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -964,7 +964,8 @@ virtio_tx_route(struct vhost_dev *vdev, struct rte_mbuf *m, uint16_t vlan_tag) struct vhost_dev *vdev2; TAILQ_FOREACH(vdev2, &vhost_dev_list, global_vdev_entry) { - virtio_xmit(vdev2, vdev, m); + if (vdev2 != vdev) + virtio_xmit(vdev2, vdev, m); } goto queue2nic; } -- 2.0.1