From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D12865F28 for ; Mon, 19 Mar 2018 09:08:22 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2018 01:08:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,329,1517904000"; d="scan'208";a="212570551" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.164]) by fmsmga006.fm.intel.com with ESMTP; 19 Mar 2018 01:08:20 -0700 Date: Mon, 19 Mar 2018 16:06:46 +0800 From: Tiwei Bie To: Jens Freimann Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Message-ID: <20180319080646.scqtwhzfzwy2uvex@debian> References: <20180316152120.13199-1-jfreimann@redhat.com> <20180316152120.13199-3-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180316152120.13199-3-jfreimann@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 02/17] net/virtio: don't call virtio_disable_intr() for packed queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 08:08:23 -0000 On Fri, Mar 16, 2018 at 04:21:05PM +0100, Jens Freimann wrote: > When VIRTIO_F_PACKED_RING is set, don't call virtio_disable_intr(). > This function accesses data structures which are not > available when packed virtqueues are enabled. Packed ring has event suppression structures. Thanks > > Signed-off-by: Jens Freimann > --- > drivers/net/virtio/virtio_ethdev.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index ce4f53d..19536eb 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -313,12 +313,11 @@ struct rte_virtio_xstats_name_off { > vq->vq_desc_tail_idx = (uint16_t)(vq->vq_nentries - 1); > > vring_desc_init(vr->desc, size); > + /* > + * Disable device(host) interrupting guest > + */ > + virtqueue_disable_intr(vq); > } > - > - /* > - * Disable device(host) interrupting guest > - */ > - virtqueue_disable_intr(vq); > } > > static int > @@ -736,7 +735,8 @@ struct rte_virtio_xstats_name_off { > struct virtnet_rx *rxvq = dev->data->rx_queues[queue_id]; > struct virtqueue *vq = rxvq->vq; > > - virtqueue_disable_intr(vq); > + if (!vtpci_packed_queue(vq->hw)) > + virtqueue_disable_intr(vq); > return 0; > } > > -- > 1.8.3.1 >