Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp511634lqb; Thu, 29 Feb 2024 07:21:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVzfQaY6N7VXGRjpLALdY3GQqTEVIQjGDhknNwTc3ZTKSANMdv6J86LQqGTAQyzgH2/bRV1SWBqRsd7cHe5Va57JhIvHn5zahJ58H3Feg== X-Google-Smtp-Source: AGHT+IHwNqdIZgyVe8qXtyFSWQPcAsBMXdxK8AwTiKo1kuAFd/cxpp/mJmVr97sAkk6pwnucd6sY X-Received: by 2002:a17:903:234f:b0:1d9:edf5:c858 with SMTP id c15-20020a170903234f00b001d9edf5c858mr2483263plh.52.1709220107518; Thu, 29 Feb 2024 07:21:47 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b6-20020a170902b60600b001dcafce30f5si1399180pls.424.2024.02.29.07.21.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 07:21:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=AOQWrQkU; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-86915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86915-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B45F9284F2C for ; Thu, 29 Feb 2024 15:21:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4CF313F01E; Thu, 29 Feb 2024 15:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AOQWrQkU" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 E6FB086275; Thu, 29 Feb 2024 15:21:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709220070; cv=none; b=E7c3/N140WQh7eKsUZ2CrbG60BHruom+LnAx8cRi83SBBcgrwy0r6XajdVBQyCoGwIbABt07T6TEmGlOEC2enGvFLVq7w1hRV5lYHSx8htBUyYoeddm4Lbrlqt6Alt0izesxE3TcQNxZAgNIOfCwm1VSqI/01GACcBQI4GNi/9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709220070; c=relaxed/simple; bh=mtw1Are5X4Bl/MyGWxpW8u5oJvyM4o2l4h/oPvehucM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rjXZ1i6o7GVH3/+Z5yLbMX/70yFN4E54bb6fRTsQSwhECNOT5PTJPhbO39IeN1auHwUxcfwDJJeKn8dQpNC12YQZi9KAFStuEldRGXUqBEAWhzILh/4cu2pTBD6XywMZkOp0LW+vJRWijg/5J+0pDZrgIZOKUncE1Bhhk1ATyRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=AOQWrQkU; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709220068; x=1740756068; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=mtw1Are5X4Bl/MyGWxpW8u5oJvyM4o2l4h/oPvehucM=; b=AOQWrQkUmDn2qo6scC606kMUiVfLcFkcnLj+VdBd2J3qQ07WEMWbpVJ6 +SIhy5QeiFIIrTO2umDPe6HBvcewBgyvcwFfTcxBF4FObl2nYCYYlKtcU O/cmgDRA56ZkZxCr3fJsp8cMc6r7mJpoNYZFx9g1/8mZRsqNglscIXPYp gt/hOLHhxIxGZ9hCh0LmjbtHS85SkRp+2OQFQObHfUc3TKk7r5zQrMcmu YLBoNZkErhSPwHBut8ziEvv3pLpbHb5z2q96J7XlNk1GMHWUL3+iEDXws Ku5fE09bKsn0H7eV+mDk5cmMnXYZCYRmwXySgykOz3snKHLjAQSDiOvZK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="3574679" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="3574679" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 07:21:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="913984387" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="913984387" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 07:21:03 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rfiDT-00000008hgQ-3rit; Thu, 29 Feb 2024 17:20:59 +0200 Date: Thu, 29 Feb 2024 17:20:59 +0200 From: Andy Shevchenko To: Herve Codina Cc: Vadim Fedorenko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yury Norov , 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 v5 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support Message-ID: References: <20240229141554.836867-1-herve.codina@bootlin.com> <20240229141554.836867-5-herve.codina@bootlin.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240229141554.836867-5-herve.codina@bootlin.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Feb 29, 2024 at 03:15:52PM +0100, Herve Codina wrote: > QMC channels support runtime timeslots changes but nothing is done at > the QMC HDLC driver to handle these changes. > > Use existing IFACE ioctl in order to configure the timeslots to use. .. > + bitmap_scatter(ts_mask, map, ts_mask_avail, 64); Wondering if we may have returned value more useful and hence having something like n = bitmap_scatter(...); > + if (bitmap_weight(ts_mask, 64) != bitmap_weight(map, 64)) { if (n != ...) { ? > + dev_err(qmc_hdlc->dev, "Cannot translate timeslots %64pb -> (%64pb, %64pb)\n", > + map, ts_mask_avail, ts_mask); > + return -EINVAL; > + } .. > + bitmap_gather(map, ts_mask, ts_mask_avail, 64); > + > + if (bitmap_weight(ts_mask, 64) != bitmap_weight(map, 64)) { > + dev_err(qmc_hdlc->dev, "Cannot translate timeslots (%64pb, %64pb) -> %64pb\n", > + ts_mask_avail, ts_mask, map); > + return -EINVAL; > + } Ditto. -- With Best Regards, Andy Shevchenko