From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 4B985A0096 for ; Thu, 6 Jun 2019 09:31:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1892B1B95B; Thu, 6 Jun 2019 09:31:54 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 693C81B94D; Thu, 6 Jun 2019 09:31:50 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5A7FFC1EB200; Thu, 6 Jun 2019 07:31:47 +0000 (UTC) Received: from [10.36.112.53] (ovpn-112-53.ams2.redhat.com [10.36.112.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6CA096606A; Thu, 6 Jun 2019 07:31:41 +0000 (UTC) To: Ye Xiaolong Cc: dev@dpdk.org, ybrustin@cisco.com, tiwei.bie@intel.com, jfreimann@redhat.com, david.marchand@redhat.com, stable@dpdk.org References: <20190605100039.18029-1-maxime.coquelin@redhat.com> <20190605100039.18029-5-maxime.coquelin@redhat.com> <20190606071537.GA14480@intel.com> From: Maxime Coquelin Message-ID: <0fd1b580-b1cf-4005-b4fc-69e1f2ef1700@redhat.com> Date: Thu, 6 Jun 2019 09:31:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190606071537.GA14480@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 06 Jun 2019 07:31:49 +0000 (UTC) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3 4/4] net/virtio: remove useless pointers checks X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 6/6/19 9:15 AM, Ye Xiaolong wrote: > On 06/05, Maxime Coquelin wrote: >> This patch removes uses checks on 'prev' pointer, as it > > s/uses/useless/ Thanks, will fix while applying. Maxime >> is always set before with a valid value. >> >> Reviewed-by: David Marchand >> Signed-off-by: Maxime Coquelin >> --- >> drivers/net/virtio/virtio_rxtx.c | 15 ++++----------- >> 1 file changed, 4 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c >> index 358cc86627..ca40ba9c5d 100644 >> --- a/drivers/net/virtio/virtio_rxtx.c >> +++ b/drivers/net/virtio/virtio_rxtx.c >> @@ -1517,9 +1517,7 @@ virtio_recv_pkts_inorder(void *rx_queue, >> >> rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]); >> >> - if (prev) >> - prev->next = rxm; >> - >> + prev->next = rxm; >> prev = rxm; >> seg_res -= 1; >> } >> @@ -1701,9 +1699,7 @@ virtio_recv_mergeable_pkts(void *rx_queue, >> >> rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]); >> >> - if (prev) >> - prev->next = rxm; >> - >> + prev->next = rxm; >> prev = rxm; >> seg_res -= 1; >> } >> @@ -1876,9 +1872,7 @@ virtio_recv_mergeable_pkts_packed(void *rx_queue, >> >> rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]); >> >> - if (prev) >> - prev->next = rxm; >> - >> + prev->next = rxm; >> prev = rxm; >> seg_res -= 1; >> } >> @@ -1921,8 +1915,7 @@ virtio_recv_mergeable_pkts_packed(void *rx_queue, >> } else { >> PMD_RX_LOG(ERR, >> "No enough segments for packet."); >> - if (prev) >> - virtio_discard_rxbuf(vq, prev); >> + virtio_discard_rxbuf(vq, prev); >> rxvq->stats.errors++; >> break; >> } >> -- >> 2.21.0 >>