[dpdk-dev,v1,2/5] config: enable compilation of rawdev library

Message ID 20180102125749.2379-3-shreyansh.jain@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Shreyansh Jain Jan. 2, 2018, 12:57 p.m. UTC
  Add config option CONFIG_RTE_LIBRTE_RAWDEV for toggling rawdev
library support. This patch also enables compilation of the library.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 config/common_base | 7 +++++++
 lib/Makefile       | 3 +++
 mk/rte.app.mk      | 1 +
 3 files changed, 11 insertions(+)
  

Comments

Thomas Monjalon Jan. 14, 2018, 10:50 p.m. UTC | #1
02/01/2018 13:57, Shreyansh Jain:
> Add config option CONFIG_RTE_LIBRTE_RAWDEV for toggling rawdev
> library support. This patch also enables compilation of the library.
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> ---
>  config/common_base | 7 +++++++
>  lib/Makefile       | 3 +++
>  mk/rte.app.mk      | 1 +
>  3 files changed, 11 insertions(+)

Please merge this patch with the first one (skeleton).
  

Patch

diff --git a/config/common_base b/config/common_base
index e74febef4..3d2e12c31 100644
--- a/config/common_base
+++ b/config/common_base
@@ -792,6 +792,13 @@  CONFIG_RTE_LIBRTE_VHOST=n
 CONFIG_RTE_LIBRTE_VHOST_NUMA=n
 CONFIG_RTE_LIBRTE_VHOST_DEBUG=n
 
+#
+# Compile raw device support
+# EXPERIMENTAL: API may change without prior notice
+#
+CONFIG_RTE_LIBRTE_RAWDEV=y
+CONFIG_RTE_MAX_RAWDEVS=10
+
 #
 # Compile vhost PMD
 # To compile, CONFIG_RTE_LIBRTE_VHOST should be enabled.
diff --git a/lib/Makefile b/lib/Makefile
index dc4e8df70..c75b7a694 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -126,4 +126,7 @@  DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
 endif
 DEPDIRS-librte_kni := librte_eal librte_mempool librte_mbuf librte_ether
 
+DIRS-$(CONFIG_RTE_LIBRTE_RAWDEV) += librte_rawdev
+DEPDIRS-librte_rawdev := librte_eal librte_ether
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 6a6a7452e..d783de2c1 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -104,6 +104,7 @@  _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline
 _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
+_LDLIBS-$(CONFIG_RTE_LIBRTE_RAWDEV)         += -lrte_rawdev
 
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni