🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3955

Re: [PATCH net] mlxsw: Initialize register query payloads

#3955
From: Björn Töpel
Date: Fri, 16 Oct 2026 10:56
20 lines
6177 bytes
Ido Schimmel <idosch@nvidia.com> writes:

> On Thu, Oct 15, 2026 at 09:48:14AM +0200, Björn Töpel wrote:
>> Hmm, isn't this pointing to that the query should be more robust,
>> instead of relying on zeroing receive buffers pre-call? Maybe just fixup
>> query instead?
>
> Most registers require an index, so the common pattern is:
>
> mlxsw_reg_*_pack(...);
> mlxsw_reg_query(...);
>
> Where the pack function zeroes the payload. We can't zero in the core
> because then we would overwrite the indexes.

Got it! Thanks for clearing that up!


Björn
Technical Details
Message-ID: <874iel6hi3.fsf@all.your.base.are.belong.to.us>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347287-linux-kernel-netdev=dewy.ru
References: <20261014173117.26305-1-mail@tk154.de> <87a4of8kw1.fsf@all.your.base.are.belong.to.us> <20261015155944.GA1836432@shredder>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347287-linux-kernel-netdev=dewy.ru
From: bjorn@kernel.org (Björn Töpel)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] mlxsw: Initialize register query payloads
Date: Fri, 16 Oct 2026 12:56:36 +0200
Organization: Usenet Network
Message-ID: <874iel6hi3.fsf@all.your.base.are.belong.to.us>
References: <20261014173117.26305-1-mail@tk154.de>
 <87a4of8kw1.fsf@all.your.base.are.belong.to.us>
 <20261015155944.GA1836432@shredder>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2744393"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:szl1y4au4mQQOKx9IPByKrN316A= sha256:LaEky47omriXQDrh4diNMS+V9vpkjAIB6Go+LqaO5U0=
	sha1:lYwNZX9aR65AtZpsrIRWJ70va6Q= sha256:ttl/nE8hkAxDhZDbn6jIeVuRep9i3c/ZbdcDEtsEVDA=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 2DDEE1104FE; Fri, 16 Oct 2026 13:57:36 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.34
X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Qr8g4ENyg0md;
	Fri, 16 Oct 2026 13:57:29 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-347287-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 0DFBE1104FA; Fri, 16 Oct 2026 13:57:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id BBAF02ADBF; Fri, 16 Oct 2026 10:56:41 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 35DEE3E8331;
	Fri, 16 Oct 2026 10:56:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kXa4jDqo"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(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 3DD013A0B2E;
	Fri, 16 Oct 2026 10:56:40 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792148201; cv=none; b=KtMkB+Ar4dC/f3xeHLqEwh0KoXCCdC29qpflIXkj3qb3eR2S4HRDOutuKlfWP0QQorfcmcpQU/hegWos575Y04JC/L8o+2zeivbKz9V5+xkCxeQ27QO6VoIg3Q02JQ8XZUusCqDffPKFGM9RRy1SQZye0VXjGfPksqVttCpo/nc=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792148201; c=relaxed/simple;
	bh=ekPL7Cosl/iTNxfkWZ2f3dQr5AG+19luc/O3WiAN7gU=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=QvKf8O3TtWLYwQE63G8XaY5fNX+pyrVCgTxZIEH6k+M4TRC5dSUcUvSSu+wwnqGM8DliYV3SAN3sYvWQCO1UArfbRHboTugVpfaNLOl2Sr+zSWrkt3FCQel6NxqYyWphEk356HWXe3HXGUYtOPAXiF1LD1UmtDUuV2qXShxbkvc=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kXa4jDqo; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E7671F000C7;
	Fri, 16 Oct 2026 10:56:39 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792148200;
	bh=ekPL7Cosl/iTNxfkWZ2f3dQr5AG+19luc/O3WiAN7gU=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date;
	b=kXa4jDqoCJVg3BD9uU6fNczAUph7/be7U+sZHwi1Kkoa0CIk5omN5GFSGnngorXxe
	 VhlcFsq6fYjks5LBBG6ErNcs8LSapyOK7aj/ZlKnCd+/tqvrZM5QU8ZTBkbc+d7mmY
	 V6JRhEM9/x1riK7wyeyVxNSGS0dSRAFvT+bxC49WNDsHx1UcfiENfZzC4u/WYdgVMU
	 MmnqwZNk595iy9lBXzKmf4PDKFSIij5pADVPP3LJdlxgb2JeeHwCwnf0Bp1qYEwIXv
	 tMZhvW5SP2ugEALv3nS06l9nrY4QOY8wla6EuBRMqEX45EkF+pkCunuAmC+ZjtFEQc
	 /X7i0d91MDdIg==
X-Cc: Til Kaiser <mail@tk154.de>, netdev@vger.kernel.org,
 stable@vger.kernel.org, Petr Machata <petrm@nvidia.com>, Andrew Lunn
 <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric
 Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo
 Abeni <pabeni@redhat.com>, Jiri Pirko <jiri@resnulli.us>, Vadim Pasternak
 <vadimp@mellanox.com>, linux-kernel@vger.kernel.org
X-In-Reply-To: <20261015155944.GA1836432@shredder>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>