[dpdk-dev] [PATCH v6 12/17] pci: add a helper for device name
Jan Viktorin
viktorin at rehivetech.com
Fri Jul 15 11:56:53 CEST 2016
On Fri, 15 Jul 2016 15:09:58 +0530
Shreyansh jain <shreyansh.jain at nxp.com> wrote:
> On Thursday 14 July 2016 10:25 PM, Jan Viktorin wrote:
> > On Tue, 12 Jul 2016 11:31:17 +0530
> > Shreyansh Jain <shreyansh.jain at nxp.com> wrote:
> >
> >> eal is a better place than crypto / ethdev for naming resources.
> >
> > s/for naming/to name/
>
> OK.
>
> >
> > What is meant by "resources" here?
>
> This has historic context (from earlier version of this patch).
> But I could relate the word 'resources' to EAL representation of devices - whether PCI or Crypto.
> Or, Resource == Device.
If it is possible I'd like more "device". But I think it's not that critical thing...
>
> >
> >> Add a helper in eal and make use of it in crypto / ethdev.
[...]
> >> TAILQ_HEAD(pci_device_list, rte_pci_device); /**< PCI devices in D-linked Q. */
> >> @@ -95,6 +96,7 @@ const char *pci_get_sysfs_path(void);
> >>
> >> /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
> >> #define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
> >> +#define PCI_PRI_STR_SIZE sizeof("XXXX:XX:XX.X")
> >>
> >> /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */
> >> #define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
> >> @@ -308,6 +310,29 @@ eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr)
> >> }
> >> #undef GET_PCIADDR_FIELD
> >>
> >> +/**
> >> + * Utility function to write a pci device name, this device name can later be
> >> + * used to retrieve the corresponding rte_pci_addr using above functions.
> >
> > What about saying "using functions eal_parse_pci_*BDF"? The
> > specification "above" is quite uncertain...
>
> Agree that 'above' is positional word and should be avoided.
> I will change that to "... using eal_parse_pci_* BDF helpers". OK?
OK.
[...]
--
Jan Viktorin E-mail: Viktorin at RehiveTech.com
System Architect Web: www.RehiveTech.com
RehiveTech
Brno, Czech Republic
More information about the dev
mailing list