Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp889913ybs; Mon, 25 May 2020 01:36:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztshZLsG8AC5YG2JpF88WO7qJ+zR20eNc5fDSalaC6xY/gPNMdIONjI0/17FCW9MzmPNnd X-Received: by 2002:a17:906:934e:: with SMTP id p14mr17591242ejw.502.1590395797997; Mon, 25 May 2020 01:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590395797; cv=none; d=google.com; s=arc-20160816; b=K/CPshVanRdCLRdr1y9O+55aScvYJMGwo7E2kVpidKTqe4m1DvBi65vgLBPuSpIOIj +sma1Kh1Yw1wK51CbxdiSzRfBI12EAGlH9rHnyM8OM3DBhdVe//MaVzFA+pVW0WUas/P SzjgBrE2YKmZObuYnpK8C+NzTpol79QRT/d6yzaZZd46DZgtkrGEPRHyPTuLtIHQa3EQ KrLChwSb3RvUOvfzsBHkwQkXUKxpxOzVuA00iEPxHMztu8Oe2GVTBA+QeImXviEe+9tT c9akto+tjJsexUs2LG+kpUs4cBRlf6j59tNBLHjzPHHuPAyHvbbD4NhZfZ7tkNN0BFwJ q4Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=uLMnYtBJ+bkqxjW9wonpFeiPbG9iEGXjOVZU8OFpip8=; b=z2yJtU9aciRLghfwrDlp3nGF0kbO7D0T0U+gO/QtDfJF6KEPEZQoIGz/vIIhH0sJZh fR7mCD9EM8hpGAxOTEyAaJWhPQ6R02ts1CcWdniVrrgWcUVQDv99qcKsm5D7L/pONIis MccosCr6l8nTE9+Jt9yVO8A84aJYyow18dCLcHKZHfHB9HZPpBoMfQx7ZFgwTOzrYTDN JLEwvnW91Uldqx/YVynfKuRvrbFqh3DzmmsJtMC/EHwIzAhBJaQ+ke8C5QM2AT2qGKFs gkzHW19J6hsudVqlsltn5h7LYT5c5KtFKtIxvt3ot/TeW09dMl+KpwyXZeN/BI9cMc5e MYQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o23si8968794ejd.302.2020.05.25.01.36.09; Mon, 25 May 2020 01:36:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388283AbgEYIff (ORCPT + 99 others); Mon, 25 May 2020 04:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388093AbgEYIff (ORCPT ); Mon, 25 May 2020 04:35:35 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5053AC061A0E for ; Mon, 25 May 2020 01:35:35 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jd8a3-002aFR-Tm; Mon, 25 May 2020 10:35:32 +0200 Message-ID: Subject: Re: [PATCH] mac80211: Fix station dump inactive time after sta connection From: Johannes Berg To: Seevalamuthu Mariappan Cc: linux-wireless@vger.kernel.org Date: Mon, 25 May 2020 10:35:30 +0200 In-Reply-To: <1588702126-11364-1-git-send-email-seevalam@codeaurora.org> References: <1588702126-11364-1-git-send-email-seevalam@codeaurora.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2 (3.36.2-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 2020-05-05 at 23:38 +0530, Seevalamuthu Mariappan wrote: > When USES_RSS is enabled, last_rx becomes zero in first few > minutes after sta connection This is wrong - it's something like "in the first few minutes after system boot" or something? > in sta_get_last_rx_stats. This > leads to inactive time showing current jiffies in msecs. > > Station 8c:fd:f0:02:10:dd (on wlan0) > inactive time: 4294701656 ms > . > . > connected time: 2 seconds > > Fix this by avoid overwriting last_rx with percpu_stat's last_rx > if it is zero. This doesn't seem like the right fix - shouldn't we just initialize last_rx better so the wrap won't cause any trouble? johannes