> -----Original Message-----
> From: Jakub Kicinski <jakub.kicin...@netronome.com>
> Sent: Tuesday, July 9, 2019 2:44 AM
> To: Parav Pandit <pa...@mellanox.com>
> Cc: netdev@vger.kernel.org; Jiri Pirko <j...@mellanox.com>; Saeed Mahameed
> <sae...@mellanox.com>
> Subject: Re: [PATCH net-next v5 3/5] devlink: Introduce PCI PF port flavour 
> and
> port attribute
> 
> 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?..
> 
My bad. Hunk got applied at wrong place when I split the patch.
Correcting it along with physical to phys name change that Jiri suggested.

> > +           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;

Reply via email to