Skip to contentSkip to conversation

regex/cn9k: remove rule compiler

PATCH In review Thomas Monjalon 3 participants 8 messages Jun 21, 2023 – Jul 3, 2023 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regex/cn9k: remove rule compiler

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library. According to what was discussed in the Technical Board:
http://mails.dpdk.org/archives/dev/2019-June/135847.html
the dependency must be "freely available".

Bugzilla ID: 1232

---
 doc/guides/prog_guide/regexdev.rst          |   3 +-
 drivers/regex/cn9k/cn9k_regexdev.c          |  10 +-
 drivers/regex/cn9k/cn9k_regexdev_compiler.c | 228 --------------------
 drivers/regex/cn9k/cn9k_regexdev_compiler.h |  11 -
 drivers/regex/cn9k/meson.build              |   8 -
 5 files changed, 2 insertions(+), 258 deletions(-)
 delete mode 100644 drivers/regex/cn9k/cn9k_regexdev_compiler.c
 delete mode 100644 drivers/regex/cn9k/cn9k_regexdev_compiler.h
doc/guides/prog_guide/regexdev.rst +1 -2
index 5ca7e0c769..93229fa743 100644
@@ -124,8 +124,7 @@ The configuration mode is depended on the PMD capabilities.
 
 Online rule configuration is done using the following API functions:
 ``rte_regexdev_rule_db_update`` which add / remove rules from the rules
-precompiled list, and ``rte_regexdev_rule_db_compile_activate``
-which compile the rules and loads them to the RegEx HW.
+precompiled list.
 
 Offline rule configuration can be done by adding a pointer to the compiled
 rule database in the configuration step, or by using
drivers/regex/cn9k/cn9k_regexdev.c +1 -9
index 56c862c5a7..e96cbf4141 100644
@@ -14,7 +14,6 @@
 
 /* REE common headers */
 #include "cn9k_regexdev.h"
-#include "cn9k_regexdev_compiler.h"
 
 
 /* HW matches are at offset 0x80 from RES_PTR_ADDR
@@ -697,12 +696,6 @@ cn9k_ree_queue_pair_setup(struct rte_regexdev *dev, uint16_t qp_id,
 	return 0;
 }
 
-static int
-cn9k_ree_rule_db_compile_activate(struct rte_regexdev *dev)
-{
-	return cn9k_ree_rule_db_compile_prog(dev);
-}
-
 static int
 cn9k_ree_rule_db_update(struct rte_regexdev *dev,
 		const struct rte_regexdev_rule *rules, uint16_t nb_rules)
@@ -834,8 +827,7 @@ static struct rte_regexdev_ops cn9k_ree_ops = {
 	.dev_attr_get = NULL,
 	.dev_attr_set = NULL,
 	.dev_rule_db_update = cn9k_ree_rule_db_update,
-	.dev_rule_db_compile_activate =
-			cn9k_ree_rule_db_compile_activate,
+	.dev_rule_db_compile_activate = NULL,
 	.dev_db_import = cn9k_ree_rule_db_import,
 	.dev_db_export = cn9k_ree_rule_db_export,
 	.dev_xstats_names_get = NULL,
drivers/regex/cn9k/cn9k_regexdev_compiler.c deleted +0 -228

228 lines not on this page · raw message

drivers/regex/cn9k/cn9k_regexdev_compiler.h deleted +0 -11
deleted file mode 100644
index 4c29a69ada..0000000000
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright (C) 2020 Marvell International Ltd.
- */
-
-#ifndef _CN9K_REGEXDEV_COMPILER_H_
-#define _CN9K_REGEXDEV_COMPILER_H_
-
-int
-cn9k_ree_rule_db_compile_prog(struct rte_regexdev *dev);
-
-#endif /* _CN9K_REGEXDEV_COMPILER_H_ */
drivers/regex/cn9k/meson.build +0 -8
index 19b2e70111..44b12b9845 100644
@@ -8,16 +8,8 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
     subdir_done()
 endif
 
-lib = cc.find_library('rxp_compiler', required: false)
-if lib.found()
-    ext_deps += lib
-    ext_deps += cc.find_library('stdc++', required: true)
-    cflags += ['-DREE_COMPILER_SDK']
-endif
-
 sources = files(
         'cn9k_regexdev.c',
-        'cn9k_regexdev_compiler.c',
 )
 
 deps += ['bus_pci', 'regexdev']
Signature · 1 line
2.41.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Thomas Monjalon

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library.

Yes. it depended on proprietary library owned by NVIDIA now. Not sure Marvell has rights to publish it "freely available".
In order to avoid forking this library, better option to make this library as public. Also, it looks like the library itself won't have proper installation procedures that is the
reason for conflict as documented here in
https://bugs.dpdk.org/show_bug.cgi?id=1232.

If that is not an option for other original owner, I think, it should be removed and accept this patch in the true sprint of open source.

Quoted 8 lines

According to what was discussed in the Technical Board:
http://mails.dpdk.org/archives/dev/2019-June/135847.html
the dependency must be "freely available".

Bugzilla ID: 1232

---

#2 lore raw
Quoted 11 lines · On Wed, 21 Jun 2023 21:03:00 +0530 Jerin Jacob <[email protected]> wrote:
Quoted 9 lines · Thomas Monjalon

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library.

Quoted 7 lines

Yes. it depended on proprietary library owned by NVIDIA now. Not sure Marvell has rights to publish it "freely available".
In order to avoid forking this library, better option to make this library as public. Also, it looks like the library itself won't have proper installation procedures that is the
reason for conflict as documented here in
https://bugs.dpdk.org/show_bug.cgi?id=1232.

Interesting. Then what about the GPU support which currently requires proprietary NVIDIA CUDA library

#3 lore raw

25/06/2023 22:57, Stephen Hemminger:

Quoted 22 lines
Quoted 11 lines · On Wed, 21 Jun 2023 21:03:00 +0530 Jerin Jacob <[email protected]> wrote:
Quoted 9 lines · Thomas Monjalon

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library.

Quoted 7 lines

Yes. it depended on proprietary library owned by NVIDIA now. Not sure Marvell has rights to publish it "freely available".
In order to avoid forking this library, better option to make this library as public. Also, it looks like the library itself won't have proper installation procedures that is the
reason for conflict as documented here in
https://bugs.dpdk.org/show_bug.cgi?id=1232.

Quoted 2 lines

Interesting. Then what about the GPU support which currently requires proprietary NVIDIA CUDA library

CUDA can be downloaded.
It is even packaged in many Linux distributions.

#4 lore raw
Quoted 23 lines · On Mon, 26 Jun 2023 09:16:32 +0200 Thomas Monjalon <[email protected]> wrote:

25/06/2023 22:57, Stephen Hemminger:

Quoted 22 lines
Quoted 18 lines · On Wed, 21 Jun 2023 21:03:00 +0530 Jerin Jacob <[email protected]> wrote:
Quoted 9 lines · Thomas Monjalon

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library.

Yes. it depended on proprietary library owned by NVIDIA now. Not sure Marvell has rights to publish it "freely available".
In order to avoid forking this library, better option to make this library as public. Also, it looks like the library itself won't have proper installation procedures that is the
reason for conflict as documented here in
https://bugs.dpdk.org/show_bug.cgi?id=1232.

Quoted 5 lines
Quoted 2 lines

Interesting. Then what about the GPU support which currently requires proprietary NVIDIA CUDA library

CUDA can be downloaded.
It is even packaged in many Linux distributions.

Thanks for the clarification.
So the real issue is not that it needs a proprietary library but it is that the library is not available without special license. CUDA does require accepting a free license which may be a problem for some people who have lawyers who read the fine print.

The policy about dependencies should be made more explicit in the documentation.

#5 lore raw

26/06/2023 18:22, Stephen Hemminger:

Quoted 29 lines
Quoted 26 lines · On Mon, 26 Jun 2023 09:16:32 +0200 Thomas Monjalon <[email protected]> wrote:

25/06/2023 22:57, Stephen Hemminger:

Quoted 24 lines
Quoted 11 lines · On Wed, 21 Jun 2023 21:03:00 +0530 Jerin Jacob <[email protected]> wrote:
Quoted 9 lines · Thomas Monjalon

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library.

Quoted 7 lines

Yes. it depended on proprietary library owned by NVIDIA now. Not sure Marvell has rights to publish it "freely available".
In order to avoid forking this library, better option to make this library as public. Also, it looks like the library itself won't have proper installation procedures that is the
reason for conflict as documented here in
https://bugs.dpdk.org/show_bug.cgi?id=1232.

Interesting. Then what about the GPU support which currently requires proprietary NVIDIA CUDA library

Quoted 6 lines
Quoted 2 lines

CUDA can be downloaded.
It is even packaged in many Linux distributions.

Thanks for the clarification.
So the real issue is not that it needs a proprietary library but it is that the library is not available without special license.

No you don't get it.
The problem is that the dependency must be downloadable on Internet. CUDA is downloadable.
The dependency for Marvell regex is not available on Internet.

Quoted 4 lines

CUDA does require accepting a free license which may be a problem for some people who have lawyers who read the fine print.

The policy about dependencies should be made more explicit in the documentation.

It could be detailed in the contributing guide.

#6 lore raw
Quoted 42 lines · On Mon, 26 Jun 2023 18:43:21 +0200 Thomas Monjalon <[email protected]> wrote:

26/06/2023 18:22, Stephen Hemminger:

Quoted 29 lines
Quoted 26 lines · On Mon, 26 Jun 2023 09:16:32 +0200 Thomas Monjalon <[email protected]> wrote:

25/06/2023 22:57, Stephen Hemminger:

Quoted 24 lines
Quoted 11 lines · On Wed, 21 Jun 2023 21:03:00 +0530 Jerin Jacob <[email protected]> wrote:
Quoted 9 lines · Thomas Monjalon

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library.

Quoted 7 lines

Yes. it depended on proprietary library owned by NVIDIA now. Not sure Marvell has rights to publish it "freely available".
In order to avoid forking this library, better option to make this library as public. Also, it looks like the library itself won't have proper installation procedures that is the
reason for conflict as documented here in
https://bugs.dpdk.org/show_bug.cgi?id=1232.

Interesting. Then what about the GPU support which currently requires proprietary NVIDIA CUDA library

Quoted 6 lines
Quoted 2 lines

CUDA can be downloaded.
It is even packaged in many Linux distributions.

Thanks for the clarification.
So the real issue is not that it needs a proprietary library but it is that the library is not available without special license.

No you don't get it.
The problem is that the dependency must be downloadable on Internet. CUDA is downloadable.
The dependency for Marvell regex is not available on Internet.

Quoted 6 lines
Quoted 4 lines

CUDA does require accepting a free license which may be a problem for some people who have lawyers who read the fine print.

The policy about dependencies should be made more explicit in the documentation.

It could be detailed in the contributing guide.

The natural place would be under a subsection about new libraries. This is where the Tech Board approval of new dependencies should go as well.

author Applied
#7 lore raw
In reply to Jerin Jacob

21/06/2023 17:33, Jerin Jacob:

Quoted 19 lines · Thomas Monjalon
Quoted 9 lines

Nobody knows how to build the feature.
When the dependency "rxp_compiler" is found,
the header file is not available:

drivers/regex/cn9k/cn9k_regexdev_compiler.c:12:10: fatal error:
rxp-compiler.h: No such file or directory

It seems that it depends on a proprietay library.

Yes. it depended on proprietary library owned by NVIDIA now. Not sure Marvell has rights to publish it "freely available".
In order to avoid forking this library, better option to make this library as public. Also, it looks like the library itself won't have proper installation procedures that is the
reason for conflict as documented here in
https://bugs.dpdk.org/show_bug.cgi?id=1232.

Quoted 4 lines

If that is not an option for other original owner, I think, it should be removed and accept this patch in the true sprint of open source.

Applied