From: Tiwei Bie Date: Mon, 12 Jun 2017 04:34:30 +0000 (+0800) Subject: net/virtio: zero the whole memory zone X-Git-Tag: spdx-start~2991 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5bdd24e451c711129218c88292cae8e891e7506a;p=dpdk.git net/virtio: zero the whole memory zone Zero the whole memory zone instead of the first few bytes. Fixes: c1f86306a026 ("virtio: add new driver") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Acked-by: Yuanhan Liu --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 4fcda80de3..371f170572 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -424,7 +424,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx) } } - memset(mz->addr, 0, sizeof(mz->len)); + memset(mz->addr, 0, mz->len); vq->vq_ring_mem = mz->phys_addr; vq->vq_ring_virt_mem = mz->addr;