From patchwork Fri Aug 12 11:21:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9276805 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 F02E6600CB for ; Fri, 12 Aug 2016 11:31:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE8B828996 for ; Fri, 12 Aug 2016 11:31:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D18A32899B; Fri, 12 Aug 2016 11:31:39 +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 8721428999 for ; Fri, 12 Aug 2016 11:31:39 +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 1bYAf4-0002Z0-JO; Fri, 12 Aug 2016 11:30:02 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bYAYn-0004R4-FQ for linux-arm-kernel@lists.infradead.org; Fri, 12 Aug 2016 11:23:36 +0000 Received: by mail-pf0-x241.google.com with SMTP id y134so1415591pfg.3 for ; Fri, 12 Aug 2016 04:23:13 -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=c7zYiVmrN14Uin8yteSXW9hRWFHfSzmqQDqox4uiCn0=; b=0lfpUvFw4s5oWTaGmb0UfjfzRWPh+T474osj/NrDhtMHpVemDqyB5ozGuJH3Wb1knt Fr5A+eE7dMc4kuaEjo1Y7UGAdM9tMY0NmKAAeuTiFLlzcbQboXriqhaGTHpo/0ESXWmv P+v47rKC3oPPVFy16fBta9sNDXe8es9rDYpKjPFDJSmmdgSB/2org7wxtjJzU4UaMD86 UGfvnDivcDHs1dej6LR8V2yZqQKqbzkcfbTwJUjzULi0qgMqdXxcH9Jw1mutIIBWraqf PpO0wv70vWst6+NMzgYD40l58ig2BZ8Y77TQpyxWPSU+NaydabBkbwyHLluvUzg4akTu KTVA== 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=c7zYiVmrN14Uin8yteSXW9hRWFHfSzmqQDqox4uiCn0=; b=d6C0kFLGX1Q3v48/wlV62vQayHdZfmy7VbRn5YWwsxHMh1i14/rgdAvzltCuoZYjPq oGptcit41zPtZBubNzI0nSP4EbtMNPWBr1kqaKuO7nAiXbbYQNcjdFV/u6SHVrKLbNfj C3frniS4g0UlT+ii1ZXsTHbvGQDZ95dykRjfMa6TjrU+u8j2XbtIz2uVmC46++oFYRyS HqXHrOwySjiIsWUlh69N9K2tHIFNFkowEpdW5vpzb2zSyt7QQIuykyfgGT4ll5aTk/N8 skBWo9lFsuxvwzNetqcw4bkNOR3+/jQrpPNyNRrIjZqWAr+/DOjgMnZ9xoE50Buz67wr PMnw== X-Gm-Message-State: AEkoousFu8M9nSst9iKL7a9aeiEQbVb8FulEdcwecJreUatTnjDq2rZH13sjfAEWpQBAPA== X-Received: by 10.98.192.144 with SMTP id g16mr26548269pfk.55.1471000992699; Fri, 12 Aug 2016 04:23:12 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id ww14sm12306817pac.34.2016.08.12.04.23.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Aug 2016 04:23:11 -0700 (PDT) From: sunil.kovvuri@gmail.com To: netdev@vger.kernel.org Subject: [PATCH v2 18/21] net: thunderx: Use napi_consume_skb for bulk free Date: Fri, 12 Aug 2016 16:51:41 +0530 Message-Id: <1471000904-21715-19-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471000904-21715-1-git-send-email-sunil.kovvuri@gmail.com> References: <1471000904-21715-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160812_042333_822704_58FA778F X-CRM114-Status: GOOD ( 11.61 ) 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 0b68f2b..eb48d33 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: