DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v4] ethdev: add field for device data per process
@ 2018-10-15 14:11 Alejandro Lucero
  2018-10-15 14:47 ` Andrew Rybchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Lucero @ 2018-10-15 14:11 UTC (permalink / raw)
  To: dev

Primary and secondary processes share a per-device private data. With
current design it is not possible to have data per-device per-process.
This is required for handling properly the CPP interface inside the NFP
PMD with multiprocess support.

There is also at least another PMD driver, tap, with similar
requirements for per-process device data.

v2:
 - changing library version
 - report shared library change in release notes

v3:
 - fix shared library version

v4:
 - fix release notes

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 doc/guides/rel_notes/release_18_11.rst | 2 +-
 lib/librte_ethdev/Makefile             | 2 +-
 lib/librte_ethdev/meson.build          | 2 +-
 lib/librte_ethdev/rte_ethdev_core.h    | 8 +++++++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst
index c806dc6..608bb0b 100644
--- a/doc/guides/rel_notes/release_18_11.rst
+++ b/doc/guides/rel_notes/release_18_11.rst
@@ -213,7 +213,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cryptodev.so.5
      librte_distributor.so.1
    + librte_eal.so.9
-     librte_ethdev.so.10
+   + librte_ethdev.so.11
    + librte_eventdev.so.6
      librte_flow_classify.so.1
      librte_gro.so.1
diff --git a/lib/librte_ethdev/Makefile b/lib/librte_ethdev/Makefile
index d720dd2..e27bcd5 100644
--- a/lib/librte_ethdev/Makefile
+++ b/lib/librte_ethdev/Makefile
@@ -16,7 +16,7 @@ LDLIBS += -lrte_mbuf -lrte_kvargs
 
 EXPORT_MAP := rte_ethdev_version.map
 
-LIBABIVER := 10
+LIBABIVER := 11
 
 SRCS-y += ethdev_private.c
 SRCS-y += rte_ethdev.c
diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
index 172e302..6783013 100644
--- a/lib/librte_ethdev/meson.build
+++ b/lib/librte_ethdev/meson.build
@@ -2,7 +2,7 @@
 # Copyright(c) 2017 Intel Corporation
 
 name = 'ethdev'
-version = 10
+version = 11
 allow_experimental_apis = true
 sources = files('ethdev_private.c',
 	'ethdev_profile.c',
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 33d12b3..0d28fd9 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -539,7 +539,13 @@ struct rte_eth_dev {
 	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
 	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
 	eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */
-	struct rte_eth_dev_data *data;  /**< Pointer to device data */
+	/**
+	 * Next two fields are per-device data but *data is shared between
+	 * primary and secondary processes and *process_private is per-process
+	 * private. The second one is managed by PMDs if necessary.
+	 */
+	struct rte_eth_dev_data *data;  /**< Pointer to device data. */
+	void *process_private; /**< Pointer to per-process device data. */
 	const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
 	struct rte_device *device; /**< Backing device */
 	struct rte_intr_handle *intr_handle; /**< Device interrupt handle */
-- 
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v4] ethdev: add field for device data per process
  2018-10-15 14:11 [dpdk-dev] [PATCH v4] ethdev: add field for device data per process Alejandro Lucero
@ 2018-10-15 14:47 ` Andrew Rybchenko
  2018-10-16  8:27   ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Rybchenko @ 2018-10-15 14:47 UTC (permalink / raw)
  To: Alejandro Lucero, dev

On 10/15/18 5:11 PM, Alejandro Lucero wrote:
> Primary and secondary processes share a per-device private data. With
> current design it is not possible to have data per-device per-process.
> This is required for handling properly the CPP interface inside the NFP
> PMD with multiprocess support.
>
> There is also at least another PMD driver, tap, with similar
> requirements for per-process device data.
>
> v2:
>   - changing library version
>   - report shared library change in release notes
>
> v3:
>   - fix shared library version
>
> v4:
>   - fix release notes
>
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v4] ethdev: add field for device data per process
  2018-10-15 14:47 ` Andrew Rybchenko
@ 2018-10-16  8:27   ` Ferruh Yigit
  2018-10-16  8:34     ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2018-10-16  8:27 UTC (permalink / raw)
  To: Andrew Rybchenko, Alejandro Lucero, dev

On 10/15/2018 3:47 PM, Andrew Rybchenko wrote:
> On 10/15/18 5:11 PM, Alejandro Lucero wrote:
>> Primary and secondary processes share a per-device private data. With
>> current design it is not possible to have data per-device per-process.
>> This is required for handling properly the CPP interface inside the NFP
>> PMD with multiprocess support.
>>
>> There is also at least another PMD driver, tap, with similar
>> requirements for per-process device data.
>>
>> v2:
>>   - changing library version
>>   - report shared library change in release notes
>>
>> v3:
>>   - fix shared library version
>>
>> v4:
>>   - fix release notes
>>
>> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
> 
> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v4] ethdev: add field for device data per process
  2018-10-16  8:27   ` Ferruh Yigit
@ 2018-10-16  8:34     ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2018-10-16  8:34 UTC (permalink / raw)
  To: Andrew Rybchenko, Alejandro Lucero, dev

On 10/16/2018 9:27 AM, Ferruh Yigit wrote:
> On 10/15/2018 3:47 PM, Andrew Rybchenko wrote:
>> On 10/15/18 5:11 PM, Alejandro Lucero wrote:
>>> Primary and secondary processes share a per-device private data. With
>>> current design it is not possible to have data per-device per-process.
>>> This is required for handling properly the CPP interface inside the NFP
>>> PMD with multiprocess support.
>>>
>>> There is also at least another PMD driver, tap, with similar
>>> requirements for per-process device data.
>>>
>>> v2:
>>>   - changing library version
>>>   - report shared library change in release notes
>>>
>>> v3:
>>>   - fix shared library version
>>>
>>> v4:
>>>   - fix release notes
>>>
>>> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>>
>> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-16  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 14:11 [dpdk-dev] [PATCH v4] ethdev: add field for device data per process Alejandro Lucero
2018-10-15 14:47 ` Andrew Rybchenko
2018-10-16  8:27   ` Ferruh Yigit
2018-10-16  8:34     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).