Skip to contentSkip to conversation

dfs:add FUSE based filesystem for DPDK

PATCH Superseded Keith Wiles 4 participants 10 messages Dec 16, 2018 – Jun 9, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/3 dfs:add FUSE based filesystem for DPDK

DFS stands for DPDK Filesystem, which helps expose data and control files in a FUSE based filesystem. The dfs requires libfuse3 and libjansson to be present in the Linux system.

DFS provides a simplified API on top of the FUSE APIs to simplify creating and using FUSE.

Here is the github repo: https://github.com/akheron/jansson
Here is the github repo: https://github.com/libfuse/libfuse

Please use you system updater tool yum, apt-get, ... to add support for these two libraries. Also read the dfs documentation in the docs directory for more details.

The DFS is only setup for Linux at this time with FreeBSD and windows support coming later.

---
V3
Fix checkpatch warnings
Must be using a different checkpatch then on my Ubuntu 18.04 system
v2
fix checkpath warnings.

 MAINTAINERS                        |   5 +
 config/common_linuxapp             |   5 +
 doc/guides/prog_guide/dfs_lib.rst  | 660 ++++++++++++++++++++++
 doc/guides/prog_guide/index.rst    |   1 +
 examples/Makefile                  |   1 +
 examples/dfs/Makefile              |  70 +++
 examples/dfs/main.c                |  86 +++
 examples/dfs/meson.build           |  13 +
 lib/Makefile                       |   2 +
 lib/librte_dfs/Makefile            |  51 ++
 lib/librte_dfs/dfs.c               | 842 +++++++++++++++++++++++++++++
 lib/librte_dfs/dfs.h               | 768 ++++++++++++++++++++++++++
 lib/librte_dfs/dfs_cryptodev.c     |  53 ++
 lib/librte_dfs/dfs_cryptodev.h     |  25 +
 lib/librte_dfs/dfs_dpdk.c          | 323 +++++++++++
 lib/librte_dfs/dfs_dpdk.h          |  37 ++
 lib/librte_dfs/dfs_eal.c           | 652 ++++++++++++++++++++++
 lib/librte_dfs/dfs_eal.h           | 102 ++++
 lib/librte_dfs/dfs_ethdev.c        | 324 +++++++++++
 lib/librte_dfs/dfs_ethdev.h        |  23 +
 lib/librte_dfs/dfs_mempool.c       | 130 +++++
 lib/librte_dfs/dfs_mempool.h       |  26 +
 lib/librte_dfs/dfs_noop.c          |  35 ++
 lib/librte_dfs/dfs_oper.c          | 836 ++++++++++++++++++++++++++++
 lib/librte_dfs/dfs_oper.h          |  48 ++
 lib/librte_dfs/dfs_rawdev.c        |  54 ++
 lib/librte_dfs/dfs_rawdev.h        |  25 +
 lib/librte_dfs/dfs_ring.c          | 107 ++++
 lib/librte_dfs/dfs_ring.h          |  25 +
 lib/librte_dfs/dfs_search.c        | 203 +++++++
 lib/librte_dfs/dfs_search.h        | 266 +++++++++
 lib/librte_dfs/dfs_timer.c         |  58 ++
 lib/librte_dfs/dfs_timer.h         |  25 +
 lib/librte_dfs/meson.build         |  47 ++
 lib/librte_dfs/rte_dfs_version.map |  29 +
 lib/meson.build                    |   2 +-
 mk/rte.app.mk                      |   3 +
 37 files changed, 5961 insertions(+), 1 deletion(-)
 create mode 100644 doc/guides/prog_guide/dfs_lib.rst
 create mode 100644 examples/dfs/Makefile
 create mode 100644 examples/dfs/main.c
 create mode 100644 examples/dfs/meson.build
 create mode 100644 lib/librte_dfs/Makefile
 create mode 100644 lib/librte_dfs/dfs.c
 create mode 100644 lib/librte_dfs/dfs.h
 create mode 100644 lib/librte_dfs/dfs_cryptodev.c
 create mode 100644 lib/librte_dfs/dfs_cryptodev.h
 create mode 100644 lib/librte_dfs/dfs_dpdk.c
 create mode 100644 lib/librte_dfs/dfs_dpdk.h
 create mode 100644 lib/librte_dfs/dfs_eal.c
 create mode 100644 lib/librte_dfs/dfs_eal.h
 create mode 100644 lib/librte_dfs/dfs_ethdev.c
 create mode 100644 lib/librte_dfs/dfs_ethdev.h
 create mode 100644 lib/librte_dfs/dfs_mempool.c
 create mode 100644 lib/librte_dfs/dfs_mempool.h
 create mode 100644 lib/librte_dfs/dfs_noop.c
 create mode 100644 lib/librte_dfs/dfs_oper.c
 create mode 100644 lib/librte_dfs/dfs_oper.h
 create mode 100644 lib/librte_dfs/dfs_rawdev.c
 create mode 100644 lib/librte_dfs/dfs_rawdev.h
 create mode 100644 lib/librte_dfs/dfs_ring.c
 create mode 100644 lib/librte_dfs/dfs_ring.h
 create mode 100644 lib/librte_dfs/dfs_search.c
 create mode 100644 lib/librte_dfs/dfs_search.h
 create mode 100644 lib/librte_dfs/dfs_timer.c
 create mode 100644 lib/librte_dfs/dfs_timer.h
 create mode 100644 lib/librte_dfs/meson.build
 create mode 100644 lib/librte_dfs/rte_dfs_version.map
MAINTAINERS +5 -0
index 71ba31208..e555ec5b7 100644
@@ -1215,6 +1215,11 @@ F: test/bpf/
 F: test/test/test_bpf.c
 F: doc/guides/prog_guide/bpf_lib.rst
 
+DFS - EXPERIMENTAL
+M: Keith Wiles <[email protected]>
+F: lib/librte_dfs
+F: examples/dfs
+F: doc/guides/prog_guide/dfs_lib.rst
 
 Test Applications
 -----------------
config/common_linuxapp +5 -0
index 6c1c8d0f4..70f55508e 100644
@@ -56,3 +56,8 @@ CONFIG_RTE_LIBRTE_PMD_DPAA2_QDMA_RAWDEV=y
 # NXP ENETC PMD Driver
 #
 CONFIG_RTE_LIBRTE_ENETC_PMD=y
+
+#
+# DPDK File System (DFS) enable building.
+#
+CONFIG_RTE_LIBRTE_DFS=n
doc/guides/prog_guide/dfs_lib.rst new file +660 -0

660 lines not on this page · raw message

doc/guides/prog_guide/index.rst +1 -0
index ba8c1f6ad..0f1d21605 100644
@@ -54,6 +54,7 @@ Programmer's Guide
     vhost_lib
     metrics_lib
     bpf_lib
+    dfs_lib
     source_org
     dev_kit_build_system
     dev_kit_root_make_help
examples/Makefile +1 -0
index 33fe0e586..cfe2279e8 100644
@@ -14,6 +14,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_BBDEV) += bbdev_app
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bond
 DIRS-y += cmdline
 DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor
+DIRS-$(CONFIG_RTE_LIBRTE_DFS) += dfs
 DIRS-y += ethtool
 DIRS-y += exception_path
 DIRS-$(CONFIG_RTE_LIBRTE_EFD) += server_node_efd
examples/dfs/Makefile new file +70 -0

70 lines not on this page · raw message

examples/dfs/main.c new file +86 -0

86 lines not on this page · raw message

examples/dfs/meson.build new file +13 -0
new file mode 100644
index 000000000..5923f8957
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+allow_experimental_apis = true
+sources = files(
+	'main.c'
+)
+deps += [ 'dfs' ]
lib/Makefile +2 -0
index b7370ef97..ae6de9bd5 100644
@@ -21,6 +21,8 @@ DEPDIRS-librte_timer := librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_CFGFILE) += librte_cfgfile
 DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += librte_cmdline
 DEPDIRS-librte_cmdline := librte_eal
+DIRS-y += librte_dfs
+DEPDIRS-librte_dfs := librte_eal librte_ethdev librte_timer librte_pci
 DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ethdev
 DEPDIRS-librte_ethdev := librte_net librte_eal librte_mempool librte_ring
 DEPDIRS-librte_ethdev += librte_mbuf
lib/librte_dfs/Makefile new file +51 -0

51 lines not on this page · raw message

lib/librte_dfs/dfs.c new file +842 -0

842 lines not on this page · raw message

lib/librte_dfs/dfs.h new file +768 -0

768 lines not on this page · raw message

lib/librte_dfs/dfs_cryptodev.c new file +53 -0

53 lines not on this page · raw message

lib/librte_dfs/dfs_cryptodev.h new file +25 -0
new file mode 100644
index 000000000..647eba3df
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation.
+ */
+
+#ifndef _DFS_CRYPTODEV_H_
+#define _DFS_CRYPTODEV_H_
+
+/**
+ * @file
+ * RTE DFS Cryptodev Operations
+ *
+ * These routines supply the Crypto usage support routines.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DFS_CRYPTODEV_INFO_FILE "cryptodev-info.tmp"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DFS_CRYPTODEV_H_ */
lib/librte_dfs/dfs_dpdk.c new file +323 -0

323 lines not on this page · raw message

lib/librte_dfs/dfs_dpdk.h new file +37 -0
new file mode 100644
index 000000000..1b0ca9106
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation.
+ */
+
+#ifndef _DFS_DPDK_H_
+#define _DFS_DPDK_H_
+
+/**
+ * @file
+ * RTE DFS DPDK Operations
+ *
+ * These routines supply the DPDK usage support routines.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DFS_DEBUG_FILE      "debug.tmp"
+#define DFS_HASH_FILE       "hash.tmp"
+#define DFS_DEVBIND_FILE    "devbind.tmp"
+
+#define DFS_DEVBIND_CMD     "dpdk-devbind.py"
+
+/**
+ * Initialize the DPDK support for DFS
+ *
+ * @return
+ *  -1 on error or 0 on OK
+ */
+int __rte_experimental dfs_dpdk_init(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DFS_DPDK_H_ */
lib/librte_dfs/dfs_eal.c new file +652 -0

31 lines not on this page · raw message

lib/librte_dfs/dfs_eal.h new file +102 -0

102 lines not on this page · raw message

lib/librte_dfs/dfs_ethdev.c new file +324 -0

324 lines not on this page · raw message

lib/librte_dfs/dfs_ethdev.h new file +23 -0
new file mode 100644
index 000000000..76f30c1ab

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_mempool.c new file +130 -0

130 lines not on this page · raw message

lib/librte_dfs/dfs_mempool.h new file +26 -0
new file mode 100644
index 000000000..121217588

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_noop.c new file +35 -0
new file mode 100644
index 000000000..2f48d8923

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_oper.c new file +836 -0

836 lines not on this page · raw message

lib/librte_dfs/dfs_oper.h new file +48 -0

48 lines not on this page · raw message

lib/librte_dfs/dfs_rawdev.c new file +54 -0

54 lines not on this page · raw message

lib/librte_dfs/dfs_rawdev.h new file +25 -0
new file mode 100644
index 000000000..69edb7cf0

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_ring.c new file +107 -0

107 lines not on this page · raw message

lib/librte_dfs/dfs_ring.h new file +25 -0
new file mode 100644
index 000000000..4e78c1120

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_search.c new file +203 -0

203 lines not on this page · raw message

lib/librte_dfs/dfs_search.h new file +266 -0

266 lines not on this page · raw message

lib/librte_dfs/dfs_timer.c new file +58 -0

58 lines not on this page · raw message

lib/librte_dfs/dfs_timer.h new file +25 -0
new file mode 100644
index 000000000..cb9fdf38b

Lines of this file are not shown. View the raw message.

lib/librte_dfs/meson.build new file +47 -0

47 lines not on this page · raw message

lib/librte_dfs/rte_dfs_version.map new file +29 -0
new file mode 100644
index 000000000..3f963c830

Lines of this file are not shown. View the raw message.

lib/meson.build +1 -1
index bb7f443f9..9a64f969e 100644

Lines of this file are not shown. View the raw message.

mk/rte.app.mk +3 -0
index 5699d979d..0fb759f79 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.1

Part of the diff is not shown here. View the raw message.

#1 lore raw

lib/librte_dfs/meson.build line 4

Quoted 7 lines · Keith Wiles
lib/librte_dfs/meson.build new file +4 -0
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+version = 1

You can leave the version out if it's 1, it's the default

Quoted 11 lines
lib/librte_dfs/Makefile new file +8 -0
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# library name
+LIB = librte_dfs.a
+

lib/librte_dfs/Makefile line 17

Quoted 10 lines
lib/librte_dfs/Makefile new file +9 -1
+CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API -D_FILE_OFFSET_BITS=64
+CFLAGS += -D_GNU_SOURCE
+CFLAGS += -I$(RTE_SDK)/drivers/bus/pci
+LDLIBS += -lrte_eal -lrte_mempool -lrte_hash -lrte_ethdev
-lrte_utils
+LDLIBS += -lrte_ring -lrte_timer -lrte_rawdev -lrte_cryptodev
+LDLIBS += -lpthread
+LDLIBS += $(shell pkg-config --libs-only-l fuse3)
+LDLIBS += $(shell pkg-config --libs-only-l jansson)

Why --libs-only-l ? If the libraries are not installed in the canonical path (eg: build-root-without-chroot) it will break as it won't use the -L

Signature · 2 lines
Kind regards,
Luca Boccassi
#2 lore raw
Quoted 14 lines · Luca Boccassi

lib/librte_dfs/meson.build line 4

Quoted 7 lines · Keith Wiles
lib/librte_dfs/meson.build new file +4 -0
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+version = 1

You can leave the version out if it's 1, it's the default

I understand that maybe the default, but it should not hurt anything and then the developer can update it as needed, right?

Quoted 18 lines
Quoted 18 lines
lib/librte_dfs/Makefile new file +13 -1
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# library name
+LIB = librte_dfs.a
+
+CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API -D_FILE_OFFSET_BITS=64
+CFLAGS += -D_GNU_SOURCE
+CFLAGS += -I$(RTE_SDK)/drivers/bus/pci
+LDLIBS += -lrte_eal -lrte_mempool -lrte_hash -lrte_ethdev
-lrte_utils
Quoted 8 lines

lib/librte_dfs/Makefile line 17

Quoted 4 lines
lib/librte_dfs/Makefile new file +4 -0
+LDLIBS += -lrte_ring -lrte_timer -lrte_rawdev -lrte_cryptodev
+LDLIBS += -lpthread
+LDLIBS += $(shell pkg-config --libs-only-l fuse3)
+LDLIBS += $(shell pkg-config --libs-only-l jansson)

Why --libs-only-l ? If the libraries are not installed in the canonical path (eg: build-root-without-chroot) it will break as it won't use the -L

OK, will look at this one and see if I had a reason to use libs-only-l.

Quoted 4 lines
Signature · 3 lines
-- 
Kind regards,
Luca Boccassi

Regards,
Keith

#3 lore raw
Quoted 14 lines · Keith
Quoted 4 lines

On Dec 16, 2018, at 4:22 PM, Luca Boccassi <[email protected]> wrote:

On Sun, 2018-12-16 at 11:46 -0600, Keith Wiles wrote:

Quoted 9 lines

lib/librte_dfs/meson.build line 4

Quoted 7 lines
lib/librte_dfs/meson.build new file +4 -0
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+version = 1

You can leave the version out if it's 1, it's the default

Quoted 2 lines

I understand that maybe the default, but it should not hurt anything and then the developer can update it as needed, right?

Yes it does not hurt, I don't mind much either way, just wanted to mention there's a default in case you prefer to reduce duplication.

Quoted 39 lines
Quoted 19 lines
Quoted 19 lines
lib/librte_dfs/Makefile new file +15 -1
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# library name
+LIB = librte_dfs.a
+
+CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API -D_FILE_OFFSET_BITS=64
+CFLAGS += -D_GNU_SOURCE
+CFLAGS += -I$(RTE_SDK)/drivers/bus/pci
+LDLIBS += -lrte_eal -lrte_mempool -lrte_hash -lrte_ethdev
-lrte_utils
+LDLIBS += -lrte_ring -lrte_timer -lrte_rawdev -lrte_cryptodev
+LDLIBS += -lpthread
Quoted 8 lines

lib/librte_dfs/Makefile line 17

Quoted 2 lines
lib/librte_dfs/Makefile new file +2 -0
+LDLIBS += $(shell pkg-config --libs-only-l fuse3)
+LDLIBS += $(shell pkg-config --libs-only-l jansson)

Why --libs-only-l ? If the libraries are not installed in the canonical
path (eg: build-root-without-chroot) it will break as it won't use the
-L

OK, will look at this one and see if I had a reason to use libs-only- l.

Quoted 4 lines

--
Kind regards,
Luca Boccassi

Regards,
Keith

Signature · 2 lines
Kind regards,
Luca Boccassi
#4 lore raw
In reply to Keith Wiles

Hi Keith,

16/12/2018 18:46, Keith Wiles:

Quoted 3 lines

DFS stands for DPDK Filesystem, which helps expose data and control files in a FUSE based filesystem. The dfs requires libfuse3 and libjansson to be present in the Linux system.

You presented this idea at the DPDK Summit in Dublin, and I have not seen any public discussion about the idea. Let's try to debate it here.

Quoted 9 lines

DFS provides a simplified API on top of the FUSE APIs to simplify creating and using FUSE.

Here is the github repo: https://github.com/akheron/jansson
Here is the github repo: https://github.com/libfuse/libfuse

Please use you system updater tool yum, apt-get, ... to add support for these two libraries. Also read the dfs documentation in the docs directory for more details.

[...]

doc/guides/prog_guide/dfs_lib.rst line 10

Quoted 7 lines
doc/guides/prog_guide/dfs_lib.rst new file +7 -0
+DPDK File System (DFS)
+======================
+
+This DPDK library provides a pseudo file system much like Linux /proc or /system
+file systems, but this one is a userspace file system. Allowing applications to
+create and design file system directories and files using the FUSE 3.2
+https://github.com/libfuse/libfuse code.

My first thought is we are missing the problem statement. What are you trying to solve? Which use case?

In DPDK, we have some run-time options accessible from the command line, and some public API functions.
I think it is agreed that the primary interface must be the API functions. The command line options should be a responsibility of the application to implement them or not.

I think exposing a filesystem tree interface would be also an application responsibility. Actually, it could be part of a DPDK application, or be run as a secondary process application.
It is probably a good idea to implement it as a ready-to-use library. As it can be implemented on top of DPDK API, I think it should live outside of the main repository. As any other DPDK applications, it will require to be updated when the DPDK APIs are updated or extended. In my opinion, we should not mandate DPDK contributors to update DFS when adding or updating an API. That's why it should not be part of the DPDK package.
One more argument to keep it outside: for diversity and innovation, it is better to not enforce one (new) control interface as the official (and suggested) one way.

One more question,
Is there something exposed in DFS that has not a public DPDK API? If so, we should try fill the gaps.

#5 lore raw
Quoted 25 lines · Thomas Monjalon

Hi Keith,

16/12/2018 18:46, Keith Wiles:

Quoted 3 lines

DFS stands for DPDK Filesystem, which helps expose data and control files in a FUSE based filesystem. The dfs requires libfuse3 and libjansson to be present in the Linux system.

You presented this idea at the DPDK Summit in Dublin, and I have not seen any public discussion about the idea. Let's try to debate it here.

Quoted 9 lines

DFS provides a simplified API on top of the FUSE APIs to simplify creating and using FUSE.

Here is the github repo: https://github.com/akheron/jansson
Here is the github repo: https://github.com/libfuse/libfuse

Please use you system updater tool yum, apt-get, ... to add support for these two libraries. Also read the dfs documentation in the docs directory for more details.

[...]

Quoted 10 lines

doc/guides/prog_guide/dfs_lib.rst line 10

Quoted 7 lines
doc/guides/prog_guide/dfs_lib.rst new file +7 -0
+DPDK File System (DFS)
+======================
+
+This DPDK library provides a pseudo file system much like Linux /proc or /system
+file systems, but this one is a userspace file system. Allowing applications to
+create and design file system directories and files using the FUSE 3.2
+https://github.com/libfuse/libfuse code.

My first thought is we are missing the problem statement. What are you trying to solve? Which use case?

The issue is we do not have a clean way for users and developers to extract information from DPDK or the application for monitoring/control. Using APIs is fine from the application perspective to get information and set information, but the user or admin of a system does not have access to those APIs without a developer giving access via a command line or other method. Each developer creating an application would have to provide this basic level of information via some method in a cloud or VNF system to allow the user or orchestration access. Using DFS the developer would not normally have to write the access methods/display himself, saving him time to develop his application.

A file system is the simplest and easiest method to get host command line access to that information. Control or initialization can also be added at this same simple method for DPDK and the application. Currently I do not have any control support in DFS and it would be reasonable to add these controls (in a limited way) to remove DPDK command line options or cmdline cmds when starting DPDK. Giving some runtime control is better for the application in a cloud or NFV environments.

Quoted 3 lines

In DPDK, we have some run-time options accessible from the command line, and some public API functions.

We have cmdline access to these functions and lets face it cmdline is very difficult for most to use :-), but we do not have access from the system level. The APIs in DFS is much easier and cleaner to allow access to the required information. The application developer also can use these APIs to expose this information without having to give some type of cmdline access. The application may not want a cmdline interface (or allowed to give cmdline access), but does want to get access to the information in the application and DPDK.

Having access via the command line or bash shell is much easier to use and provides simple access by other languages like Go, Python, Bash, Lua … any language that can read or write into a normal filesystem. Then the system level administrator or application developer can write tools in any language he see fit.

Quoted 3 lines

I think it is agreed that the primary interface must be the API functions. The command line options should be a responsibility of the application to implement them or not.

It is not agreed, customers I have spoke with do not agree that DPDK information must be supplied by the application, it should be the responsibility of DPDK in this case to provide that information in some easy to access method. If the application side wants to provide information or control then the developer can also use DFS or not.

Quoted 4 lines

I think exposing a filesystem tree interface would be also an application responsibility. Actually, it could be part of a DPDK application, or be run as a secondary process application.

The secondary process method means the user must use the same version of the application and DPDK to access the primary or we can crash the secondary or primary application. It is very easy to use the wrong version of DPDK secondary application and get invalid information as the primary is different is some offset in a structure.

Remember cloud or NFV systems will have a large number of applications and versions. Using a secondary process model is also a bit of a security problem and can cause the primary application to crash if the secondary does something wrong. Also the system would have to provide a different secondary application matching every DPDK/Application on the platform. Having to match up secondary applications to each and every application is a nightmare for the admin or developer.

Quoted 7 lines

It is probably a good idea to implement it as a ready-to-use library. As it can be implemented on top of DPDK API, I think it should live outside of the main repository. As any other DPDK applications, it will require to be updated when the DPDK APIs are updated or extended. In my opinion, we should not mandate DPDK contributors to update DFS when adding or updating an API. That's why it should not be part of the DPDK package.

The only changes from DPDK developers is when a common API in DPDK changes and is used by DFS. It would not be difficult to keep these changes updated as these changes in API do not happen often. Requiring the developer of DPDK to maintain the changes is already required for other parts of DPDK, correct?

Maintaining DFS outside of DPDK is an artificial requirement as it does not placed any more burden on DPDK developers IMO. It does place some one time work on the test system for DPDK to test DFS. The testing system would need to build DPDK with DFS and provide some basic level of verification.

The test system can also use DFS in normal testing to extract DPDK information without having to use expect scripts against the cmdline system, which are very error prone and the syntax of the command could change. If the testing system in DPDK does not do this level of testing I think we should be adding that level to verify DPDK.

Quoted 3 lines

One more argument to keep it outside: for diversity and innovation, it is better to not enforce one (new) control interface as the official (and suggested) one way.

The current control method does not work for all cases, it works only for the developer. The system admin or the developer must remember cmdline syntaxes, which are difficult to use (Look at testpmd ;-). In some cases using a command line built into the application may not be reasonable in a normal runtime environment. Accessing the filesystem is normal and easy as admin, developer, user and orchestration have access to the filesystem.

Quoted 4 lines

One more question,
Is there something exposed in DFS that has not a public DPDK API? If so, we should try fill the gaps.

Yes, only a couple of debug routine ring and tailq walk routines I included in the patch. I was not focused on adding more APIs to DPDK main code only exposing the information in DPDK using the current APIs. DFS should only use standard DPDK APIs to expose information to the file system and the application can write very simple routines to expose any other information he wants via DFS from his application.

The current exposed APIs in DFS are just the simple stats and information I could collect from DPDK today, but I believe we can expose other information as we define these very quickly.

Quoted 2 lines

Regards,
Keith

#6 lore raw

Thanks for your detailed answer Keith.
Honestly, I do not have much more to say,
except some implementation details that I may comment later.

I hope we will read more opinions from the community.

17/12/2018 16:01, Wiles, Keith:

Quoted 85 lines
Quoted 20 lines · Thomas Monjalon

16/12/2018 18:46, Keith Wiles:

Quoted 3 lines

DFS stands for DPDK Filesystem, which helps expose data and control files in a FUSE based filesystem. The dfs requires libfuse3 and libjansson to be present in the Linux system.

You presented this idea at the DPDK Summit in Dublin, and I have not seen any public discussion about the idea. Let's try to debate it here.

Quoted 9 lines

DFS provides a simplified API on top of the FUSE APIs to simplify creating and using FUSE.

Here is the github repo: https://github.com/akheron/jansson
Here is the github repo: https://github.com/libfuse/libfuse

Please use you system updater tool yum, apt-get, ... to add support for these two libraries. Also read the dfs documentation in the docs directory for more details.

[...]

Quoted 10 lines

doc/guides/prog_guide/dfs_lib.rst line 10

Quoted 7 lines
doc/guides/prog_guide/dfs_lib.rst new file +7 -0
+DPDK File System (DFS)
+======================
+
+This DPDK library provides a pseudo file system much like Linux /proc or /system
+file systems, but this one is a userspace file system. Allowing applications to
+create and design file system directories and files using the FUSE 3.2
+https://github.com/libfuse/libfuse code.

My first thought is we are missing the problem statement. What are you trying to solve? Which use case?

The issue is we do not have a clean way for users and developers to extract information from DPDK or the application for monitoring/control. Using APIs is fine from the application perspective to get information and set information, but the user or admin of a system does not have access to those APIs without a developer giving access via a command line or other method. Each developer creating an application would have to provide this basic level of information via some method in a cloud or VNF system to allow the user or orchestration access. Using DFS the developer would not normally have to write the access methods/display himself, saving him time to develop his application.

A file system is the simplest and easiest method to get host command line access to that information. Control or initialization can also be added at this same simple method for DPDK and the application. Currently I do not have any control support in DFS and it would be reasonable to add these controls (in a limited way) to remove DPDK command line options or cmdline cmds when starting DPDK. Giving some runtime control is better for the application in a cloud or NFV environments.

Quoted 3 lines

In DPDK, we have some run-time options accessible from the command line, and some public API functions.

We have cmdline access to these functions and lets face it cmdline is very difficult for most to use :-), but we do not have access from the system level. The APIs in DFS is much easier and cleaner to allow access to the required information. The application developer also can use these APIs to expose this information without having to give some type of cmdline access. The application may not want a cmdline interface (or allowed to give cmdline access), but does want to get access to the information in the application and DPDK.

Having access via the command line or bash shell is much easier to use and provides simple access by other languages like Go, Python, Bash, Lua … any language that can read or write into a normal filesystem. Then the system level administrator or application developer can write tools in any language he see fit.

Quoted 3 lines

I think it is agreed that the primary interface must be the API functions. The command line options should be a responsibility of the application to implement them or not.

It is not agreed, customers I have spoke with do not agree that DPDK information must be supplied by the application, it should be the responsibility of DPDK in this case to provide that information in some easy to access method. If the application side wants to provide information or control then the developer can also use DFS or not.

Quoted 4 lines

I think exposing a filesystem tree interface would be also an application responsibility. Actually, it could be part of a DPDK application, or be run as a secondary process application.

The secondary process method means the user must use the same version of the application and DPDK to access the primary or we can crash the secondary or primary application. It is very easy to use the wrong version of DPDK secondary application and get invalid information as the primary is different is some offset in a structure.

Remember cloud or NFV systems will have a large number of applications and versions. Using a secondary process model is also a bit of a security problem and can cause the primary application to crash if the secondary does something wrong. Also the system would have to provide a different secondary application matching every DPDK/Application on the platform. Having to match up secondary applications to each and every application is a nightmare for the admin or developer.

Quoted 7 lines

It is probably a good idea to implement it as a ready-to-use library. As it can be implemented on top of DPDK API, I think it should live outside of the main repository. As any other DPDK applications, it will require to be updated when the DPDK APIs are updated or extended. In my opinion, we should not mandate DPDK contributors to update DFS when adding or updating an API. That's why it should not be part of the DPDK package.

The only changes from DPDK developers is when a common API in DPDK changes and is used by DFS. It would not be difficult to keep these changes updated as these changes in API do not happen often. Requiring the developer of DPDK to maintain the changes is already required for other parts of DPDK, correct?

Maintaining DFS outside of DPDK is an artificial requirement as it does not placed any more burden on DPDK developers IMO. It does place some one time work on the test system for DPDK to test DFS. The testing system would need to build DPDK with DFS and provide some basic level of verification.

The test system can also use DFS in normal testing to extract DPDK information without having to use expect scripts against the cmdline system, which are very error prone and the syntax of the command could change. If the testing system in DPDK does not do this level of testing I think we should be adding that level to verify DPDK.

Quoted 3 lines

One more argument to keep it outside: for diversity and innovation, it is better to not enforce one (new) control interface as the official (and suggested) one way.

The current control method does not work for all cases, it works only for the developer. The system admin or the developer must remember cmdline syntaxes, which are difficult to use (Look at testpmd ;-). In some cases using a command line built into the application may not be reasonable in a normal runtime environment. Accessing the filesystem is normal and easy as admin, developer, user and orchestration have access to the filesystem.

Quoted 4 lines

One more question,
Is there something exposed in DFS that has not a public DPDK API? If so, we should try fill the gaps.

Yes, only a couple of debug routine ring and tailq walk routines I included in the patch. I was not focused on adding more APIs to DPDK main code only exposing the information in DPDK using the current APIs. DFS should only use standard DPDK APIs to expose information to the file system and the application can write very simple routines to expose any other information he wants via DFS from his application.

The current exposed APIs in DFS are just the simple stats and information I could collect from DPDK today, but I believe we can expose other information as we define these very quickly.

#7 lore raw
In reply to Wiles, Keith
Quoted 87 lines · Keith
Quoted 26 lines · Thomas Monjalon

Hi Keith,

16/12/2018 18:46, Keith Wiles:

Quoted 3 lines

DFS stands for DPDK Filesystem, which helps expose data and control files in a FUSE based filesystem. The dfs requires libfuse3 and libjansson to be present in the Linux system.

You presented this idea at the DPDK Summit in Dublin, and I have not seen any public discussion about the idea. Let's try to debate it here.

Quoted 9 lines

DFS provides a simplified API on top of the FUSE APIs to simplify creating and using FUSE.

Here is the github repo: https://github.com/akheron/jansson
Here is the github repo: https://github.com/libfuse/libfuse

Please use you system updater tool yum, apt-get, ... to add support for these two libraries. Also read the dfs documentation in the docs directory for more details.

[...]

Quoted 10 lines

doc/guides/prog_guide/dfs_lib.rst line 10

Quoted 7 lines
doc/guides/prog_guide/dfs_lib.rst new file +7 -0
+DPDK File System (DFS)
+======================
+
+This DPDK library provides a pseudo file system much like Linux /proc or /system
+file systems, but this one is a userspace file system. Allowing applications to
+create and design file system directories and files using the FUSE 3.2
+https://github.com/libfuse/libfuse code.

My first thought is we are missing the problem statement. What are you trying to solve? Which use case?

The issue is we do not have a clean way for users and developers to extract information from DPDK or the application for monitoring/control. Using APIs is fine from the application perspective to get information and set information, but the user or admin of a system does not have access to those APIs without a developer giving access via a command line or other method. Each developer creating an application would have to provide this basic level of information via some method in a cloud or VNF system to allow the user or orchestration access. Using DFS the developer would not normally have to write the access methods/display himself, saving him time to develop his application.

A file system is the simplest and easiest method to get host command line access to that information. Control or initialization can also be added at this same simple method for DPDK and the application. Currently I do not have any control support in DFS and it would be reasonable to add these controls (in a limited way) to remove DPDK command line options or cmdline cmds when starting DPDK. Giving some runtime control is better for the application in a cloud or NFV environments.

Quoted 3 lines

In DPDK, we have some run-time options accessible from the command line, and some public API functions.

We have cmdline access to these functions and lets face it cmdline is very difficult for most to use :-), but we do not have access from the system level. The APIs in DFS is much easier and cleaner to allow access to the required information. The application developer also can use these APIs to expose this information without having to give some type of cmdline access. The application may not want a cmdline interface (or allowed to give cmdline access), but does want to get access to the information in the application and DPDK.

Having access via the command line or bash shell is much easier to use and provides simple access by other languages like Go, Python, Bash, Lua … any language that can read or write into a normal filesystem. Then the system level administrator or application developer can write tools in any language he see fit.

Quoted 3 lines

I think it is agreed that the primary interface must be the API functions. The command line options should be a responsibility of the application to implement them or not.

It is not agreed, customers I have spoke with do not agree that DPDK information must be supplied by the application, it should be the responsibility of DPDK in this case to provide that information in some easy to access method. If the application side wants to provide information or control then the developer can also use DFS or not.

Quoted 4 lines

I think exposing a filesystem tree interface would be also an application responsibility. Actually, it could be part of a DPDK application, or be run as a secondary process application.

The secondary process method means the user must use the same version of the application and DPDK to access the primary or we can crash the secondary or primary application. It is very easy to use the wrong version of DPDK secondary application and get invalid information as the primary is different is some offset in a structure.

Remember cloud or NFV systems will have a large number of applications and versions. Using a secondary process model is also a bit of a security problem and can cause the primary application to crash if the secondary does something wrong. Also the system would have to provide a different secondary application matching every DPDK/Application on the platform. Having to match up secondary applications to each and every application is a nightmare for the admin or developer.

Quoted 7 lines

It is probably a good idea to implement it as a ready-to-use library. As it can be implemented on top of DPDK API, I think it should live outside of the main repository. As any other DPDK applications, it will require to be updated when the DPDK APIs are updated or extended. In my opinion, we should not mandate DPDK contributors to update DFS when adding or updating an API. That's why it should not be part of the DPDK package.

The only changes from DPDK developers is when a common API in DPDK changes and is used by DFS. It would not be difficult to keep these changes updated as these changes in API do not happen often. Requiring the developer of DPDK to maintain the changes is already required for other parts of DPDK, correct?

Maintaining DFS outside of DPDK is an artificial requirement as it does not placed any more burden on DPDK developers IMO. It does place some one time work on the test system for DPDK to test DFS. The testing system would need to build DPDK with DFS and provide some basic level of verification.

The test system can also use DFS in normal testing to extract DPDK information without having to use expect scripts against the cmdline system, which are very error prone and the syntax of the command could change. If the testing system in DPDK does not do this level of testing I think we should be adding that level to verify DPDK.

Quoted 3 lines

One more argument to keep it outside: for diversity and innovation, it is better to not enforce one (new) control interface as the official (and suggested) one way.

The current control method does not work for all cases, it works only for the developer. The system admin or the developer must remember cmdline syntaxes, which are difficult to use (Look at testpmd ;-). In some cases using a command line built into the application may not be reasonable in a normal runtime environment. Accessing the filesystem is normal and easy as admin, developer, user and orchestration have access to the filesystem.

Quoted 1 line
Quoted 7 lines
Quoted 3 lines

One more question,
Is there something exposed in DFS that has not a public DPDK API? If so, we should try fill the gaps.

Yes, only a couple of debug routine ring and tailq walk routines I included in the patch. I was not focused on adding more APIs to DPDK main code only exposing the information in DPDK using the current APIs. DFS should only use standard DPDK APIs to expose information to the file system and the application can write very simple routines to expose any other information he wants via DFS from his application.

The current exposed APIs in DFS are just the simple stats and information I could collect from DPDK today, but I believe we can expose other information as we define these very quickly.

Does anyone have comments or reviews on this patch?

Thanks

Quoted 6 lines
Quoted 3 lines

Regards,
Keith

Regards,
Keith

#8 lore raw
In reply to Thomas Monjalon

This patch proposed an interesting extension to DPDK, but never got any positive reviews. It creates new API's which introduces likelihood of new bugs; and overlaps existing functionality.

Therefore recommend that it be marked rejected.

#9 lore raw

PATCH v4 1/1 dfs:add FUSE based filesystem for DPDK

In reply to Keith Wiles

DFS stands for DPDK Filesystem, which helps expose data and control files in a FUSE based filesystem. The dfs requires libfuse3 and libjansson to be present in the Linux system.

DFS provides a simplified API on top of the FUSE APIs to simplify creating and using FUSE.

Here is the github repo: https://github.com/akheron/jansson
Here is the github repo: https://github.com/libfuse/libfuse

Please use you system updater tool yum, apt-get, ... to add support for these two libraries. Also read the dfs documentation in the docs directory for more details.

The DFS is only setup for Linux at this time with FreeBSD and windows support coming later.

---
V4
Fixup changes for ring and tailq walk routines.
V3
Fix checkpatch warnings
Must be using a different checkpatch then on my Ubuntu 18.04 system
v2
fix checkpath warnings.

 MAINTAINERS                        |   5 +
 config/common_linuxapp             |   5 +
 doc/guides/prog_guide/dfs_lib.rst  | 660 ++++++++++++++++++++++
 doc/guides/prog_guide/index.rst    |   1 +
 examples/Makefile                  |   1 +
 examples/dfs/Makefile              |  70 +++
 examples/dfs/main.c                |  86 +++
 examples/dfs/meson.build           |  13 +
 lib/Makefile                       |   2 +
 lib/librte_dfs/Makefile            |  51 ++
 lib/librte_dfs/dfs.c               | 842 +++++++++++++++++++++++++++++
 lib/librte_dfs/dfs.h               | 768 ++++++++++++++++++++++++++
 lib/librte_dfs/dfs_cryptodev.c     |  53 ++
 lib/librte_dfs/dfs_cryptodev.h     |  25 +
 lib/librte_dfs/dfs_dpdk.c          | 323 +++++++++++
 lib/librte_dfs/dfs_dpdk.h          |  37 ++
 lib/librte_dfs/dfs_eal.c           | 654 ++++++++++++++++++++++
 lib/librte_dfs/dfs_eal.h           | 102 ++++
 lib/librte_dfs/dfs_ethdev.c        | 324 +++++++++++
 lib/librte_dfs/dfs_ethdev.h        |  23 +
 lib/librte_dfs/dfs_mempool.c       | 130 +++++
 lib/librte_dfs/dfs_mempool.h       |  26 +
 lib/librte_dfs/dfs_noop.c          |  35 ++
 lib/librte_dfs/dfs_oper.c          | 836 ++++++++++++++++++++++++++++
 lib/librte_dfs/dfs_oper.h          |  48 ++
 lib/librte_dfs/dfs_rawdev.c        |  54 ++
 lib/librte_dfs/dfs_rawdev.h        |  25 +
 lib/librte_dfs/dfs_ring.c          | 109 ++++
 lib/librte_dfs/dfs_ring.h          |  25 +
 lib/librte_dfs/dfs_search.c        | 203 +++++++
 lib/librte_dfs/dfs_search.h        | 266 +++++++++
 lib/librte_dfs/dfs_timer.c         |  58 ++
 lib/librte_dfs/dfs_timer.h         |  25 +
 lib/librte_dfs/meson.build         |  47 ++
 lib/librte_dfs/rte_dfs_version.map |  29 +
 lib/meson.build                    |   2 +-
 mk/rte.app.mk                      |   3 +
 37 files changed, 5965 insertions(+), 1 deletion(-)
 create mode 100644 doc/guides/prog_guide/dfs_lib.rst
 create mode 100644 examples/dfs/Makefile
 create mode 100644 examples/dfs/main.c
 create mode 100644 examples/dfs/meson.build
 create mode 100644 lib/librte_dfs/Makefile
 create mode 100644 lib/librte_dfs/dfs.c
 create mode 100644 lib/librte_dfs/dfs.h
 create mode 100644 lib/librte_dfs/dfs_cryptodev.c
 create mode 100644 lib/librte_dfs/dfs_cryptodev.h
 create mode 100644 lib/librte_dfs/dfs_dpdk.c
 create mode 100644 lib/librte_dfs/dfs_dpdk.h
 create mode 100644 lib/librte_dfs/dfs_eal.c
 create mode 100644 lib/librte_dfs/dfs_eal.h
 create mode 100644 lib/librte_dfs/dfs_ethdev.c
 create mode 100644 lib/librte_dfs/dfs_ethdev.h
 create mode 100644 lib/librte_dfs/dfs_mempool.c
 create mode 100644 lib/librte_dfs/dfs_mempool.h
 create mode 100644 lib/librte_dfs/dfs_noop.c
 create mode 100644 lib/librte_dfs/dfs_oper.c
 create mode 100644 lib/librte_dfs/dfs_oper.h
 create mode 100644 lib/librte_dfs/dfs_rawdev.c
 create mode 100644 lib/librte_dfs/dfs_rawdev.h
 create mode 100644 lib/librte_dfs/dfs_ring.c
 create mode 100644 lib/librte_dfs/dfs_ring.h
 create mode 100644 lib/librte_dfs/dfs_search.c
 create mode 100644 lib/librte_dfs/dfs_search.h
 create mode 100644 lib/librte_dfs/dfs_timer.c
 create mode 100644 lib/librte_dfs/dfs_timer.h
 create mode 100644 lib/librte_dfs/meson.build
 create mode 100644 lib/librte_dfs/rte_dfs_version.map
MAINTAINERS +5 -0
index 470f36b9c..839d45f43 100644
@@ -1221,6 +1221,11 @@ F: test/bpf/
 F: test/test/test_bpf.c
 F: doc/guides/prog_guide/bpf_lib.rst
 
+DFS - EXPERIMENTAL
+M: Keith Wiles <[email protected]>
+F: lib/librte_dfs
+F: examples/dfs
+F: doc/guides/prog_guide/dfs_lib.rst
 
 Test Applications
 -----------------
config/common_linuxapp +5 -0
index 6c1c8d0f4..70f55508e 100644
@@ -56,3 +56,8 @@ CONFIG_RTE_LIBRTE_PMD_DPAA2_QDMA_RAWDEV=y
 # NXP ENETC PMD Driver
 #
 CONFIG_RTE_LIBRTE_ENETC_PMD=y
+
+#
+# DPDK File System (DFS) enable building.
+#
+CONFIG_RTE_LIBRTE_DFS=n
doc/guides/prog_guide/dfs_lib.rst new file +660 -0

660 lines not on this page · raw message

doc/guides/prog_guide/index.rst +1 -0
index ba8c1f6ad..0f1d21605 100644
@@ -54,6 +54,7 @@ Programmer's Guide
     vhost_lib
     metrics_lib
     bpf_lib
+    dfs_lib
     source_org
     dev_kit_build_system
     dev_kit_root_make_help
examples/Makefile +1 -0
index 33fe0e586..cfe2279e8 100644
@@ -14,6 +14,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_BBDEV) += bbdev_app
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bond
 DIRS-y += cmdline
 DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor
+DIRS-$(CONFIG_RTE_LIBRTE_DFS) += dfs
 DIRS-y += ethtool
 DIRS-y += exception_path
 DIRS-$(CONFIG_RTE_LIBRTE_EFD) += server_node_efd
examples/dfs/Makefile new file +70 -0

70 lines not on this page · raw message

examples/dfs/main.c new file +86 -0

86 lines not on this page · raw message

examples/dfs/meson.build new file +13 -0
new file mode 100644
index 000000000..5923f8957
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+allow_experimental_apis = true
+sources = files(
+	'main.c'
+)
+deps += [ 'dfs' ]
lib/Makefile +2 -0
index 8dbdc9bca..cfd40daa7 100644
@@ -21,6 +21,8 @@ DEPDIRS-librte_timer := librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_CFGFILE) += librte_cfgfile
 DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += librte_cmdline
 DEPDIRS-librte_cmdline := librte_eal
+DIRS-y += librte_dfs
+DEPDIRS-librte_dfs := librte_eal librte_ethdev librte_timer librte_pci
 DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ethdev
 DEPDIRS-librte_ethdev := librte_net librte_eal librte_mempool librte_ring
 DEPDIRS-librte_ethdev += librte_mbuf
lib/librte_dfs/Makefile new file +51 -0

51 lines not on this page · raw message

lib/librte_dfs/dfs.c new file +842 -0

842 lines not on this page · raw message

lib/librte_dfs/dfs.h new file +768 -0

768 lines not on this page · raw message

lib/librte_dfs/dfs_cryptodev.c new file +53 -0

53 lines not on this page · raw message

lib/librte_dfs/dfs_cryptodev.h new file +25 -0
new file mode 100644
index 000000000..647eba3df
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation.
+ */
+
+#ifndef _DFS_CRYPTODEV_H_
+#define _DFS_CRYPTODEV_H_
+
+/**
+ * @file
+ * RTE DFS Cryptodev Operations
+ *
+ * These routines supply the Crypto usage support routines.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DFS_CRYPTODEV_INFO_FILE "cryptodev-info.tmp"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DFS_CRYPTODEV_H_ */
lib/librte_dfs/dfs_dpdk.c new file +323 -0

323 lines not on this page · raw message

lib/librte_dfs/dfs_dpdk.h new file +37 -0
new file mode 100644
index 000000000..1b0ca9106
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation.
+ */
+
+#ifndef _DFS_DPDK_H_
+#define _DFS_DPDK_H_
+
+/**
+ * @file
+ * RTE DFS DPDK Operations
+ *
+ * These routines supply the DPDK usage support routines.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DFS_DEBUG_FILE      "debug.tmp"
+#define DFS_HASH_FILE       "hash.tmp"
+#define DFS_DEVBIND_FILE    "devbind.tmp"
+
+#define DFS_DEVBIND_CMD     "dpdk-devbind.py"
+
+/**
+ * Initialize the DPDK support for DFS
+ *
+ * @return
+ *  -1 on error or 0 on OK
+ */
+int __rte_experimental dfs_dpdk_init(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DFS_DPDK_H_ */
lib/librte_dfs/dfs_eal.c new file +654 -0

31 lines not on this page · raw message

lib/librte_dfs/dfs_eal.h new file +102 -0

102 lines not on this page · raw message

lib/librte_dfs/dfs_ethdev.c new file +324 -0

324 lines not on this page · raw message

lib/librte_dfs/dfs_ethdev.h new file +23 -0
new file mode 100644
index 000000000..76f30c1ab

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_mempool.c new file +130 -0

130 lines not on this page · raw message

lib/librte_dfs/dfs_mempool.h new file +26 -0
new file mode 100644
index 000000000..121217588

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_noop.c new file +35 -0
new file mode 100644
index 000000000..2f48d8923

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_oper.c new file +836 -0

836 lines not on this page · raw message

lib/librte_dfs/dfs_oper.h new file +48 -0

48 lines not on this page · raw message

lib/librte_dfs/dfs_rawdev.c new file +54 -0

54 lines not on this page · raw message

lib/librte_dfs/dfs_rawdev.h new file +25 -0
new file mode 100644
index 000000000..69edb7cf0

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_ring.c new file +109 -0

109 lines not on this page · raw message

lib/librte_dfs/dfs_ring.h new file +25 -0
new file mode 100644
index 000000000..4e78c1120

Lines of this file are not shown. View the raw message.

lib/librte_dfs/dfs_search.c new file +203 -0

203 lines not on this page · raw message

lib/librte_dfs/dfs_search.h new file +266 -0

266 lines not on this page · raw message

lib/librte_dfs/dfs_timer.c new file +58 -0

58 lines not on this page · raw message

lib/librte_dfs/dfs_timer.h new file +25 -0
new file mode 100644
index 000000000..cb9fdf38b

Lines of this file are not shown. View the raw message.

lib/librte_dfs/meson.build new file +47 -0

47 lines not on this page · raw message

lib/librte_dfs/rte_dfs_version.map new file +29 -0
new file mode 100644
index 000000000..3f963c830

Lines of this file are not shown. View the raw message.

lib/meson.build +1 -1
index a2dd52e17..e13fd7a46 100644

Lines of this file are not shown. View the raw message.

mk/rte.app.mk +3 -0
index 02e8b6f05..f8cabfcb4 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.1

Part of the diff is not shown here. View the raw message.