[dpdk-dev] [PATCH v7 2/2] net/ixgbe: add callback to user app on VF to PF mbox msg

2016-10-08 Thread Thomas Monjalon
2016-10-07 17:46, Bernard Iremonger:
> +struct rte_pmd_ixgbe_mb_event_param {
> + uint16_t vfid; /**< Virtual Function number */
> + uint16_t msg_type; /**< message type */
> + uint16_t retval;   /**< return value */
> + void *userdata;/**< pointer to user data */

Generally speaking, the user data is a pointer passed by the application
when registering the callback and must be untouched.
It should be the name of the parameter that you are overriding with
this structure.
So this "userdata" pointer could probably be better defined.

By the way, it is far from trivial to understand how to write the callback.
I think it deserves more explanations.




[dpdk-dev] [PATCH v7 0/2] modify callback for VF management

2016-10-08 Thread Thomas Monjalon
2016-10-07 17:46, Bernard Iremonger:
> This patchset modifies the callback function for VF management.
> 
> A third parameter has been added to the _rte_eth_dev_callback_process
> function. All references to this function have been updated.
> Changes have been made to the ixgbe_rcv_msg_from_vf function to
> use the new callback parameter.
> 
> This patchset depends on the following patch.
> http://dpdk.org/dev/patchwork/patch/16430/
> [dpdk-dev,v7,1/2] net/ixgbe: add API's for VF management

OK, this is probably a temporary solution.
I am OK to let it enter in DPDK 16.11 and starts some discussions.
That's why I'll try to sum up the situation for this patchset and
the other one (API for VF management).

The VF features are not yet enough standardized.
So the functions to manage them from the PF will be in some specific
headers (drivers/net/ixgbe/rte_pmd_ixgbe.h in this case).
They could be promoted in the generic ethdev API if it appears to be
generic enough.
There can be also some application callbacks called from the drivers
with a specific signature:
- a "generic" event type for VF
- a specific parameter defined in the driver
Obviously, we cannot have different meanings of this event depending
on the driver in use. So we must have something more robust when
implementing such feature in a second driver.

As there is no obvious solution, the pragmatic approach is to
accept this first specific implementation while waiting for a better idea.


[dpdk-dev] [PATCH 1/3] eal/drivers: prefix driver REGISTER macros with EAL

2016-10-08 Thread Shreyansh Jain


> -Original Message-
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Friday, October 07, 2016 7:15 PM
> To: Shreyansh Jain 
> Cc: david.marchand at 6wind.com; dev at dpdk.org
> Subject: Re: [PATCH 1/3] eal/drivers: prefix driver REGISTER macros with EAL
> 
> 2016-10-07 19:03, Shreyansh Jain:
> > DRIVER_REGISTER_PCI -> EAL_REGISTER_PCI
> > DRIVER_REGISTER_PCI_TABLE -> EAL_REGISTER_PCI_TABLE
> 
> Why not RTE_ prefix instead of EAL_?

Because while searching for similar naming pattern I came across other macros 
like EAL_REGISTER_TAILQ which were within librte_eal/eal/* folders.

> Why 3 patches? As there is no specific comment in each, I think you can
> squash.

Because each of the patch are common and tightly related changes. The 
replacement touches a large number of files, even though the change itself is 
small. By splitting, it makes review (or minor misses) easier - at least for me.
Anyways, if as a maintainer you prefer having a single bulk, I have no issues.

I will send next version with RTE_* and the 'grep -E' suggestion from Neil.

-
Shreyansh


[dpdk-dev] [PATCH 1/3] eal/drivers: prefix driver REGISTER macros with EAL

2016-10-08 Thread Shreyansh Jain
Hi Thomas,

> -Original Message-
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Friday, October 07, 2016 7:22 PM
> To: Shreyansh Jain 
> Cc: david.marchand at 6wind.com; dev at dpdk.org
> Subject: Re: [PATCH 1/3] eal/drivers: prefix driver REGISTER macros with EAL
> 
> 2016-10-07 19:11, Shreyansh Jain:
> > --- a/mk/internal/rte.compile-pre.mk
> > +++ b/mk/internal/rte.compile-pre.mk
> > @@ -87,7 +87,7 @@ 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 'EAL_REGISTER_.*(.*)' $<; then \
> >  echo "$(if $V,$(PMDINFO_GEN),  PMDINFO $@.pmd.c)" && \
> >  $(PMDINFO_GEN) && \
> >  echo "$(if $V,$(PMDINFO_CC),  CC $@.pmd.o)" && \
> >
> > --->8---
> >CC eal_pci_vfio.o
> >PMDINFO eal_pci_vfio.o.pmd.c
> > /bin/sh: 1:
> > /home/shreyansh/build/DPDK/02_dpdk/x86_64-native-linuxapp-gcc/app/dpdk-
> pmdinfogen:
> > not found
> > /home/shreyansh/build/DPDK/02_dpdk/mk/internal/rte.compile-pre.mk:138:
> > recipe for target 'eal_pci_vfio.o' failed
> > --->8---
> >
> > I don't think PMDINFO should be running on eal_pci_vfio file. Isn't it?
> 
> Every files are scanned for the pattern.

Sorry, I should have been clearer in my statement.
I meant, I didn't think eal_pci_vfio.o had anything of interest for the PMD 
tool and hence the mk files would have skipped over it in absence of a match.
I understand that PMDINFO would run on all files.

> 
> > Is it because EAL_REGISTER_* is matching EAL_REGISTER_TAILQ like macro
> > as well?
> 
> Probably.
> That's another argument in favor of good prefixes.
> I think you should use RTE_DRIVER_REGISTER_ or better, RTE_PMD_REGISTER_

I thought of EAL_PMD_REGISTER_* but dropped it because for PCI_TABLE like 
macros, the name got really long (EAL_PMD_REGISTER_PCI_TABLE()).
Anyways, I will use RTE_PMD_REGISTER_* now and send another version.

> >
> > I am not very well versed with how PMDINFO is linking with the build
> > system so any hints/insight into this would be really helpful.
> >
> > One I get more clarity on this, I will push a new version of this patch.
> 
> Thanks

-
Shreyansh


[dpdk-dev] [PATCH 1/3] eal/drivers: prefix driver REGISTER macros with EAL

2016-10-08 Thread Shreyansh Jain
Hi Neil,

> -Original Message-
> From: Neil Horman [mailto:nhorman at tuxdriver.com]
> Sent: Friday, October 07, 2016 7:48 PM
> To: Thomas Monjalon 
> Cc: Shreyansh Jain ; david.marchand at 6wind.com;
> dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/3] eal/drivers: prefix driver REGISTER
> macros with EAL
> 
> On Fri, Oct 07, 2016 at 03:51:44PM +0200, Thomas Monjalon wrote:
> > 2016-10-07 19:11, Shreyansh Jain:
> > > --- a/mk/internal/rte.compile-pre.mk
> > > +++ b/mk/internal/rte.compile-pre.mk
> > > @@ -87,7 +87,7 @@ 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 'EAL_REGISTER_.*(.*)' $<; then \
> > >  echo "$(if $V,$(PMDINFO_GEN),  PMDINFO $@.pmd.c)" && \
> > >  $(PMDINFO_GEN) && \
> > >  echo "$(if $V,$(PMDINFO_CC),  CC $@.pmd.o)" && \
> > >
> > > --->8---
> > >CC eal_pci_vfio.o
> > >PMDINFO eal_pci_vfio.o.pmd.c
> > > /bin/sh: 1:
> > > /home/shreyansh/build/DPDK/02_dpdk/x86_64-native-linuxapp-gcc/app/dpdk-
> pmdinfogen:
> > > not found
> > > /home/shreyansh/build/DPDK/02_dpdk/mk/internal/rte.compile-pre.mk:138:
> > > recipe for target 'eal_pci_vfio.o' failed
> > > --->8---
> > >
> > > I don't think PMDINFO should be running on eal_pci_vfio file. Isn't it?
> >
> > Every files are scanned for the pattern.
> >
> > > Is it because EAL_REGISTER_* is matching EAL_REGISTER_TAILQ like macro
> > > as well?
> >
> > Probably.
> > That's another argument in favor of good prefixes.
> > I think you should use RTE_DRIVER_REGISTER_ or better, RTE_PMD_REGISTER_
> Thats what we had, about 4 changes to this macro ago, and yes, that made alot
> more sense, to grep on a more complete version of the macro name to ensure a
> unique match.  You might just look for the regex
> EAL_REGISTER_VDEV|EAL_REGISTER_PCI with grep -E

Thanks. I will use this grep.

> 
> Neil
> 
> 
> 
> > >
> > > I am not very well versed with how PMDINFO is linking with the build
> > > system so any hints/insight into this would be really helpful.
> > >
> > > One I get more clarity on this, I will push a new version of this patch.
> >
> > Thanks
> >

-
Shreyansh


[dpdk-dev] ZUC PMD as shared library

2016-10-08 Thread Thomas Monjalon
Hi Pablo,

You are probably aware of the issue, but I would like to make it clear
in case someone else run into the same trouble:

It is impossible to build the ZUC crypto PMD as a shared library:

libsso-zuc-0.1.1/build/libsso_zuc.a(sso_zuc_yasm.o):
relocation R_X86_64_32 against `EK_d' can not be used
when making a shared object; recompile with -fPIC

The library libsso-zuc-0.1.1 needs an update to make the asm code
relocatable.
Should we explicit this limitation in the PMD doc?


[dpdk-dev] [PATCH v1] drivers: prefix driver REGISTER macro with RTE EAL

2016-10-08 Thread Shreyansh Jain
All macros related to driver registeration renamed from DRIVER_*
to RTE_PMD_*

This includes:

 DRIVER_REGISTER_PCI -> RTE_PMD_REGISTER_PCI
 DRIVER_REGISTER_PCI_TABLE -> RTE_PMD_REGISTER_PCI_TABLE
 DRIVER_REGISTER_VDEV -> RTE_PMD_REGISTER_VDEV
 DRIVER_REGISTER_PARAM_STRING -> RTE_PMD_REGISTER_PARAM_STRING
 DRIVER_EXPORT_* -> RTE_PMD_EXPORT_*

Fix PMDINFOGEN tool to look for exact matches of RTE_PMD_REGISTER_PCI and
RTE_PMD_REGISTER_VDEV.

Signed-off-by: Shreyansh Jain 

--
Changes since v0:
 - expand replacement to DRIVER_EXPORT_*
 - merge all changes into single commit
 - checkpatch fixes
---
 doc/guides/prog_guide/dev_kit_build_system.rst |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c   |  4 ++--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c |  4 ++--
 drivers/crypto/kasumi/rte_kasumi_pmd.c |  4 ++--
 drivers/crypto/libcrypto/rte_libcrypto_pmd.c   |  5 +++--
 drivers/crypto/null/null_crypto_pmd.c  |  4 ++--
 drivers/crypto/qat/rte_qat_cryptodev.c |  4 ++--
 drivers/crypto/snow3g/rte_snow3g_pmd.c |  4 ++--
 drivers/crypto/zuc/rte_zuc_pmd.c   |  4 ++--
 drivers/net/af_packet/rte_eth_af_packet.c  |  4 ++--
 drivers/net/bnx2x/bnx2x_ethdev.c   |  8 
 drivers/net/bnxt/bnxt_ethdev.c |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c |  4 ++--
 drivers/net/cxgbe/cxgbe_ethdev.c   |  4 ++--
 drivers/net/e1000/em_ethdev.c  |  4 ++--
 drivers/net/e1000/igb_ethdev.c |  8 
 drivers/net/ena/ena_ethdev.c   |  4 ++--
 drivers/net/enic/enic_ethdev.c |  4 ++--
 drivers/net/fm10k/fm10k_ethdev.c   |  4 ++--
 drivers/net/i40e/i40e_ethdev.c |  4 ++--
 drivers/net/i40e/i40e_ethdev_vf.c  |  4 ++--
 drivers/net/ixgbe/ixgbe_ethdev.c   |  8 
 drivers/net/mlx4/mlx4.c|  4 ++--
 drivers/net/mlx5/mlx5.c|  4 ++--
 drivers/net/mpipe/mpipe_tilegx.c   |  4 ++--
 drivers/net/nfp/nfp_net.c  |  4 ++--
 drivers/net/null/rte_eth_null.c|  4 ++--
 drivers/net/pcap/rte_eth_pcap.c|  4 ++--
 drivers/net/qede/qede_ethdev.c |  8 
 drivers/net/ring/rte_eth_ring.c|  4 ++--
 drivers/net/szedata2/rte_eth_szedata2.c|  4 ++--
 drivers/net/thunderx/nicvf_ethdev.c|  4 ++--
 drivers/net/vhost/rte_eth_vhost.c  |  4 ++--
 drivers/net/virtio/virtio_ethdev.c |  4 ++--
 drivers/net/virtio/virtio_user_ethdev.c|  4 ++--
 drivers/net/vmxnet3/vmxnet3_ethdev.c   |  4 ++--
 drivers/net/xenvirt/rte_eth_xenvirt.c  |  4 ++--
 lib/librte_eal/common/eal_common_dev.c |  2 +-
 lib/librte_eal/common/include/rte_dev.h| 10 +-
 lib/librte_eal/common/include/rte_pci.h|  4 ++--
 lib/librte_eal/common/include/rte_vdev.h   |  4 ++--
 mk/internal/rte.compile-pre.mk |  3 ++-
 42 files changed, 94 insertions(+), 92 deletions(-)

diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst 
b/doc/guides/prog_guide/dev_kit_build_system.rst
index 05358d0..19de156 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -264,7 +264,7 @@ instance the macro:

 .. code-block:: c

-   DRIVER_REGISTER_PCI(name, drv)
+   RTE_PMD_REGISTER_PCI(name, drv)

 Creates the following symbol:

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c 
b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 76dce9c..0b3fd09 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -528,8 +528,8 @@ static struct rte_vdev_driver aesni_gcm_pmd_drv = {
.remove = aesni_gcm_remove
 };

-DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
-DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
+RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
+RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
"max_nb_queue_pairs= "
"max_nb_sessions= "
"socket_id=");
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c 
b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index ff2fc25..b936735 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -719,8 +719,8 @@ static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
.remove = cryptodev_aesni_mb_remove
 };

-DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
-DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
+RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
+RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
"max_nb_queue_pairs= "
"max_nb_sessions= "
"socket_id=");
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c 
b/drivers/crypto/kasum

[dpdk-dev] [PATCH v1] drivers: prefix driver REGISTER macro with RTE EAL

2016-10-08 Thread Shreyansh Jain
On 10/8/2016 11:31 PM, Shreyansh Jain wrote:
> All macros related to driver registeration renamed from DRIVER_*
> to RTE_PMD_*
>
> This includes:
>
>  DRIVER_REGISTER_PCI -> RTE_PMD_REGISTER_PCI
>  DRIVER_REGISTER_PCI_TABLE -> RTE_PMD_REGISTER_PCI_TABLE
>  DRIVER_REGISTER_VDEV -> RTE_PMD_REGISTER_VDEV
>  DRIVER_REGISTER_PARAM_STRING -> RTE_PMD_REGISTER_PARAM_STRING
>  DRIVER_EXPORT_* -> RTE_PMD_EXPORT_*
>
> Fix PMDINFOGEN tool to look for exact matches of RTE_PMD_REGISTER_PCI and
> RTE_PMD_REGISTER_VDEV.
>
> Signed-off-by: Shreyansh Jain 
>
> --
> Changes since v0:
>  - expand replacement to DRIVER_EXPORT_*
>  - merge all changes into single commit
>  - checkpatch fixes
[...]

Incorrect patch headline (RTE EAL in place of RTE PMD)
Self-NACK



[dpdk-dev] [PATCH v2] drivers: prefix driver REGISTER macro with RTE PMD

2016-10-08 Thread Shreyansh Jain
All macros related to driver registeration renamed from DRIVER_*
to RTE_PMD_*

This includes:

 DRIVER_REGISTER_PCI -> RTE_PMD_REGISTER_PCI
 DRIVER_REGISTER_PCI_TABLE -> RTE_PMD_REGISTER_PCI_TABLE
 DRIVER_REGISTER_VDEV -> RTE_PMD_REGISTER_VDEV
 DRIVER_REGISTER_PARAM_STRING -> RTE_PMD_REGISTER_PARAM_STRING
 DRIVER_EXPORT_* -> RTE_PMD_EXPORT_*

Fix PMDINFOGEN tool to look for exact matches of RTE_PMD_REGISTER_PCI and
RTE_PMD_REGISTER_VDEV.

Signed-off-by: Shreyansh Jain 

--
Changes since v1:
 - Fix patch headline

Changes since v0:
 - expand replacement to DRIVER_EXPORT_*
 - merge all changes into single commit
 - checkpatch fixes

---
 doc/guides/prog_guide/dev_kit_build_system.rst |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c   |  4 ++--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c |  4 ++--
 drivers/crypto/kasumi/rte_kasumi_pmd.c |  4 ++--
 drivers/crypto/libcrypto/rte_libcrypto_pmd.c   |  5 +++--
 drivers/crypto/null/null_crypto_pmd.c  |  4 ++--
 drivers/crypto/qat/rte_qat_cryptodev.c |  4 ++--
 drivers/crypto/snow3g/rte_snow3g_pmd.c |  4 ++--
 drivers/crypto/zuc/rte_zuc_pmd.c   |  4 ++--
 drivers/net/af_packet/rte_eth_af_packet.c  |  4 ++--
 drivers/net/bnx2x/bnx2x_ethdev.c   |  8 
 drivers/net/bnxt/bnxt_ethdev.c |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c |  4 ++--
 drivers/net/cxgbe/cxgbe_ethdev.c   |  4 ++--
 drivers/net/e1000/em_ethdev.c  |  4 ++--
 drivers/net/e1000/igb_ethdev.c |  8 
 drivers/net/ena/ena_ethdev.c   |  4 ++--
 drivers/net/enic/enic_ethdev.c |  4 ++--
 drivers/net/fm10k/fm10k_ethdev.c   |  4 ++--
 drivers/net/i40e/i40e_ethdev.c |  4 ++--
 drivers/net/i40e/i40e_ethdev_vf.c  |  4 ++--
 drivers/net/ixgbe/ixgbe_ethdev.c   |  8 
 drivers/net/mlx4/mlx4.c|  4 ++--
 drivers/net/mlx5/mlx5.c|  4 ++--
 drivers/net/mpipe/mpipe_tilegx.c   |  4 ++--
 drivers/net/nfp/nfp_net.c  |  4 ++--
 drivers/net/null/rte_eth_null.c|  4 ++--
 drivers/net/pcap/rte_eth_pcap.c|  4 ++--
 drivers/net/qede/qede_ethdev.c |  8 
 drivers/net/ring/rte_eth_ring.c|  4 ++--
 drivers/net/szedata2/rte_eth_szedata2.c|  4 ++--
 drivers/net/thunderx/nicvf_ethdev.c|  4 ++--
 drivers/net/vhost/rte_eth_vhost.c  |  4 ++--
 drivers/net/virtio/virtio_ethdev.c |  4 ++--
 drivers/net/virtio/virtio_user_ethdev.c|  4 ++--
 drivers/net/vmxnet3/vmxnet3_ethdev.c   |  4 ++--
 drivers/net/xenvirt/rte_eth_xenvirt.c  |  4 ++--
 lib/librte_eal/common/eal_common_dev.c |  2 +-
 lib/librte_eal/common/include/rte_dev.h| 10 +-
 lib/librte_eal/common/include/rte_pci.h|  4 ++--
 lib/librte_eal/common/include/rte_vdev.h   |  4 ++--
 mk/internal/rte.compile-pre.mk |  3 ++-
 42 files changed, 94 insertions(+), 92 deletions(-)

diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst 
b/doc/guides/prog_guide/dev_kit_build_system.rst
index 05358d0..19de156 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -264,7 +264,7 @@ instance the macro:

 .. code-block:: c

-   DRIVER_REGISTER_PCI(name, drv)
+   RTE_PMD_REGISTER_PCI(name, drv)

 Creates the following symbol:

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c 
b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 76dce9c..0b3fd09 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -528,8 +528,8 @@ static struct rte_vdev_driver aesni_gcm_pmd_drv = {
.remove = aesni_gcm_remove
 };

-DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
-DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
+RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
+RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
"max_nb_queue_pairs= "
"max_nb_sessions= "
"socket_id=");
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c 
b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index ff2fc25..b936735 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -719,8 +719,8 @@ static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
.remove = cryptodev_aesni_mb_remove
 };

-DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
-DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
+RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
+RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
"max_nb_queue_pairs= "
"max_nb_sessions= "
"socket_id=");
diff --git a/drivers/crypto/kasum

[dpdk-dev] [PATCH v2] drivers: prefix driver REGISTER macro with RTE PMD

2016-10-08 Thread Thomas Monjalon
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_.*(' ?