[dpdk-dev] [PATCH v2] ethdev: rename folder to library name

Ferruh Yigit ferruh.yigit at intel.com
Thu Apr 26 23:25:59 CEST 2018


Library folder name and output library name are same except a few flaws
including librte_ether.

This library is network device abstraction layer, the name "ethdev" fits
better than "ether", and library & header files already named as ethdev.

Also there is a rte_ether.h in the net library which can cause confusion.

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---
v2:
* rebased
---
 MAINTAINERS                                        |  8 ++---
 doc/api/doxy-api.conf                              |  2 +-
 doc/guides/prog_guide/source_org.rst               |  2 +-
 .../prog_guide/traffic_metering_and_policing.rst   |  2 +-
 lib/Makefile                                       | 34 +++++++++++-----------
 lib/{librte_ether => librte_ethdev}/Makefile       |  0
 .../ethdev_profile.c                               |  0
 .../ethdev_profile.h                               |  0
 lib/{librte_ether => librte_ethdev}/meson.build    |  0
 lib/{librte_ether => librte_ethdev}/rte_dev_info.h |  0
 lib/{librte_ether => librte_ethdev}/rte_eth_ctrl.h |  0
 lib/{librte_ether => librte_ethdev}/rte_ethdev.c   |  0
 lib/{librte_ether => librte_ethdev}/rte_ethdev.h   |  0
 .../rte_ethdev_core.h                              |  0
 .../rte_ethdev_driver.h                            |  0
 .../rte_ethdev_pci.h                               |  0
 .../rte_ethdev_vdev.h                              |  0
 .../rte_ethdev_version.map                         |  0
 lib/{librte_ether => librte_ethdev}/rte_flow.c     |  0
 lib/{librte_ether => librte_ethdev}/rte_flow.h     |  0
 .../rte_flow_driver.h                              |  0
 lib/{librte_ether => librte_ethdev}/rte_mtr.c      |  0
 lib/{librte_ether => librte_ethdev}/rte_mtr.h      |  0
 .../rte_mtr_driver.h                               |  0
 lib/{librte_ether => librte_ethdev}/rte_tm.c       |  0
 lib/{librte_ether => librte_ethdev}/rte_tm.h       |  0
 .../rte_tm_driver.h                                |  0
 lib/meson.build                                    |  2 +-
 28 files changed, 25 insertions(+), 25 deletions(-)
 rename lib/{librte_ether => librte_ethdev}/Makefile (100%)
 rename lib/{librte_ether => librte_ethdev}/ethdev_profile.c (100%)
 rename lib/{librte_ether => librte_ethdev}/ethdev_profile.h (100%)
 rename lib/{librte_ether => librte_ethdev}/meson.build (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_dev_info.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_eth_ctrl.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_ethdev.c (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_ethdev.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_ethdev_core.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_ethdev_driver.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_ethdev_pci.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_ethdev_vdev.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_ethdev_version.map (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_flow.c (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_flow.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_flow_driver.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_mtr.c (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_mtr.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_mtr_driver.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_tm.c (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_tm.h (100%)
 rename lib/{librte_ether => librte_ethdev}/rte_tm_driver.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 11bf102c2..6836171c5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -292,22 +292,22 @@ F: test/test/test_mbuf.c
 Ethernet API
 M: Thomas Monjalon <thomas at monjalon.net>
 T: git://dpdk.org/next/dpdk-next-net
-F: lib/librte_ether/
+F: lib/librte_ethdev/
 F: devtools/test-null.sh
 
 Flow API
 M: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
 T: git://dpdk.org/next/dpdk-next-net
-F: lib/librte_ether/rte_flow*
+F: lib/librte_ethdev/rte_flow*
 
 Traffic Management API - EXPERIMENTAL
 M: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
 T: git://dpdk.org/next/dpdk-next-tm
-F: lib/librte_ether/rte_tm*
+F: lib/librte_ethdev/rte_tm*
 
 Traffic Metering and Policing API - EXPERIMENTAL
 M: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
-F: lib/librte_ether/rte_mtr*
+F: lib/librte_ethdev/rte_mtr*
 
 Baseband API - EXPERIMENTAL
 M: Amr Mokhtar <amr.mokhtar at intel.com>
diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf
index ad8bdcf61..5686cbb9d 100644
--- a/doc/api/doxy-api.conf
+++ b/doc/api/doxy-api.conf
@@ -48,7 +48,7 @@ INPUT                   = doc/api/doxy-api-index.md \
                           lib/librte_cryptodev \
                           lib/librte_distributor \
                           lib/librte_efd \
-                          lib/librte_ether \
+                          lib/librte_ethdev \
                           lib/librte_eventdev \
                           lib/librte_flow_classify \
                           lib/librte_gro \
diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst
index b640b0111..cee4ce6b7 100644
--- a/doc/guides/prog_guide/source_org.rst
+++ b/doc/guides/prog_guide/source_org.rst
@@ -40,7 +40,7 @@ The lib directory contains::
     +-- librte_cmdline      # Command line interface helper
     +-- librte_distributor  # Packet distributor
     +-- librte_eal          # Environment abstraction layer
-    +-- librte_ether        # Generic interface to poll mode driver
+    +-- librte_ethdev       # Generic interface to poll mode driver
     +-- librte_hash         # Hash library
     +-- librte_ip_frag      # IP fragmentation library
     +-- librte_kni          # Kernel NIC interface
diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst b/doc/guides/prog_guide/traffic_metering_and_policing.rst
index dc9bdd5b8..90c781eb1 100644
--- a/doc/guides/prog_guide/traffic_metering_and_policing.rst
+++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst
@@ -28,7 +28,7 @@ The metering and policing stage typically sits on top of flow classification,
 which is why the MTR objects are enabled through a special "meter" action.
 
 The MTR objects are created and updated in their own name space (``rte_mtr``)
-within the ``librte_ether`` library. Whether an MTR object is private to a
+within the ``librte_ethdev`` library. Whether an MTR object is private to a
 flow or potentially shared by several flows has to be specified at its
 creation time.
 
diff --git a/lib/Makefile b/lib/Makefile
index 536775e59..057bf7890 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -18,10 +18,10 @@ 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-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ether
-DEPDIRS-librte_ether := librte_net librte_eal librte_mempool librte_ring
-DEPDIRS-librte_ether += librte_mbuf
-DEPDIRS-librte_ether += librte_kvargs
+DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ethdev
+DEPDIRS-librte_ethdev := librte_net librte_eal librte_mempool librte_ring
+DEPDIRS-librte_ethdev += librte_mbuf
+DEPDIRS-librte_ethdev += librte_kvargs
 DIRS-$(CONFIG_RTE_LIBRTE_BBDEV) += librte_bbdev
 DEPDIRS-librte_bbdev := librte_eal librte_mempool librte_mbuf
 DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += librte_cryptodev
@@ -29,14 +29,14 @@ DEPDIRS-librte_cryptodev := librte_eal librte_mempool librte_ring librte_mbuf
 DEPDIRS-librte_cryptodev += librte_kvargs
 DIRS-$(CONFIG_RTE_LIBRTE_SECURITY) += librte_security
 DEPDIRS-librte_security := librte_eal librte_mempool librte_ring librte_mbuf
-DEPDIRS-librte_security += librte_ether
+DEPDIRS-librte_security += librte_ethdev
 DEPDIRS-librte_security += librte_cryptodev
 DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += librte_eventdev
-DEPDIRS-librte_eventdev := librte_eal librte_ring librte_ether librte_hash librte_mempool librte_timer
+DEPDIRS-librte_eventdev := librte_eal librte_ring librte_ethdev librte_hash librte_mempool librte_timer
 DIRS-$(CONFIG_RTE_LIBRTE_RAWDEV) += librte_rawdev
-DEPDIRS-librte_rawdev := librte_eal librte_ether
+DEPDIRS-librte_rawdev := librte_eal librte_ethdev
 DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += librte_vhost
-DEPDIRS-librte_vhost := librte_eal librte_mempool librte_mbuf librte_ether \
+DEPDIRS-librte_vhost := librte_eal librte_mempool librte_mbuf librte_ethdev \
 			librte_net
 DIRS-$(CONFIG_RTE_LIBRTE_HASH) += librte_hash
 DEPDIRS-librte_hash := librte_eal librte_ring
@@ -51,18 +51,18 @@ DEPDIRS-librte_member := librte_eal librte_hash
 DIRS-$(CONFIG_RTE_LIBRTE_NET) += librte_net
 DEPDIRS-librte_net := librte_mbuf librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += librte_ip_frag
-DEPDIRS-librte_ip_frag := librte_eal librte_mempool librte_mbuf librte_ether
+DEPDIRS-librte_ip_frag := librte_eal librte_mempool librte_mbuf librte_ethdev
 DEPDIRS-librte_ip_frag += librte_hash
 DIRS-$(CONFIG_RTE_LIBRTE_GRO) += librte_gro
-DEPDIRS-librte_gro := librte_eal librte_mbuf librte_ether librte_net
+DEPDIRS-librte_gro := librte_eal librte_mbuf librte_ethdev librte_net
 DIRS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += librte_jobstats
 DEPDIRS-librte_jobstats := librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_METRICS) += librte_metrics
 DEPDIRS-librte_metrics := librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_BITRATE) += librte_bitratestats
-DEPDIRS-librte_bitratestats := librte_eal librte_metrics librte_ether
+DEPDIRS-librte_bitratestats := librte_eal librte_metrics librte_ethdev
 DIRS-$(CONFIG_RTE_LIBRTE_LATENCY_STATS) += librte_latencystats
-DEPDIRS-librte_latencystats := librte_eal librte_metrics librte_ether librte_mbuf
+DEPDIRS-librte_latencystats := librte_eal librte_metrics librte_ethdev librte_mbuf
 DIRS-$(CONFIG_RTE_LIBRTE_POWER) += librte_power
 DEPDIRS-librte_power := librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter
@@ -75,9 +75,9 @@ DEPDIRS-librte_sched += librte_timer
 DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs
 DEPDIRS-librte_kvargs := librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += librte_distributor
-DEPDIRS-librte_distributor := librte_eal librte_mbuf librte_ether
+DEPDIRS-librte_distributor := librte_eal librte_mbuf librte_ethdev
 DIRS-$(CONFIG_RTE_LIBRTE_PORT) += librte_port
-DEPDIRS-librte_port := librte_eal librte_mempool librte_mbuf librte_ether
+DEPDIRS-librte_port := librte_eal librte_mempool librte_mbuf librte_ethdev
 DEPDIRS-librte_port += librte_ip_frag librte_sched
 ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
 DEPDIRS-librte_port += librte_kni
@@ -94,15 +94,15 @@ DEPDIRS-librte_pipeline += librte_table librte_port
 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
+DEPDIRS-librte_pdump := librte_eal librte_mempool librte_mbuf librte_ethdev
 DIRS-$(CONFIG_RTE_LIBRTE_GSO) += librte_gso
-DEPDIRS-librte_gso := librte_eal librte_mbuf librte_ether librte_net
+DEPDIRS-librte_gso := librte_eal librte_mbuf librte_ethdev librte_net
 DEPDIRS-librte_gso += librte_mempool
 
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
 DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
 endif
-DEPDIRS-librte_kni := librte_eal librte_mempool librte_mbuf librte_ether
+DEPDIRS-librte_kni := librte_eal librte_mempool librte_mbuf librte_ethdev
 DEPDIRS-librte_kni += librte_pci
 
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/lib/librte_ether/Makefile b/lib/librte_ethdev/Makefile
similarity index 100%
rename from lib/librte_ether/Makefile
rename to lib/librte_ethdev/Makefile
diff --git a/lib/librte_ether/ethdev_profile.c b/lib/librte_ethdev/ethdev_profile.c
similarity index 100%
rename from lib/librte_ether/ethdev_profile.c
rename to lib/librte_ethdev/ethdev_profile.c
diff --git a/lib/librte_ether/ethdev_profile.h b/lib/librte_ethdev/ethdev_profile.h
similarity index 100%
rename from lib/librte_ether/ethdev_profile.h
rename to lib/librte_ethdev/ethdev_profile.h
diff --git a/lib/librte_ether/meson.build b/lib/librte_ethdev/meson.build
similarity index 100%
rename from lib/librte_ether/meson.build
rename to lib/librte_ethdev/meson.build
diff --git a/lib/librte_ether/rte_dev_info.h b/lib/librte_ethdev/rte_dev_info.h
similarity index 100%
rename from lib/librte_ether/rte_dev_info.h
rename to lib/librte_ethdev/rte_dev_info.h
diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h
similarity index 100%
rename from lib/librte_ether/rte_eth_ctrl.h
rename to lib/librte_ethdev/rte_eth_ctrl.h
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
similarity index 100%
rename from lib/librte_ether/rte_ethdev.c
rename to lib/librte_ethdev/rte_ethdev.c
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
similarity index 100%
rename from lib/librte_ether/rte_ethdev.h
rename to lib/librte_ethdev/rte_ethdev.h
diff --git a/lib/librte_ether/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
similarity index 100%
rename from lib/librte_ether/rte_ethdev_core.h
rename to lib/librte_ethdev/rte_ethdev_core.h
diff --git a/lib/librte_ether/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
similarity index 100%
rename from lib/librte_ether/rte_ethdev_driver.h
rename to lib/librte_ethdev/rte_ethdev_driver.h
diff --git a/lib/librte_ether/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
similarity index 100%
rename from lib/librte_ether/rte_ethdev_pci.h
rename to lib/librte_ethdev/rte_ethdev_pci.h
diff --git a/lib/librte_ether/rte_ethdev_vdev.h b/lib/librte_ethdev/rte_ethdev_vdev.h
similarity index 100%
rename from lib/librte_ether/rte_ethdev_vdev.h
rename to lib/librte_ethdev/rte_ethdev_vdev.h
diff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
similarity index 100%
rename from lib/librte_ether/rte_ethdev_version.map
rename to lib/librte_ethdev/rte_ethdev_version.map
diff --git a/lib/librte_ether/rte_flow.c b/lib/librte_ethdev/rte_flow.c
similarity index 100%
rename from lib/librte_ether/rte_flow.c
rename to lib/librte_ethdev/rte_flow.c
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ethdev/rte_flow.h
similarity index 100%
rename from lib/librte_ether/rte_flow.h
rename to lib/librte_ethdev/rte_flow.h
diff --git a/lib/librte_ether/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
similarity index 100%
rename from lib/librte_ether/rte_flow_driver.h
rename to lib/librte_ethdev/rte_flow_driver.h
diff --git a/lib/librte_ether/rte_mtr.c b/lib/librte_ethdev/rte_mtr.c
similarity index 100%
rename from lib/librte_ether/rte_mtr.c
rename to lib/librte_ethdev/rte_mtr.c
diff --git a/lib/librte_ether/rte_mtr.h b/lib/librte_ethdev/rte_mtr.h
similarity index 100%
rename from lib/librte_ether/rte_mtr.h
rename to lib/librte_ethdev/rte_mtr.h
diff --git a/lib/librte_ether/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h
similarity index 100%
rename from lib/librte_ether/rte_mtr_driver.h
rename to lib/librte_ethdev/rte_mtr_driver.h
diff --git a/lib/librte_ether/rte_tm.c b/lib/librte_ethdev/rte_tm.c
similarity index 100%
rename from lib/librte_ether/rte_tm.c
rename to lib/librte_ethdev/rte_tm.c
diff --git a/lib/librte_ether/rte_tm.h b/lib/librte_ethdev/rte_tm.h
similarity index 100%
rename from lib/librte_ether/rte_tm.h
rename to lib/librte_ethdev/rte_tm.h
diff --git a/lib/librte_ether/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h
similarity index 100%
rename from lib/librte_ether/rte_tm_driver.h
rename to lib/librte_ethdev/rte_tm_driver.h
diff --git a/lib/meson.build b/lib/meson.build
index 73d6f25c7..0d58c556f 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -9,7 +9,7 @@
 # given as a dep, no need to mention ring. This is especially true for the
 # core libs which are widely reused, so their deps are kept to a minimum.
 libraries = [ 'compat', # just a header, used for versioning
-	'eal', 'ring', 'mempool', 'mbuf', 'net', 'ether', 'pci', # core
+	'eal', 'ring', 'mempool', 'mbuf', 'net', 'ethdev', 'pci', # core
 	'metrics', # bitrate/latency stats depends on this
 	'hash',    # efd depends on this
 	'kvargs',  # cryptodev depends on this
-- 
2.14.3



More information about the dev mailing list