Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp857968rdb; Fri, 23 Feb 2024 02:08:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUBf3+t+L+RTGvRKQjvvzdT8q/veoMbQrryqYaaQaxj1SJS1cHNuXCd7FaFzvRzchic9dMWyG/b1rloXIRM1OcJ2tSFDt1sfHmZjS8q5w== X-Google-Smtp-Source: AGHT+IHCusLoKq8188g/quHVV1vwGKt5c/WcEq6AZnuwjMOS8FK7FwUDoNGc7k/+vjwOOfsNEf5I X-Received: by 2002:a17:906:264d:b0:a3e:d210:1e87 with SMTP id i13-20020a170906264d00b00a3ed2101e87mr799026ejc.77.1708682898835; Fri, 23 Feb 2024 02:08:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708682898; cv=pass; d=google.com; s=arc-20160816; b=HhiYx/1YbMzQGiOGyqFpC+46G7ATjyhGiI/WuurBjz/dZ/22U28fRLfZqcrmTpOCd3 jMk/EO2LHLdWyjPodffHoLRkqe8gVq5e6Rh8q5vzzXpK3zXnOWLdJBTF92jR+QHS5tiK 93OLroK6GNphVSjJ6zAO/A1WP1IqVwXmXl8Bbw1nOmAPiUtBZcPZbyfLnOhv7KSVu1BJ MpP3CeJ+GJi5HYbasZTVwwubaHvmFLiCloGlDzGSZF0AN+jLBGxoKncIKW+vDZpRqE2u QdRe+4OTr2ewSpKmrjIp+rsIc7/eg99fpmCzdBmEIGg5GcF+TnqmRdJH87saqrbmoSj4 Ymfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=5c3jkfiwWBVIVcLpQtxgvJnB9TnAlyKeMM5FmscF5j8=; fh=yOG3M3GE3AFY9om8JCgGZExnGvnbwVfTQwaI5ArQDAg=; b=gZDRMHNX8gNY6TFfNbHe1kVPXwXw+jA7IaqR68jvvViLfwM24IvzS61hhCv8nmXV0C 8ibPzxm+dqgvUWTTIpUt6tfVKIok2eL8mn/3vqQFuyPl4P0yXYOdS8DrJ9zgzaDQTNAe 2r9RWKr20rXc76pxYmk6JsbuDICNud8hLFCO4BE8zhsKVJoAIDhiMdn1W0WJMTxeY8zB rISh3nAE0TBSY0UF1Q/BD6KYVbdsc0mTqWyNtuA7l/2obljbZ0qaU46Aof4s1ppHDvK/ JHuHQ0vqDI8J3ZnWwp3ch/GkRAc6CF8js/ycpanPCYAo/xrH6Zhwclmwu0YFp5R2f8ns YscA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lesdaC3A; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-78100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lr13-20020a170906fb8d00b00a3e72ead652si4730500ejb.877.2024.02.23.02.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:08:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lesdaC3A; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-78100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8458B1F225CE for ; Fri, 23 Feb 2024 10:08:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1276E5CDE0; Fri, 23 Feb 2024 10:08:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="lesdaC3A" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB17F29D08; Fri, 23 Feb 2024 10:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708682887; cv=none; b=U/eS3UFA54HSlWOxEHEXr0T0ERgqbFwHgB94xoJoCM1YbT5+nE8kCUhUrqZ+kfTr1DNGiJYfKy5LmL/Wb6yNVyORkaUoJFvc71/PSRwbcEXpYXR+wrrt1i4gbTTNkvBMR+pG2MNIe/buV4RZ+B9ZhvhdsR2AW2xKS+x63SZX3E4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708682887; c=relaxed/simple; bh=Zin8l2qPLCAOlaxlh9w1w0UDrji5ob34On52/vcAqkA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X3T363u6SW8ublAlniunN5PCeqlT2rZCcFN6o5JUEJAGvyV5XegnV9O4LcTbz2IuCGxrYDsNKH3UX66i3qQdnqn77+eTe1+CTBwFb/yXqT77JhNmO0ktgQTRcWXzhYZeZhpYRZDVn2f5e4h5cVnuRHlmym4QOl+BKzpvk4UYaQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=lesdaC3A; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 9A3A524000A; Fri, 23 Feb 2024 10:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708682876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5c3jkfiwWBVIVcLpQtxgvJnB9TnAlyKeMM5FmscF5j8=; b=lesdaC3AUqO4IhojWmi1I7Z8Y86vi8R00ZOyKv++IK4CwhLPLOgn5XY5k4oR3MF9KxG5bP FHh8Vwvv8ZqVP7QC7gAed27JRdYn4HIB7z1pIItzXg4YYNTrETeym5e/QwVk9lB36wh9tm JxbCR6BLtTMDJO9AvkEoN32a3DNz4gcCTqKL8Tr4ZDnrsyAQx7L0BHAgfYciUrRKAtWAd6 TbBK9YZKs7K2AT92OvKym9dtZqqCJBhxy0zzQxhyw1V+Tke2vFi33vAh1YiWLCw5Dgt4Bl LyPfMMvW0GnXiDCqRuf8EqRFC3wBpgyr9kKf/gl7Wy0DYjAFj74/A+0yraffPA== Date: Fri, 23 Feb 2024 11:07:52 +0100 From: Herve Codina To: Yury Norov , Andy Shevchenko Cc: Vadim Fedorenko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasmus Villemoes , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Andrew Lunn , Mark Brown , Christophe Leroy , Thomas Petazzoni Subject: Re: [PATCH v4 3/5] lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers Message-ID: <20240223110752.2329d3f0@bootlin.com> In-Reply-To: References: <20240222142219.441767-1-herve.codina@bootlin.com> <20240222142219.441767-4-herve.codina@bootlin.com> <20240222174959.7097c29b@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com Andy, Yury, On Thu, 22 Feb 2024 13:50:48 -0800 Yury Norov wrote: > On Thu, Feb 22, 2024 at 05:49:59PM +0100, Herve Codina wrote: > > Hi Andy, Yury, > > > > On Thu, 22 Feb 2024 17:39:27 +0200 > > Andy Shevchenko wrote: > > > > ... > > > > + * bitmap_scatter() for the bitmap scatter detailed operations). > > > > > > > + * Suppose scattered computed using bitmap_scatter(scattered, src, mask, n). > > > > + * The operation bitmap_gather(result, scattered, mask, n) leads to a result > > > > + * equal or equivalent to src. > > > > > > This paragraph... > > > > > > > + * The result can be 'equivalent' because bitmap_scatter() and bitmap_gather() > > > > + * are not bijective. > > > > > > > > > > + * The result and src values are equivalent in that sense that a call to > > > > + * bitmap_scatter(res, src, mask, n) and a call to bitmap_scatter(res, result, > > > > + * mask, n) will lead to the same res value. > > > > > > ...seems duplicating this one. > > > > > > I would drop the latter one. > > > > I would like to give details about the 'equivalent' in this scatter/gather case. > > If you would like - please do! :) > > > If Yury is ok, I can drop this last paragraph. > > The original bitmap_onto() description is 3 times longer, and barely > that descriptive. I'm OK with your working and especially pictures. > Right, I will keep my last paragraph in the next iteration. Regards, Hervé