devlink: Show devlink port number
Show devlink port number whenever kernel reports that attribute. An example output for a physical port. $ devlink port show pci/0000:06:00.1/65535: type eth netdev eth1_p1 flavour physical port 1 Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
a257456f96
commit
2eb23f3e7a
|
|
@ -2829,6 +2829,12 @@ static void pr_out_port(struct dl *dl, struct nlattr **tb)
|
|||
|
||||
pr_out_str(dl, "flavour", port_flavour_name(port_flavour));
|
||||
}
|
||||
if (tb[DEVLINK_ATTR_PORT_NUMBER]) {
|
||||
uint32_t port_number;
|
||||
|
||||
port_number = mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_NUMBER]);
|
||||
pr_out_uint(dl, "port", port_number);
|
||||
}
|
||||
if (tb[DEVLINK_ATTR_PORT_SPLIT_GROUP])
|
||||
pr_out_uint(dl, "split_group",
|
||||
mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_SPLIT_GROUP]));
|
||||
|
|
|
|||
Loading…
Reference in New Issue