regex/mlx5: fix registration name

Message ID 1596031264-59994-1-git-send-email-orika@mellanox.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series regex/mlx5: fix registration name |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Ori Kam July 29, 2020, 2:01 p.m. UTC
  The current registration name has the net prefix, which is incorrect.
This commit removes the net and changes the name to be regex_mlx5.

Signed-off-by: Ori Kam <orika@mellanox.com>
---
 drivers/regex/mlx5/mlx5_regex.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Thomas Monjalon July 29, 2020, 2:10 p.m. UTC | #1
29/07/2020 16:01, Ori Kam:
> The current registration name has the net prefix, which is incorrect.
> This commit removes the net and changes the name to be regex_mlx5.
> 
> Signed-off-by: Ori Kam <orika@mellanox.com>
> ---
>  drivers/regex/mlx5/mlx5_regex.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
> index 1ca5bfe..cba3eb9 100644
> --- a/drivers/regex/mlx5/mlx5_regex.c
> +++ b/drivers/regex/mlx5/mlx5_regex.c
> @@ -262,6 +262,6 @@
>  }
>  
>  RTE_LOG_REGISTER(mlx5_regex_logtype, pmd.regex.mlx5, NOTICE)
> -RTE_PMD_EXPORT_NAME(net_mlx5_regex, __COUNTER__);
> -RTE_PMD_REGISTER_PCI_TABLE(net_mlx5_regex, mlx5_regex_pci_id_map);
> -RTE_PMD_REGISTER_KMOD_DEP(net_mlx5_regex, "* ib_uverbs & mlx5_core & mlx5_ib");
> +RTE_PMD_EXPORT_NAME(regex_mlx5, __COUNTER__);
> +RTE_PMD_REGISTER_PCI_TABLE(regex_mlx5, mlx5_regex_pci_id_map);
> +RTE_PMD_REGISTER_KMOD_DEP(regex_mlx5, "* ib_uverbs & mlx5_core & mlx5_ib");

I think you should add a macro for the name of the driver,
and take this opportunity to use the macro in mlx5_regex_driver.pci_driver.driver.name,
which is currently mlx5_regex instead of regex_mlx5.
  
David Marchand July 29, 2020, 2:13 p.m. UTC | #2
On Wed, Jul 29, 2020 at 4:10 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 29/07/2020 16:01, Ori Kam:
> > The current registration name has the net prefix, which is incorrect.
> > This commit removes the net and changes the name to be regex_mlx5.
> >

It was offlist, but
Reported-by: David Marchand <david.marchand@redhat.com>


> > Signed-off-by: Ori Kam <orika@mellanox.com>
> > ---
> >  drivers/regex/mlx5/mlx5_regex.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
> > index 1ca5bfe..cba3eb9 100644
> > --- a/drivers/regex/mlx5/mlx5_regex.c
> > +++ b/drivers/regex/mlx5/mlx5_regex.c
> > @@ -262,6 +262,6 @@
> >  }
> >
> >  RTE_LOG_REGISTER(mlx5_regex_logtype, pmd.regex.mlx5, NOTICE)
> > -RTE_PMD_EXPORT_NAME(net_mlx5_regex, __COUNTER__);
> > -RTE_PMD_REGISTER_PCI_TABLE(net_mlx5_regex, mlx5_regex_pci_id_map);
> > -RTE_PMD_REGISTER_KMOD_DEP(net_mlx5_regex, "* ib_uverbs & mlx5_core & mlx5_ib");
> > +RTE_PMD_EXPORT_NAME(regex_mlx5, __COUNTER__);
> > +RTE_PMD_REGISTER_PCI_TABLE(regex_mlx5, mlx5_regex_pci_id_map);
> > +RTE_PMD_REGISTER_KMOD_DEP(regex_mlx5, "* ib_uverbs & mlx5_core & mlx5_ib");
>
> I think you should add a macro for the name of the driver,
> and take this opportunity to use the macro in mlx5_regex_driver.pci_driver.driver.name,
> which is currently mlx5_regex instead of regex_mlx5.

Sounds good to me.
We might want to align other drivers too, as there are discrepancies
in vdpa drivers.
  

Patch

diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index 1ca5bfe..cba3eb9 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -262,6 +262,6 @@ 
 }
 
 RTE_LOG_REGISTER(mlx5_regex_logtype, pmd.regex.mlx5, NOTICE)
-RTE_PMD_EXPORT_NAME(net_mlx5_regex, __COUNTER__);
-RTE_PMD_REGISTER_PCI_TABLE(net_mlx5_regex, mlx5_regex_pci_id_map);
-RTE_PMD_REGISTER_KMOD_DEP(net_mlx5_regex, "* ib_uverbs & mlx5_core & mlx5_ib");
+RTE_PMD_EXPORT_NAME(regex_mlx5, __COUNTER__);
+RTE_PMD_REGISTER_PCI_TABLE(regex_mlx5, mlx5_regex_pci_id_map);
+RTE_PMD_REGISTER_KMOD_DEP(regex_mlx5, "* ib_uverbs & mlx5_core & mlx5_ib");