From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4C45958F3 for ; Tue, 20 Oct 2015 17:37:51 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 20 Oct 2015 08:37:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,707,1437462000"; d="scan'208";a="815354581" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 20 Oct 2015 08:37:47 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 20 Oct 2015 08:32:35 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 20 Oct 2015 08:32:34 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by shsmsx102.ccr.corp.intel.com ([169.254.2.253]) with mapi id 14.03.0248.002; Tue, 20 Oct 2015 23:32:32 +0800 From: "Xie, Huawei" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v2 2/7] virtio: add software rx ring, fake_buf into virtqueue Thread-Index: AdEKK+j8PJNu9BpbSsmYKEvPpdhKvw== Date: Tue, 20 Oct 2015 15:32:32 +0000 Message-ID: References: <1443537953-23917-1-git-send-email-huawei.xie@intel.com> <1445149744-3217-1-git-send-email-huawei.xie@intel.com> <1445149744-3217-3-git-send-email-huawei.xie@intel.com> <20151018212012.3ba74f45@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 2/7] virtio: add software rx ring, fake_buf into virtqueue 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: Tue, 20 Oct 2015 15:37:51 -0000 On 10/19/2015 1:07 PM, Xie, Huawei wrote:=0A= > On 10/19/2015 12:20 PM, Stephen Hemminger wrote:=0A= >=0A= > On Sun, 18 Oct 2015 14:28:59 +0800=0A= > Huawei Xie wrote:=0A= >=0A= >=0A= >=0A= > + if (vq->sw_ring)=0A= > + rte_free(vq->sw_ring);=0A= > +=0A= >=0A= >=0A= >=0A= > Do not need to test for NULL before calling rte_free.=0A= > Better to just rely on the fact that rte_free(NULL) is documented=0A= > to be ok (no operation).=0A= >=0A= >=0A= >=0A= > ok, btw, in previous commit, just in the same function,=0A= > void virtio_dev_queue_release(vq)=0A= > [...]=0A= >=0A= > rte_free(vq);=0A= >=0A= > vq =3D NULL;=0A= > I think there is no need to set NULL to vq. Will submit a patch to fix it= if you agree.=0A= In v3 patch, i also remove the "vq =3D NULL".=0A= >=0A= >=0A= =0A=