From patchwork Wed Nov 14 11:48:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Radulescu X-Patchwork-Id: 997649 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="eRR9pRkb"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42w2nm22dxz9s3q for ; Wed, 14 Nov 2018 22:48:44 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732413AbeKNVvg (ORCPT ); Wed, 14 Nov 2018 16:51:36 -0500 Received: from mail-eopbgr70055.outbound.protection.outlook.com ([40.107.7.55]:23109 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727758AbeKNVvf (ORCPT ); Wed, 14 Nov 2018 16:51:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cGyKA8Az/h/ZsHU/tbygGNlyOPE2pLJRAR1DZ4uQcwI=; b=eRR9pRkb11OfWxnJALTvefjtTTA546NZfcIh91yJSPEW9JyJJmjoblrfZ+z5T4ljTgfb51YBa3ZDheXqSr8LnWUlunxMeB4rIAIprFIexDeJU08H+MH86GrFqMwBYjLU2yMeiP3NN7OQJ1J3Z/62sVk5Q3xf8uHdMqmMXznl+zQ= Received: from AM0PR04MB4994.eurprd04.prod.outlook.com (20.177.40.15) by AM0PR04MB4275.eurprd04.prod.outlook.com (52.134.126.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.45; Wed, 14 Nov 2018 11:48:35 +0000 Received: from AM0PR04MB4994.eurprd04.prod.outlook.com ([fe80::988d:7d6b:21f3:286b]) by AM0PR04MB4994.eurprd04.prod.outlook.com ([fe80::988d:7d6b:21f3:286b%2]) with mapi id 15.20.1294.045; Wed, 14 Nov 2018 11:48:35 +0000 From: Ioana Ciocoi Radulescu To: "netdev@vger.kernel.org" , "davem@davemloft.net" CC: Ioana Ciornei Subject: [PATCH net-next 1/3] dpaa2-eth: Update callback signature Thread-Topic: [PATCH net-next 1/3] dpaa2-eth: Update callback signature Thread-Index: AQHUfA/5aJM0+q7ZVEKi3GUCsTWy2Q== Date: Wed, 14 Nov 2018 11:48:35 +0000 Message-ID: <1542196109-1127-2-git-send-email-ruxandra.radulescu@nxp.com> References: <1542196109-1127-1-git-send-email-ruxandra.radulescu@nxp.com> In-Reply-To: <1542196109-1127-1-git-send-email-ruxandra.radulescu@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0501CA0033.eurprd05.prod.outlook.com (2603:10a6:800:60::19) To AM0PR04MB4994.eurprd04.prod.outlook.com (2603:10a6:208:c7::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ruxandra.radulescu@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [86.34.165.90] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR04MB4275; 6:AJYkxGS7u1oLAuoDzyq+quA1ynGeu6cQOfjZtBXBMeMcy8kNACYN+9pQ/7BU/JqI6irB3b2AHN+JiaRLYFtmNHjtlBssfP3HjqHuE64TC21gJRnkbh02ftFuuIHUtWYmxGciU2hFhoWK93uvs9sEv9XPPq+MABk34ukHCpvKueES+4hOgLC7oEF4gnMW8nOlRj7p5f5nmNCBg74/61CJ3Y/qbKNdUn6GYyEso6XkBRRoLhri462o0b6EDR+FvwyRlca10RfN61yhC269r9+1uV/gT/pVVQNmchTi2INzbSsUqIC1ZdnXroY0I7r/nK1FKdOC1AmRX6ZZ5VZ1yzma1lljmVzXDQ+M25CAspUnGJuiZf0vbFVmGryyOjiAJdrhXvdcl6tmWqYeqnwC5mXc2W9oh0hm43PrGXXrpftWYSFx5rqmQdRJTuap6Neuncwozu2wcl0TO3iiGI90WdEmnw==; 5:y98nsXCXWcvEAbHG15GL3jpxWAUBstbt134aNET4i1UpxytFryaE6AvYFQwiayJtde2NbKbKxs50vq7daKp/fdwuBSBD8jZjz4bUXPs0+gPHm7OjDdsnb+iWkGZfLZuF1xy2GUtYjUzmX8v5EsKuoSu+q7eSxstk8QAZFDY8OME=; 7:bFzKfbvgaGi/peaWhanrw7OL6FeWIl0e0BC91/tteHQk1hyVrziEdBZ4LATbRwITaVD6tvjNP3/5qi/bLVlE7lcIO+bL1S5JXn4of1BoU3GvJqEd8ZKM0NX3MkKm8koJpc4WjxQeK0VZ2b8K3pBNVA== x-ms-office365-filtering-correlation-id: bbcf0c8e-833b-4b4a-856c-08d64a271bcf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4275; x-ms-traffictypediagnostic: AM0PR04MB4275: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231382)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:AM0PR04MB4275; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4275; x-forefront-prvs: 085634EFF4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(376002)(396003)(346002)(39860400002)(189003)(199004)(68736007)(102836004)(6486002)(86362001)(186003)(53936002)(305945005)(446003)(76176011)(11346002)(52116002)(2900100001)(386003)(6506007)(476003)(71200400001)(6436002)(2616005)(256004)(99286004)(478600001)(486006)(71190400001)(26005)(4326008)(2906002)(8936002)(25786009)(5660300001)(81166006)(81156014)(36756003)(8676002)(110136005)(316002)(66066001)(2501003)(7736002)(6512007)(14454004)(3846002)(6116002)(97736004)(105586002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4275; H:AM0PR04MB4994.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: riM5wlEaGgO3GUpsTeEzEitK4EfHJlGcaL/XYV1Lr89wOZ5cGrbzEcEnqfF5CwEQjSd+JDvFB3ACPElw3q4VxGVP7VZ15hNXqaX99rJocIKKBFUFypYGnFd/BqkIj0t8jHotfBz2pN+WBnEqjHowM9b0buGI+2QK7LXF2ZZkKNbaoZClPbyukZYjjkJcds4RRfmUAvFz7C41WEm5BgbaMdJ0O00N73yo/6fy9pOyPO55kuWKVcP+/3wnN7bBS6mRU2ajg4wzR2zX90ZkrF1g1KikuDlAAmlSFY19r2/hMdTJZ2mLDYWLw/7J150FEMu4hX2KBLx2hqprhCORRXm3oHyCVJ1d9U9yfqWtXJEWP5g= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbcf0c8e-833b-4b4a-856c-08d64a271bcf X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2018 11:48:35.2700 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4275 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Change the frame consume callback signature: * the entire FQ structure is passed to the callback instead of just the queue index * the NAPI structure can be easily obtained from the channel it is associated to, so we don't need to pass it explicitly Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 12 +++++------- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index bdfb13b..048414a 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -203,8 +203,7 @@ static struct sk_buff *build_frag_skb(struct dpaa2_eth_priv *priv, static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv, struct dpaa2_eth_channel *ch, const struct dpaa2_fd *fd, - struct napi_struct *napi, - u16 queue_id) + struct dpaa2_eth_fq *fq) { dma_addr_t addr = dpaa2_fd_get_addr(fd); u8 fd_format = dpaa2_fd_get_format(fd); @@ -267,12 +266,12 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv, } skb->protocol = eth_type_trans(skb, priv->net_dev); - skb_record_rx_queue(skb, queue_id); + skb_record_rx_queue(skb, fq->flowid); percpu_stats->rx_packets++; percpu_stats->rx_bytes += dpaa2_fd_get_len(fd); - napi_gro_receive(napi, skb); + napi_gro_receive(&ch->napi, skb); return; @@ -312,7 +311,7 @@ static int consume_frames(struct dpaa2_eth_channel *ch, fd = dpaa2_dq_fd(dq); fq = (struct dpaa2_eth_fq *)(uintptr_t)dpaa2_dq_fqd_ctx(dq); - fq->consume(priv, ch, fd, &ch->napi, fq->flowid); + fq->consume(priv, ch, fd, fq); cleaned++; } while (!is_last); @@ -661,8 +660,7 @@ static netdev_tx_t dpaa2_eth_tx(struct sk_buff *skb, struct net_device *net_dev) static void dpaa2_eth_tx_conf(struct dpaa2_eth_priv *priv, struct dpaa2_eth_channel *ch __always_unused, const struct dpaa2_fd *fd, - struct napi_struct *napi __always_unused, - u16 queue_id __always_unused) + struct dpaa2_eth_fq *fq __always_unused) { struct rtnl_link_stats64 *percpu_stats; struct dpaa2_eth_drv_stats *percpu_extras; diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h index 452a8e9..287b6853 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h @@ -277,8 +277,7 @@ struct dpaa2_eth_fq { void (*consume)(struct dpaa2_eth_priv *priv, struct dpaa2_eth_channel *ch, const struct dpaa2_fd *fd, - struct napi_struct *napi, - u16 queue_id); + struct dpaa2_eth_fq *fq); struct dpaa2_eth_fq_stats stats; };