From: Ori Kam <orika@mellanox.com>
To: jerinj@marvell.com, xiang.w.wang@intel.com, matan@mellanox.com,
viacheslavo@mellanox.com, Thomas Monjalon <thomas@monjalon.net>,
John McNamara <john.mcnamara@intel.com>,
Marko Kovacevic <marko.kovacevic@intel.com>,
Parav Pandit <parav@mellaox.com>,
Shahaf Shuler <shahafs@mellanox.com>,
Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>
Cc: guyk@marvell.com, dev@dpdk.org, pbhagavatula@marvell.com,
hemant.agrawal@nxp.com, opher@mellanox.com, alexr@mellanox.com,
dovrat@marvell.com, pkapoor@marvell.com, nipun.gupta@nxp.com,
bruce.richardson@intel.com, yang.a.hong@intel.com,
harry.chang@intel.com, gu.jian1@zte.com.cn,
shanjiangh@chinatelecom.cn, zhangy.yun@chinatelecom.cn,
lixingfu@huachentel.com, wushuai@inspur.com,
yuyingxia@yxlink.com, fanchenggang@sunyainfo.com,
davidfgao@tencent.com, liuzhong1@chinaunicom.cn,
zhaoyong11@huawei.com, oc@yunify.com, jim@netgate.com,
hongjun.ni@intel.com, deri@ntop.org, fc@napatech.com,
arthur.su@lionic.com, orika@mellanox.com, rasland@mellanox.com,
Yuval Avnery <yuvalav@mellanox.com>
Subject: [dpdk-dev] [PATCH v6 01/13] regex/mlx5: add RegEx PMD layer and mlx5 driver
Date: Mon, 20 Jul 2020 06:26:05 +0000 [thread overview]
Message-ID: <1595226378-81144-2-git-send-email-orika@mellanox.com> (raw)
In-Reply-To: <1595226378-81144-1-git-send-email-orika@mellanox.com>
From: Yuval Avnery <yuvalav@mellanox.com>
This commit introduce the RegEx pull mode drivers class, and
adds Mellanox RegEx PMD.
Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
Signed-off-by: Ori Kam <orika@mellanox.com>
---
v6:
* Address ML comments.
v5:
* Move to mlx5 bus
v3:
* Address ML comments.
v2:
* Add docs.
---
.gitignore | 1 +
MAINTAINERS | 11 +++
config/common_base | 5 ++
doc/guides/conf.py | 7 +-
doc/guides/index.rst | 1 +
doc/guides/regexdevs/features/default.ini | 32 +++++++
doc/guides/regexdevs/features/mlx5.ini | 9 ++
doc/guides/regexdevs/features_overview.rst | 100 ++++++++++++++++++++++
doc/guides/regexdevs/index.rst | 15 ++++
doc/guides/regexdevs/mlx5.rst | 53 ++++++++++++
doc/guides/rel_notes/release_20_08.rst | 2 +
drivers/Makefile | 2 +
drivers/bus/Makefile | 2 +-
drivers/bus/mlx5_pci/mlx5_pci_bus.c | 6 +-
drivers/common/Makefile | 2 +-
drivers/common/mlx5/Makefile | 4 +-
drivers/common/mlx5/mlx5_common.h | 1 +
drivers/meson.build | 1 +
drivers/regex/Makefile | 8 ++
drivers/regex/meson.build | 7 ++
drivers/regex/mlx5/Makefile | 34 ++++++++
drivers/regex/mlx5/meson.build | 26 ++++++
drivers/regex/mlx5/mlx5_regex.c | 5 ++
drivers/regex/mlx5/mlx5_regex.h | 8 ++
drivers/regex/mlx5/rte_pmd_mlx5_regex_version.map | 3 +
mk/rte.app.mk | 5 +-
26 files changed, 342 insertions(+), 8 deletions(-)
create mode 100644 doc/guides/regexdevs/features/default.ini
create mode 100644 doc/guides/regexdevs/features/mlx5.ini
create mode 100644 doc/guides/regexdevs/features_overview.rst
create mode 100644 doc/guides/regexdevs/index.rst
create mode 100644 doc/guides/regexdevs/mlx5.rst
create mode 100644 drivers/regex/Makefile
create mode 100644 drivers/regex/meson.build
create mode 100644 drivers/regex/mlx5/Makefile
create mode 100644 drivers/regex/mlx5/meson.build
create mode 100644 drivers/regex/mlx5/mlx5_regex.c
create mode 100644 drivers/regex/mlx5/mlx5_regex.h
create mode 100644 drivers/regex/mlx5/rte_pmd_mlx5_regex_version.map
diff --git a/.gitignore b/.gitignore
index f2f8892..f73d93c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ doc/guides/cryptodevs/overview_auth_table.txt
doc/guides/cryptodevs/overview_aead_table.txt
doc/guides/cryptodevs/overview_asym_table.txt
doc/guides/compressdevs/overview_feature_table.txt
+doc/guides/regexdevs/overview_feature_table.txt
doc/guides/vdpadevs/overview_feature_table.txt
doc/guides/bbdevs/overview_feature_table.txt
diff --git a/MAINTAINERS b/MAINTAINERS
index 9e3bd16..dc4bf21 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -454,6 +454,7 @@ RegEx API - EXPERIMENTAL
M: Ori Kam <orika@mellanox.com>
F: lib/librte_regexdev/
F: doc/guides/prog_guide/regexdev.rst
+F: doc/guides/regexdevs/features/default.ini
Eventdev API
M: Jerin Jacob <jerinj@marvell.com>
@@ -1133,6 +1134,16 @@ F: doc/guides/compressdevs/zlib.rst
F: doc/guides/compressdevs/features/zlib.ini
+RegEx Drivers
+-------------
+
+Mellanox MLX5
+M: Ori Kam <orika@mellanox.com>
+F: drivers/regex/mlx5/
+F: doc/guides/regexdevs/mlx5.rst
+F: doc/guides/regexdevs/features/mlx5.ini
+
+
vDPA Drivers
------------
T: git://dpdk.org/next/dpdk-next-virtio
diff --git a/config/common_base b/config/common_base
index f7a8824..f76585f 100644
--- a/config/common_base
+++ b/config/common_base
@@ -375,6 +375,11 @@ CONFIG_RTE_LIBRTE_MLX5_PMD=n
CONFIG_RTE_LIBRTE_MLX5_DEBUG=n
#
+# Compile regex-oriented Mellanox PMD
+#
+CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD=n
+
+#
# Compile vdpa-oriented Mellanox ConnectX-6 & BlueField (MLX5) PMD
#
CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD=n
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 700e05e..d8fe5cc 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -47,7 +47,7 @@
master_doc = 'index'
# Maximum feature description string length
-feature_str_len = 25
+feature_str_len = 30
# Figures, tables and code-blocks automatically numbered if they have caption
numfig = True
@@ -409,6 +409,11 @@ def setup(app):
'Features',
'Features availability in compression drivers',
'Feature')
+ table_file = dirname(__file__) + '/regexdevs/overview_feature_table.txt'
+ generate_overview_table(table_file, 1,
+ 'Features',
+ 'Features availability in regex drivers',
+ 'Feature')
table_file = dirname(__file__) + '/vdpadevs/overview_feature_table.txt'
generate_overview_table(table_file, 1,
'Features',
diff --git a/doc/guides/index.rst b/doc/guides/index.rst
index 988c6ea..857f036 100644
--- a/doc/guides/index.rst
+++ b/doc/guides/index.rst
@@ -20,6 +20,7 @@ DPDK documentation
cryptodevs/index
compressdevs/index
vdpadevs/index
+ regexdevs/index
eventdevs/index
rawdevs/index
mempool/index
diff --git a/doc/guides/regexdevs/features/default.ini b/doc/guides/regexdevs/features/default.ini
new file mode 100644
index 0000000..10f6c50
--- /dev/null
+++ b/doc/guides/regexdevs/features/default.ini
@@ -0,0 +1,32 @@
+;
+; Features of a default RegEx driver.
+;
+; This file defines the features that are valid for inclusion in
+; the other driver files and also the order that they appear in
+; the features table in the documentation. The feature description
+; string should not exceed feature_str_len defined in conf.py.
+;
+[Features]
+Cross buffer =
+PCRE start anchor =
+PCRE atomic grouping =
+PCRE back reference =
+PCRE back tracking ctrl =
+PCRE call outs =
+PCRE forward reference =
+PCRE greedy =
+PCRE match all =
+PCRE match as end =
+PCRE match point rst =
+PCRE New line conventions =
+PCRE new line SEQ =
+PCRE look around =
+PCRE possessive qualifiers =
+PCRE subroutine references =
+PCRE UTF 8 =
+PCRE UTF 16 =
+PCRE UTF 32 =
+PCRE word boundary =
+Run time compilation =
+Armv8 =
+x86 =
diff --git a/doc/guides/regexdevs/features/mlx5.ini b/doc/guides/regexdevs/features/mlx5.ini
new file mode 100644
index 0000000..9fe5f73
--- /dev/null
+++ b/doc/guides/regexdevs/features/mlx5.ini
@@ -0,0 +1,9 @@
+;
+; Supported features of the 'mlx5' RegEx driver.
+;
+; Refer to default.ini for the full list of available driver features.
+;
+[Features]
+Armv8 = Y
+x86 = Y
+
diff --git a/doc/guides/regexdevs/features_overview.rst b/doc/guides/regexdevs/features_overview.rst
new file mode 100644
index 0000000..f90b394
--- /dev/null
+++ b/doc/guides/regexdevs/features_overview.rst
@@ -0,0 +1,100 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2020 Mellanox Technologies, Ltd
+
+Overview of RegEx Drivers Features
+==================================
+
+This section explains the supported features that are listed in the table below.
+
+Cross buffer
+ Support cross buffer detection.
+
+PCRE start anchor
+ Support PCRE start anchor.
+
+PCRE atomic grouping
+ Support PCRE atomic grouping.
+
+PCRE back reference
+ Support PCRE back regerence.
+
+PCRE back tracking ctrl
+ Support PCRE back tracking ctrl.
+
+PCRE call outs
+ Support PCRE call outes.
+
+PCRE forward reference
+ Support Forward reference.
+
+PCRE greedy
+ Support PCRE greedy mode.
+
+PCRE match all
+ Support PCRE match all.
+
+PCRE match as end
+ Support match as end.
+
+PCRE match point rst
+ Support PCRE match point reset directive.
+
+PCRE New line conventions
+ Support new line conventions.
+
+PCRE new line SEQ
+ Support new line sequence.
+
+PCRE look around
+ Support PCRE look around.
+
+PCRE possessive qualifiers
+ Support PCRE possessive qualifiers.
+
+PCRE subroutine references
+ Support PCRE subroutine references.
+
+PCRE UTF 8
+ Support UTF-8.
+
+PCRE UTF 16
+ Support UTF-16.
+
+PCRE UTF 32
+ Support UTF-32.
+
+PCRE word boundary
+ Support word boundaries.
+
+Run time compilation
+ Support compilation during run time.
+
+Armv8
+ Support armv8 (64bit) architecture.
+
+x86
+ Support x86 architecture.
+
+.. note::
+
+ Most of the features capabilities should be provided by the drivers via the
+ RegEx ``info_get`` operation.
+
+
+References
+==========
+
+ * `PCRE: PCRE pattern man page <https://www.pcre.org/original/doc/html/pcrepattern.html>`_
+
+
+Features Table
+==============
+
+.. _table_regex_pmd_features:
+
+.. include:: overview_feature_table.txt
+
+.. Note::
+
+ Features marked with "P" are partially supported. Refer to the appropriate
+ driver guide in the following sections for details.
diff --git a/doc/guides/regexdevs/index.rst b/doc/guides/regexdevs/index.rst
new file mode 100644
index 0000000..49216a9
--- /dev/null
+++ b/doc/guides/regexdevs/index.rst
@@ -0,0 +1,15 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2020 Mellanox Technologies, Ltd
+
+REGEX Device Drivers
+====================
+
+The following are a list of RegEx (Regular Expression) device drivers,
+which can be used from an application through RegEx API.
+
+.. toctree::
+ :maxdepth: 2
+ :numbered:
+
+ features_overview
+ mlx5
diff --git a/doc/guides/regexdevs/mlx5.rst b/doc/guides/regexdevs/mlx5.rst
new file mode 100644
index 0000000..0e6ee8c
--- /dev/null
+++ b/doc/guides/regexdevs/mlx5.rst
@@ -0,0 +1,53 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2020 Mellanox Technologies, Ltd
+
+.. include:: <isonum.txt>
+
+MLX5 RegEx driver
+=================
+
+The MLX5 RegEx (Regular Expression) driver library
+(**librte_pmd_mlx5_regex**) provides support for **Mellanox BlueField 2**
+families of 25/50/100/200 Gb/s adapters.
+
+Design
+------
+
+This PMD is configuring the RegEx HW engine.
+For the PMD to work, the application must supply
+a precompiled rule file in rof2 format.
+
+The PMD uses libibverbs and libmlx5 to access the device firmware
+or directly the hardware components.
+There are different levels of objects and bypassing abilities
+to get the best performances:
+
+- Verbs is a complete high-level generic API
+- Direct Verbs is a device-specific API
+- DevX allows to access firmware objects
+
+Enabling librte_pmd_mlx5_regex causes DPDK applications to be linked against
+libibverbs.
+
+Mellanox mlx5 pci device can be probed by number of different pci devices,
+for example net / vDPA / RegEx. To select the RegEx PMD ``class=regex`` should
+be specified as device parameter. The RegEx device can be probed and used with
+other Mellanox devices, by adding more options in the class.
+For example: ``class=net:regex`` will probe both the net PMD and the RegEx PMD.
+
+Supported NICs
+--------------
+
+* Mellanox\ |reg| BlueField 2 SmartNIC
+
+Prerequisites
+-------------
+
+- BlueField 2 running Mellanox supported kernel.
+- Enable the RegEx capabilities using system call from the BlueField 2.
+- Official support is not yet released.
+
+Run-time configuration
+~~~~~~~~~~~~~~~~~~~~~~
+
+- **ethtool** operations on related kernel interfaces also affect the PMD.
diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst
index 917a5b8..3f18273 100644
--- a/doc/guides/rel_notes/release_20_08.rst
+++ b/doc/guides/rel_notes/release_20_08.rst
@@ -81,6 +81,8 @@ New Features
Added the RegEx library which provides an API for offload of regular
expressions search operations to hardware or software accelerator devices.
+ Added Mellanox RegEx PMD, allowing to offload RegEx searches.
+
* **Added eCPRI protocol support in rte_flow.**
The ``ECPRI`` item has been added to support eCPRI packet offloading for
diff --git a/drivers/Makefile b/drivers/Makefile
index c70bdf9..b814e05 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -18,6 +18,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += common/qat
DEPDIRS-common/qat := bus mempool
DIRS-$(CONFIG_RTE_LIBRTE_COMPRESSDEV) += compress
DEPDIRS-compress := bus mempool
+DIRS-$(CONFIG_RTE_LIBRTE_REGEXDEV) += regex
+DEPDIRS-regex := common
DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vdpa
DEPDIRS-vdpa := common bus mempool
DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index a70f213..b07786a 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -9,7 +9,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
endif
DIRS-$(CONFIG_RTE_LIBRTE_IFPGA_BUS) += ifpga
DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci
-ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
+ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD)),y)
DEPDIRS-mlx5_pci := pci
DIRS-y += mlx5_pci
endif
diff --git a/drivers/bus/mlx5_pci/mlx5_pci_bus.c b/drivers/bus/mlx5_pci/mlx5_pci_bus.c
index 6f21973..22c24f8 100644
--- a/drivers/bus/mlx5_pci/mlx5_pci_bus.c
+++ b/drivers/bus/mlx5_pci/mlx5_pci_bus.c
@@ -25,13 +25,17 @@ static TAILQ_HEAD(mlx5_pci_devices_head, mlx5_pci_device) devices_list =
const char *name;
unsigned int dev_class;
} mlx5_classes[] = {
- { .name = "vdpa", .dev_class = MLX5_CLASS_VDPA },
{ .name = "net", .dev_class = MLX5_CLASS_NET },
+ { .name = "vdpa", .dev_class = MLX5_CLASS_VDPA },
+ { .name = "regex", .dev_class = MLX5_CLASS_REGEX },
};
static const unsigned int mlx5_class_combinations[] = {
MLX5_CLASS_NET,
MLX5_CLASS_VDPA,
+ MLX5_CLASS_REGEX,
+ MLX5_CLASS_REGEX | MLX5_CLASS_NET,
+ MLX5_CLASS_REGEX | MLX5_CLASS_VDPA,
/* New class combination should be added here.
* For example a new multi class device combination
* can be MLX5_CLASS_FOO | MLX5_CLASS_BAR.
diff --git a/drivers/common/Makefile b/drivers/common/Makefile
index df2e840..cbc7107 100644
--- a/drivers/common/Makefile
+++ b/drivers/common/Makefile
@@ -36,7 +36,7 @@ ifneq (,$(findstring y,$(IAVF-y)))
DIRS-y += iavf
endif
-ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
+ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD)),y)
DIRS-y += mlx5
endif
diff --git a/drivers/common/mlx5/Makefile b/drivers/common/mlx5/Makefile
index 96a2dae..6b89a6c 100644
--- a/drivers/common/mlx5/Makefile
+++ b/drivers/common/mlx5/Makefile
@@ -10,7 +10,7 @@ LIB_GLUE_BASE = librte_pmd_mlx5_glue.so
LIB_GLUE_VERSION = 20.02.0
# Sources.
-ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
+ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD)),y)
ifneq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y)
SRCS-y += linux/mlx5_glue.c
endif
@@ -370,7 +370,7 @@ mlx5_autoconf.h: mlx5_autoconf.h.new
cmp '$<' '$@' $(AUTOCONF_OUTPUT) || \
mv '$<' '$@'
-ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
+ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD)),y)
$(SRCS-y:.c=.o): mlx5_autoconf.h
endif
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index 5b9b7bd..a1f34c3 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -212,6 +212,7 @@ enum mlx5_class {
MLX5_CLASS_INVALID,
MLX5_CLASS_NET = RTE_BIT64(0),
MLX5_CLASS_VDPA = RTE_BIT64(1),
+ MLX5_CLASS_REGEX = RTE_BIT64(2),
};
#define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */
diff --git a/drivers/meson.build b/drivers/meson.build
index 161cfda..e76ebdd 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -9,6 +9,7 @@ dpdk_driver_classes = ['common',
'raw', # depends on common, bus and net.
'crypto', # depends on common, bus and mempool (net in future).
'compress', # depends on common, bus, mempool.
+ 'regex', # depends on common, bus, regexdev.
'vdpa', # depends on common, bus and mempool.
'event', # depends on common, bus, mempool and net.
'baseband'] # depends on common and bus.
diff --git a/drivers/regex/Makefile b/drivers/regex/Makefile
new file mode 100644
index 0000000..906b205
--- /dev/null
+++ b/drivers/regex/Makefile
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2020 Mellanox Technologies, Ltd
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+DIRS-$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD) += mlx5
+
+include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/regex/meson.build b/drivers/regex/meson.build
new file mode 100644
index 0000000..8edeba3
--- /dev/null
+++ b/drivers/regex/meson.build
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2020 Mellanox Technologies, Ltd
+
+drivers = ['mlx5']
+std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
+config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
+driver_name_fmt = 'rte_pmd_@0@'
diff --git a/drivers/regex/mlx5/Makefile b/drivers/regex/mlx5/Makefile
new file mode 100644
index 0000000..2aba90e
--- /dev/null
+++ b/drivers/regex/mlx5/Makefile
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2020 Mellanox Technologies, Ltd
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# Library name.
+LIB = librte_pmd_mlx5_regex.a
+
+# Sources.
+SRCS-$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD) += mlx5_regex.c
+
+# Basic CFLAGS.
+CFLAGS += -O3
+CFLAGS += -std=c11 -Wall -Wextra
+CFLAGS += -g
+CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5
+CFLAGS += -I$(BUILDDIR)/drivers/common/mlx5
+CFLAGS += -D_BSD_SOURCE
+CFLAGS += -D_DEFAULT_SOURCE
+CFLAGS += -D_XOPEN_SOURCE=600
+CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-strict-prototypes
+LDLIBS += -lrte_common_mlx5
+LDLIBS += -lm
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_regexdev
+LDLIBS += -lrte_kvargs
+LDLIBS += -lrte_bus_pci -lrte_buf_mlx5_pci
+
+# A few warnings cannot be avoided in external headers.
+CFLAGS += -Wno-error=cast-qual
+
+EXPORT_MAP := rte_pmd_mlx5_regex_version.map
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/regex/mlx5/meson.build b/drivers/regex/mlx5/meson.build
new file mode 100644
index 0000000..27bb0ad
--- /dev/null
+++ b/drivers/regex/mlx5/meson.build
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2020 Mellanox Technologies, Ltd
+
+if not is_linux
+ build = false
+ reason = 'only supported on Linux'
+ subdir_done()
+endif
+
+fmt_name = 'mlx5_regex'
+deps += ['common_mlx5', 'bus_pci', 'bus_mlx5_pci', 'eal', 'regexdev']
+sources = files(
+ 'mlx5_regex.c',
+)
+cflags_options = [
+ '-std=c11',
+ '-Wno-strict-prototypes',
+ '-D_BSD_SOURCE',
+ '-D_DEFAULT_SOURCE',
+ '-D_XOPEN_SOURCE=600'
+]
+foreach option:cflags_options
+ if cc.has_argument(option)
+ cflags += option
+ endif
+endforeach
diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
new file mode 100644
index 0000000..b942a75
--- /dev/null
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+
+#include "mlx5_regex.h"
diff --git a/drivers/regex/mlx5/mlx5_regex.h b/drivers/regex/mlx5/mlx5_regex.h
new file mode 100644
index 0000000..0e0495c
--- /dev/null
+++ b/drivers/regex/mlx5/mlx5_regex.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+
+#ifndef MLX5_REGEX_H
+#define MLX5_REGEX_H
+
+#endif /* MLX5_REGEX_H */
diff --git a/drivers/regex/mlx5/rte_pmd_mlx5_regex_version.map b/drivers/regex/mlx5/rte_pmd_mlx5_regex_version.map
new file mode 100644
index 0000000..4a76d1d
--- /dev/null
+++ b/drivers/regex/mlx5/rte_pmd_mlx5_regex_version.map
@@ -0,0 +1,3 @@
+DPDK_21 {
+ local: *;
+};
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index d7c1d90..a7f30c4 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -201,12 +201,13 @@ endif
_LDLIBS-$(CONFIG_RTE_LIBRTE_LIO_PMD) += -lrte_pmd_lio
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_MEMIF) += -lrte_pmd_memif
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4
-ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
+ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD)),y)
_LDLIBS-y += -lrte_common_mlx5
_LDLIBS-y += -lrte_bus_mlx5_pci
endif
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD) += -lrte_pmd_mlx5_vdpa
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD) += -lrte_pmd_mlx5_regex
ifeq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y)
_LDLIBS-y += -ldl
else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)
@@ -215,7 +216,7 @@ _LDLIBS-y += --no-whole-archive
_LDLIBS-y += $(LIBS_IBVERBS_STATIC)
_LDLIBS-y += --whole-archive
else
-ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
+ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD)),y)
_LDLIBS-y += -libverbs -lmlx5
endif
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs -lmlx4
--
1.8.3.1
next prev parent reply other threads:[~2020-07-20 6:26 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-05 9:23 [dpdk-dev] [PATCH 00/20] add Mellanox RegEx PMD Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 01/20] regex/mlx5: add RegEx PMD layer and mlx5 driver Ori Kam
2020-07-05 10:59 ` Wang, Haiyue
2020-07-05 11:32 ` Ori Kam
2020-07-06 22:47 ` Thomas Monjalon
2020-07-05 9:23 ` [dpdk-dev] [PATCH 02/20] regex/mlx5: add log utils Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 03/20] common/mlx5: add MMO and regexp structs/opcodes Ori Kam
2020-07-08 7:32 ` Slava Ovsiienko
2020-07-05 9:23 ` [dpdk-dev] [PATCH 04/20] common/mlx5: add mlx5 regex command structs Ori Kam
2020-07-08 7:32 ` Slava Ovsiienko
2020-07-05 9:23 ` [dpdk-dev] [PATCH 05/20] common/mlx5: add support for regex capability query Ori Kam
2020-07-08 7:32 ` Slava Ovsiienko
2020-07-05 9:23 ` [dpdk-dev] [PATCH 06/20] regex/mlx5: add probe function Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 07/20] common/mlx5: add rxp database set cmd Ori Kam
2020-07-08 7:32 ` Slava Ovsiienko
2020-07-05 9:23 ` [dpdk-dev] [PATCH 08/20] regex/mlx5: add RXP register definitions Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 09/20] common/mlx5: add write and read RXP registers Ori Kam
2020-07-08 7:32 ` Slava Ovsiienko
2020-07-05 9:23 ` [dpdk-dev] [PATCH 10/20] regex/mlx5: add engine status check Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 11/20] regex/mlx5: add get info function Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 12/20] regex/mlx5: add configure function Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 13/20] regex/mlx5: add program rules support Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 14/20] regex/mlx5: add completion queue creation Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 15/20] regex/mlx5: add send queue support Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 16/20] common/mlx5: add match tuple hw layout Ori Kam
2020-07-08 7:32 ` Slava Ovsiienko
2020-07-05 9:23 ` [dpdk-dev] [PATCH 17/20] regex/mlx5: fastpath setup Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 18/20] regex/mlx5: add enqueue implementation Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 19/20] regex/mlx5: implement dequeue function Ori Kam
2020-07-05 9:23 ` [dpdk-dev] [PATCH 20/20] maintainers: add maintainers to regexdev lib Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 00/20] add Mellanox RegEx PMD Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 01/20] regex/mlx5: add RegEx PMD layer and mlx5 driver Ori Kam
2020-07-15 17:20 ` Thomas Monjalon
2020-07-15 17:29 ` Thomas Monjalon
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 02/20] regex/mlx5: add log utils Ori Kam
2020-07-15 17:32 ` Thomas Monjalon
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 03/20] common/mlx5: add MMO and regexp structs/opcodes Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 04/20] common/mlx5: add mlx5 regex command structs Ori Kam
2020-07-15 17:24 ` Thomas Monjalon
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 05/20] common/mlx5: add support for regex capability query Ori Kam
2020-07-15 17:26 ` Thomas Monjalon
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 06/20] regex/mlx5: add probe function Ori Kam
2020-07-15 17:38 ` Thomas Monjalon
2020-07-15 19:02 ` Thomas Monjalon
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 07/20] common/mlx5: add rxp database set cmd Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 08/20] regex/mlx5: add RXP register definitions Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 09/20] common/mlx5: add write and read RXP registers Ori Kam
2020-07-15 17:34 ` Thomas Monjalon
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 10/20] regex/mlx5: add engine status check Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 11/20] regex/mlx5: add get info function Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 12/20] regex/mlx5: add configure function Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 13/20] regex/mlx5: add program rules support Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 14/20] regex/mlx5: add completion queue creation Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 15/20] regex/mlx5: add send queue support Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 16/20] common/mlx5: add match tuple hw layout Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 17/20] regex/mlx5: fastpath setup Ori Kam
2020-07-12 20:58 ` [dpdk-dev] [PATCH v2 18/20] regex/mlx5: add enqueue implementation Ori Kam
2020-07-12 20:59 ` [dpdk-dev] [PATCH v2 19/20] regex/mlx5: implement dequeue function Ori Kam
2020-07-12 20:59 ` [dpdk-dev] [PATCH v2 20/20] regex/mlx5: add start stop functions Ori Kam
2020-07-15 16:48 ` [dpdk-dev] [PATCH v2 00/20] add Mellanox RegEx PMD Thomas Monjalon
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 00/13] " Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 01/13] regex/mlx5: add RegEx PMD layer and mlx5 driver Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 02/13] regex/mlx5: add log utils Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 03/13] regex/mlx5: add probe function Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 04/13] regex/mlx5: add get info function Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 05/13] regex/mlx5: add engine status check Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 06/13] regex/mlx5: add configure function Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 07/13] regex/mlx5: add program rules support Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 08/13] regex/mlx5: add completion queue creation Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 09/13] regex/mlx5: add send queue support Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 10/13] regex/mlx5: fastpath setup Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 11/13] regex/mlx5: add enqueue implementation Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 12/13] regex/mlx5: implement dequeue function Ori Kam
2020-07-17 10:27 ` [dpdk-dev] [PATCH v3 13/13] regex/mlx5: add start stop functions Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 00/13] add Mellanox RegEx PMD Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 01/13] regex/mlx5: add RegEx PMD layer and mlx5 driver Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 02/13] regex/mlx5: add log utils Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 03/13] regex/mlx5: add probe function Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 04/13] regex/mlx5: add get info function Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 05/13] regex/mlx5: add engine status check Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 06/13] regex/mlx5: add configure function Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 07/13] regex/mlx5: add program rules support Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 08/13] regex/mlx5: add completion queue creation Ori Kam
2020-07-17 11:10 ` [dpdk-dev] [PATCH v4 09/13] regex/mlx5: add send queue support Ori Kam
2020-07-17 11:11 ` [dpdk-dev] [PATCH v4 10/13] regex/mlx5: fastpath setup Ori Kam
2020-07-17 11:11 ` [dpdk-dev] [PATCH v4 11/13] regex/mlx5: add enqueue implementation Ori Kam
2020-07-17 11:11 ` [dpdk-dev] [PATCH v4 12/13] regex/mlx5: implement dequeue function Ori Kam
2020-07-17 11:11 ` [dpdk-dev] [PATCH v4 13/13] regex/mlx5: add start stop functions Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 00/13] add Mellanox RegEx PMD Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 01/13] regex/mlx5: add RegEx PMD layer and mlx5 driver Ori Kam
2020-07-19 22:15 ` Thomas Monjalon
2020-07-20 4:50 ` Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 02/13] regex/mlx5: add log utils Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 03/13] regex/mlx5: add probe function Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 04/13] regex/mlx5: add get info function Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 05/13] regex/mlx5: add engine status check Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 06/13] regex/mlx5: add configure function Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 07/13] regex/mlx5: add program rules support Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 08/13] regex/mlx5: add completion queue creation Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 09/13] regex/mlx5: add send queue support Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 10/13] regex/mlx5: fastpath setup Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 11/13] regex/mlx5: add enqueue implementation Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 12/13] regex/mlx5: implement dequeue function Ori Kam
2020-07-19 18:09 ` [dpdk-dev] [PATCH v5 13/13] regex/mlx5: add start stop functions Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 00/13] add Mellanox RegEx PMD Ori Kam
2020-07-20 6:26 ` Ori Kam [this message]
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 02/13] regex/mlx5: add log utils Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 03/13] regex/mlx5: add probe function Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 04/13] regex/mlx5: add get info function Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 05/13] regex/mlx5: add engine status check Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 06/13] regex/mlx5: add configure function Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 07/13] regex/mlx5: add program rules support Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 08/13] regex/mlx5: add completion queue creation Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 09/13] regex/mlx5: add send queue support Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 10/13] regex/mlx5: fastpath setup Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 11/13] regex/mlx5: add enqueue implementation Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 12/13] regex/mlx5: implement dequeue function Ori Kam
2020-07-20 6:26 ` [dpdk-dev] [PATCH v6 13/13] regex/mlx5: add start stop functions Ori Kam
2020-07-21 17:06 ` [dpdk-dev] [PATCH v6 00/13] add Mellanox RegEx PMD Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1595226378-81144-2-git-send-email-orika@mellanox.com \
--to=orika@mellanox.com \
--cc=alexr@mellanox.com \
--cc=arthur.su@lionic.com \
--cc=bruce.richardson@intel.com \
--cc=davidfgao@tencent.com \
--cc=deri@ntop.org \
--cc=dev@dpdk.org \
--cc=dovrat@marvell.com \
--cc=fanchenggang@sunyainfo.com \
--cc=fc@napatech.com \
--cc=gu.jian1@zte.com.cn \
--cc=guyk@marvell.com \
--cc=harry.chang@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=hongjun.ni@intel.com \
--cc=jerinj@marvell.com \
--cc=jim@netgate.com \
--cc=john.mcnamara@intel.com \
--cc=liuzhong1@chinaunicom.cn \
--cc=lixingfu@huachentel.com \
--cc=marko.kovacevic@intel.com \
--cc=matan@mellanox.com \
--cc=mdr@ashroe.eu \
--cc=nhorman@tuxdriver.com \
--cc=nipun.gupta@nxp.com \
--cc=oc@yunify.com \
--cc=opher@mellanox.com \
--cc=parav@mellaox.com \
--cc=pbhagavatula@marvell.com \
--cc=pkapoor@marvell.com \
--cc=rasland@mellanox.com \
--cc=shahafs@mellanox.com \
--cc=shanjiangh@chinatelecom.cn \
--cc=thomas@monjalon.net \
--cc=viacheslavo@mellanox.com \
--cc=wushuai@inspur.com \
--cc=xiang.w.wang@intel.com \
--cc=yang.a.hong@intel.com \
--cc=yuvalav@mellanox.com \
--cc=yuyingxia@yxlink.com \
--cc=zhangy.yun@chinatelecom.cn \
--cc=zhaoyong11@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).