linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: "Peer, Ilan" <ilan.peer@intel.com>
Cc: "Korenblit, Miriam Rachel" <miriam.rachel.korenblit@intel.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Berg, Johannes" <johannes.berg@intel.com>
Subject: Re: [PATCH 6/7] wifi: cfg80211: Add support for interface usage notification
Date: Mon, 24 Jun 2024 15:49:37 +0300	[thread overview]
Message-ID: <87sex2ijz2.fsf@kernel.org> (raw)
In-Reply-To: <DM4PR11MB60435B5F50827F6ED8E8115EE9CC2@DM4PR11MB6043.namprd11.prod.outlook.com> (Ilan Peer's message of "Sun, 16 Jun 2024 14:58:59 +0000")

"Peer, Ilan" <ilan.peer@intel.com> writes:

> Hi,
>
>> >
>> > As depicted above, the need to inform the driver about the intended
>> > usage of the interface is real.
>> 
>> Sure, I can understand the need is real. This just feels like an ugly workaround,
>> not a proper solution.
>> 
>
> If you have a different solution in mind, please share.

Yeah, fix the root cause :)

>> And the documentation for this is quite vague, I'm worried how do we get
>> similarly working drivers? Let's say if I were to implement a user space
>> application for this, or a driver implementation for that matter, it would be a
>> guessing game for me. For example, what's "soon" in this context? 5 mins, 50
>> secs or 5 secs? Can the mac80211 operation sleep?
>> 
>
> I understand this is not clear. The intention was to say that by the
> time the interface is enabled,
> the interface type might change, and that the driver should be aware
> of that. I can try to better express
> this in the command and documentation.
>
>> So user space is now always supposed to always call this nl80211 command
>> and at what stage exactly? Or is it optional? But if it's optional what's the point
>> of adding it?
>> 
>
> It is optional. User space should use it when it expects the interface type to
> change before the interface is activated.

If this is optional for user space (wpasupplicant, iwd etc.) then the
driver cannot rely on it being called, no? So this command cannot be
used for anything important because it's optional. Also I'm worried how
this will give a different user experience based on if the user space
calls this optional command or not.

The way I see that this is designed just to workaround one iwlwifi bug,
not really as a generic nl80211 command which could be useful for all
drivers. But I'm more than happy to be proven wrong!

>> > We encountered several P2P cases in which an interface was added and
>> > P2P Group Ownership Negotiation and P2P Invitation signalling were
>> > completed successfully, but the P2P Group Session establishment failed
>> > since the interface type changed from P2P Client to P2P GO and the
>> > local device was no longer able to accommodate the P2P GO operation
>> > due to resource constraints.
>> >
>> > With this new API, user space can now inform the driver about the
>> > intended usage of the interface so the driver will make the resources
>> > available for all possible interface types. With this the information
>> > exchanged during the P2P signalling would correctly reflect state and
>> > the P2P group session would be able to be established.
>> 
>> Why not allocate the resources during driver initialisation? Or when changing
>> the interface? Why need this weird interface?
>> 
>
> Allocating resources to all possible interface combinations etc. is waste as
> not all allocations would eventually be used. 

Sure, in ath11k/ath12k we have problems with resource allocation as
well, for example how to allocate firmware memory (number of clients vs
size data buffers etc), and we really should find a solution for that.
Quite a few people are pushing for INI files to be able to configure
wireless driver resource allocation but I cannot see how that would be
accepted to upstream. It would be great find some type of dynamic
configuration solution for wireless drivers, for example devlink or
similar.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2024-06-24 12:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 10:57 [PATCH 0/7] cfg80211/mac80211 patches from our internal tree 2024-06-05 Miri Korenblit
2024-06-05 10:57 ` [PATCH 1/7] wifi: nl80211: remove the FTMs per burst limit for NDP ranging Miri Korenblit
2024-06-05 10:57 ` [PATCH 2/7] wifi: mac80211_hwsim: add 320 MHz to hwsim channel widths Miri Korenblit
2024-06-05 10:57 ` [PATCH 3/7] wifi: mac80211: fix erroneous errors for STA changes Miri Korenblit
2024-06-05 10:57 ` [PATCH 4/7] wifi: mac80211: clean up 'ret' in sta_link_apply_parameters() Miri Korenblit
2024-06-05 10:57 ` [PATCH 5/7] wifi: cfg80211: honor WIPHY_FLAG_SPLIT_SCAN_6GHZ in cfg80211_conn_scan Miri Korenblit
2024-06-05 10:57 ` [PATCH 6/7] wifi: cfg80211: Add support for interface usage notification Miri Korenblit
2024-06-06  9:27   ` Kalle Valo
2024-06-09  7:35     ` Peer, Ilan
2024-06-12 16:19       ` Kalle Valo
2024-06-16 14:58         ` Peer, Ilan
2024-06-24 12:49           ` Kalle Valo [this message]
2024-07-01  9:40             ` Peer, Ilan
2024-06-05 10:57 ` [PATCH 7/7] wifi: mac80211: " Miri Korenblit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sex2ijz2.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ilan.peer@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).