Commit bb70b0d4 authored by Parav Pandit's avatar Parav Pandit Committed by Jakub Kicinski
Browse files

devlink: Improve the port attributes description



Current PF number description is vague, sometimes interpreted as
some PF index. VF number in the PCI specification starts at 1; however
in kernel, it starts at 0 for representor model.

Improve the description of devlink port attributes PF, VF and SF
numbers with these details.

Reviewed-by: default avatarSridhar Samudrala <sridhar.samudrala@intel.com>
Reviewed-by: default avatarShay Drory <shayd@nvidia.com>
Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarParav Pandit <parav@nvidia.com>
Link: https://patch.msgid.link/20241224183706.26571-1-parav@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent be16b46f
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ struct devlink_port_phys_attrs {
/**
 * struct devlink_port_pci_pf_attrs - devlink port's PCI PF attributes
 * @controller: Associated controller number
 * @pf: Associated PCI PF number for this port.
 * @pf: associated PCI function number for the devlink port instance
 * @external: when set, indicates if a port is for an external controller
 */
struct devlink_port_pci_pf_attrs {
@@ -47,8 +47,9 @@ struct devlink_port_pci_pf_attrs {
/**
 * struct devlink_port_pci_vf_attrs - devlink port's PCI VF attributes
 * @controller: Associated controller number
 * @pf: Associated PCI PF number for this port.
 * @vf: Associated PCI VF for of the PCI PF for this port.
 * @pf: associated PCI function number for the devlink port instance
 * @vf: associated PCI VF number of a PF for the devlink port instance;
 *	VF number starts from 0 for the first PCI virtual function
 * @external: when set, indicates if a port is for an external controller
 */
struct devlink_port_pci_vf_attrs {
@@ -61,8 +62,8 @@ struct devlink_port_pci_vf_attrs {
/**
 * struct devlink_port_pci_sf_attrs - devlink port's PCI SF attributes
 * @controller: Associated controller number
 * @sf: Associated PCI SF for of the PCI PF for this port.
 * @pf: Associated PCI PF number for this port.
 * @sf: associated SF number of a PF for the devlink port instance
 * @pf: associated PCI function number for the devlink port instance
 * @external: when set, indicates if a port is for an external controller
 */
struct devlink_port_pci_sf_attrs {
+6 −5
Original line number Diff line number Diff line
@@ -1376,7 +1376,7 @@ EXPORT_SYMBOL_GPL(devlink_port_attrs_set);
 *
 *	@devlink_port: devlink port
 *	@controller: associated controller number for the devlink port instance
 *	@pf: associated PF for the devlink port instance
 *	@pf: associated PCI function number for the devlink port instance
 *	@external: indicates if the port is for an external controller
 */
void devlink_port_attrs_pci_pf_set(struct devlink_port *devlink_port, u32 controller,
@@ -1402,8 +1402,9 @@ EXPORT_SYMBOL_GPL(devlink_port_attrs_pci_pf_set);
 *
 *	@devlink_port: devlink port
 *	@controller: associated controller number for the devlink port instance
 *	@pf: associated PF for the devlink port instance
 *	@vf: associated VF of a PF for the devlink port instance
 *	@pf: associated PCI function number for the devlink port instance
 *	@vf: associated PCI VF number of a PF for the devlink port instance;
 *	     VF number starts from 0 for the first PCI virtual function
 *	@external: indicates if the port is for an external controller
 */
void devlink_port_attrs_pci_vf_set(struct devlink_port *devlink_port, u32 controller,
@@ -1430,8 +1431,8 @@ EXPORT_SYMBOL_GPL(devlink_port_attrs_pci_vf_set);
 *
 *	@devlink_port: devlink port
 *	@controller: associated controller number for the devlink port instance
 *	@pf: associated PF for the devlink port instance
 *	@sf: associated SF of a PF for the devlink port instance
 *	@pf: associated PCI function number for the devlink port instance
 *	@sf: associated SF number of a PF for the devlink port instance
 *	@external: indicates if the port is for an external controller
 */
void devlink_port_attrs_pci_sf_set(struct devlink_port *devlink_port, u32 controller,