From patchwork Wed Sep 23 17:37:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 54069 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id CA3BE22E14 for ; Wed, 23 Sep 2015 17:37:43 +0000 (UTC) Received: by lagj9 with SMTP id j9sf27525312lag.0 for ; Wed, 23 Sep 2015 10:37:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=qxKgP9KaS2r5pAra1EJGljIqVlrxnw8U5X0vWTW7HtE=; b=SEv8RqMeX6daut2bO6lg1GeMt+8HO0/h4U0ScJ6YuDGcHoVGTV8pA8IIWOrBSHv62j zHNKXVCtbKRI2h+POuxMLdVGOw3z+Zi+NV6A5rVVxnDn1EeNrUgae9+69CbjDiJrm7y8 w4sQAzD1hMIemQiqZ/V+REZen+DRHU+Pt7X5ncLWaspSwj5ymhFkVB0VtKhtxESjpBSd WkuVYkYOkWV/HdHurUOSbhGxFudHXyVgfzyUtteuJrQnt6Ccdlcta9yJ2bMTxrknR4Nl xnhIkUnoJ2Q7+B531RT72nRde1gCNsiGvMZTNaeULJt0pmpHCB4cb4mhjnIfh539i0mX 4dGg== X-Gm-Message-State: ALoCoQmPxYXlZlGY3s7y2pB1vQBNUYPnIbEGVAS3plci3S71yApCZqoPZsSqFCuRspSLq8O2WYOD X-Received: by 10.195.18.100 with SMTP id gl4mr5536036wjd.4.1443029862750; Wed, 23 Sep 2015 10:37:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.180.75 with SMTP id dm11ls56140lac.102.gmail; Wed, 23 Sep 2015 10:37:42 -0700 (PDT) X-Received: by 10.112.89.230 with SMTP id br6mr12023429lbb.15.1443029862568; Wed, 23 Sep 2015 10:37:42 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id dn8si609573lac.119.2015.09.23.10.37.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 10:37:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lacao8 with SMTP id ao8so36506375lac.3 for ; Wed, 23 Sep 2015 10:37:42 -0700 (PDT) X-Received: by 10.112.35.130 with SMTP id h2mr10391389lbj.36.1443029862448; Wed, 23 Sep 2015 10:37:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp28275lbq; Wed, 23 Sep 2015 10:37:41 -0700 (PDT) X-Received: by 10.66.97.102 with SMTP id dz6mr39556352pab.29.1443029861415; Wed, 23 Sep 2015 10:37:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pl7si12067134pbb.100.2015.09.23.10.37.40; Wed, 23 Sep 2015 10:37:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756396AbbIWRhg (ORCPT + 30 others); Wed, 23 Sep 2015 13:37:36 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:32953 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756202AbbIWRg7 (ORCPT ); Wed, 23 Sep 2015 13:36:59 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8NHawUT022358; Wed, 23 Sep 2015 12:36:58 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8NHav1p004541; Wed, 23 Sep 2015 12:36:57 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Wed, 23 Sep 2015 12:36:57 -0500 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8NHarOX021888; Wed, 23 Sep 2015 12:36:57 -0500 From: Murali Karicheri To: , , , , , CC: Subject: [PATCH 6/7] net: netcp: allocate buffers to desc before re-enable interrupt Date: Wed, 23 Sep 2015 13:37:10 -0400 Message-ID: <1443029831-22035-7-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443029831-22035-1-git-send-email-m-karicheri2@ti.com> References: <1443029831-22035-1-git-send-email-m-karicheri2@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m-karicheri2@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Currently netcp_rxpool_refill() that refill descriptors and attached buffers to fdq while interrupt is enabled as part of NAPI poll. Doing it while interrupt is disabled could be beneficial as hardware will not be starved when CPU is busy with processing interrupt. Signed-off-by: Murali Karicheri --- drivers/net/ethernet/ti/netcp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index d39dce3..8026daa 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -904,12 +904,12 @@ static int netcp_rx_poll(struct napi_struct *napi, int budget) packets = netcp_process_rx_packets(netcp, budget); + netcp_rxpool_refill(netcp); if (packets < budget) { napi_complete(&netcp->rx_napi); knav_queue_enable_notify(netcp->rx_queue); } - netcp_rxpool_refill(netcp); return packets; }