From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 504D45F4A for ; Fri, 16 Mar 2018 16:21:31 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E947A4023156; Fri, 16 Mar 2018 15:21:30 +0000 (UTC) Received: from localhost (dhcp-192-241.str.redhat.com [10.33.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1558215CDAF; Fri, 16 Mar 2018 15:21:30 +0000 (UTC) From: Jens Freimann To: dev@dpdk.org Cc: tiwei.bie@intel.com, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Date: Fri, 16 Mar 2018 16:21:05 +0100 Message-Id: <20180316152120.13199-3-jfreimann@redhat.com> In-Reply-To: <20180316152120.13199-1-jfreimann@redhat.com> References: <20180316152120.13199-1-jfreimann@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 16 Mar 2018 15:21:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 16 Mar 2018 15:21:30 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jfreimann@redhat.com' RCPT:'' Subject: [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: Fri, 16 Mar 2018 15:21:31 -0000 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. 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