diff mbox

[dpdk-dev,v2] examples/vhost: fix sending arp packet to self

Message ID 1514557999-151167-1-git-send-email-junjie.j.chen@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Yuanhan Liu
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

junjie.j.chen@intel.com Dec. 29, 2017, 2:33 p.m. UTC
ARP packets are not dropped when dest vdev is itself, which breaks
RX ring inconspicuously.

Fixes: 9c5ef51207c6 ("examples/vhost: handle broadcast packet")

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
---
v2: 
 - Add fixline in commit message.

 examples/vhost/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Yuanhan Liu Jan. 8, 2018, 2:14 p.m. UTC | #1
On Fri, Dec 29, 2017 at 09:33:19AM -0500, Junjie Chen wrote:
> ARP packets are not dropped when dest vdev is itself, which breaks
> RX ring inconspicuously.
> 
> Fixes: 9c5ef51207c6 ("examples/vhost: handle broadcast packet")
> 
> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> ---

Applied to dpdk-next-virtio.

Thanks.

	--yliu
diff mbox

Patch

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;
 	}