Merge branch 'devlink-controller-external-info' into next
Parav Pandit says: ==================== For certain devlink port flavours controller number and optionally external= attributes are reported by the kernel. (a) controller number indicates that a given port belong to which local or = external controller. (b) external port attribute indicates that if a given port is for external = or local controller. This short series shows this attributes to user. ==================== Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
commit
cec67df974
|
|
@ -3343,6 +3343,9 @@ static void pr_out_port_pfvf_num(struct dl *dl, struct nlattr **tb)
|
|||
{
|
||||
uint16_t fn_num;
|
||||
|
||||
if (tb[DEVLINK_ATTR_PORT_CONTROLLER_NUMBER])
|
||||
print_uint(PRINT_ANY, "controller", " controller %u",
|
||||
mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_CONTROLLER_NUMBER]));
|
||||
if (tb[DEVLINK_ATTR_PORT_PCI_PF_NUMBER]) {
|
||||
fn_num = mnl_attr_get_u16(tb[DEVLINK_ATTR_PORT_PCI_PF_NUMBER]);
|
||||
print_uint(PRINT_ANY, "pfnum", " pfnum %u", fn_num);
|
||||
|
|
@ -3351,6 +3354,12 @@ static void pr_out_port_pfvf_num(struct dl *dl, struct nlattr **tb)
|
|||
fn_num = mnl_attr_get_u16(tb[DEVLINK_ATTR_PORT_PCI_VF_NUMBER]);
|
||||
print_uint(PRINT_ANY, "vfnum", " vfnum %u", fn_num);
|
||||
}
|
||||
if (tb[DEVLINK_ATTR_PORT_EXTERNAL]) {
|
||||
uint8_t external;
|
||||
|
||||
external = mnl_attr_get_u8(tb[DEVLINK_ATTR_PORT_EXTERNAL]);
|
||||
print_bool(PRINT_ANY, "external", " external %s", external);
|
||||
}
|
||||
}
|
||||
|
||||
static void pr_out_port_function(struct dl *dl, struct nlattr **tb_port)
|
||||
|
|
|
|||
Loading…
Reference in New Issue