Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2357775rdb; Wed, 21 Feb 2024 05:26:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXClQng+FyfL/38ALD3zvrtKRWgawulgiQ3d2J7u9iA4Xo4SSN8Y2WfK/hkXE4ej1lfKm7e+KeOvMgUD+YG6IieR82a9vaje1NglXH47g== X-Google-Smtp-Source: AGHT+IGXRqMvE2FlQ59zDZSB56RmgxHNvfFnxIDkaambMAa5gwFzUdLwxCfk0BWSkoFp4GB+h+pV X-Received: by 2002:ac8:501:0:b0:42d:cb89:daa0 with SMTP id u1-20020ac80501000000b0042dcb89daa0mr17911949qtg.0.1708521995591; Wed, 21 Feb 2024 05:26:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708521995; cv=pass; d=google.com; s=arc-20160816; b=XpX8HsT5/3Sorlllc7bPWwd2FiuobiQw/WH4APBySTSjDEc/C6OlhE4ZrAp37Jhxxl FSdmAILxyPy/9Kj+xDPG2UILvJ+gd/mp7mkqKhwUm6hJKndb39bqcUFyeCy/RDPQo8kQ jCxhuu+bq7bV/UcUWJmwY2wgZe+ylurS36321xXxS2BTK3EOOYuFSNQyNJ4yMyiHYS8B 9FJ/jfr+YQGxSioPtz8lZv4pQxogCIS9H5ZD5wlcEX26CD8S23VJWnxUvJknxEaxo/RH fUjIpdO1HIlEOlhqhFFqY3q5dncOy6uXXkWqpUAVrrux+cTT2cBfScbhVxoCQcEyoOxD Zteg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=P/qK5TqAjPViEt37XC0w6INh2ahRNozGnu7xeaXNpK0=; fh=wvaXWvVgn6DLA5XqqRyd5FdHrFd+2Fwj4QP9y6qk/9w=; b=Mpu89nQvI5gjAs4UrXHWJ6m0WT5+hIlbTjq4PkPl2W3roMYJ21uDAO064A8gEL503p sPlbrXN52Yx29gWzS47h4tXpN7oNSj5JG//0Kmnz48xjzg4YGqVHYmeFf2F+d6ojdXqN C9WdvKoAYgNRwNKPAphry3qvBqsJr4SxsUX7NVEUho3YtTfowqwkqRh/UMGVe2XsG1wG Vkn0Tq2ec/lMZpx1LdCn6CyKkl3pkvO90CGCSd1pEAJVl8Y+hS6fZDlVVgAqmvxKW7m5 JZ0hjKuicn1jjZB4Ridd/qBzyendHZhcRba1MFzBrusGAAEqnQm3ugvkmafas64e6IXQ dOdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=co7LpC06; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-3861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x18-20020ac85392000000b0042e3fa62777si393618qtp.594.2024.02.21.05.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 05:26:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=co7LpC06; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-3861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4AE2A1C2127E for ; Wed, 21 Feb 2024 13:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF73179953; Wed, 21 Feb 2024 13:24:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="co7LpC06" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 CD5FC7BB03 for ; Wed, 21 Feb 2024 13:24:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521886; cv=none; b=RHJORu0lep+VK9Hr6dMJWFaD2oI19rJctJDO62aeYYaxW+/66kBKlPZEioknUi5TqdCpjHzxUxx8C2KQyD4C3VvZ6kZN2k8wGVP3m1pw+wFfv6pvUaqiT9DC425kYLwFM4/1eeWruoPoavIJUC7QQYVl2cy/8+l0KjzhWYT5JuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521886; c=relaxed/simple; bh=X/2bOJ0j4/gjsnIn6/xZ+SAkfdbGfyu5qHhxvQ8JonE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=kenYvz+kThFoDSEE9dwT5T0RAgqu+gd4BJDj52fqkas1UWXpMvONMKuTjWM8pRQ1TSdmE0NeThG1nOdSnpMXLaJLGahGCBu26wavfkysuzcKuAosm66v4FP74wh7tt5m1meDlkj/gsoqY2G9dszRucUkPOAaLrMPYKj1u+txgkc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=co7LpC06; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41L88ZSG005380; Wed, 21 Feb 2024 13:22:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=P/qK5TqAjPViEt37XC0w6INh2ahRNozGnu7xeaXNpK0=; b=co 7LpC065U8ZGLx/p+J1+OkLj+2A7DJxYOUgQMa50aqtySnYvJrYr1oiAC6/UaqC3P 8VjhqqTIPoTJe0Jrt105c1UKG9A4sYaeMvtRhbcw/YrWB/D+kAaqR/M3Fu2sSpUf Ob+bKhkvGbO/VyvrMZUuk6Lirg1HnsSx/com2ATBAasI/gKZT1jiZ66aycW13BXw 2U95uL5HiDRnYsXrT9BKefSpaqRZnlDfttYDMhMwoRgkRd2Tc+4fA5D5CUEgf1MR iejsNM2vX+UmHM8J1eOSJ4hFNZv4g4IMuk0dslMuCfCuwoA/0VSIBZY2TB29oUjU vtLdf3CFN81ty83EHj1A== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wdddg0pcp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 13:22:30 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41LDMUeb013929 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 13:22:30 GMT Received: from [10.216.12.189] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 21 Feb 2024 05:22:26 -0800 Message-ID: <48a16061-d62b-4456-8545-36e3f040e317@quicinc.com> Date: Wed, 21 Feb 2024 18:52:22 +0530 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 4/5] wifi: mac80211: start and finalize channel switch on link basis Content-Language: en-US To: Johannes Berg , Ping-Ke Shih CC: "linux-wireless@vger.kernel.org" , "Jeff Johnson" , Ilan Peer , "Jouni Malinen" , Ryder Lee , Arend van Spriel , Felix Fietkau References: <20240130140918.1172387-1-quic_adisi@quicinc.com> <20240130140918.1172387-5-quic_adisi@quicinc.com> <646d1e3e404a437f4c99c80996eb4f194ac242b8.camel@sipsolutions.net> <26df9aa6-e497-4040-ad5c-c647454acca6@quicinc.com> <5c0fd2eb-eb19-4b69-a325-ad9eef633336@quicinc.com> <18c0d4de-392a-420c-8a05-466a83cd2eb8@quicinc.com> <3c550ae335a9762a9cbd0c8109b6dd99faeb8f6f.camel@sipsolutions.net> <5a89e63fb7644d12be72154c90c96199@realtek.com> <32b5e358f7b54f4921e0a9e44a71f3a791f0d0da.camel@sipsolutions.net> <31b97f3c18129edd835ca4d968cd59947efab950.camel@sipsolutions.net> From: Aditya Kumar Singh In-Reply-To: <31b97f3c18129edd835ca4d968cd59947efab950.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: w_ItDBQDYg-zFGiebFRjAMXihnsQp8pv X-Proofpoint-ORIG-GUID: w_ItDBQDYg-zFGiebFRjAMXihnsQp8pv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-20_06,2024-02-21_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=999 spamscore=0 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 bulkscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402210104 On 2/21/24 18:38, Johannes Berg wrote: > Hi, > > On Wed, 2024-02-21 at 18:22 +0530, Aditya Kumar Singh wrote: >> On 2/21/24 13:39, Johannes Berg wrote: >>> Qualcomm: >>> - copies and updates CSA/ECSA elements all by itself >>> - btw, not sure here about probe responses, does it do that too? >> >> We had a thought about keeping this CSA/ECSA handling at host/kernel >> level only. But the major point of concern is _synchronization_ among >> firmware of each of the links participating in the MLD. > > Sure. > >> * Even if we ignore TSF/TBTT synchronization for a moment, how firmware >> will know when to transmit the beacon with a particular counter or when >> CSA has finished on other link? If rely on host's update then there is >> room for further delay and hence errors. >> - This is because, counter value on the reported link depends on >> the last beacon transmitted by the affected link. > > Sure. > > I don't think anyone suggested that the host will put the exact counter > value there, just to have the template. > >> * Host can send the template on all links > > Right. > >> but how to ensure that first >> template is reached on the affected link and then only on the partner >> links? Host will queue the command properly but reaping of the command >> on n (no of links) independent firmware can not be guaranteed in the >> same order in which host has filled. It depends how busy each of host to >> firmware path is. > > True, and there's a potential for race conditions there I suppose, but I > suppose in the Intel, Realtek and hwsim case at least we wouldn't have > *different* firmwares running multiple links, but a single one. oh okay, makes sense. > > In any case, you could solve this even with multiple, by applying the > new template only after you have the CSA'ing link's new beacon template, > if it requires filling in CSA counters, or such. > >> * And then obviously, considering TSF/TBTT will be again complicating >> the synchronization part and making it more difficult to manage just via >> host. > > Again, not suggesting that it is managed completely by the host, just > the templates. > >> Hence there is a strong urge to let firmware handle all this for beacons. > > Sure, that's fine, your call :) > >> As far as how firmware will _magically_ communicate among themselves is >> concerned, we have *IPC* in place to achieve that. One link firmware can >> talk to other link firmware when required. > > :-) > > It probably doesn't actually help you make it race-free though, so does > it really matter? But again, it's your call how you want to do it, and > we'll just have to handle it in software appropriately. While I'd prefer > to have _one_ way of doing things, at least so far we've basically seen > one way of having the host involved and ath12k not having the host > involved, so it's all still really simple. Yes! > >> Kernel Level >> ____________________________________________________________________________ >> -------------- -------------- -------------- >>> Firmware 1 | <- IPC -> | Firmware 2 | <- IPC -> | Firmware 3 | >>> on HW 1 | | on HW 2 | | on HW 3 | >> -------------- -------------- -------------- >> >> >> Hence, host just needs to update template of the affected link and >> indicate to firmware that it is a critical update. This firmware then >> can indicate other link firmware(s) to append CSA/ECSA IE with a given >> counter value to its beacon via this IPC. > > Sure. You still have a race, because if you send a message over IPC > saying that the CSA needs to be included and it's just before the TBTT, > chances are the TBTT event will still happen without that. So in a sense > it's similar to the host updating the partner link's beacon template > "too late". You can have a situation where the CSA link's template is > updated just before _its_ TBTT, and the partner link's TBTT is just a > little bit later, but the update is delayed ... > > You could probably solve that by making your IPC synchronous but then > you risk your TBTT timings in cases like this. > > Arguably, I'm not sure it matters. I'm thinking we'll enforce that the > CSA must be in progress when updating the partner links beacon/probe > response templates referring to it (*), but ... ultimately, I think we > can accept that the partner link updates the CSA one beacon later if > their TBTTs are very close. > > > (*) and now that I think about it, that might have to immediately come > with a separate template to use _after_ the switch, like CSA does for > the CSA link True. So each link will have to send two templates. beacon_csa and beacon_after > >> Parsing the IE and >> de-fragmenting and fragmenting it again can be done by firmware itself. >> (Agree that it is bit complex but when comparing with complexity of >> maintaining synchronicity across links, this looks more doable) > > That sync maintenance is because of your hardware design though, others > don't necessarily have that because multiple links are handled by the > same NIC, not separate ones. > >> Hence we have taken "offloading beacons fully to firmware" approach. > > Sure, fair enough. > >> For probe responses, it is handled in host/kernel only. Firmware sends >> back the last transmitted count in beacon to host. So we have the last >> transmitted count info. Per STA profile generation logic is also there. >> So we manage via that. > > So I think like in Realtek's case I'd probably advocate doing that in > the driver with the offsets given by hostapd/software stack, although > that requires having *two* feature flags, one for beacons and one for > probe responses ... since you lack the "magic" for probe responses. > :) I guess yeah. So this approach we discussed is fine right? Have some _feature flag_ to indicate whether host would like templates (with offsets) for reporting links or not. If it does then hostapd can send those, otherwise it won't. Hosts can further handle as per their need.