From patchwork Tue Mar 8 21:10:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 12774383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10283C433EF for ; Tue, 8 Mar 2022 21:13:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WPEq/m6jjes+8TBVvk6Kjaha3O7Ftd0QM9p1laNRtZ4=; b=fDxjSs5bWOavRP l19CQHUC6qHRi+PudnNBWWdlp5B42wvHvkpu1+2S19g3IuTRVKfyr2tdLsTHuT9GEa8QkVGkO882e oRfyUOOHvG16epclVAE02ZcA83s1gwlLJZwgzNr0JPbEFWwUdzU8GNyeYBxlFYwOBy6RWL2qg++vq qbNWRdS4yUi38Dyot7ONHDQJzKmKFvNq+BXH86H8h4StzpqUJfrUKPRGqvTRyES2eF6uFDnC67l3V XQ//OvYo2XxkGmqdphGwS0QtcIv0Os8vTWAwQvvSAWPtXIGFQ6r1CBaXQaJGw0Q8G1tu7amUdIdm7 r5rfM1ii35UVjMsFRWWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRh7h-006HI6-CM; Tue, 08 Mar 2022 21:12:01 +0000 Received: from mx0c-0054df01.pphosted.com ([67.231.159.91]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRh7e-006HHn-Bo for linux-arm-kernel@lists.infradead.org; Tue, 08 Mar 2022 21:11:59 +0000 Received: from pps.filterd (m0208999.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 228L6lu9001661; Tue, 8 Mar 2022 16:11:41 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2054.outbound.protection.outlook.com [104.47.61.54]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3em3v0tcxn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Mar 2022 16:11:41 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RYDlzXJNM38j8BOY4Zhe3bypN3xeX55/DM34GTUnjUqJkOQZAcH/THZj0YyO7sFjJvQLiLKcPyZA9D+RAUcPfFXQZhP/eI5MC30tuIanSePyVZ622Sr91V4MLvKuIy+zK7eXdYEwi26926NaXBUlxUDxFulJ3VakPk0fNY8AjPZUXl0pU8/y1aAiALn+ggJSpXMY4APtg4C2198c0xPcy0UiO9yh4DUn2+jBagI3K0pzJ0h/MJu5u5u9+Rh/D8vE//pgCwzBGs+6AXRJD3+DzycTs+zcDJ7hVdhHW9QgLptwBnUv2XfBR0hOSacaGG1ZTX2qy2XGom0g6ilMyVYovA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mlpW9xIsMG05UcOWSk5m03m3CbuvZMD9W+/I8PbTdCo=; b=hAPqypQD6Ht1kJ4PiQgtgG4vsf6DySQO+3pUQsrXG2ek/q+q7RDQ8IfWqpmmzGOVOuzFLa2EJ6s+B+8GmKJF2Imcc6QzKbbD4tG1HXtbLvzaqEdeuJlSEwNZwfDLRhUqnmx1IPWio8DXlrc4cTTlFzdB1+9PE/Cwn1pmK9ExV//SYOkiNvgB7f+VzIlkPzEnZcXrl8F9ShXSIesOx1cmaTKWNwYACx0A+QLej62n2TqGKyzXJQ1/KkNPwy/fEMivKF/eACCDY/ibRY3C7vx6Zc0W+5KOiKxwhgDp6O5i7auyvj914GAg4hxwE6LSyj4fXm8T6GJPPDMWyokfzCCbtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=calian.com; dmarc=pass action=none header.from=calian.com; dkim=pass header.d=calian.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mlpW9xIsMG05UcOWSk5m03m3CbuvZMD9W+/I8PbTdCo=; b=hlJVanlkPQVdIOL9XlwEEvP4Mph57v6MpzsGPWZNKXZGZGKuPHwlgNu6kFIfAo7u25yucwxFz569KQ6aO9hUJSdynkbF+G/dDhxgfrLvtGpXdIvrCnw/Kz8Du3sHPXCf0y0Fxq8R+A1mru9aKGATxLhdAorJSjf11ccg8Ie7aV0= Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) by YQBPR0101MB4476.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:17::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Tue, 8 Mar 2022 21:11:39 +0000 Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::e8a8:1158:905f:8230]) by YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::e8a8:1158:905f:8230%7]) with mapi id 15.20.5038.027; Tue, 8 Mar 2022 21:11:39 +0000 From: Robert Hancock To: netdev@vger.kernel.org Cc: radhey.shyam.pandey@xilinx.com, davem@davemloft.net, kuba@kernel.org, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org, jwiedmann.dev@gmail.com, Robert Hancock Subject: [PATCH net-next] net: axienet: Use napi_alloc_skb when refilling RX ring Date: Tue, 8 Mar 2022 15:10:13 -0600 Message-Id: <20220308211013.1530955-1-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: CH0PR03CA0308.namprd03.prod.outlook.com (2603:10b6:610:118::10) To YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f42e2b6d-73e4-4879-5ee0-08da01483c9d X-MS-TrafficTypeDiagnostic: YQBPR0101MB4476:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hR6xUabRCXVOiU+v9OSi80HCXA5LpF37rYKQ48qL3h1Ni8bGAuvOvieycGCLJje16ujEKK/h00BnxUFqaganRklcUUZIIdwaOgNBQRRgf9BPyoEkefU4eU5a+GI0Edg9ZwkYu00oVKd7CeaLsDtKdU7QAPRjVpcBY4ExVZ4dxKNKDzAsW6xW6+oN8SvKAIAhn8WOYKYEKORr0g5IVwZH/3aGsrZZHOTU+1tz86tv7dCyBO5mtrlXb4aT2Vwc2A3pBSu5CBAc9Kr5+qumKbgf5SPd+3wJCTqgEGU8vrUrk9X1Gu5VPXqrzFnKrg/zanMWLxUaGSHfdImP9nipwrl0UcIj6auTgkZwkx0my+8Vdq/R8+V/jNstbMareXM2gieMgxb9k7ho24OVAFxUhEKvoxZD83sFzKKKHXTsj/t2AR56s8TOLtDVU3/TobRo+eY0Zlb4GLff+9Vyi7Nj70wTqBudgwwCBQFQHkc3EK4hp2joHPQZ6ttBeoWdVIqZVqBlegGz9BVxpBlHBZnvYOsasXuMXUFHNUl+J78oBXR0FyLN9CY2eFASr2w5E64XVw0HoPEwsxIv9Opa+4qkdOsjAbo8hGRmKL5uYgfSEN9q7CZbWsLxrKSt700yKXQiZqNlbzsbwOUgYexctNb+caGXCwX2KtbE/XToWQKyqEga0VDXa7CSZDmfOFgDBWzksjSI63hgF4nHKKlBYTwcq0VvMQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(83380400001)(2906002)(36756003)(107886003)(38100700002)(38350700002)(2616005)(1076003)(26005)(86362001)(186003)(316002)(44832011)(8936002)(5660300002)(6916009)(66476007)(66556008)(8676002)(4326008)(66946007)(6666004)(6512007)(6486002)(6506007)(52116002)(508600001)(4744005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rrX5Gfml3l8fA4Vv0SASKNTQPGAnrGFoTRUC0Wo358rhhqybKEkTefJNlExVi95Jt2KWnm/8NSrIKuu27ak23WwL3HjNZc6BLbXEv6KVZoF3E5u1oFvQJFc8mUEkhibb/In3MUyrF0BpyezLWqhIxx3H5vgkfHVlh2KNh4uuRNPHPcbADzy7klx0Ro2uYVKrj+W09yuSXMctcVZ5UO/+uRUZjP1Z1oKoCJYoNWoeRElu+VFcYvjq15Mp3JM9D1+NK7ZG/uZxsbitbNu2o+wiryd+bIjBGevMP9GdaDx4FdwSQ+b2q5USewcUOq+5W1V0tB+BJCGN9kIQHv3h+u8rVFmPmj5wHSgfxPjFUvh82OuV6pr3gUvm0qi2kka7O+prOigYV1KACk/OQeRvKGCnNZSlr+E8ifMcsvKUu5K+ky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A84YClRkz/xBHP3LatHw+ASBnnNNrHe9Zw10Vtp4hZU63FZPec0cVPF2Iz2ZR3f/wfhAOXVuLyAATCCP8VUgN5ECg/3Bc8w6QCSVPllDl8e4nyHFY/dYxzLbgVO0AxeJHNjRcYSZMEp7cQtNmIvExN/6zSvfNSYkI58cz0s1uwnMQrZA== X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: f42e2b6d-73e4-4879-5ee0-08da01483c9d X-MS-Exchange-CrossTenant-AuthSource: YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2022 21:11:39.3984 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: W/Avz/42qodUa22O6g0LczWIN3YSYTOwdXKQWnjAqlDldrPriDzo+h1diZk7WwHBCjv2ZqP9dSsybIoKUBcVM0LzAQF4KSjWYSDMxmlVfRg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB4476 X-Proofpoint-GUID: d6YnVDlSjGLC-G-N9gv5jFiRQFO2wVgU X-Proofpoint-ORIG-GUID: d6YnVDlSjGLC-G-N9gv5jFiRQFO2wVgU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-08_08,2022-03-04_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 clxscore=1011 mlxscore=0 lowpriorityscore=0 mlxlogscore=438 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203080108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_131158_635959_636EDA09 X-CRM114-Status: GOOD ( 10.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use napi_alloc_skb to allocate memory when refilling the RX ring in axienet_poll for more efficiency. Signed-off-by: Robert Hancock --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index a51a8228e1b7..1da90ec553c5 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -965,7 +965,7 @@ static int axienet_poll(struct napi_struct *napi, int budget) packets++; } - new_skb = netdev_alloc_skb_ip_align(lp->ndev, lp->max_frm_size); + new_skb = napi_alloc_skb(napi, lp->max_frm_size); if (!new_skb) break;