From mboxrd@z Thu Jan 1 00:00:00 1970 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 434A78289A; Fri, 1 Nov 2024 01:49:56 +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=1730425797; cv=none; b=QdoQgurthr/5RnWHcEXBHytWSd48E+Hel5oIe+omkbTH3GgiNH+hx/4U+4oc88doIkFKI2/XW2m4vJXAu1QfMG2gYxPQhByFZGzmaizRRFgc3z8oitwhnenYNVratQE0p9/B2KrBqu6OmJ1aHj9SLzdRskrs9HBtokFVPKrpFSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730425797; c=relaxed/simple; bh=dE/ylJ6ge1HqyoW9KyWdTWFUjztcM0sAXkdF7dnXeaY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lsoWvAabJPuli6zbwNczelqKRXCRQDIINjH4F5Cv6IyUjpSribnYwwRYn5Ui+zDHj1AjC/6faATal2tnob7gsyb87BfxcEtcGcu5WvQ0muIDVuQZImTedFeeSvESI2j65pVJXRjG28ijvgdWIc5aDEQBxVWYu9rz4/Kw7Mkjd2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q/JFupgb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q/JFupgb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49094C4CEC3; Fri, 1 Nov 2024 01:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730425796; bh=dE/ylJ6ge1HqyoW9KyWdTWFUjztcM0sAXkdF7dnXeaY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=q/JFupgbMKZgQ495HX2P33PdvSIrJV3/NNeKT6CPJMaxh3c+rPteRAj09A9L1BA0+ XxZ/pzQjTauyOBmEODAKVygey1QRUEjQoUIzZCos/sGERIgLSQgOy4tWM81T0aWeRb DX3kRIHPwrV7UxA06/B9Bn1o+C05DIUdy3N3bVsFSotoAyt4rOxc8+wC76/QphYtaO rqymvrECTI9m2erJ0zmH/tQTow33Zacx2SevANUsuldp182fQmPYg4re6Vv8zxDlIv 2gkdCXaBPNOxIU2kUcXBwyJmhtYkE2AQLPr3pRdamKSZSKZPYBB29IX3lmTC+x9PDT /i9hDMMjhGTNA== Date: Thu, 31 Oct 2024 18:49:55 -0700 From: Jakub Kicinski To: Maksym Kutsevol Cc: "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Jonathan Corbet , Andrew Lunn , Breno Leitao , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH net-next v4 2/2] netcons: Add udp send fail statistics to netconsole Message-ID: <20241031184955.159d2211@kernel.org> In-Reply-To: References: <20241027-netcons-add-udp-send-fail-statistics-to-netconsole-v4-0-a8065a43c897@kutsevol.com> <20241027-netcons-add-udp-send-fail-statistics-to-netconsole-v4-2-a8065a43c897@kutsevol.com> <20241030184928.3273f76d@kernel.org> Precedence: bulk X-Mailing-List: netdev@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 Thu, 31 Oct 2024 21:19:26 -0400 Maksym Kutsevol wrote: > Thanks for looking into this! > > Parroting examples, e.g. > struct pcpu_lstats { > u64_stats_t packets; > u64_stats_t bytes; > struct u64_stats_sync syncp; > } __aligned(2 * sizeof(u64)); > > in netdevice.h https://github.com/torvalds/linux/blob/master/include/linux/netdevice.h#L2743-L2747 > I don't have any strongly held opinion about this. I'd appreciate an > explanation (a link would suffice) why this is a bad idea. No entirely sure why the pcpu stats in netdev are aligned like this, but yours are not per cpu, and not fast path of any sort. So aligning is a premature optimization in the first place. > > > +static void netpoll_send_udp_count_errs(struct netconsole_target *nt, > > > + const char *msg, int len) > > > > This is defined in the netconsole driver, it should not use the > > netpoll_ prefix for the function name.' > > netconsole_send_udp_count_errs sounds better? I don't think the _count_errs() suffix is needed any more