Fri, Nov 08, 2019 at 03:20:24AM CET, jakub.kicinski@xxxxxxxxxxxxx wrote: >On Fri, 8 Nov 2019 01:44:53 +0000, Parav Pandit wrote: [...] >> > > > > @@ -6649,6 +6678,9 @@ static int >> > > > __devlink_port_phys_port_name_get(struct devlink_port *devlink_port, >> > > > > n = snprintf(name, len, "pf%uvf%u", >> > > > > attrs->pci_vf.pf, attrs->pci_vf.vf); >> > > > > break; >> > > > > + case DEVLINK_PORT_FLAVOUR_MDEV: >> > > > > + n = snprintf(name, len, "p%s", attrs->mdev.mdev_alias); >> > > > >> > > > Didn't you say m$alias in the cover letter? Not p$alias? >> > > > >> > > In cover letter I described the naming scheme for the netdevice of the >> > > mdev device (not the representor). Representor follows current unique >> > > phys_port_name method. >> > >> > So we're reusing the letter that normal ports use? >> > >> I initially had 'm' as prefix to make it easy to recognize as mdev's port, instead of 'p', but during internal review Jiri's input was to just use 'p'. > >Let's way for Jiri to weigh in then. Hmm, it's been so far I can't really recall. But looking at what we have now: DEVLINK_PORT_FLAVOUR_PHYSICAL "p%u"/"p%us%u" DEVLINK_PORT_FLAVOUR_PCI_PF "pf%u" DEVLINK_PORT_FLAVOUR_PCI_VF "pf%uvf%u" For mdev, the ideal format would be: "pf%um%s" or "pf%uvf%um%s", but that would be too long. I guess that "m%s" is fine. "p" is probably not a good idea as phys ports already have that. [...]