From patchwork Wed Aug 10 06:42:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9272725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A355600CA for ; Wed, 10 Aug 2016 06:50:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AE9126C2F for ; Wed, 10 Aug 2016 06:50:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F8F327F4B; Wed, 10 Aug 2016 06:50:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D902D26C2F for ; Wed, 10 Aug 2016 06:50:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bXNJW-00004s-4Y; Wed, 10 Aug 2016 06:48:30 +0000 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bXNGR-0004kB-Pd for linux-arm-kernel@lists.infradead.org; Wed, 10 Aug 2016 06:45:23 +0000 Received: by mail-pa0-x243.google.com with SMTP id ez1so2293153pab.3 for ; Tue, 09 Aug 2016 23:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K8yE+aKbQMcjRBHskS5AHj1UOccErGJ49FfQMEbTSww=; b=F7jihEoikkDPr4U4X6radNBReBvu/XIc9vPfkkWjnecaUL7+zpWw3UTDGZ23ombbp1 pCBC7cKkFQpXTDvnGMNciKyu8U6HQw733A4EMtUc/VW+x0kIllixJcAb4qfB1PMz+TIv VVGZ6iN8kzKz4f9UZUKfHrA0xiMPjNkeYWVZDwkR51vDIXJyvqRaISyDEdns7sPVnQUE 0t6QNuNPqAzIHr4RH9PnnhHJ8uwZc4pSjTfBBvMQabqzoi/oLkb2K4H/uVXWBceCGBMD IczQENTE2hzKzhYERqQc58+s99CvdA7hii2iVRcTcHltwowvs8Yu/ppwgUyjL3cPsXN/ Stfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K8yE+aKbQMcjRBHskS5AHj1UOccErGJ49FfQMEbTSww=; b=CuQCGYfjVDkdBQneHUJe1Gr/Wfb9jKJIr6gWW6mvtnKhHPNiVKBozdf6oRpoqMJBi7 LwH6qjVLivM1/LDT2Z+JLdOolxmeONIdP8A6XwrCVuYKtSwc0llt9JqR8EIcydglmQq1 azQfG3HVB1E4GREmplEk9s/qN+QokOF5SLVIfbUvyUOOhwEQvgLyz3K5TIOOGIHCbDaq J3CfHX85zb8EaMn8tbi5BXM6d3D5A1tjt4JklIdd4/Y18BvgY2ZV1wJZKM3qRU2b/bEy +mP7ecjvW9ip7DHKM/lq+/XXo/Zg/deQJcPWOp41x1vBYL9NSeYdguQ7g9aTVEkHsMXP n16Q== X-Gm-Message-State: AEkoous7dtTlmMXO4zoVtmoW9RJn0opMsUrOJyo9iwsTRyoxojwg1qfMR1e8cM8v/RX7bQ== X-Received: by 10.66.72.106 with SMTP id c10mr4332624pav.18.1470811502323; Tue, 09 Aug 2016 23:45:02 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id lf11sm60825780pab.17.2016.08.09.23.44.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Aug 2016 23:45:01 -0700 (PDT) From: sunil.kovvuri@gmail.com To: netdev@vger.kernel.org Subject: [PATCH 18/21] net: thunderx: Use napi_consume_skb for bulk free Date: Wed, 10 Aug 2016 12:12:50 +0530 Message-Id: <1470811373-28277-19-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470811373-28277-1-git-send-email-sunil.kovvuri@gmail.com> References: <1470811373-28277-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160809_234520_208806_38687F08 X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sunil Goutham , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sunil Goutham This patch enables bulk freeing on the Tx side. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index 4a084ab..e73e6df 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -521,7 +521,8 @@ static int nicvf_init_resources(struct nicvf *nic) static void nicvf_snd_pkt_handler(struct net_device *netdev, struct cmp_queue *cq, - struct cqe_send_t *cqe_tx, int cqe_type) + struct cqe_send_t *cqe_tx, + int cqe_type, int budget) { struct sk_buff *skb = NULL; struct nicvf *nic = netdev_priv(netdev); @@ -545,7 +546,7 @@ static void nicvf_snd_pkt_handler(struct net_device *netdev, if (skb) { nicvf_put_sq_desc(sq, hdr->subdesc_cnt + 1); prefetch(skb); - dev_consume_skb_any(skb); + napi_consume_skb(skb, budget); sq->skbuff[cqe_tx->sqe_ptr] = (u64)NULL; } else { /* In case of HW TSO, HW sends a CQE for each segment of a TSO @@ -700,7 +701,8 @@ loop: break; case CQE_TYPE_SEND: nicvf_snd_pkt_handler(netdev, cq, - (void *)cq_desc, CQE_TYPE_SEND); + (void *)cq_desc, CQE_TYPE_SEND, + budget); tx_done++; break; case CQE_TYPE_INVALID: