Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2505192rdb; Wed, 4 Oct 2023 03:27:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHazx1DeMxtiHdrLSE6WrCuXatsLO+9FyLE0YO4hD1gy8YcHOwWlCiYlyazVqRblMyJnY2t X-Received: by 2002:a17:903:2451:b0:1c8:7364:a3ab with SMTP id l17-20020a170903245100b001c87364a3abmr1979004pls.17.1696415239256; Wed, 04 Oct 2023 03:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696415239; cv=none; d=google.com; s=arc-20160816; b=ab6XY5J6BdLdureZYZMRXzAvAgvc1U0uSSmZWLN7/mmnW0MdOUVYMwV287q+bjseiO 3K6vND/vprjIcOZr4eaIpRmmp6imcWP6rFnKxe8T4s9Ee7mN8ud72GoYmQ+35BqU3NyH ra6MvsQ8yzswVWNAQL6iZnMMF54R0xUvYeoX7yYw1XzkKEeCkK/ofMs2zSO9tgu+gyA9 3MtOuunbWROdlOKd+yR+XSng9bU+xtm6W9FWlSux6nivTQ9kFab3/Ej1c1BxvlNezMf7 Teit+kMGEybY0VDiH0fxyPuqtid39Jl97yazDJnb60lyJOuQffFsmvaJjA54uR2aUneg Ym+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=J+5j5FsPe3wOf+NshD6BJkX9Wh1zyOfnKlMVW8LSlNc=; fh=YjyYT2agaChgxePf93DOCgpdMFsSA09cCO+Z3Wr8tw0=; b=rtF3+2FuwIxiaUFklLHb3tOcKLE8ojO1o0wu6TtePoF4T0E2PZz6bGLq7rTz8lO4zP bN5bWau93xZFId+Y8baSaE4Ot2Y6eEN1wrU3MNBa0RkzXKUKx9i6sV/vIdOh/uoyDQA2 uK3esWylNwXt4b4ZA4GUQis/VDY53ODw3Q3QuWBA55imE7YoPw/thMgBT4NuYZWLVYnG 659Sr+q6NBtWbu/wQRxLrXwlzcdtNM0/UMUPnBWnjVXpar1Y3gvm+R1W49jGYX8vGLe3 sUhmqQNvndh3lVYLiRVXw6/wVTSiz7wjjoQSsozRR3zpxzXsscQRUF0iIXwFVa1Su+RR vYkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t1o8wIO6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id q13-20020a170902a3cd00b001c60de17b50si3209436plb.182.2023.10.04.03.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 03:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t1o8wIO6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 6B0BB80B9509; Wed, 4 Oct 2023 03:27:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242172AbjJDK1T (ORCPT + 53 others); Wed, 4 Oct 2023 06:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232957AbjJDK1S (ORCPT ); Wed, 4 Oct 2023 06:27:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6496B0; Wed, 4 Oct 2023 03:27:15 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0909AC433C8; Wed, 4 Oct 2023 10:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696415235; bh=dcG5RxBw9qfIoGIbgz+2DfwsMimy/DM3rdmUIsB1jlw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=t1o8wIO6aKpD6cJLia0CqU/VtxlL33sKt//IyXqLu8yL02esJcZsn/usry4kTLqgp YtemuI5R6Qit5ljP2mRBA4vTWPBYJ/HLMJTG+xbMD/lRu6H4WfgUsTQ2G5MSQEJgTS xhUyynABWd3oJc38DpaX5+epQoylVEsSY3N4VW3bMOKuEJkf7rqPOc1w8Aa1119BQw ghsR6AQbHvO99X+6vQisZv0wBDw+V9IopwTWhBae8gS1wlS/M/2vvRcyKWAjtDyPf1 9e12yosnxJ76CEFLv6uLT6gLtxUYtvgdmqJ2kBddVQTwYoxfxMXhQmaboYdLBSw8UH og6jDyYnmY+hQ== From: Kalle Valo To: =?utf-8?B?SsOpcsO0bWU=?= Pouiller Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Felix Fietkau , Felipe Negrelli Wolter , Olivier Souloumiac , Alexandr Suslenko Subject: Re: [PATCH] wifi: wfx: fix case where rates are out of order References: <20230928101048.5543-1-jerome.pouiller@silabs.com> Date: Wed, 04 Oct 2023 13:29:31 +0300 In-Reply-To: <20230928101048.5543-1-jerome.pouiller@silabs.com> (=?utf-8?B?IkrDqXLDtG1l?= Pouiller"'s message of "Thu, 28 Sep 2023 12:10:48 +0200") Message-ID: <87lecihe9g.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 03:27:18 -0700 (PDT) J=C3=A9r=C3=B4me Pouiller writes: > 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 apply rates in descending order. The workaround > is to drop rate when it higher than its predecessor in the rate list. > Thus [ 4, 5, 3 ] become [ 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: 9bca45f3d6924 "staging: wfx: allow to send 802.11 frames" > Tested-by: Olivier Souloumiac > Tested-by: Alexandr Suslenko > Reported-by: Alexandr Suslenko > Co-developed-by: J=C3=A9r=C3=B4me Pouiller > Signed-off-by: J=C3=A9r=C3=B4me Pouiller ERROR: Invalid format: Fixes: 9bca45f3d6924 "staging: wfx: allow to send 80= 2.11 frames" ERROR: Missing Signed-off-by: felipe.negrelliwolter@silabs.com --=20 https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes