From patchwork Thu Feb 25 00:36:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8415461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 26D47C0553 for ; Thu, 25 Feb 2016 00:42:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4201C2026F for ; Thu, 25 Feb 2016 00:42:38 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 6B86020274 for ; Thu, 25 Feb 2016 00:42:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYjzO-0008Db-Sl; Thu, 25 Feb 2016 00:41:06 +0000 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYjys-0007zV-Qb for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2016 00:40:36 +0000 Received: by mail-pf0-x235.google.com with SMTP id x65so22279124pfb.1 for ; Wed, 24 Feb 2016 16:40:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VDH4dVxX4cYE6r6Fpq/fNMqJ+qDSA53oHdjJEBaMnZo=; b=rlUNk3+33hB6mYZouL4FRa0pK0iIv7eHJsyHVjLeiK4zm9mG8Yc8y2A1Rfoye1AOlb 5jtR+v3KEoCD8cvCWjZ5FAqpjJkQRcfpKcBf0dEEXoPkrYIM+HLP7BdX+oKJv5OxPBdc So1WJb4FF/lWhvHz1TmmIdmcopilxX+RumiBPgZX5ROdgCAWnOLy4sX5/MAdaHvL4oPc PiOYJJIo05rwKRYgqnn/xY21ZyZ/0E0vcBy3l/qt7Vgl25Mzz5665VBheHDM2ohtovpu Eahf2Lhb2FQztoz1UkFT2220sz0g4Vy72/+lqITvHVmMnSm06RoQ09Uk0q14vztYJIKb 9CAQ== 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=VDH4dVxX4cYE6r6Fpq/fNMqJ+qDSA53oHdjJEBaMnZo=; b=O8EkAuNfTfN9Kb86CDxVA7Mscwm2RywS/msZ6LFjwTtaHAN2zHcLlktN/mgnCUFQwo qTw1XxYXT6gJpy3w3v65sHG52CZTjdXj8U4QEh8osK6CA2TDG3HOLPQJcWdJ3k+D5SXZ 8RBZeVuEDdkjBfbDiBbKKYdTcwBqlIrbpqQrCG17OBDnv6CIBcmtJBzkNspGr0O2vfe/ mIRe16E8xCE3igWxeMHFZ6t3gn0H8jiPsPbmgQDsjTLMj1rUQEnxFufrBQe++2So4kvf pGXaMAGMQFCSOhSWHpmAxCKfaIYJ6q1M/mu0qS9Dc9IO+wSEuLK1yA+EmU9MSUVDprYb qaFg== X-Gm-Message-State: AG10YOQCO5SQYNN2UUWH3LjFTRwMIJMyRRDxy+HGDqOEC9jV502aNlpfOcfPzFrag9fYVw== X-Received: by 10.98.75.10 with SMTP id y10mr59083003pfa.32.1456360814217; Wed, 24 Feb 2016 16:40:14 -0800 (PST) Received: from localhost.localdomain (wsip-70-184-93-199.ph.ph.cox.net. [70.184.93.199]) by smtp.googlemail.com with ESMTPSA id 79sm7561982pfr.22.2016.02.24.16.40.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Feb 2016 16:40:13 -0800 (PST) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, B38611@freescale.com Subject: [PATCH net-next V2 02/16] net: fec: pass rxq to fec_enet_rx_queue instead of queue_id Date: Wed, 24 Feb 2016 17:36:45 -0700 Message-Id: <1456360619-24390-3-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456360619-24390-1-git-send-email-troy.kisky@boundarydevices.com> References: <1456360619-24390-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160224_164035_116486_62A63161 X-CRM114-Status: GOOD ( 13.02 ) X-Spam-Score: -2.6 (--) 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: fabio.estevam@freescale.com, andrew@lunn.ch, stillcompiling@gmail.com, linux@arm.linux.org.uk, arnd@arndb.de, sergei.shtylyov@cogentembedded.com, Troy Kisky , laci@boundarydevices.com, johannes@sipsolutions.net, l.stach@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, tremyfr@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The queue_id is the qid member of struct bufdesc_prop. Signed-off-by: Troy Kisky Acked-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index dbac975..9619b9e 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1328,11 +1328,9 @@ static bool fec_enet_copybreak(struct net_device *ndev, struct sk_buff **skb, * not been given to the system, we just set the empty indicator, * effectively tossing the packet. */ -static int -fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) +static int fec_rxq(struct net_device *ndev, struct fec_enet_private *fep, + struct fec_enet_priv_rx_q *rxq, int budget) { - struct fec_enet_private *fep = netdev_priv(ndev); - struct fec_enet_priv_rx_q *rxq; struct bufdesc *bdp; unsigned short status; struct sk_buff *skb_new = NULL; @@ -1350,8 +1348,6 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) #ifdef CONFIG_M532x flush_cache_all(); #endif - queue_id = FEC_ENET_GET_QUQUE(queue_id); - rxq = fep->rx_queue[queue_id]; /* First, grab all of the stats for the incoming packet. * These get messed up if we get called due to a busy condition. @@ -1519,11 +1515,12 @@ fec_enet_rx(struct net_device *ndev, int budget) int pkt_received = 0; u16 queue_id; struct fec_enet_private *fep = netdev_priv(ndev); + struct fec_enet_priv_rx_q *rxq; for_each_set_bit(queue_id, &fep->work_rx, FEC_ENET_MAX_RX_QS) { clear_bit(queue_id, &fep->work_rx); - pkt_received += fec_enet_rx_queue(ndev, - budget - pkt_received, queue_id); + rxq = fep->rx_queue[FEC_ENET_GET_QUQUE(queue_id)]; + pkt_received += fec_rxq(ndev, fep, rxq, budget - pkt_received); } return pkt_received; }