Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1720891rdb; Sun, 8 Oct 2023 23:54:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1B4R07EAFhOwsi7DqJnXcsn4L/zU5UVg2WiALlz0wzKacTLYBtUlce3JEIz1puRr9DXcB X-Received: by 2002:a17:90a:ad09:b0:268:2500:b17e with SMTP id r9-20020a17090aad0900b002682500b17emr12394170pjq.23.1696834484492; Sun, 08 Oct 2023 23:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696834484; cv=none; d=google.com; s=arc-20160816; b=G6WavAdPIq3FxZbi4LsPjtk6r/n10D9b8cUZ5QQzFy5nF6L7NtQ3Tp83nEDSZK80WF m3K10bo6FGKJN431l9qeVHYU8NF7KO5LygQxG5EjgzVRG45TAsP/wgP86QD5yjH04kO6 puet3YJkqBIywWG4AcWl977UlepQu0Igak41X9ZTqnqOeJRVly+abgAA0xQIbkPab1l7 /I3cUNSsls7Y0/45wFU0H0mXf5s8uFNvipcMKPNR5oa8DwLAOaVsYb8aOB81sX7inCwK J4WuQMAHNLAG5n1fN37G/CycNomLLtNZqL8b9hIWaD7a40GsQXPZa5jyb/cCHXVI+veM GQsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=XhYScgl4dk6pgqc6I6lo9a0Nd5dbL9DcH5EQsPfNO8g=; fh=R0kpj83iizMBThLe8H6xYWhfWFBxvG78ecmkaoimPk8=; b=ysCM/jHLvMdURW0ZbVeXMEtLEhA7nzkIEIMO4Z4u9/urEd0VgZ6EcjVU7rzMoZkBT9 OFdaYyRKZv4AyJhiHEur0r1lTLlVPl+ctD4FI4hHInHvJFJeItye0STY8bbg0TzcOD9B c2CVjKZKekSi5TubAyBAxFDBrHTL3lRv1WHjihOkXR9Yw291dsmlCQXlbuFEgbiXRfJv kwdum4lljKyMpvoLxx6eWAIbwE3MRlTuppv381pxWKovsDzMu/GoMECbIbR9WnFBQGBp DmIgmTADPqNs+heK5qkxLDgQjPOu5fJ7OdNq5nNyyXl1/Tb449It8CpNmAU85HwoG9TG 2Obw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SWGMwF5l; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id hk8-20020a17090b224800b00274c6997c25si9796256pjb.110.2023.10.08.23.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 23:54:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SWGMwF5l; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6188480401C3; Sun, 8 Oct 2023 23:54:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345307AbjJIGyh (ORCPT + 52 others); Mon, 9 Oct 2023 02:54:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345305AbjJIGyf (ORCPT ); Mon, 9 Oct 2023 02:54:35 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0EFBA4; Sun, 8 Oct 2023 23:54:34 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EE01C433C8; Mon, 9 Oct 2023 06:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696834474; bh=rZrIcDQhefr0DHgoymWmiWlPeKqu+JDo4LZvNnP0GxI=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=SWGMwF5l5eeF+ti9rjZXEHhfcSF0LGQYWh8xIPYIGoj8pM/LqfHI5Cf56YARyJXiz qqFHxhaWOMPc2Ip/YEUPbdK6p4HpVLderIYYmvqlGDn2fxj6jnAUhDIulH/Q5dXXTw +d7ODVAAmKNZWBG3NbTAg0m2LCVgMxWxWP64OXhyn+D58IMKnGqXWtM0KoeXfpT/Y8 JuutbfY3TxgbVMHwyFlGOh7c2YlCrGJOqCg31PPTxnw+GqNWful9vnrHT9gVwKT6ND 9+Lqp/0vlZtdkQIvlkJo/0MKzv2ubXVSE2zhEWCTF5G4zWGqT/cBghNkYIJQtppym2 Y3JAUPFb4CvHQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v2] wifi: wfx: fix case where rates are out of order From: Kalle Valo In-Reply-To: <20231004123039.157112-1-jerome.pouiller@silabs.com> References: <20231004123039.157112-1-jerome.pouiller@silabs.com> To: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Felix Fietkau , Felipe Negrelli Wolter , Olivier Souloumiac , Alexandr Suslenko , =?utf-8?b?SsOpcsO0bWUgUG91aWxs?= =?utf-8?b?ZXI=?= User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169683447045.2071896.3998375753268021178.kvalo@kernel.org> Date: Mon, 9 Oct 2023 06:54:32 +0000 (UTC) X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 08 Oct 2023 23:54:38 -0700 (PDT) X-Spam-Level: ** Jérôme Pouiller wrote: > From: Felipe Negrelli Wolter > > When frames are sent over the air, the device always applies the data > rates in descending order. The driver assumed Minstrel also provided > rate in descending order. > > However, in some cases, Minstrel can a choose a fallback rate greater > than the primary rate. In this case, the two rates was inverted, the > device try highest rate first and we get many retries. > > Since the device always applies rates in descending order, the > workaround is to drop the rate when it higher than its predecessor in > the rate list. Thus [ 4, 5, 3 ] becomes [ 4, 3 ]. > > This patch has been tested in isolated room with a series of > attenuators. Here are the Minstrel statistics with 80dBm of attenuation: > > Without the fix: > > best ____________rate__________ ____statistics___ _____last____ ______sum-of________ > mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts] > HT20 LGI 1 S MCS0 0 1477 5.6 5.2 82.7 3 0 0 3 4 > HT20 LGI 1 MCS1 1 738 10.6 0.0 0.0 0 0 0 0 1 > HT20 LGI 1 D MCS2 2 492 14.9 13.5 81.5 5 0 0 5 9 > HT20 LGI 1 C MCS3 3 369 18.8 17.6 84.3 5 0 0 76 96 > HT20 LGI 1 A P MCS4 4 246 25.4 22.4 79.5 5 0 0 11268 14026 > HT20 LGI 1 B S MCS5 5 185 30.7 19.7 57.7 5 8 9 3918 9793 > HT20 LGI 1 MCS6 6 164 33.0 0.0 0.0 5 0 0 6 102 > HT20 LGI 1 MCS7 7 148 35.1 0.0 0.0 0 0 0 0 44 > > With the fix: > > best ____________rate__________ ____statistics___ _____last____ ______sum-of________ > mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts] > HT20 LGI 1 S MCS0 0 1477 5.6 1.8 28.6 1 0 0 1 5 > HT20 LGI 1 DP MCS1 1 738 10.6 9.7 82.6 4 0 0 14 34 > HT20 LGI 1 MCS2 2 492 14.9 9.2 55.4 5 0 0 52 77 > HT20 LGI 1 B S MCS3 3 369 18.8 15.6 74.9 5 1 1 417 554 > HT20 LGI 1 A MCS4 4 246 25.4 16.7 59.2 5 1 1 13812 17951 > HT20 LGI 1 C S MCS5 5 185 30.7 14.0 41.0 5 1 5 57 640 > HT20 LGI 1 MCS6 6 164 33.0 0.0 0.0 0 0 1 0 48 > HT20 LGI 1 S MCS7 7 148 35.1 0.0 0.0 0 0 0 0 36 > > We can notice the device try now to send with lower rates (and high > success rates). At the end, we measured 20-25% better throughput with > this patch. > > Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") > Tested-by: Olivier Souloumiac > Tested-by: Alexandr Suslenko > Reported-by: Alexandr Suslenko > Co-developed-by: Jérôme Pouiller > Signed-off-by: Jérôme Pouiller > Signed-off-by: Felipe Negrelli Wolter Patch applied to wireless-next.git, thanks. ea2274ab0b18 wifi: wfx: fix case where rates are out of order -- https://patchwork.kernel.org/project/linux-wireless/patch/20231004123039.157112-1-jerome.pouiller@silabs.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches