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-next>] [day] [month] [year] [list]
Message-ID: <20250828065229.528417-1-shayd@nvidia.com>
Date: Thu, 28 Aug 2025 09:52:29 +0300
From: Shay Drory <shayd@...dia.com>
To: <jiri@...nulli.us>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <horms@...nel.org>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <ozsh@...dia.com>, <mbloch@...dia.com>, <tariqt@...dia.com>,
	<saeedm@...dia.com>, Shay Drory <shayd@...dia.com>
Subject: [RFC net-next] net: devlink: add port function attr for vport ↔ eswitch metadata forwarding

In some product architectures, the eswitch manager and the exception
handler run as separate user space processes. The eswitch manager uses
the physical uplink device, while the slow path handler uses a virtual
device.

In this architectures, the eswitch manager application program the HW to
send the exception packets to specific vport, and on top this vport
virtual device, the exception application is running and handling these
packets.

Currently, when packets are forwarded between the eswitch and a vport,
no per-packet metadata is preserved. As a result, the slow path handler
cannot implement features that require visibility into the packet's
hardware context.

This RFC introduces two optional devlink port-function attributes. When
these two capabilities are enable for a function of the port, the device
is making the necessary preparations for the function to exchange
metadata with the eswitch.

rx_metadata
When enabled, packets received by the vport from the eswitch will be
prepended with a device-specific metadata header. This allows the slow
path application to receive the full context of the packet as seen by
the hardware.

tx_metadata
When enabled, the vport can send a packet prepended with a metadata
header. The eswitch hardware consumes this metadata to steer the packet.

Together they allow the said app to process slow-path events in
user-space at line rate while still leaving the common fast-path in
hardware.

User-space interface
Enable / disable is done with existing devlink port-function syntax:

$ devlink port function set pci/0000:06:00.0/3 rx_metadata enable
$ devlink port function set pci/0000:06:00.0/3 tx_metadata enable

Querying the state shows the new knobs:

$ devlink port function show pci/0000:06:00.0/3
  pci/0000:06:00.0/3:
   roce enabled rx_metadata enabled tx_metadata enabled

Disabling is symmetrical:

$ devlink port function set pci/0000:06:00.0/3 rx_metadata disable
$ devlink port function set pci/0000:06:00.0/3 tx_metadata disable

Signed-off-by: Shay Drory <shayd@...dia.com>


-- 
2.38.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ