[dpdk-dev] [PATCH v2 2/7] virtio: add software rx ring, fake_buf into virtqueue

Xie, Huawei huawei.xie at intel.com
Mon Oct 19 07:06:28 CEST 2015


On 10/19/2015 12:20 PM, Stephen Hemminger wrote:

On Sun, 18 Oct 2015 14:28:59 +0800
Huawei Xie <huawei.xie at intel.com><mailto:huawei.xie at intel.com> 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).



 ok, btw, in previous commit, just in the same function,
void virtio_dev_queue_release(vq)
[...]

                           rte_free(vq);

                           vq = NULL;
I think there is no need to set NULL to vq. Will submit a patch to fix it if you agree.




More information about the dev mailing list