Thread (3 messages) flat view 3 messages, 3 authors, 1d ago
WARM1d REVIEWED: 1 (0M)

1 review trailer.

[PATCH net] devlink: Expose external flag for PCI SF ports

From: Shay Drory <hidden>
Date: 2026-08-03 09:01:14
Subsystem: devlink, networking [general], the rest · Maintainers: Jiri Pirko, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

The external flag is part of the PCI SF port attributes, but unlike the
PCI PF and PCI VF flavours it was never filled into the port dump, so
userspace could not query it directly.

Reporting of the external flag was missed for SF ports. Hence, put
DEVLINK_ATTR_PORT_EXTERNAL for the PCI SF flavour as well, matching what
PCI PF and PCI VF ports already report.

$ devlink port show pci/0033:01:00.0/163840
 pci/0033:01:00.0/163840: type eth netdev eth1 flavour pcisf controller 1 pfnum 0 sfnum 77 external true splittable false

Fixes: a1ab3e4554b5 ("devlink: Extend SF port attributes to have external attribute")
Reviewed-by: Parav Pandit <redacted>
Signed-off-by: Shay Drory <redacted>
---
 net/devlink/port.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/net/devlink/port.c b/net/devlink/port.c
index dc82cac68e7d..1528f2d148df 100644
--- a/net/devlink/port.c
+++ b/net/devlink/port.c
@@ -267,6 +267,8 @@ static int devlink_nl_port_attrs_put(struct sk_buff *msg,
 		    nla_put_u32(msg, DEVLINK_ATTR_PORT_PCI_SF_NUMBER,
 				attrs->pci_sf.sf))
 			return -EMSGSIZE;
+		if (nla_put_u8(msg, DEVLINK_ATTR_PORT_EXTERNAL, attrs->pci_sf.external))
+			return -EMSGSIZE;
 		break;
 	case DEVLINK_PORT_FLAVOUR_PHYSICAL:
 	case DEVLINK_PORT_FLAVOUR_CPU:
-- 
2.38.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help