Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1083496pxk; Fri, 25 Sep 2020 05:57:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRYSFyAz9YpneAryZXgf4lMYEq8rBK58HkBeLMEZ1jGCtKOEnHC2eU2F0g9YWoRBoftiTK X-Received: by 2002:a17:906:b7d1:: with SMTP id fy17mr2650862ejb.391.1601038656466; Fri, 25 Sep 2020 05:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601038656; cv=none; d=google.com; s=arc-20160816; b=dKYFJx4tME9mmby8lu/jPc+6PqB+YEDLWrXZJzElvydl1T//mVXF3p9IEp6V262XSs R3EBQunF2RwhzUr/K6GPZ4B92ltGgXSkUPWscJkBek1WjaKeF25Yak6597ZjltNLmi39 mDhgGuV0FitJpT1RbIP6aVQoUyqY/TXDGDCLu5rfvenI02XqS8ZQL+kICrZJWNdutB2j JXAvjxT3e3+SIrMmnkxFQ3LgDj0/AJ2RVoLI7sl6DKMCNhr+cStjwuduRn8DswnstrJp lzPFZCuhZBkEp6F5GymwQwyfAX3+v1rDWHorDeTZU8egAXbAB90V9qgErvZTE4AUbt55 I6iQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DvnyfZEfc2l6TwGaR/JnGqtJpsXt0C5YhL1+DrNEc80=; b=QB+L3upRrvvhHFHopOwKycwGmPLhAXO3a0m85dQyd2P4HvCsV317hTWS4U4gD9vlY+ trmfPsOIMWCdWxLILoCv9hZtQxMhboeXDPQgbJA3ejbvlC21ZOypTQsZgYF3gGpj2LYB JP/5lzVFepif27GYrem+dya/0B+xiJtmr8xokiC2p/xfWuQCZOM9V3Q7Bu6lm96LyZad iPuWGNgOJHGLxrfrSiDbevPw1umTzxCbNDcO4vNA6+yXx+cMSlLqublBhRucscBn0g1U y5kdWUJ8hqGKZqAjd19mSJi5sfiUQ+XN7MnJRu18Qg7VM5kcBIndG42kQdM3U68ARFQb SExg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P9aTGEMM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si1774226ejb.651.2020.09.25.05.57.13; Fri, 25 Sep 2020 05:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P9aTGEMM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729097AbgIYMxq (ORCPT + 99 others); Fri, 25 Sep 2020 08:53:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:59598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729463AbgIYMxn (ORCPT ); Fri, 25 Sep 2020 08:53:43 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FCF52075E; Fri, 25 Sep 2020 12:53:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601038422; bh=VDt7r3woC7LTg2GRHiQhEspTdp95zxK8PVx7W4tdc6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9aTGEMMycwF4vZBD7GW1iA42Ssn2GzdTnNZjqFQZ/qrIRB0KpvYPVK93pAi/q+2z PGLfIaDKlVTKh6yu8EQQMZRhgj5HQrSHS5gQzyVsdtlzniAXLh7MeLBeD6d78GInsn otdzWA16eAGFR6Z7vSUtnvbzeUTw0xHj3bq9fHs4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ganji Aravind , Jakub Kicinski Subject: [PATCH 4.19 05/37] cxgb4: Fix offset when clearing filter byte counters Date: Fri, 25 Sep 2020 14:48:33 +0200 Message-Id: <20200925124721.762475323@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200925124720.972208530@linuxfoundation.org> References: <20200925124720.972208530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ganji Aravind [ Upstream commit 94cc242a067a869c29800aa789d38b7676136e50 ] Pass the correct offset to clear the stale filter hit bytes counter. Otherwise, the counter starts incrementing from the stale information, instead of 0. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Ganji Aravind Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c @@ -1591,13 +1591,16 @@ out: static int configure_filter_tcb(struct adapter *adap, unsigned int tid, struct filter_entry *f) { - if (f->fs.hitcnts) + if (f->fs.hitcnts) { set_tcb_field(adap, f, tid, TCB_TIMESTAMP_W, - TCB_TIMESTAMP_V(TCB_TIMESTAMP_M) | + TCB_TIMESTAMP_V(TCB_TIMESTAMP_M), + TCB_TIMESTAMP_V(0ULL), + 1); + set_tcb_field(adap, f, tid, TCB_RTT_TS_RECENT_AGE_W, TCB_RTT_TS_RECENT_AGE_V(TCB_RTT_TS_RECENT_AGE_M), - TCB_TIMESTAMP_V(0ULL) | TCB_RTT_TS_RECENT_AGE_V(0ULL), 1); + } if (f->fs.newdmac) set_tcb_tflag(adap, f, tid, TF_CCTRL_ECE_S, 1,