Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp326480lqc; Thu, 7 Mar 2024 20:47:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVorqqGis0AXMDXDl+spFX+ZfsoFoKQWu93wACKajRipIiHxFYYYeh5XLRahRAHt4r3Ew29sDq+Td/ePep2NOHenc6oHkf3APib3FstuA== X-Google-Smtp-Source: AGHT+IHw6fl0LHaevfDwOAZXzu4nXBvu1/CnQt7vO6cPohnGAwU9B9s4/D1Iaz/XpkNxjbqoQhwP X-Received: by 2002:a05:620a:1469:b0:788:4e71:bd52 with SMTP id j9-20020a05620a146900b007884e71bd52mr1860080qkl.60.1709873255153; Thu, 07 Mar 2024 20:47:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709873255; cv=pass; d=google.com; s=arc-20160816; b=Vn7eiLDjDUlXzXAOvo4UdJ/Kf3UgUexlq3DzS5/igvP0RvOuBrFCAjjhDPaPoKWh8m p7BEbB0kzcYstrifOf837YBqHuPdaoKLTP4ActvL2q8XDQDnxmSP/KOcZGfLMHHjbbra zw6ZZsuLJdoE42gm1DqLi4JEC0/htCPawuBkxxb01G4ggGjbygjLpqGPpJdYA/HSwhMj R3CTuAjQTaAGOnW1qrjwfj6aQo1/cpAc2jdDlgmdQZZuM6DXPbHbDACTnNprT7zjBGLq 4aTLfpmXxMkWw5bPjB58sp/UKodVRt5gz7yHs6TU+Z+1xjGvz+lk4RDRPpwEYYXF4t6b iosA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=LnAGMyiWI7W1M99QTaoth2Xz2/XL6fDb4zmiUkK/Xc8=; fh=tejCXwj6VOLK/pP00sMZ2qp9+7rhEzA/hK/BYYFtQFU=; b=rwh9I94RCJcL4YUb2/bGtketRSI9Vs830S9o4b+ylltpdkeHLohX+6vsBxj3vh54RQ VXdxOllZbklW4eb3NWrfQXWz8/ZgH3PLc8C0f6Y7i3f0mku1UjiMRmL0re/CJ9E1SzOm ApVqhQaaJsWXBxJEJPivH01JsoWKgKtLI0s9Zrf4YTAUgaBrXohvn0VQ1e8CxrV3KpHM WhsY4mb7UOutC/1Iz0Uo0GIy0xa4MKeP54vO2mA1iUeBJkUWKE03WElXQL1JGH1lO0s/ ZtZgXJu5e2iv8XbywerDHjezoxc9gdVaYuG25ajCL9/DClUuhRKgM6Zhpkqlr7pxJr4G 9MHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A4spbCkn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96508-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h10-20020a05620a13ea00b007883576de21si7223814qkl.532.2024.03.07.20.47.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 20:47:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A4spbCkn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96508-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C88371C20FBE for ; Fri, 8 Mar 2024 04:47:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D71EF2E633; Fri, 8 Mar 2024 04:47:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A4spbCkn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AB2B1E487; Fri, 8 Mar 2024 04:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709873247; cv=none; b=E6gm4xHzUaT43pfZtB9luuH4eX6YyzU7PgeAaHp31hpTX81bYuHemqCoKeAYwatey2aCWZHuIRzypSnKUjeg+qMmtnNGKBG8QO3Qt3kQ+78q834bKtoCw+4k4mPGJHbLFIM78AqE4E9bT2yXHvrjbq5kNrVcNJRMm/BHD831Vzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709873247; c=relaxed/simple; bh=mov2suGwYSotDcil8OtlRhObFutbrPEMy0JCqdY2T1w=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AjwXrh/mZ0NdlCT5oFIO4VaxwW1AclaEwBAUlhUCu8ic7OxCHmScOH8tfDrfGc/P2vsE+zcUM2mtd9rjFOjrmfY+jR7q9QbWg6wvG1owLCCHq3ESbpspwGQg18geQoUWHM1iUPFutUUVjnw9vFEl7TLKRqxhrLzT5aluISTWMw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A4spbCkn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17224C433F1; Fri, 8 Mar 2024 04:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709873246; bh=mov2suGwYSotDcil8OtlRhObFutbrPEMy0JCqdY2T1w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A4spbCkn3HzV/GF5B7akHbt5i9qAw2bbSfPjSIMm7slD9p85X3DT3/Z9zORg3h6l1 CGzva2VFdHClrWUJJsHZW1FtTYepQg3GxIooVwGKnAtXQL5WU8c0ZZ/Hc9erzDkuRx lkKHw/Ih6GUsIYqCFGibUSPFLPVsIQ6bSsZn0WukhGlCPUuDNQjQ4MyIPsk9fwQTeB 9tWnQOaYntQ/Fz9rYTBvCDH07eZbxLiGdJeZoJMDwZP/m7NMJiXNxJs453Uwm4mME/ 8fdLfYXm57ybJ+BMkZWv1fQfKlVt9XM4IsJn+oHVlJzYqtEGTcdLnrzqgFArb4hAmm FOQ2aeYT91kOw== Date: Thu, 7 Mar 2024 20:47:25 -0800 From: Jakub Kicinski To: Sai Krishna Cc: , , , , , , , , Subject: Re: [net-next PATCH v2] octeontx2-pf: Reset MAC stats during probe Message-ID: <20240307204725.4dddcc9d@kernel.org> In-Reply-To: <20240305082707.213332-1-saikrishnag@marvell.com> References: <20240305082707.213332-1-saikrishnag@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 5 Mar 2024 13:57:07 +0530 Sai Krishna wrote: > +int otx2_reset_mac_stats(struct otx2_nic *pfvf); > > /* RVU block related APIs */ > int otx2_attach_npa_nix(struct otx2_nic *pfvf); > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c > index e5fe67e73865..a91f5b7e84c6 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c > @@ -1124,6 +1124,24 @@ static int otx2_cgx_config_linkevents(struct otx2_nic *pf, bool enable) > return err; > } > > +int otx2_reset_mac_stats(struct otx2_nic *pfvf) > +{ > + struct msg_req *req; > + int err; > + > + mutex_lock(&pfvf->mbox.lock); > + req = otx2_mbox_alloc_msg_cgx_stats_rst(&pfvf->mbox); > + if (!req) { > + mutex_unlock(&pfvf->mbox.lock); > + return -ENOMEM; > + } > + > + err = otx2_sync_mbox_msg(&pfvf->mbox); > + mutex_unlock(&pfvf->mbox.lock); > + return err; > +} > +EXPORT_SYMBOL(otx2_reset_mac_stats); Why the export? I see only one call to this function and it's right below.. > static int otx2_cgx_config_loopback(struct otx2_nic *pf, bool enable) > { > struct msg_req *msg; > @@ -3048,6 +3066,9 @@ static int otx2_probe(struct pci_dev *pdev, const struct pci_device_id *id) > > otx2_qos_init(pf, qos_txqs); > > + /* reset CGX/RPM MAC stats */ > + otx2_reset_mac_stats(pf); > +