[dpdk-dev,v9,01/20] ethtool: add library skeleton

Message ID 20170630165140.59594-2-ferruh.yigit@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

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

Commit Message

Ferruh Yigit June 30, 2017, 4:51 p.m. UTC
  Library is disabled by default.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 MAINTAINERS                                | 3 +++
 config/common_base                         | 5 +++++
 doc/guides/rel_notes/release_17_08.rst     | 1 +
 lib/Makefile                               | 2 ++
 lib/librte_eal/common/include/rte_log.h    | 1 +
 lib/librte_ethtool/rte_ethtool_version.map | 4 ++++
 mk/rte.app.mk                              | 1 +
 7 files changed, 17 insertions(+)
 create mode 100644 lib/librte_ethtool/rte_ethtool_version.map
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index f6095efff..b2cf83c8e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -754,6 +754,9 @@  Latency statistics
 M: Reshma Pattan <reshma.pattan@intel.com>
 F: lib/librte_latencystats/
 
+Ethtool
+M: Remy Horton <remy.horton@intel.com>
+F: lib/librte_ethtool/
 
 Test Applications
 -----------------
diff --git a/config/common_base b/config/common_base
index f6aafd17d..c767b1090 100644
--- a/config/common_base
+++ b/config/common_base
@@ -699,6 +699,11 @@  CONFIG_RTE_KNI_PREEMPT_DEFAULT=y
 CONFIG_RTE_LIBRTE_PDUMP=y
 
 #
+# Compile librte_ethtool
+#
+CONFIG_RTE_LIBRTE_ETHTOOL=n
+
+#
 # Compile vhost user library
 #
 CONFIG_RTE_LIBRTE_VHOST=n
diff --git a/doc/guides/rel_notes/release_17_08.rst b/doc/guides/rel_notes/release_17_08.rst
index 842f46f75..dbe1ee906 100644
--- a/doc/guides/rel_notes/release_17_08.rst
+++ b/doc/guides/rel_notes/release_17_08.rst
@@ -186,6 +186,7 @@  The libraries prepended with a plus sign were incremented in this version.
      librte_distributor.so.1
      librte_eal.so.4
      librte_ethdev.so.6
+   + librte_ethtool.so.1
      librte_hash.so.2
      librte_ip_frag.so.1
      librte_jobstats.so.1
diff --git a/lib/Makefile b/lib/Makefile
index 07e1fd0c5..434237d6e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -106,6 +106,8 @@  DIRS-$(CONFIG_RTE_LIBRTE_REORDER) += librte_reorder
 DEPDIRS-librte_reorder := librte_eal librte_mempool librte_mbuf
 DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += librte_pdump
 DEPDIRS-librte_pdump := librte_eal librte_mempool librte_mbuf librte_ether
+DIRS-$(CONFIG_RTE_LIBRTE_ETHTOOL) += librte_ethtool
+DEPDIRS-librte_ethtool := librte_eal librte_ether
 
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
 DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
index 341913851..5b240e8b1 100644
--- a/lib/librte_eal/common/include/rte_log.h
+++ b/lib/librte_eal/common/include/rte_log.h
@@ -87,6 +87,7 @@  extern struct rte_logs rte_logs;
 #define RTE_LOGTYPE_CRYPTODEV 17 /**< Log related to cryptodev. */
 #define RTE_LOGTYPE_EFD       18 /**< Log related to EFD. */
 #define RTE_LOGTYPE_EVENTDEV  19 /**< Log related to eventdev. */
+#define RTE_LOGTYPE_ETHTOOL   20 /**< Log related to ethtool. */
 
 /* these log types can be used in an application */
 #define RTE_LOGTYPE_USER1     24 /**< User-defined log type 1. */
diff --git a/lib/librte_ethtool/rte_ethtool_version.map b/lib/librte_ethtool/rte_ethtool_version.map
new file mode 100644
index 000000000..b6d2840be
--- /dev/null
+++ b/lib/librte_ethtool/rte_ethtool_version.map
@@ -0,0 +1,4 @@ 
+DPDK_17.08 {
+
+	local: *;
+};
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index bcaf1b382..449bd2f61 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -90,6 +90,7 @@  _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS)         += -lrte_kvargs
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF)           += -lrte_mbuf
 _LDLIBS-$(CONFIG_RTE_LIBRTE_NET)            += -lrte_net
 _LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER)          += -lrte_ethdev
+_LDLIBS-$(CONFIG_RTE_LIBRTE_ETHTOOL)        += -lrte_ethtool
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CRYPTODEV)      += -lrte_cryptodev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EVENTDEV)       += -lrte_eventdev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool