On Sun, 7 Jul 2019 23:15:47 -0500, Parav Pandit wrote: > diff --git a/net/core/devlink.c b/net/core/devlink.c > index 3e5f8204c36f..88b2cf207cb2 100644 > --- a/net/core/devlink.c > +++ b/net/core/devlink.c > @@ -519,6 +519,11 @@ static int devlink_nl_port_attrs_put(struct sk_buff *msg, > if (devlink_port->attrs.flavour != DEVLINK_PORT_FLAVOUR_PHYSICAL && > devlink_port->attrs.flavour != DEVLINK_PORT_FLAVOUR_CPU && > devlink_port->attrs.flavour != DEVLINK_PORT_FLAVOUR_DSA) > return 0; > + if (devlink_port->attrs.flavour == DEVLINK_PORT_FLAVOUR_PCI_PF) {
Thanks for making the changes! I'm not sure how this would work, tho. We return early if flavour is not phys/cpu/dsa, so how can flavour be pci here?.. > + if (nla_put_u16(msg, DEVLINK_ATTR_PORT_PCI_PF_NUMBER, > + attrs->pci_pf.pf)) > + return -EMSGSIZE; > + } > if (nla_put_u32(msg, DEVLINK_ATTR_PORT_NUMBER, > attrs->physical.port_number)) > return -EMSGSIZE;