From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by dpdk.org (Postfix) with ESMTP id CC2858E6F for ; Mon, 19 Oct 2015 06:20:02 +0200 (CEST) Received: by padhk11 with SMTP id hk11so16811971pad.1 for ; Sun, 18 Oct 2015 21:20:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=PVxp0xG/UXhPFjVBTKHW7DOE978sChZRVtGirzECDFI=; b=iQY5RUcGoiWEh4j9I21MGacMefFPOXfNJEh93L/O2QIVgHim90MmD9gNEnbgYzzErl u5QOPlJlwxJZPfWenGcd6uKvtLby+GsW5L5wvx0IxpARiYeMJ2qxGVloxmeWGKz6QJ80 lBcLmSbgA6/WbaghogjL45RymXdUvkYhckZEQzHY/jJz+8jPdOZYL3k1MaCBAI7nszlL jlHNsP7o81vfP4dBXrAO5hro7mFPBdzgPHZrpBHNgHZ1XI9KAEVJrtcl15t6ZpjZ3u8n FteIQarLu7AKh2wOtxZCOYVDDMH1C0r3UOi1JZ5p7ba9cJHBC6p0AYnk8H/Zg6sYufvS hgtw== X-Gm-Message-State: ALoCoQn9TH7cEkGQrAv886ArvjgJy/kdFcXOynEAyb/JGMb84ztd/H2rVQK9R0/O6vaeWwZCC2A6 X-Received: by 10.66.145.10 with SMTP id sq10mr7468632pab.114.1445228402149; Sun, 18 Oct 2015 21:20:02 -0700 (PDT) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id yq2sm33429377pbb.39.2015.10.18.21.20.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 21:20:02 -0700 (PDT) Date: Sun, 18 Oct 2015 21:20:12 -0700 From: Stephen Hemminger To: Huawei Xie Message-ID: <20151018212012.3ba74f45@xeon-e3> In-Reply-To: <1445149744-3217-3-git-send-email-huawei.xie@intel.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Mon, 19 Oct 2015 04:20:03 -0000 On Sun, 18 Oct 2015 14:28:59 +0800 Huawei Xie wrote: > + if (vq->sw_ring) > + rte_free(vq->sw_ring); > + Do not need to test for NULL before calling rte_free. Better to just rely on the fact that rte_free(NULL) is documented to be ok (no operation).