DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ring: support secondary process
@ 2020-09-30 11:02 Ferruh Yigit
  2021-02-17 17:49 ` Ferruh Yigit
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ferruh Yigit @ 2020-09-30 11:02 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov; +Cc: dev, Ferruh Yigit, Kevin Laatz

Also add missing .ini feature list documentation and document some
existing features including new "Multiprocess aware" feature.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Kevin Laatz <kevin.laatz@intel.com>
---
 doc/guides/nics/features/ring.ini | 10 ++++++++++
 drivers/net/ring/rte_eth_ring.c   | 17 +++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 doc/guides/nics/features/ring.ini

diff --git a/doc/guides/nics/features/ring.ini b/doc/guides/nics/features/ring.ini
new file mode 100644
index 0000000000..fbfa6555d7
--- /dev/null
+++ b/doc/guides/nics/features/ring.ini
@@ -0,0 +1,10 @@
+;
+; Supported features of the 'ring' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Basic stats          = Y
+Multiprocess aware   = Y
+ARMv8                = Y
+x86-64               = Y
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 12046f5a00..f33951ee2e 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -595,6 +595,23 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 
 	PMD_LOG(INFO, "Initializing pmd_ring for %s", name);
 
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		eth_dev = rte_eth_dev_attach_secondary(name);
+		if (!eth_dev) {
+			PMD_LOG(ERR, "Failed to probe %s", name);
+			return -1;
+		}
+		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
+
+		eth_dev->rx_pkt_burst = eth_ring_rx;
+		eth_dev->tx_pkt_burst = eth_ring_tx;
+
+		rte_eth_dev_probing_finish(eth_dev);
+
+		return 0;
+	}
+
 	if (params == NULL || params[0] == '\0') {
 		ret = eth_dev_ring_create(name, dev, rte_socket_id(), DEV_CREATE,
 				&eth_dev);
-- 
2.26.2


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

* Re: [dpdk-dev] [PATCH] net/ring: support secondary process
  2020-09-30 11:02 [dpdk-dev] [PATCH] net/ring: support secondary process Ferruh Yigit
@ 2021-02-17 17:49 ` Ferruh Yigit
  2021-03-01 13:38 ` Bruce Richardson
  2021-03-08 11:39 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  2 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2021-02-17 17:49 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov; +Cc: dev, Kevin Laatz

On 9/30/2020 12:02 PM, Ferruh Yigit wrote:
> Also add missing .ini feature list documentation and document some
> existing features including new "Multiprocess aware" feature.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: Kevin Laatz <kevin.laatz@intel.com>

Hi Bruce,

Reminder of this patch waiting for review.

Thanks,
ferruh


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

* Re: [dpdk-dev] [PATCH] net/ring: support secondary process
  2020-09-30 11:02 [dpdk-dev] [PATCH] net/ring: support secondary process Ferruh Yigit
  2021-02-17 17:49 ` Ferruh Yigit
@ 2021-03-01 13:38 ` Bruce Richardson
  2021-03-04 17:14   ` Ferruh Yigit
  2021-03-08 11:39 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  2 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2021-03-01 13:38 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Anatoly Burakov, dev, Kevin Laatz

On Wed, Sep 30, 2020 at 12:02:40PM +0100, Ferruh Yigit wrote:
> Also add missing .ini feature list documentation and document some
> existing features including new "Multiprocess aware" feature.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: Kevin Laatz <kevin.laatz@intel.com>
> ---
>  doc/guides/nics/features/ring.ini | 10 ++++++++++
>  drivers/net/ring/rte_eth_ring.c   | 17 +++++++++++++++++
>  2 files changed, 27 insertions(+)
>  create mode 100644 doc/guides/nics/features/ring.ini
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>


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

* Re: [dpdk-dev] [PATCH] net/ring: support secondary process
  2021-03-01 13:38 ` Bruce Richardson
@ 2021-03-04 17:14   ` Ferruh Yigit
  2021-03-07 21:02     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2021-03-04 17:14 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dev, Kevin Laatz

On 3/1/2021 1:38 PM, Bruce Richardson wrote:
> On Wed, Sep 30, 2020 at 12:02:40PM +0100, Ferruh Yigit wrote:
>> Also add missing .ini feature list documentation and document some
>> existing features including new "Multiprocess aware" feature.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> Cc: Kevin Laatz <kevin.laatz@intel.com>
>> ---
>>   doc/guides/nics/features/ring.ini | 10 ++++++++++
>>   drivers/net/ring/rte_eth_ring.c   | 17 +++++++++++++++++
>>   2 files changed, 27 insertions(+)
>>   create mode 100644 doc/guides/nics/features/ring.ini
>>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 

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

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

* Re: [dpdk-dev] [PATCH] net/ring: support secondary process
  2021-03-04 17:14   ` Ferruh Yigit
@ 2021-03-07 21:02     ` Thomas Monjalon
  2021-03-08 11:30       ` Ferruh Yigit
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2021-03-07 21:02 UTC (permalink / raw)
  To: Bruce Richardson, Ferruh Yigit; +Cc: Anatoly Burakov, dev, Kevin Laatz

04/03/2021 18:14, Ferruh Yigit:
> On 3/1/2021 1:38 PM, Bruce Richardson wrote:
> > On Wed, Sep 30, 2020 at 12:02:40PM +0100, Ferruh Yigit wrote:
> >> Also add missing .ini feature list documentation and document some
> >> existing features including new "Multiprocess aware" feature.
> >>
> >> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >> ---
> >> Cc: Kevin Laatz <kevin.laatz@intel.com>
> >> ---
> >>   doc/guides/nics/features/ring.ini | 10 ++++++++++
> >>   drivers/net/ring/rte_eth_ring.c   | 17 +++++++++++++++++
> >>   2 files changed, 27 insertions(+)
> >>   create mode 100644 doc/guides/nics/features/ring.ini
> >>
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > 
> 
> Applied to dpdk-next-net/main, thanks.

Sorry, just seeing now.
I think we should not re-introduce the ring PMD in the features table.
It is not significant enough to occupy a column in this table I think.

This is the commit where I removed it from the table:
https://git.dpdk.org/dpdk/commit/?id=7b103c4ccd



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

* Re: [dpdk-dev] [PATCH] net/ring: support secondary process
  2021-03-07 21:02     ` Thomas Monjalon
@ 2021-03-08 11:30       ` Ferruh Yigit
  0 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2021-03-08 11:30 UTC (permalink / raw)
  To: Thomas Monjalon, Bruce Richardson; +Cc: Anatoly Burakov, dev, Kevin Laatz

On 3/7/2021 9:02 PM, Thomas Monjalon wrote:
> 04/03/2021 18:14, Ferruh Yigit:
>> On 3/1/2021 1:38 PM, Bruce Richardson wrote:
>>> On Wed, Sep 30, 2020 at 12:02:40PM +0100, Ferruh Yigit wrote:
>>>> Also add missing .ini feature list documentation and document some
>>>> existing features including new "Multiprocess aware" feature.
>>>>
>>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>>> ---
>>>> Cc: Kevin Laatz <kevin.laatz@intel.com>
>>>> ---
>>>>    doc/guides/nics/features/ring.ini | 10 ++++++++++
>>>>    drivers/net/ring/rte_eth_ring.c   | 17 +++++++++++++++++
>>>>    2 files changed, 27 insertions(+)
>>>>    create mode 100644 doc/guides/nics/features/ring.ini
>>>>
>>> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>>>
>>
>> Applied to dpdk-next-net/main, thanks.
> 
> Sorry, just seeing now.
> I think we should not re-introduce the ring PMD in the features table.
> It is not significant enough to occupy a column in this table I think.
> 
> This is the commit where I removed it from the table:
> https://git.dpdk.org/dpdk/commit/?id=7b103c4ccd
> 
> 
That is OK, I can send a new version without the .ini file.

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

* [dpdk-dev] [PATCH v2] net/ring: support secondary process
  2020-09-30 11:02 [dpdk-dev] [PATCH] net/ring: support secondary process Ferruh Yigit
  2021-02-17 17:49 ` Ferruh Yigit
  2021-03-01 13:38 ` Bruce Richardson
@ 2021-03-08 11:39 ` Ferruh Yigit
  2021-03-09  8:40   ` Ferruh Yigit
  2 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2021-03-08 11:39 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov; +Cc: Ferruh Yigit, dev

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2:
* Drop .ini file
---
 drivers/net/ring/rte_eth_ring.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 472d838582ee..02f6da2817ba 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -615,6 +615,23 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 
 	PMD_LOG(INFO, "Initializing pmd_ring for %s", name);
 
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		eth_dev = rte_eth_dev_attach_secondary(name);
+		if (!eth_dev) {
+			PMD_LOG(ERR, "Failed to probe %s", name);
+			return -1;
+		}
+		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
+
+		eth_dev->rx_pkt_burst = eth_ring_rx;
+		eth_dev->tx_pkt_burst = eth_ring_tx;
+
+		rte_eth_dev_probing_finish(eth_dev);
+
+		return 0;
+	}
+
 	if (params == NULL || params[0] == '\0') {
 		ret = eth_dev_ring_create(name, dev, rte_socket_id(), DEV_CREATE,
 				&eth_dev);
-- 
2.29.2


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

* Re: [dpdk-dev] [PATCH v2] net/ring: support secondary process
  2021-03-08 11:39 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
@ 2021-03-09  8:40   ` Ferruh Yigit
  0 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2021-03-09  8:40 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov; +Cc: dev

On 3/8/2021 11:39 AM, Ferruh Yigit wrote:
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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


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

end of thread, other threads:[~2021-03-09  8:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 11:02 [dpdk-dev] [PATCH] net/ring: support secondary process Ferruh Yigit
2021-02-17 17:49 ` Ferruh Yigit
2021-03-01 13:38 ` Bruce Richardson
2021-03-04 17:14   ` Ferruh Yigit
2021-03-07 21:02     ` Thomas Monjalon
2021-03-08 11:30       ` Ferruh Yigit
2021-03-08 11:39 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2021-03-09  8:40   ` 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).