Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1559252pxb; Sat, 16 Apr 2022 12:38:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmkj9PJJI2dJGZDoe5yfaXOyUplywh+wHZDUu6pxGIubOsOzWXJ2qokveCJDpoMENIdBC3 X-Received: by 2002:a17:902:e841:b0:158:f1b3:18c with SMTP id t1-20020a170902e84100b00158f1b3018cmr2149601plg.172.1650137890672; Sat, 16 Apr 2022 12:38:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650137890; cv=none; d=google.com; s=arc-20160816; b=IQozU9GJt56q3n2KEjirEBBxjy4mQyEaTnmt7C0soD8S9ju1i0GalkVON95tZEPxwU 8uMCm892sjue4ko++e/aBzx/9Wbhd2j2Bdn9bMRt54QZeG8N2LQqrSUycZzhRM3NiSRJ LGbHl39Ss4LY7A6WKGWxwrOgLvfXvOkyr7O6xlPr05cqjMtuWjAdR1hJ/fqUeSnJXUXE c1RZdM2VQ5ZbEE8uUk8tcF5C+ChRM21ACaQhPonKBsgbf1kosWYWTSJrwrTcp0pjyKVK tdaCOhpXXao85jTiCAElkKFo6BCI03jTqS8R8qM2FJ3euck1q1y30ptsr0T+tcEYe6v1 vlfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=QXg79ITIMb+c/YfTxTorJco9Mt6LYRevJ11/hq3FBHM=; b=H2F0KmbpNZL7pDWMIdIZGxuc8fVHllwTremWekZCEvhl6EVZQkzQrPINAQlqM1W5P1 91NN3PFAfBKzfPa+w6ceAI2OzOYpXa/+N/cEXfQyBD/jUX3ngTrUosrTduuj2tB50KYy DMjp4PCwUHbkx/5AsjM/TOXpMLp+485IwlZcIVMhW3jpr9wQVRH21ejsczctXbgHctHB PNsNGV70OP7HUBjQGG6rKCq027YAIUuaWGI7OaLYcN+4OVi2B4qIkaxlGY5JPYfOlTXe Yti3r5U2cbgjA2xPrfgF2vAfeO56cBhSnfcPEEAaJyIZyV+6rM5ABUhAbMMO/5rLEzBQ Ocyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=fmJwVTpL; 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=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x20-20020a17090300d400b00153b2d165e8si3978949plc.496.2022.04.16.12.37.53; Sat, 16 Apr 2022 12:38:10 -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=@inria.fr header.s=dc header.b=fmJwVTpL; 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=NONE dis=NONE) header.from=inria.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232249AbiDPOMf (ORCPT + 99 others); Sat, 16 Apr 2022 10:12:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232233AbiDPOMd (ORCPT ); Sat, 16 Apr 2022 10:12:33 -0400 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD234BC15; Sat, 16 Apr 2022 07:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=QXg79ITIMb+c/YfTxTorJco9Mt6LYRevJ11/hq3FBHM=; b=fmJwVTpLkxQYJ84reDMPtf2kdPCy1MxrwZogdslFhrQhcidTftQca1zB VDQQHeuEtFCSO4nHYtOSPVwEae3uCetGHZTbhmQlZ770ZtDBtQjqUDskl Uvs9Xz7l5HY7zTbYbVLzjJRxg/3NQdnvRz3VJaSidouSlW2874zxBStNj 4=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.90,264,1643670000"; d="scan'208";a="32016200" Received: from 203.107.68.85.rev.sfr.net (HELO hadrien) ([85.68.107.203]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2022 16:09:58 +0200 Date: Sat, 16 Apr 2022 16:09:58 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Alaa Mohamed cc: Julia Lawall , outreachy@lists.linux.dev, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ira.weiny@intel.com Subject: Re: [PATCH v3] intel: igb: igb_ethtool.c: Convert kmap() to kmap_local_page() In-Reply-To: <857a2d22-5d0f-99d6-6686-98d50e4491d5@gmail.com> Message-ID: References: <20220416111457.5868-1-eng.alaamohamedsoliman.am@gmail.com> <857a2d22-5d0f-99d6-6686-98d50e4491d5@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-848588355-1650118198=:3501" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-848588355-1650118198=:3501 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Sat, 16 Apr 2022, Alaa Mohamed wrote: > > On ١٦/٤/٢٠٢٢ ١٣:٣١, Julia Lawall wrote: > > > > On Sat, 16 Apr 2022, Alaa Mohamed wrote: > > > > > Convert kmap() to kmap_local_page() > > > > > > With kmap_local_page(), the mapping is per thread, CPU local and not > > > globally visible. > > It's not clearer. > I mean this " fix kunmap_local path value to take address of the mapped page" > be more clearer > > This is a general statement about the function. You > > need to explain why it is appropriate to use it here. Unless it is the > > case that all calls to kmap should be converted to call kmap_local_page. > It's required to convert all calls kmap to kmap_local_page. So, I don't what > should the commit message be? If all calls should be changed then you can also say that. I thought that a previous commit on the outreachy list made some arguments about how the affacted value was just allocated and thus could not yet be shared. julia > > Is this will be good : > > "kmap_local_page() was recently developed as a replacement for kmap().  The > kmap_local_page() creates a mapping which is restricted to local use by a > single thread of execution. " > > > > julia > > > > > Signed-off-by: Alaa Mohamed > > > --- > > > changes in V2: > > > fix kunmap_local path value to take address of the mapped page. > > > --- > > > changes in V3: > > > edit commit message to be clearer > > > --- > > > drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c > > > b/drivers/net/ethernet/intel/igb/igb_ethtool.c > > > index 2a5782063f4c..c14fc871dd41 100644 > > > --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c > > > +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c > > > @@ -1798,14 +1798,14 @@ static int igb_check_lbtest_frame(struct > > > igb_rx_buffer *rx_buffer, > > > > > > frame_size >>= 1; > > > > > > - data = kmap(rx_buffer->page); > > > + data = kmap_local_page(rx_buffer->page); > > > > > > if (data[3] != 0xFF || > > > data[frame_size + 10] != 0xBE || > > > data[frame_size + 12] != 0xAF) > > > match = false; > > > > > > - kunmap(rx_buffer->page); > > > + kunmap_local(data); > > > > > > return match; > > > } > > > -- > > > 2.35.2 > > > > > > > > > > --8323329-848588355-1650118198=:3501--