From nobody Thu Mar 06 14:52:31 2025 X-Original-To: wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Z7spV4BVYz5pjHW for ; Thu, 06 Mar 2025 14:52:34 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z7spV3kcXz3Ncl; Thu, 06 Mar 2025 14:52:34 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741272754; 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: in-reply-to:in-reply-to:references:references; bh=7U8HvoS1naKXxB6/r5kiJCpSfnIo1h3u0omI1h902Dg=; b=HzpQ4+vBbqI3Vft/haZEBFAepx0Tg24TWI/+t5ncd/M3bIVU6lzwC3GasYt+l5wBiKsxvq M/l5f3s7EP8g/kwhHPXAsq4ukozlal84kvKHXj9HGucug7kwt6kIN1K4Ug/5RW5k5bJnw0 9Kftx+E/T12L5qAutGvFLerGEimg1ETGmRgwUfJRqmLzgb+Pwj1Bki5ACKg3sGJVYgGKfx Am+B1ZS7PCIhroocWjxARg3fGBEjy/YMrUiC6yyW4T5fKlEtD7+v6wpCKtbhvPLo0kGh4F daCtyou9qZmm50WVAU8wMzEN0fAY3uCqtOr1KPyDCa8ozq3C9BjbMmXjaZRqqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741272754; a=rsa-sha256; cv=none; b=pxiEu9LC3abSsFxyQQ8ZAHZ4+VTiBl1vBli6u3tJerSgnRBitGt8WV3gZPiU4sW7moCQIe l3A/VrCUiFP7s1JeKuyWSGtsQLuvKS+Pw9YcdUqV/NlNzmYB84MgAsY2urb3Mz+uWfOxaK hwgtE3By4MT/WrAehqfANpDLWA5ftKJ9cwSgJSlvE8QacGXd6bfFeLXuxcKVT3UXegPvye BC7XXr3oYgLW0MSsWWGwQ7U9q0NNYO/oYHcDWxkoXP+dSaJfRnkhn3oLjJtTBU4ytTR8Sv ESYqlWv5Rggd8TLOVxf7MOgaFa6O9omzLRZA5WPS5gagRNajrowjnSe67ti4xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741272754; 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: in-reply-to:in-reply-to:references:references; bh=7U8HvoS1naKXxB6/r5kiJCpSfnIo1h3u0omI1h902Dg=; b=xXONcFB71XMhNQAhBX/8duk7yowHd2D80C8aop0AIMJDoDnXKqZInGOeVA/F6F+iKgJTYA Yw+xb/Asz7Z6gH4aufPAQPyxHu1YYQ3HK7rfN7C+IFAMt85x+EDzZnQ5KI/LqDnSp/8WvF RJH9vsOU5/YiZF5vAbxN7lhTzJzCUAN3QQpniu5nVEyMkYoBK8WRwT8Bwb6WmbnW0sbkH/ zOYIo9cS74IfViUktMsSJBmpKZBdlQDHpJsVtZIu+GRfKBVs9gE1BWszkrssaXz9hITYuV EdIhwBgAvgoQNlHcUcv1C5y6V1dXh8rLNH1rLx3VmbtUehE8ftMRBzTW9OTXAw== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Z7spV1zjbzyHH; Thu, 06 Mar 2025 14:52:34 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id CAD41A64806; Thu, 06 Mar 2025 14:52:30 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 982CF2D029E1; Thu, 6 Mar 2025 14:52:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id Qb-mtzoJJhcR; Thu, 6 Mar 2025 14:52:31 +0000 (UTC) Received: from strong-rtwn0.sbone.de (strong-rtwn0.sbone.de [IPv6:fde9:577b:c1a9:4902:da44:89ff:fedd:d5ab]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 87A0F2D029D8; Thu, 6 Mar 2025 14:52:31 +0000 (UTC) Date: Thu, 6 Mar 2025 14:52:31 +0000 (UTC) From: "Bjoern A. Zeeb" To: Adrian Chadd cc: Baptiste Daroussin , FreeBSD wireless mailing list Subject: Re: HEADS UP! Do not update on main currently (panic - on boot) In-Reply-To: Message-ID: <33n7so07-7364-o2sn-1495-on498r54s323@serrofq.bet> References: <38523r8n-46pr-9r68-8049-47pqqr774711@SerrOFQ.bet> <63xz4b6wrnhr4zwune5sbdflumjk5nlqwkq35cm2yh55sskkm7@nebya5fcoknu> <6257760p-p535-8p6q-8096-9489q6on4837@serrofq.bet> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-wireless@freebsd.org Sender: owner-freebsd-wireless@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Thu, 6 Mar 2025, Adrian Chadd wrote: > On Thu, 6 Mar 2025 at 06:34, Bjoern A. Zeeb wrote: > > >> >> Or multiple: >> - unlocked register writes >> - rtwn_cmd_sleepable() which defers it to a task which doesn't fly but >> simply opens more problems, especially for the "SET" operation; >> otherwise you'll have to hold all packets until you get a callback >> (I presume) [and make sure crypto state doesn't change anymore]. >> Even more fun, you have to make sure a del key is done before doing >> another set; which either will have to error or sleep again if the >> del is sitll pending so simply "reduces chances", or use the taskq >> for serialization as well (going back to holding packets while any >> crypto operation is in progress). >> > > I did that for my ath10k driver - i buffered frames in a per-node queue > until the > key set/update finished, and then i unblocked. PITA, but it needed to be > done. > I had to do the buffering anyway - I needed to buffer frames until the > firmware > BSS JOIN command completed. You also had a lot more taskqs I remember. > So if you'd like, after we get the crypto cleanup stuff finished enough and > landed, I can tackle seqno next (which removes the TX lock) and then I can > work on pushing some per-STA queue pause stuff into net80211 so we can > delay passing traffic until STA JOIN and key create/update. That way it's > fixed for everyone. Defering bits into taskqs is not going to solve the problem. It didn't work for state updates as we found out - because we are still swapping nodes under ourselves It doesn't really work out here nicely either. The queues are a thing to tackle at some point *but* before any of this the question is the nt (NODE) lock being held inconsistently in the downcalls. Until that isn't fixed any of the other other solutions won't work well either. I am off for a few hours; I have manually extracted my "weekend workaroud" into https://reviews.freebsd.org/D49256 from my TKIP branch (assume code next to this had changes too) and started a build. I'll go and test it tonight hopefully individually. The TKIP branch has been spinning for an hour and half or so already. /bz -- Bjoern A. Zeeb r15:7