Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Sunday, October 09, 2016 1:52 AM > To: Shreyansh Jain <shreyansh.jain at nxp.com> > Cc: david.marchand at 6wind.com; dev at dpdk.org; nhorman at tuxdriver.com > Subject: Re: [PATCH v2] drivers: prefix driver REGISTER macro with RTE PMD > > 2016-10-08 23:35, Shreyansh Jain: > > --- a/mk/internal/rte.compile-pre.mk > > +++ b/mk/internal/rte.compile-pre.mk > > @@ -87,7 +87,8 @@ endif > > PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c > > PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c > > PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@ > > -PMDINFO_TO_O = if grep -q 'DRIVER_REGISTER_.*(.*)' $<; then \ > > +PMDINFO_TO_O = if grep -E 'RTE_PMD_REGISTER_PCI\([0-9a-zA-Z,_\. > ]+\)|RTE_PMD_REGISTER_VDEV\([0-9a-zA-Z,_\. ]+\)' $<;\ > > + then \ > > I don't understand why you don't simply grep 'RTE_PMD_REGISTER_.*(' ?
Because I want to make sure that the grep matches only the DRIVER registration functions. In case a new macro (or driver type) is added in future, this macro can be updated. This way we can reduce the probability of a faulty match. Is there a problem with closest possible match? - Shreyansh