lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240403123848.GC26556@kernel.org>
Date: Wed, 3 Apr 2024 13:38:48 +0100
From: Simon Horman <horms@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, Ido Schimmel <idosch@...dia.com>,
	Amit Cohen <amcohen@...dia.com>, mlxsw@...dia.com
Subject: Re: [PATCH net-next 07/15] mlxsw: pci: Poll command interface for
 each cmd_exec()

On Tue, Apr 02, 2024 at 03:54:20PM +0200, Petr Machata wrote:
> From: Amit Cohen <amcohen@...dia.com>
> 
> Command interface is used for configuring and querying FW when EMADs are
> not available. During the time that the driver sets up the asynchronous
> queues, it polls the command interface for getting completions. Then,
> there is a short period when asynchronous queues work, but EMADs are not
> available (marked in the code as nopoll = true). During this time, we
> send commands via command interface, but we do not poll it, as we can get
> an interrupt for the completion. Completions of command interface are
> received from HW in EQ0 (event queue 0).
> 
> The usage of EQ0 instead of polling is done only 4 times during
> initialization and one time during tear down, but it makes an overhead
> during lifetime of the driver. For each interrupt, we have to check if
> we get events in EQ0 or EQ1 and handle them. This is really ineffective,
> especially because of the fact that EQ0 is used only as part of driver
> init/fini.
> 
> Instead, we can poll command interface for each call of cmd_exec(). It
> means that when we send a command via command interface (as EMADs are
> not available), we will poll it, regardless of availability of the
> asynchronous queues. This will allow us to configure later only EQ1 and
> simplify the flow.
> 
> Remove 'nopoll' indication and change mlxsw_pci_cmd_exec() to poll till
> answer/timeout regardless of queues' state. For now, completions are
> handled also by EQ0, but it will be removed in next patch. Additional
> cleanups will be added in next patches.
> 
> Signed-off-by: Amit Cohen <amcohen@...dia.com>
> Reviewed-by: Ido Schimmel <idosch@...dia.com>
> Signed-off-by: Petr Machata <petrm@...dia.com>

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ