Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp432930lqh; Thu, 28 Mar 2024 06:34:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQMa7hJv/mshjZSxzPNwxpmNhz4xn0yKzDq/1dRHCMZ07rq/rpgf7YfiXc7nZUAVxKfUaVYGQgo0QZMu2cPXwpOdW4FthsWbak9UvmFw== X-Google-Smtp-Source: AGHT+IHcFc35DOb/LAna09boxz56oejXlgPF+rkRo1G1f8jXahIicb5frJZDZor4MguDPsomTsXk X-Received: by 2002:a17:907:7255:b0:a46:be3d:1ed8 with SMTP id ds21-20020a170907725500b00a46be3d1ed8mr2417005ejc.54.1711632839969; Thu, 28 Mar 2024 06:33:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711632839; cv=pass; d=google.com; s=arc-20160816; b=GTLAG/BYvq/0oUNtX/D/39LqxupUGxbq90MvOqc1CPru1LSLjazYK3XYhINd+Si2B8 JRIcP+G3hSwxV1vza/UsUF6v/GxfeDLPXIcDd+eVwqXmfMvN4D4EzjS+oqrj7WZvSOSw 5oCIK+mGcdi2sjKOeK1j8U76eDtXMBEKREXPbzq/XjY4Sh52u84nZSMglBrFeu11H3Gw A7PYW7TKrC9mCCBYv4P9JUuyPZznHlhIDcQH+utn/ZVIwxdfxeQ1y5X8Xkl7upzUuAGu PXvCYb57KI7WnMlzRnXC+OyWSXjvPjQzwTcVn6/qDopBexbvp89Z3CJ4hejBQrB+SAsa 5muA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=ukAwndyN8wSwuY93m82P0N4u/3kEv+p+1SKSqFRuS2o=; fh=AN3TPovGZlXbVOAi9DnJbFLhX12tsufHwxfR0pDbwBE=; b=KD5PtWZ1+vqO2hAjTOfgKmgbw2fJln21F9PIrTvgORtBLQFICsnTf7VGKEK+butJ0T Mgfi5Kxd3yfWtTbV450vjZgBOnkLOzWvOyJ6UvyYM3RJ5FibPQTjkf83OUYgMyt91PjD W4f84gF7NLs54fv6yg2LfgYwB8JxaofZysUrM8Wx/d1YAZOvAVtB1fWv04u90v9dX6D7 9uQIN4+vRft6Xsis6cNdrpMslr94+3va5NNQ2aWbQUpdX5uwqPSg/UCFpwMaI8RG8oEL OqGM4LPNXtwAcAV/SMetwry8z0s2BuggKTalyuJedquwpFs5E4SliGZAzMfCRIBTB60+ Zq9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=yDbJAJ38; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dp14-20020a170906c14e00b00a4e282838afsi310614ejc.767.2024.03.28.06.33.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 06:33:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5458-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=@sipsolutions.net header.s=mail header.b=yDbJAJ38; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 AFBD91F23D85 for ; Thu, 28 Mar 2024 13:33:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 466CA7D09A; Thu, 28 Mar 2024 13:33:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="yDbJAJ38" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 DE5D5405FF for ; Thu, 28 Mar 2024 13:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711632836; cv=none; b=g4reX6L/dRVH8e2DbQLfyLWzefr3ymcOjCLwY+0ybC6195PL/3FbNImNjQE922sNkzXxqQvqnzG1ZUQGQsgykWeT9hXRtu+qd/VMutzN+f47rCXEHb+HZykomAL+Vg99Lb1HsGQpoFQ0SfOKuD1wPhgqHfhK36dTeadfoCVVo1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711632836; c=relaxed/simple; bh=GIP4Y3zP+Jc0542YRw67X+QNVuem+/PQWwyvTFjX0IM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=cxARvCXLRuy9NNc0WPUy5sgkXLDkSbjo/WtprVZI0Pnc3mqQNPU+4LXlsG1YDGtWaEATFRHp3VpHFHAKZGFjuVukmI1m+Yd2DYoYfLNFUBLXWlifTMdwsfNbR75AHZpzFjXR/L+sucAH9Evg/zH5/y9w7Osg9mirTCvcwYcZn4I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=yDbJAJ38; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=ukAwndyN8wSwuY93m82P0N4u/3kEv+p+1SKSqFRuS2o=; t=1711632833; x=1712842433; b=yDbJAJ38K0f9ooUEJqma6yCYsvTKN9F3gl7Ggfx5IvY/2jO POUuDs0Va19dXKuIvkYOB/a4AG2CM/BW+wu4WOuqLyuPLJK5fK2+Kbi2rkXiA9M028VhmwKn146s1 4N+kja1ym8fZu7MyR+mwknQX7s/9RtHdynyjdyNL9q8ie0ezn/HV7fbcUGnOyj8cLjQ5oYWmUxIdb jgHDqw7xUIKry7XCkb/MOQul//u0gI8wnXJ9M7iRp5D+0etlblKjWVoc9CcTuKPYIWj4eI3RpgNRY O1/1fBF7/IK+SymWOl+C10UJWP+//KrSuad1m8J0uBB42CeDYDqihrkY+JfhssaA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rppt8-000000010MD-2pDO; Thu, 28 Mar 2024 14:33:50 +0100 Message-ID: <29fc2719d6814a8e84f5db9ad81c76116a52828b.camel@sipsolutions.net> Subject: Re: [PATCH 06/13] wifi: nl80211: send iface combination to user space in multi-hardware wiphy From: Johannes Berg To: Karthikeyan Periyasamy , ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Vasanthakumar Thiagarajan Date: Thu, 28 Mar 2024 14:33:49 +0100 In-Reply-To: <20240328072916.1164195-7-quic_periyasa@quicinc.com> References: <20240328072916.1164195-1-quic_periyasa@quicinc.com> <20240328072916.1164195-7-quic_periyasa@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Thu, 2024-03-28 at 12:59 +0530, Karthikeyan Periyasamy wrote: >=20 > + * When describing per-hardware combinations in multi-hardware in > + * one wiphy model, the first possibility can further include the finer > + * capabilities like below Not sure I'd say "below" rather than e.g. "like this:" > + * hw_chan_idx =3D 0, numbers =3D [ #{STA} <=3D 1, #{AP} <=3D 1 ], > + * channels =3D 1, max =3D 2 > + * =3D> allows a STA plus an AP interface on the underlying hardware mac > + * advertised at index 0 in wiphy @hw_chans array. > + * hw_chan_idx =3D 1, numbers =3D [ #{STA} <=3D 1, #{AP} <=3D 2 ], > + * channels =3D 1, max =3D 3 > + * =3D> allows a STA plus two AP interfaces on the underlying hardware m= ac > + * advertised at index 1 in wiphy @hw_chans array. Have you checked the rst output for this? Seems likely that's not going to be great with that formatting, but I haven't checked. > + * @NL80211_IFACE_COMB_PER_HW_COMB_HW_IDX: u8 attribute specifying the i= ndex > + * to the wiphy @hw_chans list for which the iface combination is being > + * described. "@hw_chans" doesn't make sense here, this is nl80211, it should refer to some attribute but why didn't you just _say_ in the patch 2 discussion that it's used here ... > + * @NL80211_IFACE_COMB_PER_HW_COMB_LIMITS: nested attribute containing t= he > + * limits for the given interface types, see > + * &enum nl80211_iface_limit_attrs. > + * @NL80211_IFACE_COMB_PER_HW_COMB_MAXIMUM: u32 attribute giving the max= imum > + * number of interfaces that can be created in this group. This number > + * does not apply to the interfaces purely managed in software. > + * @NL80211_IFACE_COMB_PER_HW_COMB_NUM_CHANNELS: u32 attribute specifyin= g the > + * number of different channels that can be used in this group. > + * @NUM_NL80211_IFACE_COMB_PER_HW_COMB: number of attributes > + * @MAX_NL80211_IFACE_COMB_PER_HW_COMB: highest attribute number > + */ > +enum nl80211_if_comb_per_hw_comb_attrs { > + NL80211_IFACE_COMB_PER_HW_COMB_UNSPEC, > + NL80211_IFACE_COMB_PER_HW_COMB_HW_IDX, > + NL80211_IFACE_COMB_PER_HW_COMB_LIMITS, > + NL80211_IFACE_COMB_PER_HW_COMB_MAXIMUM, > + NL80211_IFACE_COMB_PER_HW_COMB_NUM_CHANNELS, Almost all these attributes duplicate - including their docs - attributes from enum nl80211_if_combination_attrs. Is it really worth doing that, rather than adding NL80211_IFACE_COMB_HW_IDX and documenting the different uses of the attribute set? > + hw_combis =3D nla_nest_start(msg, NL80211_IFACE_COMB_PER_HW_COMB); > + if (!hw_combis) > + return -ENOBUFS; > + > + for (i =3D 0; i < c->n_hw_list; i++) { > + struct nlattr *hw_combi, *limits; > + > + hw_combi =3D nla_nest_start(msg, i + 1); And of course the array and splitting discussions apply here too. johannes