Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2448558rdb; Mon, 5 Feb 2024 07:01:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEojPFAXnNXvkXN98W0mkQsiU6i5O5RBwWSfTxR2DYjXFe+EXtgVMhr9vO7qmix0EKI0pag X-Received: by 2002:a05:6402:2885:b0:560:77de:741b with SMTP id eg5-20020a056402288500b0056077de741bmr1944742edb.10.1707145293921; Mon, 05 Feb 2024 07:01:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707145293; cv=pass; d=google.com; s=arc-20160816; b=nfIignnkLapK2A83LEGZqgV3t5YFJcpwGqWD0gMR7vB4SnF/p3evWOQ6tPiO8zoZ2c dLxlXBX0pVJ1EraSeD5lM2F8g7ntx3YbQM3WV3ErXL/7WMwiCLr5ecnrT3vVMa1S00ME WnzcFjGIdRtxT94Gpehwe6H/7t/bzpFOqOGS9Y3Tqi5rYL12eYoblXgLOBGZ/aKkyuFp y/sJv0/fh2fXuwdkDtZnXHm5A4VVMJDs1j3DUWq94O2AS1swI83tUjA06WhzVo09Ayp3 tVmdHu2OT8iOC62Jv4XFW1oE/2I/xmo4+j398C+i3vxxEyXOOrL4LSOt8dASsB2LPs10 L9Jw== 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=PEE4+JdfTjyn6YerADKkv+gio5Qai05SHvunF75uvZU=; fh=Oewwphg8JWO2TuxigLSH971LV4XyMue2hRfcbXR3/n8=; b=pnWXOMgg29fkMqyu+Ld713ze6rwHbXKQjU+fWsiUecEra/Ec59Z5dDCT1hdc/5isDd v3kefIeZTbSp8vcwJWJzPoMyx5NBfz6aUbKDAh9RfUQfZN0/D50MqxeknR2840FK+++5 s+o/62kMvqbGJCh0NoyUyFXPV32s6ULPDJGD3pwnI//5MqNFnchAXy+OzlxfMOI4kitY WM19+lr9nJewdirtJzeBNhU0DD1BbMenNHgAbSur1ei1An8bqeFg5628bebBJKcbsT/k bFWzr9FPoqs9TXrNm2af6ZDo2yA+p9icohwAWwoKIfC4XbPYLMTiUCnOStlWIMSSxBoY gu/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oX3xciPi; 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-52869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=1; AJvYcCU8juk7KGI2u3+cSjheZ20E0amTwzbD5J7mtXay++qpbm+aBYvhvBjHF2h/ENlKjHCkc9a3k/9AOBvOYshkc6cKiMy+SkZwO64yq2Sn1Q== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d18-20020a056402517200b00560542792c7si1603398ede.274.2024.02.05.07.01.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 07:01:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oX3xciPi; 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-52869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52869-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 A5A941F210A2 for ; Mon, 5 Feb 2024 15:01:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF4362C6BD; Mon, 5 Feb 2024 15:00:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="oX3xciPi" Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 3A9B42C19C; Mon, 5 Feb 2024 15:00:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707145245; cv=none; b=aO3jz/nIX08tZo97WzCTLDougVfmPTE2CPVpLbxHRTVg9t2noH2qYHOxBKdsFQHLzpKrTo4ep5WQAQm9hJoccih+oV59DK7D1s0iTX5widpMIQ1+4LF/g7o+Nm+aH6YKJHa72Ua7wp+aeeoD0N6tNzEfEmbvbYB6cFHvJx+N0mA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707145245; c=relaxed/simple; bh=G/upHH50MlPuOxBBaB3xXpKK9F7lVAXSgZQ2cx/UUr0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZecgAJOh80lKflqo46M2Ul0twSxUjatNMRtea2dI1fPvceb0ciq2ldfvqzG5xuvreq4PVVpGG7CkymSTTfzcb6dnwx2mKc0skZ23/uDjJZ2qiwU+C/cHdwdlnlmXxob5YDPjk94lcf5alN3/whewdQ5BvYaQyj0TlMFhUqb+Fhk= 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=oX3xciPi; arc=none smtp.client-ip=217.70.183.199 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 8545EFF814; Mon, 5 Feb 2024 15:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707145241; 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=PEE4+JdfTjyn6YerADKkv+gio5Qai05SHvunF75uvZU=; b=oX3xciPiOpgsx1o4tDNRxIBoA7dmBw3a39tOa1P386RMNRDh0M00hwbtZuiQQg6pZ/wtHS HSgTnpDkxu/BejnrNyEVqNww/V2jr2k0ZJ1+hx3SYYdgB73/NdEeZBcHt3bjBPzZ6FlYMY IjC2YdExejSDAcHawCwPefQ9a1DbrsbPuIAmum/7i00XyTJZWQZRw3hJ3Ly44jsone5EDw QxORhCF4x1c0u6roUFaB8F4RX6oGu+FWBJmuS82JVdOIntjx8Phy7oZ70xXKLJnwd+vbY7 HHum87IPtjxZ9/EtxpZCe5nlAi0ygarL1gEABTngUxDw4/mTwf42W5KxSHnH1Q== Date: Mon, 5 Feb 2024 16:00:33 +0100 From: Herve Codina To: Paolo Abeni Cc: Vadim Fedorenko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , 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 v2 5/6] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support Message-ID: <20240205160033.2c017f46@bootlin.com> In-Reply-To: References: <20240130084035.115086-1-herve.codina@bootlin.com> <20240130084035.115086-6-herve.codina@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 Hi Paolo, On Thu, 01 Feb 2024 13:01:51 +0100 Paolo Abeni wrote: [...] > > > > +static int qmc_hdlc_xlate_slot_map(struct qmc_hdlc *qmc_hdlc, > > + u32 slot_map, struct qmc_chan_ts_info *ts_info) > > +{ > > + DECLARE_BITMAP(ts_mask_avail, 64); > > + DECLARE_BITMAP(ts_mask, 64); > > + DECLARE_BITMAP(map, 64); > > + u32 array32[2]; > > + > > + /* Tx and Rx available masks must be identical */ > > + if (ts_info->rx_ts_mask_avail != ts_info->tx_ts_mask_avail) { > > + dev_err(qmc_hdlc->dev, "tx and rx available timeslots mismatch (0x%llx, 0x%llx)\n", > > + ts_info->rx_ts_mask_avail, ts_info->tx_ts_mask_avail); > > + return -EINVAL; > > + } > > + > > + bitmap_from_arr64(ts_mask_avail, &ts_info->rx_ts_mask_avail, 64); > > + array32[0] = slot_map; > > + array32[1] = 0; > > + bitmap_from_arr32(map, array32, 64); > > What about using bitmap_from_u64 everywhere ? Yes indeed. Will be updated in the next series iteration. Thanks for this review. Best regards, Hervé