From: Andrew Rybchenko Date: Wed, 11 Jul 2018 14:14:09 +0000 (+0100) Subject: ethdev: deprecate attach and detach functions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;ds=sidebyside;h=9f2be5b3db8b3e6cf873e142f57ea2f0cff621d9;p=dpdk.git ethdev: deprecate attach and detach functions These functions are buggy from the very beginning and should not be used. Generic EAL hotplug mechanisms should be used instead. Signed-off-by: Andrew Rybchenko Acked-by: Thomas Monjalon Acked-by: Stephen Hemminger --- diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index f788078372..2b4d604b81 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -13,6 +13,7 @@ APP = testpmd CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -Wno-deprecated-declarations # # all source are stored in SRCS-y diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index 55539baa9b..a0b3be07f0 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -4,6 +4,7 @@ # override default name to drop the hyphen name = 'testpmd' allow_experimental_apis = true +cflags += '-Wno-deprecated-declarations' sources = files('cmdline.c', 'cmdline_flow.c', 'cmdline_mtr.c', diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 14714fe941..32c035e0c5 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -62,6 +62,13 @@ Deprecation Notices Target release for removal of the legacy API will be defined once most PMDs have switched to rte_flow. +* ethdev: In v18.11 ``rte_eth_dev_attach()`` and ``rte_eth_dev_detach()`` + will be removed. + Hotplug functions ``rte_eal_hotplug_add()`` and ``rte_eal_hotplug_remove()`` + should be used instread. + Function ``rte_eth_dev_get_port_by_name()`` may be used to find + identifier of the added port. + * pdump: As we changed to use generic IPC, some changes in APIs and structure are expected in subsequent release. diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index cacd76ec6a..7070e9ab40 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1431,6 +1431,7 @@ uint16_t __rte_experimental rte_eth_dev_count_total(void); * @return * 0 on success and port_id is filled, negative on error */ +__rte_deprecated int rte_eth_dev_attach(const char *devargs, uint16_t *port_id); /** @@ -1446,6 +1447,7 @@ int rte_eth_dev_attach(const char *devargs, uint16_t *port_id); * @return * 0 on success and devname is filled, negative on error */ +__rte_deprecated int rte_eth_dev_detach(uint16_t port_id, char *devname); /**