Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp713562iog; Thu, 30 Jun 2022 08:46:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vlKu37NewngV+ZW+5V/WBd4euP1V0N6QsC3sckp8WYAqfL1sMDm79fCzC8i1qiK9xKJjgC X-Received: by 2002:a63:6984:0:b0:40d:9ebe:5733 with SMTP id e126-20020a636984000000b0040d9ebe5733mr8303493pgc.170.1656604012524; Thu, 30 Jun 2022 08:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656604012; cv=none; d=google.com; s=arc-20160816; b=UZFOkTP5tQL68Is+5+OORGxwvAsK7Lqrr28UKDSe9ttcifE48pJUf3G3c1Na6uh7V1 hosQQCdu5sWz0QegNUigYnxD76YvC0RJTleqhJaccq29l6QnSMXhjNErtHsO/06UQrAV F41nfGodJ/tmYzA8mnb/JIA7Tg2/Ew2oIOJ0LUw/9u5/A0xul/ixe2UxQxyMVqZ/jROg 9P1SiTHSv8miadmESH9rH6pjWxqAfGSf6UnNvlIqZbkZMr4/gW+s8jHtob0H7r328MUz jJ/lh5evYrIn6yPf2g/n/1FMbjQgdA5Lnq7On8fUrDx7dIgdf0QCO4Qe2WaqJ88vnP61 0S9g== 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=/i5OyXrdHIl03uJMvczX531K/3M39oSh861kA9eYkbU=; b=icAfOByobsxXa1p0uRrm5ortH8OfkYRZEs6ePMAIWTYyhCSuPxa4b8Tgso05NkzBiT E7MmHRLVAUIgvE/edpv8+o+Y0N+do8rzW0VkdtjnQoJ20ZIZKBpxWrZjUWHQovk7PPpT 8CDC/G3vraupp8T2VM18TwnRTHsJG3m9Csykc0KHO/uIQ+Xlns2ZtwfFK+j7R3PjSiYf ZY6h+5JHXmihIs7wy4Z2E8EbROpAYenrYsMW28FouZ9vQa5yXxFGTUjniCx/W9M0GfWZ kahFi3vJmCgdAhDbVgsq7xrZHpvzwQYriAOru2pWKrlallb2VR3p+M/T8+YGp44YN4cn xumg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aUnaDEQf; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a170903228300b0016a02eecec3si5607366plh.303.2022.06.30.08.46.40; Thu, 30 Jun 2022 08:46:52 -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=@gmail.com header.s=20210112 header.b=aUnaDEQf; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235397AbiF3PRu (ORCPT + 99 others); Thu, 30 Jun 2022 11:17:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235232AbiF3PRl (ORCPT ); Thu, 30 Jun 2022 11:17:41 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB01C31DEC; Thu, 30 Jun 2022 08:17:37 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id pk21so39709593ejb.2; Thu, 30 Jun 2022 08:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/i5OyXrdHIl03uJMvczX531K/3M39oSh861kA9eYkbU=; b=aUnaDEQf/6DZiB9+2W4JNMnceVSAaQP7P20qDaIlYU2rIgQd30pZyBI6JIDqFCXbQT vocFA2dds+c2iYSC2f6DEc3scWLcnYg/SOVK8wY2xZFqSwCVI/yA2xxj35Q5P7QtLFng ucHahq3keTH8wpoKTw23IaNHyTsk5TE2HMSiFGDuHUkaH3uB1vdtsfO6q7tGCe/nwB3E OseqyINdZv01zFtHRxOHMZhbOzneyJycUpWgxEzx2fPBTjbMtiZgS5zaB3ec/WHv4suM 7OD4FaSoA3XafBUR2QRUNH2ncTdRB6oN+7eUs+kgdaoIKUJtMnqOiIYBEG1cIpwouPaA F4gg== 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=/i5OyXrdHIl03uJMvczX531K/3M39oSh861kA9eYkbU=; b=vE/NdBlQoMo/34URFcm3PaIcnFdG2OSSP+jBFapIOsjk2fYm88DbEPQySc59Buc2tB vOOPUJvv85SMz/dSyLlDUu/FjNfiJnPOzdYcnJ9w4Ufv9NqunUI+kQvmfzcXZzQ6jlk4 koGjny5LIVu6ZQvVnva+aGQDGDaN0WYWD5z5hmJ8JGuYL2+Zc3Az9V2cHdKlEFUnIeOP 8NnX76k0I14RrTzFMk7j6dvh83hquMFZaksHdztoIuw3nOjbxPOKShX2+LvtPQQM3yER FnTVI0I23PeUUwTEjwJn1H0Aum6Tn0e2xRZR10oJukNV6h9QIViUkxb9ZUrqpYMtGToG fPow== X-Gm-Message-State: AJIora8dJv7bu+jKdC10I5rFxej/mcAoAPvYsBHuFdvwntmEXtHeIj6d UGG83cqGcoW6MTyKcNMCREUpBMPoQB0tnTyI5bs= X-Received: by 2002:a17:907:16a6:b0:726:574d:d31f with SMTP id hc38-20020a17090716a600b00726574dd31fmr9240954ejc.514.1656602256279; Thu, 30 Jun 2022 08:17:36 -0700 (PDT) MIME-Version: 1.0 References: <20220629085836.18042-1-fmdefrancesco@gmail.com> In-Reply-To: From: Alexander Duyck Date: Thu, 30 Jun 2022 08:17:24 -0700 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH] ixgbe: Use kmap_local_page in ixgbe_check_lbtest_frame() To: Maciej Fijalkowski Cc: "Fabio M. De Francesco" , Jesper Dangaard Brouer , Daniel Borkmann , intel-wired-lan , Alexander Duyck , John Fastabend , Jesse Brandeburg , Alexei Starovoitov , Eric Dumazet , Netdev , Jakub Kicinski , bpf , Paolo Abeni , Ira Weiny , "David S. Miller" , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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 Thanks, - Alex