All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH v10 02/20] ethtool: move from sample folder into lib folder
Date: Tue,  4 Jul 2017 17:13:19 +0100	[thread overview]
Message-ID: <20170704161337.45926-3-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20170704161337.45926-1-ferruh.yigit@intel.com>

ethtool library initially developed for ethtool sample application,
moving it to library folder to reuse it.

Sample application will continue to use ethtool library.

Sample application disabled for now, it will be enabled again when
modifications to the ethtool library finished.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/Makefile                                  |  2 +-
 examples/ethtool/Makefile                          | 24 ++++++++-------
 examples/ethtool/{ethtool-app => }/ethapp.c        |  0
 examples/ethtool/{ethtool-app => }/ethapp.h        |  0
 examples/ethtool/{ethtool-app => }/main.c          |  0
 .../ethtool/lib => lib/librte_ethtool}/Makefile    | 35 ++++++++--------------
 .../lib => lib/librte_ethtool}/rte_ethtool.c       |  0
 .../lib => lib/librte_ethtool}/rte_ethtool.h       |  0
 lib/librte_ethtool/rte_ethtool_version.map         | 24 +++++++++++++++
 9 files changed, 51 insertions(+), 34 deletions(-)
 rename examples/ethtool/{ethtool-app => }/ethapp.c (100%)
 rename examples/ethtool/{ethtool-app => }/ethapp.h (100%)
 rename examples/ethtool/{ethtool-app => }/main.c (100%)
 rename {examples/ethtool/lib => lib/librte_ethtool}/Makefile (76%)
 rename {examples/ethtool/lib => lib/librte_ethtool}/rte_ethtool.c (100%)
 rename {examples/ethtool/lib => lib/librte_ethtool}/rte_ethtool.h (100%)

diff --git a/examples/Makefile b/examples/Makefile
index c0e9c3be6..aa1696158 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -40,7 +40,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bond
 DIRS-y += cmdline
 DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor
-DIRS-y += ethtool
+DIRS-n += ethtool
 DIRS-y += exception_path
 DIRS-$(CONFIG_RTE_LIBRTE_EFD) += server_node_efd
 DIRS-y += helloworld
diff --git a/examples/ethtool/Makefile b/examples/ethtool/Makefile
index 30b42b70e..a774eace0 100644
--- a/examples/ethtool/Makefile
+++ b/examples/ethtool/Makefile
@@ -1,6 +1,6 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2010-2017 Intel Corporation. All rights reserved.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -33,20 +33,22 @@ ifeq ($(RTE_SDK),)
 $(error "Please define RTE_SDK environment variable")
 endif
 
-# Default target, can be overwritten by command line or environment
+# Default target, can be overridden by command line or environment
 RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
-$(info This application can only operate in a linuxapp environment, \
-please change the definition of the RTE_TARGET environment variable)
-else
+# binary name
+APP = ethtool
 
-DIRS-y += lib ethtool-app
-endif
+# all source are stored in SRCS-y
+SRCS-y := main.c ethapp.c
+
+#CFLAGS += -O3 -D_GNU_SOURCE -pthread -I$(SRCDIR)/../lib
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
 
-DEPDIRS-ethtool-app := lib
-DEPDIRS-lib := librte_eal librte_ether
+#LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib
+#LDLIBS += -lrte_ethtool
 
-include $(RTE_SDK)/mk/rte.extsubdir.mk
+include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethapp.c
similarity index 100%
rename from examples/ethtool/ethtool-app/ethapp.c
rename to examples/ethtool/ethapp.c
diff --git a/examples/ethtool/ethtool-app/ethapp.h b/examples/ethtool/ethapp.h
similarity index 100%
rename from examples/ethtool/ethtool-app/ethapp.h
rename to examples/ethtool/ethapp.h
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/main.c
similarity index 100%
rename from examples/ethtool/ethtool-app/main.c
rename to examples/ethtool/main.c
diff --git a/examples/ethtool/lib/Makefile b/lib/librte_ethtool/Makefile
similarity index 76%
rename from examples/ethtool/lib/Makefile
rename to lib/librte_ethtool/Makefile
index 266babade..f41cad3da 100644
--- a/examples/ethtool/lib/Makefile
+++ b/lib/librte_ethtool/Makefile
@@ -29,35 +29,26 @@
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
-endif
-
-# Default target, can be overwritten by command line or environment
-RTE_TARGET ?= x86_64-native-linuxapp-gcc
-
 include $(RTE_SDK)/mk/rte.vars.mk
 
-ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
-$(error This application can only operate in a linuxapp environment, \
-please change the definition of the RTE_TARGET environment variable)
-endif
-
+#
 # library name
+#
 LIB = librte_ethtool.a
 
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+EXPORT_MAP := rte_ethtool_version.map
+
 LIBABIVER := 1
 
 # all source are stored in SRC-Y
-SRCS-y := rte_ethtool.c
+SRCS-$(CONFIG_RTE_LIBRTE_ETHTOOL) := rte_ethtool.c
 
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS)
-
-ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
-ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
-LDLIBS += -lrte_pmd_ixgbe
-endif
-endif
+#
+# Export include files
+#
+SYMLINK-$(CONFIG_RTE_LIBRTE_ETHTOOL)-include += rte_ethtool.h
 
-include $(RTE_SDK)/mk/rte.extlib.mk
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/examples/ethtool/lib/rte_ethtool.c b/lib/librte_ethtool/rte_ethtool.c
similarity index 100%
rename from examples/ethtool/lib/rte_ethtool.c
rename to lib/librte_ethtool/rte_ethtool.c
diff --git a/examples/ethtool/lib/rte_ethtool.h b/lib/librte_ethtool/rte_ethtool.h
similarity index 100%
rename from examples/ethtool/lib/rte_ethtool.h
rename to lib/librte_ethtool/rte_ethtool.h
diff --git a/lib/librte_ethtool/rte_ethtool_version.map b/lib/librte_ethtool/rte_ethtool_version.map
index b6d2840be..a6e756c50 100644
--- a/lib/librte_ethtool/rte_ethtool_version.map
+++ b/lib/librte_ethtool/rte_ethtool_version.map
@@ -1,4 +1,28 @@
 DPDK_17.08 {
+	global:
+
+	rte_ethtool_get_drvinfo;
+	rte_ethtool_get_link;
+	rte_ethtool_get_regs_len;
+	rte_ethtool_get_regs;
+	rte_ethtool_get_eeprom_len;
+	rte_ethtool_get_eeprom;
+	rte_ethtool_set_eeprom;
+	rte_ethtool_get_pauseparam;
+	rte_ethtool_set_pauseparam;
+	rte_ethtool_get_ringparam;
+	rte_ethtool_set_ringparam;
+
+	rte_ethtool_net_open;
+	rte_ethtool_net_stop;
+	rte_ethtool_net_get_mac_addr;
+	rte_ethtool_net_set_mac_addr;
+	rte_ethtool_net_validate_addr;
+	rte_ethtool_net_change_mtu;
+	rte_ethtool_net_get_stats64;
+	rte_ethtool_net_vlan_rx_add_vid;
+	rte_ethtool_net_vlan_rx_kill_vid;
+	rte_ethtool_net_set_rx_mode;
 
 	local: *;
 };
-- 
2.13.0

  parent reply	other threads:[~2017-07-04 16:13 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 16:52 [RFC] Kernel Control Path (KCP) Ferruh Yigit
2017-05-28 16:55 ` Wiles, Keith
2017-05-29  9:26   ` Bruce Richardson
2017-05-29 17:29     ` Wiles, Keith
2017-06-16 15:54   ` Ferruh Yigit
2017-06-20 12:33     ` Ferruh Yigit
2017-05-30 10:55 ` Thomas Monjalon
2017-06-13 17:21   ` Ferruh Yigit
2017-06-13 18:00     ` Jay Rolette
2017-06-13 18:04       ` Dumitrescu, Cristian
2017-06-13 18:18         ` Wiles, Keith
2017-06-15 12:07           ` Alex Rosenbaum
2017-06-16 15:27             ` Ferruh Yigit
2017-06-16 16:48               ` Stephen Hemminger
2017-06-13 18:17       ` Wiles, Keith
2017-06-21 11:06 ` [PATCH v8 0/4] Userspace Network Control Interface (UNCI) Ferruh Yigit
2017-06-21 11:06   ` [PATCH v8 1/4] ethtool: move from sample folder to lib folder Ferruh Yigit
2017-06-26 11:02     ` Bruce Richardson
2017-06-21 11:06   ` [PATCH v8 2/4] unci: add kernel control path kernel module Ferruh Yigit
2017-06-21 15:23     ` Stephen Hemminger
2017-06-30 17:02       ` Ferruh Yigit
2017-06-21 11:06   ` [PATCH v8 3/4] rte_ctrl_if: add control interface library Ferruh Yigit
2017-06-26 11:09     ` Bruce Richardson
2017-06-26 11:30     ` Bruce Richardson
2017-06-21 11:06   ` [PATCH v8 4/4] ethdev: add control interface support Ferruh Yigit
2017-06-21 15:24     ` Stephen Hemminger
2017-06-30 17:06       ` Ferruh Yigit
2017-06-26 11:39   ` [PATCH v8 0/4] Userspace Network Control Interface (UNCI) Bruce Richardson
2017-06-29 16:13     ` Ferruh Yigit
2017-06-30 16:56       ` Ferruh Yigit
2017-06-30 16:51   ` [PATCH v9 00/20] " Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 01/20] ethtool: add library skeleton Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 02/20] ethtool: move from sample folder into lib folder Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 03/20] ethtool: remove PMD specific API call Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 04/20] ethtool: update header doxygen syntax Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 05/20] ethtool: enable library Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 06/20] doc: add ethtool library documentation Ferruh Yigit
2017-07-02 20:18       ` Mcnamara, John
2017-06-30 16:51     ` [PATCH v9 07/20] doc: update ethtool sample app doc Ferruh Yigit
2017-07-02 20:17       ` Mcnamara, John
2017-06-30 16:51     ` [PATCH v9 08/20] unci: add module skeleton Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 09/20] unci: add rtnl newlink Ferruh Yigit
2017-06-30 17:27       ` Stephen Hemminger
2017-06-30 16:51     ` [PATCH v9 10/20] unci: init netlink Ferruh Yigit
2017-06-30 17:28       ` Stephen Hemminger
2017-06-30 17:29       ` Stephen Hemminger
2017-06-30 16:51     ` [PATCH v9 11/20] unci: add netlink exec Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 12/20] unci: add netdevice ops Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 13/20] unci: add ethtool support Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 14/20] ctrl_if: add library skeleton Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 15/20] ctrl_if: add create destroy interface APIs Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 16/20] ctrl_if: initialize netlink interface Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 17/20] ctrl_if: process control messages Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 18/20] ctrl_if: process ethtool messages Ferruh Yigit
2017-06-30 16:51     ` [PATCH v9 19/20] doc: add control interface library documentation Ferruh Yigit
2017-07-02 20:16       ` Mcnamara, John
2017-06-30 16:51     ` [PATCH v9 20/20] ethdev: add control interface support Ferruh Yigit
2017-07-04 16:13     ` [PATCH v10 00/20] Userspace Network Control Interface (UNCI) Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 01/20] ethtool: add library skeleton Ferruh Yigit
2017-07-04 16:13       ` Ferruh Yigit [this message]
2017-07-04 16:13       ` [PATCH v10 03/20] ethtool: remove PMD specific API call Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 04/20] ethtool: update header doxygen syntax Ferruh Yigit
2017-07-06  9:18         ` Burakov, Anatoly
2017-07-04 16:13       ` [PATCH v10 05/20] ethtool: enable library Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 06/20] doc: add ethtool library documentation Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 07/20] doc: update ethtool sample app doc Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 08/20] unci: add module skeleton Ferruh Yigit
2017-07-06  9:25         ` Burakov, Anatoly
2017-07-04 16:13       ` [PATCH v10 09/20] unci: add rtnl newlink Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 10/20] unci: init netlink Ferruh Yigit
2017-07-06  9:32         ` Burakov, Anatoly
2017-07-04 16:13       ` [PATCH v10 11/20] unci: add netlink exec Ferruh Yigit
2017-07-05 19:07         ` Stephen Hemminger
2017-07-06 10:45           ` Ferruh Yigit
2017-07-07  0:25             ` Stephen Hemminger
2017-07-05 19:15         ` Stephen Hemminger
2017-07-04 16:13       ` [PATCH v10 12/20] unci: add netdevice ops Ferruh Yigit
2017-07-05 19:12         ` Stephen Hemminger
2017-07-05 19:12         ` Stephen Hemminger
2017-07-04 16:13       ` [PATCH v10 13/20] unci: add ethtool support Ferruh Yigit
2017-07-05 19:07         ` Stephen Hemminger
2017-07-05 19:08         ` Stephen Hemminger
2017-07-04 16:13       ` [PATCH v10 14/20] ctrl_if: add library skeleton Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 15/20] ctrl_if: add create destroy interface APIs Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 16/20] ctrl_if: initialize generic netlink interface Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 17/20] ctrl_if: process control messages Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 18/20] ctrl_if: process ethtool messages Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 19/20] doc: add control interface library documentation Ferruh Yigit
2017-07-04 16:13       ` [PATCH v10 20/20] ethdev: add control interface support Ferruh Yigit
2017-07-08  6:28         ` Yuanhan Liu
2017-07-20 14:55           ` Ferruh Yigit

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=20170704161337.45926-3-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.