Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7161246rwd; Tue, 6 Jun 2023 07:10:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7L6TRtE0O+unHGEOVh9uJU+ROyWnS8jJ1BsaS8bQjnpE36klOV2Tpa7nMmlvcvqJvXYz0j X-Received: by 2002:a05:620a:2495:b0:75e:1506:d3cb with SMTP id i21-20020a05620a249500b0075e1506d3cbmr2563860qkn.74.1686060610853; Tue, 06 Jun 2023 07:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686060610; cv=none; d=google.com; s=arc-20160816; b=VEiSjn0KbVKycpIhl7OjDSvzbvJCtzmpYzrdJCaIBmgRV/CxMUSdMcX7Bivr4NFBoW L4bQUh6PtUbNZr9t2MB33TJRrdZmJwyE9gBc6GHKB8M5nTfHay+Ja7jH/HtWm08qvlCq edUySZh0XdN1wArH3rXSEh0+uKWiU2xL+EnPQj5uiZVSnApQZb8OzruWzEFUIkQDYyGu Z4Aj6t5BZP7LMft89NTqZi52l7CCaIMEEKItv2zSOsFP4bMsfYNmZcRizKeJ1u+bod2i jupPhhaqLdKusBp1QFMdeo+00mhMEvLpIUVNgrPcKD7ZE+gLOtJ7S7Sd7xxZiBsx0ojj XjYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :references:to:from:subject:dkim-signature:dkim-filter; bh=DclItOsicxYD43Iu+QpNEiZlciXo9Z0nfFrkCYFxH4Y=; b=tG9ua8vQfUTyEZGBD0hWYbr65yjEgrx6E6Nu959IYq7ujZyS48l+BphMwrmr0TmLWg LJh1Apl94woTtZh3+ksA4KPI/u6saribYhCrSlTy/XdP/pwBle15yY/hkyY8XtB9vo5o IFL+btzrRnTWU99E0zGgkkOWO43B3NQtKzlIWnI6ivCKal+AFn55tsTAL+S9etGIdyGE kCD7CYWR2LjKhxJKgun3ezIK9P/1ylcLIbCoF+XZW6t+0q3M/g3zVgJ3uwtNZDyGu2gt svw6QD9RsKUxDmDIgbq0gW6Mx88KoPrqhHSfvPo5C8zwvhBk71QIfzSPt/YEZ5LS5Ogz C2nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=D6Qxq++7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f26-20020ae9ea1a000000b0075b344f68f8si5801813qkg.728.2023.06.06.07.09.41; Tue, 06 Jun 2023 07:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=D6Qxq++7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237991AbjFFNwf (ORCPT + 62 others); Tue, 6 Jun 2023 09:52:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237466AbjFFNwe (ORCPT ); Tue, 6 Jun 2023 09:52:34 -0400 Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61BEE7E for ; Tue, 6 Jun 2023 06:52:32 -0700 (PDT) X-Virus-Scanned: Proofpoint Essentials engine Received: from mail3.candelatech.com (mail2.candelatech.com [208.74.158.173]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 9A2E4900085 for ; Tue, 6 Jun 2023 13:52:30 +0000 (UTC) Received: from [192.168.1.115] (unknown [98.97.35.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id E218413C2B0 for ; Tue, 6 Jun 2023 06:52:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com E218413C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1686059550; bh=tsdfktztIh21HJogh6GNLJlXZBm5zR2+XTTgORyJ1CQ=; h=Subject:From:To:References:Date:In-Reply-To:From; b=D6Qxq++7WGvgUnHJ6WOxggfxZossMLrM7cDj6aEx1RvEienFcKlfHVQ9qeFWDHTjh s5nlFQGSW7nanTBkhsBOUcV1/gm5vAcMR6/lGMwQbPPsOutkPZ6crVLw6FcutpoFiV IUmjbe5Y4ShOHDEuVaJyh79UqTINEdMB2afY4IM8= Subject: Re: iwlwifi: tx-fail reported with zero retry count. From: Ben Greear To: "linux-wireless@vger.kernel.org" References: <6b920700-e9a2-bbeb-98ce-7a2d09e76975@candelatech.com> Organization: Candela Technologies Message-ID: <2fbaa2cb-9193-32cd-66ef-ffd6b48c049d@candelatech.com> Date: Tue, 6 Jun 2023 06:52:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <6b920700-e9a2-bbeb-98ce-7a2d09e76975@candelatech.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-MW Content-Transfer-Encoding: 8bit X-MDID: 1686059551-m2TpKQkt-BIs X-MDID-O: us5;at1;1686059551;m2TpKQkt-BIs;;f7146c1849a4b08a52804beb1c1cdf45 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 6/6/23 6:36 AM, Ben Greear wrote: > It seems that when tx fails (due to TX_STATUS_FAIL_LONG_LIMIT in this case), the > retry-count is sometimes reported as zero.  I would expect that it actually must have retried > many times (15 it seems?).  At least for fail-long-limit failures, is there a known constant amount of > times the firmware retransmits the frame before giving up?  If so, I can just hack that > value into the retry counter in this case. > > Debug patch: > > [greearb@ben-dt5 iwlwifi]$ git diff > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c > index 1cddc65dd51e..6544dabb092b 100644 > --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c > @@ -1929,8 +1929,14 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, >                 mvm->ethtool_stats.tx_mpdu_attempts += info->status.rates[0].count; >                 mvm->ethtool_stats.tx_mpdu_retry += tx_resp->failure_frame; >                 if (cb.flags & IWL_TX_CB_TXO_USED) { > +                       u32 idx = status & TX_STATUS_MSK; > + >                         mvm->ethtool_stats.txo_tx_mpdu_attempts += info->status.rates[0].count; >                         mvm->ethtool_stats.txo_tx_mpdu_retry += tx_resp->failure_frame; > +                       if (idx != TX_STATUS_SUCCESS) { > +                               pr_info("txo tx status failed: %d  tx_resp->failure_frame: %d\n", > +                                       idx, tx_resp->failure_frame); > +                       } >                 } > >                 iwl_mvm_hwrate_to_tx_status(mvm, mvm->fw, > > > From dmesg: > > Jun 06 06:29:40 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 > Jun 06 06:29:43 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 > Jun 06 06:29:48 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 > Jun 06 06:29:49 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 > Jun 06 06:29:52 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 > Jun 06 06:29:57 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 0 > Jun 06 06:29:57 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 0 > Jun 06 06:29:58 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 0 > Jun 06 06:30:01 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 > Jun 06 06:30:02 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 > Jun 06 06:30:03 ct523c-0b29 kernel: txo tx status failed: 131  tx_resp->failure_frame: 15 I think it has some other weirdness too. I added printout to show any non-zero failure_frame: + if (idx != TX_STATUS_SUCCESS || tx_resp->failure_frame) { + pr_info("txo tx status: %d tx_resp->failure_frame: %d\n", + idx, tx_resp->failure_frame); + } For a while, it showed the status 131 and failure_frame of 0, then it started reporting lots of smaller numbers of retries (more like what I would expect to see). And then it seemed to stick in a case where it was reporting lots of successes with 15 retries: Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 Jun 06 06:44:50 ct523c-0b29 kernel: txo tx status: 1 tx_resp->failure_frame: 15 I think it is quite unlikely that it reliably succeeded on the very last retry so many times in a row. Maybe the FW has some issues in reporting the failure_frame count properly? Thanks, Ben