From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 48915A04F1; Sat, 14 Dec 2019 11:30:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F28261BFC3; Sat, 14 Dec 2019 11:30:28 +0100 (CET) Received: from incedge.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id 96ECF1BF9D for ; Sat, 14 Dec 2019 11:30:21 +0100 (CET) X-ASG-Debug-ID: 1576319405-0a3dd1322c5fe70009-TfluYd Received: from mail.chinasoftinc.com (inccas002.ito.icss [10.168.0.52]) by incedge.chinasoftinc.com with ESMTP id iw5BD13HjjXs1WLO (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 14 Dec 2019 18:30:10 +0800 (CST) X-Barracuda-Envelope-From: huwei013@chinasoftinc.com X-Barracuda-RBL-Trusted-Forwarder: 10.168.0.52 X-ASG-Whitelist: Client Received: from localhost.localdomain (203.160.91.226) by INCCAS002.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.439.0; Sat, 14 Dec 2019 18:30:08 +0800 From: "Wei Hu (Xavier)" X-Barracuda-RBL-Trusted-Forwarder: 10.168.0.60 To: Date: Sat, 14 Dec 2019 18:29:33 +0800 X-ASG-Orig-Subj: [PATCH v2 8/9] net/hns3: remove the unnecessary assignment Message-ID: <20191214102934.50491-9-huwei013@chinasoftinc.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191214102934.50491-1-huwei013@chinasoftinc.com> References: <20191214102934.50491-1-huwei013@chinasoftinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [203.160.91.226] X-Barracuda-Connect: inccas002.ito.icss[10.168.0.52] X-Barracuda-Start-Time: 1576319410 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://spam.chinasoftinc.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at chinasoftinc.com X-Barracuda-Scan-Msg-Size: 1419 Subject: [dpdk-dev] [PATCH v2 8/9] net/hns3: remove the unnecessary assignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: "Wei Hu (Xavier)" This patch removes the unncessary assignment in hns3_xmit_pkts function to avoid performance loss. Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_rxtx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 0090cda31..18c07b85e 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -1612,7 +1612,6 @@ hns3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) struct rte_mbuf *m_seg; struct rte_mbuf *temp; uint32_t nb_hold = 0; - uint16_t tx_next_clean; uint16_t tx_next_use; uint16_t tx_bd_ready; uint16_t tx_pkt_num; @@ -1627,11 +1626,8 @@ hns3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) if (tx_bd_ready == 0) return 0; - tx_next_clean = txq->next_to_clean; tx_next_use = txq->next_to_use; tx_bd_max = txq->nb_tx_desc; - tx_bak_pkt = &txq->sw_ring[tx_next_clean]; - tx_pkt_num = (tx_bd_ready < nb_pkts) ? tx_bd_ready : nb_pkts; /* send packets */ @@ -1707,7 +1703,6 @@ hns3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) if (likely(nb_tx)) { hns3_queue_xmit(txq, nb_hold); - txq->next_to_clean = tx_next_clean; txq->tx_bd_ready = tx_bd_ready - nb_hold; } -- 2.23.0