[dpdk-dev] examples/vhost: fix sending arp packet to self
Checks
Commit Message
ARP packets are not dropped when dest vdev is itself, which breaks
RX ring inconspicuously.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
---
examples/vhost/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Hi Junjie,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Junjie Chen
> Sent: Friday, December 29, 2017 6:14 PM
> To: yliu@fridaylinux.org; maxime.coquelin@redhat.com
> Cc: dev@dpdk.org; Chen, Junjie J <junjie.j.chen@intel.com>
> Subject: [dpdk-dev] [PATCH] examples/vhost: fix sending arp packet to self
>
> ARP packets are not dropped when dest vdev is itself, which breaks RX ring
> inconspicuously.
>
If you are fixing a bug, it's better to write one fixline before SOB that can describe which commit caused the issue.
For example,
Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API")
Thanks
Zhiyong
> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> ---
...
<snip>
Thanks Zhiyong
Updated in v2.
> -----Original Message-----
> From: Yang, Zhiyong
> Sent: Friday, December 29, 2017 2:27 PM
> To: Chen, Junjie J <junjie.j.chen@intel.com>; yliu@fridaylinux.org;
> maxime.coquelin@redhat.com
> Cc: dev@dpdk.org; Chen, Junjie J <junjie.j.chen@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] examples/vhost: fix sending arp packet to self
>
> Hi Junjie,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Junjie Chen
> > Sent: Friday, December 29, 2017 6:14 PM
> > To: yliu@fridaylinux.org; maxime.coquelin@redhat.com
> > Cc: dev@dpdk.org; Chen, Junjie J <junjie.j.chen@intel.com>
> > Subject: [dpdk-dev] [PATCH] examples/vhost: fix sending arp packet to
> > self
> >
> > ARP packets are not dropped when dest vdev is itself, which breaks RX
> > ring inconspicuously.
> >
> If you are fixing a bug, it's better to write one fixline before SOB that can
> describe which commit caused the issue.
> For example,
> Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API")
>
> Thanks
> Zhiyong
>
> > Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> > ---
> ...
> <snip>
@@ -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;
}