Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp718484iog; Thu, 30 Jun 2022 08:52:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vD44d2IfSAeGDTIzfhBnQWhNL76IzHBTjWOM+w7rSNWddTLGEnciiDVoD7gswPa1lrez2s X-Received: by 2002:a17:902:da82:b0:16a:7ca5:36df with SMTP id j2-20020a170902da8200b0016a7ca536dfmr16602376plx.91.1656604349298; Thu, 30 Jun 2022 08:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656604349; cv=none; d=google.com; s=arc-20160816; b=lOXSF3+UJ4U2/CohVldRvAZ3n+t7z4FJ5Dsk6ID+sKQMIwZlAD6BqRQeEDNi2PS8H9 tCul5JwivEj3WuwZT2Wh4Ge41skPYTtxvt6fIdZD/CuPKtEtr38/DoUAQtJcB7m6s3Ug Dl6bUmeovKG0Y/Qxw8+s1SdMeYydsS+VOgS9ixHbN3cdLboolm3u4nRBq/PxVSuN+EpN z1zmxDLrTyW/zKqJNh/4ar3iVP8UxNlVkFuIAScVQMxN96M/W24vwfMf84CaUUfNF0md ukuF4PETpBbizx8WnIpZRN9nanzKzU2vSWLlgSb+D8v7h/J65NoEGFus+crJuUjo5WDo rxhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=b1HHuJRU/PzgASK5LVwUbv/TAJnPbu4jGG6I27QsOqY=; b=Y6+SZNQLeVm6bsl65GtfPzr+yJU3Gby22Bgfjol/3KxjLYGqB+v8xwrnilY3CQxlQr PKQxrvDlgTCnEC5EN1iJyTMAydJT62O9d91Dta516rN+6nSrXMp1W4X0KA/1JsWfofZl sIxt+YUJHpYpdAkArzyOk0F9g/BihAaxQC5f9Nn1bIymAIntG32gozHCxAyN3hJDzuH1 wXbnuncU3ntL8CAGOQ20YRupLnsD65gfi3/i3A6tQYginjZE4Or6NntHAwwZu9w6zzUh CNEcPPauEQnPVNJTHPDKmXllrHN/ubxbTAI7HPV8miIT8k7I5SI/5khaAAzOtkwcEZPL f60Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=K7z0kaXZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a170902c40800b0016a5ec8e31csi34704893plk.165.2022.06.30.08.52.16; Thu, 30 Jun 2022 08:52:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=K7z0kaXZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235741AbiF3P0B (ORCPT + 99 others); Thu, 30 Jun 2022 11:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235644AbiF3PZz (ORCPT ); Thu, 30 Jun 2022 11:25:55 -0400 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C583039831 for ; Thu, 30 Jun 2022 08:25:53 -0700 (PDT) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-31772f8495fso182648517b3.4 for ; Thu, 30 Jun 2022 08:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b1HHuJRU/PzgASK5LVwUbv/TAJnPbu4jGG6I27QsOqY=; b=K7z0kaXZV+Vs0mudhBZ7v5I4hJ8K2IoRajqCVJXAvPAUEz8uwvT8kGg0TdLJ301AZC JKYyEQwIY2IUACWR8lS97iGRrC3WGn0tOXHUT16Ho/0modgYkovGX6yeA4tUtBtJfS0z Zlme6FyIJLdzNxUkBOwb8Mg7cC00jhPzMIFSa5h9jSd6wzE5flCIjTdT1UreW/ZMi4jZ yZ1Hp5lhZBiHrqx3mTXl95L0gizbbmnSXYD/Qa7zF5btYwTA0Hz3lZxHv2AbyPMVnZzl OM/jrbRauDoW2DR/7klV31KWRREq37PILkOqdgt1n2sU2VQbdKdICAxeJsewdFtutPMr WhbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b1HHuJRU/PzgASK5LVwUbv/TAJnPbu4jGG6I27QsOqY=; b=ani3TzAlgkJ8UycP+wAG49ZNhKnhm6B8xkydoa0R+uV4WpW286dMnbA1E0/BJz/gei 4GdP/RlL1+3BPPN45qq3BC2VNEwenqx2tEL1GGfNp4F/Ug+MKD3pVPL4vS3HHrridRQ/ rtAIWEKvHb2kVfBZVd0WcVmRzAPdwCCNLkYKygnS5gwLd57dM/7VIQBakDUJKSEr+zd7 igpdJS6sy5KfVZ5yjXqyGCU03hPfe4PP0CHs80/RZKEvfF9jMz/WPLr+IXOQon4sMtC4 DrpETMO8oA6eZDsL5MZKNE2RwbehBewNj29IpvLIgUY2BAGYKnkJYb+t2ga0jEkoePGy VMGQ== X-Gm-Message-State: AJIora/ebiUifjXcQFVXLsWX1GK+ryDWkyHHkzvk8wibRx7eZdxuOqpn 8l/U4wKk+ApCX6875ssQhsvezaE9hdH1QBkvvISm5g== X-Received: by 2002:a0d:df50:0:b0:317:9c40:3b8b with SMTP id i77-20020a0ddf50000000b003179c403b8bmr11226355ywe.332.1656602752755; Thu, 30 Jun 2022 08:25:52 -0700 (PDT) MIME-Version: 1.0 References: <20220629085836.18042-1-fmdefrancesco@gmail.com> In-Reply-To: From: Eric Dumazet Date: Thu, 30 Jun 2022 17:25:40 +0200 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH] ixgbe: Use kmap_local_page in ixgbe_check_lbtest_frame() To: Alexander Duyck Cc: Maciej Fijalkowski , "Fabio M. De Francesco" , Jesper Dangaard Brouer , Daniel Borkmann , intel-wired-lan , Alexander Duyck , John Fastabend , Jesse Brandeburg , Alexei Starovoitov , Netdev , Jakub Kicinski , bpf , Paolo Abeni , Ira Weiny , "David S. Miller" , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2022 at 5:17 PM Alexander Duyck wrote: > > On Thu, Jun 30, 2022 at 3:10 AM Maciej Fijalkowski > wrote: > > > > On Wed, Jun 29, 2022 at 10:58:36AM +0200, Fabio M. De Francesco wrote: > > > The use of kmap() is being deprecated in favor of kmap_local_page(). > > > > > > With kmap_local_page(), the mapping is per thread, CPU local and not > > > globally visible. Furthermore, the mapping can be acquired from any context > > > (including interrupts). > > > > > > Therefore, use kmap_local_page() in ixgbe_check_lbtest_frame() because > > > this mapping is per thread, CPU local, and not globally visible. > > > > Hi, > > > > I'd like to ask why kmap was there in the first place and not plain > > page_address() ? > > > > Alex? > > The page_address function only works on architectures that have access > to all of physical memory via virtual memory addresses. The kmap > function is meant to take care of highmem which will need to be mapped > before it can be accessed. > > For non-highmem pages kmap just calls the page_address function. > https://elixir.bootlin.com/linux/latest/source/include/linux/highmem-internal.h#L40 Sure, but drivers/net/ethernet/intel/ixgbe/ixgbe_main.c is allocating pages that are not highmem ? This kmap() does not seem needed.