From patchwork Thu Jan 28 21:25:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8154111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3D0E29F818 for ; Thu, 28 Jan 2016 21:36:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BC142020F for ; Thu, 28 Jan 2016 21:36:34 +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 5C3F62017D for ; Thu, 28 Jan 2016 21:36:33 +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 1aOuDO-0003w1-WA; Thu, 28 Jan 2016 21:34:55 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOu7R-0005sa-W1 for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2016 21:28:49 +0000 Received: by mail-pa0-x22c.google.com with SMTP id cy9so29200998pac.0 for ; Thu, 28 Jan 2016 13:28:25 -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=IRN1XMvU8qZZosmWZkREiX7GnBIYIyaRVrYZvGae+4w=; b=BMF4u5b8n+evhkp4sWWIoBhoVjz02DMnslSfJjQmQwAUEfR9zd8FHiddhJraZIIhp5 uYe/z4WqUb3kA1VimnPZCyvdDZT6HE+5Q0GoZbfzm3quU+75abZPYrF0XEewBaUPF95R mekoTQuA6TPDWAzLFDYMny9PrYNb1cw5OenXJnwRajsBv7F0ys7fq7EbN+TRTgO33oBS V9g3GfF1Byo1Q76iPB7KJmfAAi7TgWvpwLjRZItqggtY/r23qBa+9k/soECbYp/DiHpN n7LKETmeDGV4mvN6HFYR4AgeLg+SArNTvtPmde6G+NJz4xRRJmJK6ZJtWVp9ZF+sUY96 /NMQ== 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=IRN1XMvU8qZZosmWZkREiX7GnBIYIyaRVrYZvGae+4w=; b=Uq3VVnJoXfgRjeLasxaLDeE0x67wZSPK82o0Oy6EfVWBcTk3vK56TSpYcvopUQXu/g QB8c8KBU1HJVBvIYt4N6X/ptQlz7mm+Z4Ssi/kGpk9rQvcwTQM9jifi2oWwJ0R/WZb3S jgd3CN/h+uGnXRX7xMFMVPOGnTgk4n/VFoXOh1TYuo2EOPP5r1VEbmFpAQfnZrXx3dJo pSSrVvHAV57cL23su63uqc5D1pugDC1UX4BAuvQRzc/1MUMObnmtZvqWMEKWb/KBJe6U TzbHD2NipRYlAEljQ0JcE0bMgOV9d0YvRt3Cwefe1s8902WP7OAlvowebiQ7rzpahK75 QdhQ== X-Gm-Message-State: AG10YORDhz5wf7XecmjRxC8qV7+XgrfpGoxU0Dv+i9AbQQ9k1Xq8XXyUU0Bh2taiMZ8gKw== X-Received: by 10.67.1.164 with SMTP id bh4mr8016995pad.118.1454016505350; Thu, 28 Jan 2016 13:28:25 -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 c90sm18583190pfd.31.2016.01.28.13.28.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 13:28:24 -0800 (PST) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, B38611@freescale.com Subject: [PATCH net-next 10/40] net: fec: pass rxq to fec_enet_rx_queue instead of queue_id Date: Thu, 28 Jan 2016 14:25:34 -0700 Message-Id: <1454016364-30985-11-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> References: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160128_132846_382246_B3045A4C X-CRM114-Status: GOOD ( 12.26 ) 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, linux@arm.linux.org.uk, Troy Kisky , laci@boundarydevices.com, 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 --- 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 3ed79fd..01b9740 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1320,11 +1320,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; @@ -1342,8 +1340,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. @@ -1508,11 +1504,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; }