> -----Original Message----- > From: Jiri Pirko <j...@resnulli.us> > Sent: Thursday, June 20, 2019 7:08 PM > To: Sudarsana Reddy Kalluru <skall...@marvell.com> > Cc: Jakub Kicinski <jakub.kicin...@netronome.com>; da...@davemloft.net; > netdev@vger.kernel.org; Michal Kalderon <mkalde...@marvell.com>; Ariel > Elior <ael...@marvell.com> > Subject: Re: [EXT] Re: [PATCH net-next 4/4] qed: Add devlink support for > configuration attributes. > > Thu, Jun 20, 2019 at 02:09:29PM CEST, skall...@marvell.com wrote: > >> -----Original Message----- > >> From: Jakub Kicinski <jakub.kicin...@netronome.com> > >> Sent: Tuesday, June 18, 2019 4:24 AM > >> To: Sudarsana Reddy Kalluru <skall...@marvell.com> > >> Cc: da...@davemloft.net; netdev@vger.kernel.org; Michal Kalderon > >> <mkalde...@marvell.com>; Ariel Elior <ael...@marvell.com>; Jiri Pirko > >> <j...@resnulli.us> > >> Subject: [EXT] Re: [PATCH net-next 4/4] qed: Add devlink support for > >> configuration attributes. > >> > >> External Email > >> > >> --------------------------------------------------------------------- > >> - On Mon, 17 Jun 2019 04:45:28 -0700, Sudarsana Reddy Kalluru wrote: > >> > This patch adds implementation for devlink callbacks for reading/ > >> > configuring the device attributes. > >> > > >> > Signed-off-by: Sudarsana Reddy Kalluru <skall...@marvell.com> > >> > Signed-off-by: Ariel Elior <ael...@marvell.com> > >> > >> You need to provide documentation for your parameters, plus some of > >> them look like they should potentially be port params, not device params. > > > >Thanks a lot for your review. Will add the required documentation. In case > of Marvell adapter, any of the device/adapter/port parameters can be > read/configurable via any PF (ethdev) on the port. Hence adding the > commands at device level. Hope this is fine. > > No it is not. Port param should be port param. > > Also please be careful not to add any generic param as driver specific. > > Thanks! Apologies for bringing this topic again. From the driver(s) code paths/'devlink man pages', I understood that devlink-port object is an entity on top of the PCI bus device. Some drivers say NFP represents vnics (on pci-dev) as a devlink-ports and, some represents (virtual?) ports on the PF/device as devlink-ports. In the case of Marvell NIC driver, we don't have [port] partitioning of the PCI device. And the config attributes are specific to PCI-device (not the vports/vnics of PF). Hence I didn't see a need for creating devlink-port objects in the system for Marvell NICs. And planning to add the config attributes to 'devlink-dev' object. Please let me know if my understanding and the proposal is ok?
Code paths which use devlink-port: mlx4_load_one(struct pci_dev *pdev): mlx4_init_port_info(1 .. dev->caps.num_ports) -> devlink_port_register() nfp_net_pf_init_vnics (1 .. pf->vnics) -> nfp_net_pf_init_vnic() -> nfp_devlink_port_register() nsim_dev_probe (1 .. nsim_bus_dev->port_count) -> __nsim_dev_port_add() -> devlink_port_register () man page for 'devlink-port': devlink port set - change devlink port attributes DEV/PORT_INDEX - specifies the devlink port to operate on. devlink port show pci/0000:01:00.0/1 Shows the state of specified devlink port.