af_packet: make the device detachable
PATCH v4 1/1 af_packet: make the device detachable
Allow dynamic deallocation of af_packet device through proper API functions. To achieve this:
* set device flag to RTE_ETH_DEV_DETACHABLE
* implement rte_pmd_af_packet_devuninit() and expose it through rte_driver.uninit()
* copy device name to ethdev->data to make discoverable with rte_eth_dev_allocated()
Moreover, make af_packet init function static, as there is no reason to keep it public.
---
v4:
* Rebased against current master branch
v3:
* Rephrased feature note in release notes.
* Rephrased commit log.
* Added API change note in release notes.
* Made init function static.
* Removed af_packet header file, as it is not needed after init function is not public anymore.
v2:
* Fixed typo and a comment.
* Added feature to the 2.3 release notes.
* Free memory allocated for rx and tx queues.
doc/guides/rel_notes/release_16_04.rst | 6 +++ drivers/net/af_packet/Makefile | 5 -- drivers/net/af_packet/rte_eth_af_packet.c | 43 ++++++++++++++++-- drivers/net/af_packet/rte_eth_af_packet.h | 53 ---------------------- .../net/af_packet/rte_pmd_af_packet_version.map | 3 -- 5 files changed, 45 insertions(+), 65 deletions(-) delete mode 100644 drivers/net/af_packet/rte_eth_af_packet.h
doc/guides/rel_notes/release_16_04.rst +6 -0
@@ -51,6 +51,9 @@ This section should contain new features added in this release. Sample format: * **Added vhost-user live migration support.** +* **Added af_packet dynamic removal function.** + + Af_packet device can now be detached using API, like other PMD devices. Resolved Issues ---------------
@@ -120,6 +123,9 @@ This section should contain API changes. Sample format: * Add a short 1-2 sentence description of the API change. Use fixed width quotes for ``rte_function_names`` or ``rte_struct_names``. Use the past tense. +* Af_packet device init function is no longer public. Device should be attached + with API. + ABI Changes -----------
drivers/net/af_packet/Makefile +0 -5
@@ -50,11 +50,6 @@ CFLAGS += $(WERROR_FLAGS) # SRCS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += rte_eth_af_packet.c -# -# Export include files -# -SYMLINK-y-include += rte_eth_af_packet.h - # this lib depends upon: DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_mbuf DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_ether
drivers/net/af_packet/rte_eth_af_packet.c +39 -4
81 lines not on this page · raw message
drivers/net/af_packet/rte_eth_af_packet.h deleted +0 -53
53 lines not on this page · raw message
drivers/net/af_packet/rte_pmd_af_packet_version.map +0 -3
@@ -1,7 +1,4 @@ DPDK_2.0 { - global: - - rte_pmd_af_packet_devinit; local: *; };
Signature · 1 line
1.9.1
Quoted 19 lines
-----Original Message-----
From: Wojciech Zmuda [mailto:[email protected]]
Sent: Wednesday, March 2, 2016 11:56 AM
To: [email protected]
Cc: Iremonger, Bernard <[email protected]>; [email protected]; Richardson, Bruce <[email protected]>; [email protected]
Subject: [PATCH v4]af_packet: make the device detachableAllow dynamic deallocation of
af_packetdevice through proper API functions. To achieve this:
* set device flag toRTE_ETH_DEV_DETACHABLE
* implementrte_pmd_af_packet_devuninit()and expose it
throughrte_driver.uninit()
* copy device name toethdev->datato make discoverable withrte_eth_dev_allocated()
Moreover, makeaf_packetinit function static, as there is no reason to keep it public.
Quoted 1 line
Signed-off-by Wojciech Zmuda <[email protected]>
Bruce Richardson
AppliedQuoted 19 lines · Bernard
Quoted 19 lines
-----Original Message-----
From: Wojciech Zmuda [mailto:[email protected]]
Sent: Wednesday, March 2, 2016 11:56 AM
To: [email protected]
Cc: Iremonger, Bernard <[email protected]>; [email protected]; Richardson, Bruce <[email protected]>; [email protected]
Subject: [PATCH v4]af_packet: make the device detachableAllow dynamic deallocation of
af_packetdevice through proper API functions. To achieve this:
* set device flag toRTE_ETH_DEV_DETACHABLE
* implementrte_pmd_af_packet_devuninit()and expose it
throughrte_driver.uninit()
* copy device name toethdev->datato make discoverable withrte_eth_dev_allocated()
Moreover, makeaf_packetinit function static, as there is no reason to keep it public.
Quoted 4 lines
Quoted 1 line
Signed-off-by Wojciech Zmuda <[email protected]>
Applied to dpdk-next-net/rel_16_04
/Bruce