From patchwork Wed Apr 12 21:16:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haiyang Zhang X-Patchwork-Id: 13209523 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAD18C77B6C for ; Wed, 12 Apr 2023 21:17:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbjDLVRd (ORCPT ); Wed, 12 Apr 2023 17:17:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230214AbjDLVRa (ORCPT ); Wed, 12 Apr 2023 17:17:30 -0400 Received: from BN6PR00CU002.outbound.protection.outlook.com (mail-eastus2azon11021021.outbound.protection.outlook.com [52.101.57.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0690F7DB0; Wed, 12 Apr 2023 14:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GT7XlNA0h086uS1mGe3A17HvFoPE8RU9kVzf9nlyE8Wag24KJPzJj3FJ7YeaVkUETHXSU+UvWHItzy19exl2fKA7N2jmh9Zs4T8L+ibddJh60yquJX52uLg0shAC+nSt3neYmr47SpM0yabLGsFnHFPe7cpdVx+kedS+Vgj2E/LYL8ACp11LcECxRhzqfvRQeKKbOeN6yWDAZJLqvrU0acj8HWe5sZw5kGwbkTZfRIsfwN/wga/xiWgEA7BO+eNU1YRZDfvztHM/nPUvGH2kMZkd8mqBLwdsrJPWeqfOHtWU4ebExZK164qkIdRu0Dz/g8hYE6Ddvkk+uOiNrNwZhA== 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=jkZb2endiUvSQiBBqICOnNXOTE5v7ywntoF1PbwKMQY=; b=cS0sXV+vuABeGXCQUQvne7Lj11/BixAtHyDBvOo/e/fVTJ6bPoRG52cO0AmADLOLc/xaTgl9rjbxs22G8/8QkQse7g7AZLDcD+Vr7yqPfDDSKER7FURtCcsBOqZT7rBks4PU8ZKnzIRPCtLqhfiRDlkTKv/gpVgfby2dYcxmKf1UmhBMJDZpIcBOcbSdXrEgqXQ48zQGXeyeiwBQQHEWm0PS26sDiLRzc8NBxgDITsxHWp2Tnpd2s6NIjIq+yDKt4C41GEJdFbXytt38NtAMWz7dUhxzy2IiQE3uuIXyC+tP4+D/2OvvfOqBbcmi7kpzp7foE7+BrQjd45XrXZxSbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jkZb2endiUvSQiBBqICOnNXOTE5v7ywntoF1PbwKMQY=; b=H+E47Cvnv0LcagTwQYb9oLvA/8t8FocKYpigjyeGv1PCiC7sRRBXFg2GdyC+1z3VfitXx5LXhe6HLb30golsCKTndNwVA6ZGHGFK+lwMeYh+PGasgWUexGu+NEl+741h4b8N+Wver02ZQa/bQw/m11/NytjUb1LsitOmDJo96wE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from BY5PR21MB1443.namprd21.prod.outlook.com (2603:10b6:a03:21f::18) by SA0PR21MB1881.namprd21.prod.outlook.com (2603:10b6:806:e6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.4; Wed, 12 Apr 2023 21:17:21 +0000 Received: from BY5PR21MB1443.namprd21.prod.outlook.com ([fe80::3e29:da85:120c:b968]) by BY5PR21MB1443.namprd21.prod.outlook.com ([fe80::3e29:da85:120c:b968%6]) with mapi id 15.20.6319.004; Wed, 12 Apr 2023 21:17:21 +0000 From: Haiyang Zhang To: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org Cc: haiyangz@microsoft.com, decui@microsoft.com, kys@microsoft.com, paulros@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com, davem@davemloft.net, wei.liu@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, leon@kernel.org, longli@microsoft.com, ssengar@linux.microsoft.com, linux-rdma@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, bpf@vger.kernel.org, ast@kernel.org, sharmaajay@microsoft.com, hawk@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3,net-next, 1/4] net: mana: Use napi_build_skb in RX path Date: Wed, 12 Apr 2023 14:16:00 -0700 Message-Id: <1681334163-31084-2-git-send-email-haiyangz@microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1681334163-31084-1-git-send-email-haiyangz@microsoft.com> References: <1681334163-31084-1-git-send-email-haiyangz@microsoft.com> X-ClientProxiedBy: MW2PR16CA0002.namprd16.prod.outlook.com (2603:10b6:907::15) To BY5PR21MB1443.namprd21.prod.outlook.com (2603:10b6:a03:21f::18) MIME-Version: 1.0 Sender: LKML haiyangz X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR21MB1443:EE_|SA0PR21MB1881:EE_ X-MS-Office365-Filtering-Correlation-Id: 11e944ab-c066-4e04-730f-08db3b9b4ddf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K3Mg1U9nHBv+c2uYpWgIzvF9SCZcVLNSbMdO39xPVWfVpiNYis+QTlXYA5B4oyypAs2JglYTHwfrkliNKjmH0RUvj5PjbeqCb2vkA5LFwz81cMXH2PfoJVaGcFOpF5wrBBmMQ9E/PCZAsf6hIKvmXjZ4IOqzor9Z+kvgJuI/+K4DbYO99qC7EGSgyyP7A/4X87v7fdQ7z9TYwNPNenxfGCP7C0DI3kp+ToFEabOZSd2W8kuX9gA1p3R6S3omHW1/xK2dHhZ2RsyOiDAmlb79M5IXlkDHOx+UToaV3UHBmT8GdE5PEJcwCZz+HvHBNpPRRXQFYPWnZwIOzAS//Yny4Nq/wXqKiVkH5+/8UfhF70ONj9gt6HZ0LUvTFIu8f6w3JzFSPpTvXsFq9YxHfa9l1B+o3Go+p3bGhPO3dVDYXMe83Lht5pmn/siMlLiMBqiXu8Kig3LC+INw59fmEbnfAn8UvUH1FON4L7wAx/7/ay+4a1m8z9OlOBabngqpe/3g9DqVw4zD2gkGp7853slnEB1TAlpe17R2CLMCfqEMWHpMA0BTIZABidXzAm2q2FcuCxF10m4Pi8lE0rrezYxveNJUKoSUZUqZPJN1qrraoRrHvpKOfIijmA3gCJq398bCVpfAHUnFgt6kPgxIc6Ri206KVvUbDJpe7TiZtuOGmSQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR21MB1443.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(366004)(39860400002)(136003)(396003)(346002)(451199021)(8676002)(38350700002)(38100700002)(2616005)(83380400001)(7846003)(186003)(478600001)(52116002)(10290500003)(6486002)(6666004)(316002)(26005)(6506007)(6512007)(2906002)(4744005)(5660300002)(7416002)(36756003)(4326008)(82950400001)(66476007)(66946007)(82960400001)(41300700001)(66556008)(786003)(8936002);DIR:OUT;SFP:1102;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/ZXOExAGtGtC6aYpHBdrKuIqseUKNB48AbfTdz1GM8H/3EK4A1sLxYUAiB717m5Y2qzKzk1UVtfML5RBMOjlKhrIH0yCNinZI/exZKPnNgJYrtcwAxOUtD4haaYQ9mI1XpK3GfB76BHj6tDj2dAzyvvjKaoOpPr9L/DAbROuo9YEf+cGcIXvSdFaJraeXFYX1LxxYS/hhcsC6bNlhsSaJiSc0glE62ZBsCNW5pxYQcnS7W0Sa+au8GIALon5Azl6B4Op/Q0sWaPTkt+yUJst/lZ3v6U0ne+VTYoaOCOuuI9ayiuGhwOnZNdJzZjVb/mhSttzhax2j4sPoU9H9KXgBrAs6BY6MN83ixe4eqvmeYfqXPxkrj59PNnPACrEN4c4QG/jyYN+IGHEybxuo60fWNI0inwJxL13iJbgbEQNILx8+2/1OzH8mMgqnJgk4uQCtRcSOUKf5dC6j5gHbNflncTilfjUTAv3JiI52CZfP9hb6j6pZbEUBCyBjy4luhqqcN3irU+81k6dRtJk7P/B6dJAE6E33DIaCxfOhlNqltaBsNC5bOx8+XHLdU1 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11e944ab-c066-4e04-730f-08db3b9b4ddf X-MS-Exchange-CrossTenant-AuthSource: BY5PR21MB1443.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 21:17:21.6684 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1lLNPYfQka3r4EXKrVQmnwnCCeblU2h+kLBGw3BmRuhJTkCCMUB4Ux4FhbmWahwgrcg7szDdFHbdlg8hqLnqVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR21MB1881 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use napi_build_skb() instead of build_skb() to take advantage of the NAPI percpu caches to obtain skbuff_head. Signed-off-by: Haiyang Zhang Reviewed-by: Jesse Brandeburg --- drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index 492474b4d8aa..112c642dc89b 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1188,7 +1188,7 @@ static void mana_post_pkt_rxq(struct mana_rxq *rxq) static struct sk_buff *mana_build_skb(void *buf_va, uint pkt_len, struct xdp_buff *xdp) { - struct sk_buff *skb = build_skb(buf_va, PAGE_SIZE); + struct sk_buff *skb = napi_build_skb(buf_va, PAGE_SIZE); if (!skb) return NULL;