From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 10FD958F7 for ; Thu, 3 Sep 2015 04:27:26 +0200 (CEST) Received: by padhy1 with SMTP id hy1so30284318pad.1 for ; Wed, 02 Sep 2015 19:27:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MZ3wUmW+55JiUehjcXgOgB6MsensoS4rwbjQ0lna96w=; b=NKzJHez4TKvghJ4mhUBfZKC5yFF8Pao8r5gvDdb83EnfUg/gp4FuECX7NOWZHpenRF LvKB75B2QgbjZKWfJuzVtrsHsBIQxBID+oNWHG+Gxm35ZDTmS4jTz3l9eV+WCA+Vv+Bq qyoe9H4w8IneYObIBFZkOt0JJVfgsTfMC6JMbIT5/Athw5Vri8GpR1mbQoytS9lrFJtA sREIUL7eNPZQgUuUAO0f2UZiau9RAIc+49PuLQoVkvoa5G3Lj2FFlGNbaOasWGApGtD9 osKmuQ2lEYjyWtPdt2VjxcnHpH4KmkHREDhhTqUcpBl4Y7qAp4FNnyF7Y0Fh3INrud7I saJw== X-Gm-Message-State: ALoCoQl3G/O27MTAqgzDjcjAi6eVRJJMDPwaaFcaXGBKVgEqfHBoydeZ8LhjzFA6WNKa8A1JstRq X-Received: by 10.68.195.231 with SMTP id ih7mr63210160pbc.26.1441247245357; Wed, 02 Sep 2015 19:27:25 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id fz8sm14005528pdb.0.2015.09.02.19.27.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2015 19:27:24 -0700 (PDT) Message-ID: <55E7B00B.20000@igel.co.jp> Date: Thu, 03 Sep 2015 11:27:23 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@dpdk.org, "Ouyang, Changchun" References: <1434355006-30583-1-git-send-email-changchun.ouyang@intel.com> <1439366567-3402-1-git-send-email-changchun.ouyang@intel.com> <1439366567-3402-3-git-send-email-changchun.ouyang@intel.com> In-Reply-To: <1439366567-3402-3-git-send-email-changchun.ouyang@intel.com> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 02/12] vhost: support multiple queues in virtio dev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 02:27:26 -0000 On 2015/08/12 17:02, Ouyang Changchun wrote: > diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.h b/lib/librte_vhost/vhost_user/virtio-net-user.h > index df24860..2429836 100644 > --- a/lib/librte_vhost/vhost_user/virtio-net-user.h > +++ b/lib/librte_vhost/vhost_user/virtio-net-user.h > @@ -46,4 +46,6 @@ void user_set_vring_kick(struct vhost_device_ctx, struct VhostUserMsg *); > > /* > @@ -206,9 +213,17 @@ cleanup_device(struct virtio_net *dev) > static void > free_device(struct virtio_net_config_ll *ll_dev) > { > - /* Free any malloc'd memory */ > - rte_free(ll_dev->dev.virtqueue[VIRTIO_RXQ]); > - rte_free(ll_dev->dev.virtqueue[VIRTIO_TXQ]); > + uint32_t qp_idx; > + > + /* > + * Free any malloc'd memory. > + */ > + /* Free every queue pair. */ > + for (qp_idx = 0; qp_idx < ll_dev->dev.virt_qp_nb; qp_idx++) { > + uint32_t virt_rx_q_idx = qp_idx * VIRTIO_QNUM + VIRTIO_RXQ; > + rte_free(ll_dev->dev.virtqueue[virt_rx_q_idx]); Hi Changchun, Should we free tx queue also here? Thanks, Tetsuya > + } > + rte_free(ll_dev->dev.virtqueue); > rte_free(ll_dev); > } > >