From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FD8AC4332F for ; Mon, 13 Nov 2023 22:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230332AbjKMWih (ORCPT ); Mon, 13 Nov 2023 17:38:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbjKMWig (ORCPT ); Mon, 13 Nov 2023 17:38:36 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19B371738 for ; Mon, 13 Nov 2023 14:38:33 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9939C433C7; Mon, 13 Nov 2023 22:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699915112; bh=OP3I7fpOVYpk/z9dNWNGPuMZiLtZS4ZdqSK6+IzmD2U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SVm0VlNumMuPkfY6BPByX96F51MOtPGk1twkJwdP1Ns2MVOGSc0AINj7/5JlJNvij ZYzLEyCOLONmbcd+eOm1+NRR5C6tRNoXKPsMvtxc7D4tsbx7WrdcVQM1x/AzjUIXxg P3wThId7CL2F4JfFiGcKJe/+mVgXTP29Fk8qFfy8wLtbcGrfEJ6SWLT6uF9iETJp0x qo/zXXGBFia5UQGx/W9xw+yB+elvOMSHFJHUiAf+OnU7B86v6QUWHHcYICccoSRgpQ d8u/48dHQTqbllD0ElOzkBHuqnaUHUPX0yHCqRAyttan0AOqdN2fD6an699vW6AY1Y ADO3uaIcNAL+w== Date: Mon, 13 Nov 2023 17:38:30 -0500 From: Jakub Kicinski To: Cc: , , , , , Subject: Re: [PATCH v4 1/2] tg3: Move the [rt]x_dropped counters to tg3_napi Message-ID: <20231113173830.4c01d551@kernel.org> In-Reply-To: <20231113182350.37472-1-alexey.pakhunov@spacex.com> References: <20231113182350.37472-1-alexey.pakhunov@spacex.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Nov 2023 10:23:49 -0800 alexey.pakhunov@spacex.com wrote: > This change moves [rt]x_dropped counters to tg3_napi so that they can be > updated by a single writer, race-free. Michael, do you have a preference on the using u64_stats_inc() ? Since we're only doing inc here the conversion should be pretty trivial. The semantics of local64 are a bit murky but looks like other drivers think that it's okay to use inc without u64_stats_update_begin() / end().