From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] net/virtio: zero the whole memory zone Date: Mon, 12 Jun 2017 18:21:37 +0800 Message-ID: <20170612102137.GA2611@yliu-home> References: <1497242070-68791-1-git-send-email-tiwei.bie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, maxime.coquelin@redhat.com, mtetsuyah@gmail.com, stable@dpdk.org To: Tiwei Bie Return-path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 25D5F2BB9 for ; Mon, 12 Jun 2017 12:21:45 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id f127so13924159pgc.2 for ; Mon, 12 Jun 2017 03:21:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1497242070-68791-1-git-send-email-tiwei.bie@intel.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" On Mon, Jun 12, 2017 at 12:34:30PM +0800, Tiwei Bie wrote: > 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 > --- > drivers/net/virtio/virtio_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index 45f9bca..88118f1 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); Nice catch! Applied to dpdk-next-virtio. Thanks. --yliu