net/ring: support secondary process
PATCH 1/1 net/ring: support secondary process
Also add missing .ini feature list documentation and document some existing features including new "Multiprocess aware" feature.
---
Cc: Kevin Laatz <[email protected]>
--- 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
doc/guides/nics/features/ring.ini new file +10 -0
@@ -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
drivers/net/ring/rte_eth_ring.c +17 -0
@@ -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 , ð_dev);
Signature · 1 line
2.26.2
Quoted 6 lines · Ferruh Yigit
Also add missing .ini feature list documentation and document some existing features including new "Multiprocess aware" feature.
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: Kevin Laatz <[email protected]>
Hi Bruce,
Reminder of this patch waiting for review.
Thanks,
ferruh
Quoted 12 lines · Ferruh Yigit
Also add missing .ini feature list documentation and document some existing features including new "Multiprocess aware" feature.
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: Kevin Laatz <[email protected]>--- 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
Ferruh Yigit
AppliedQuoted 13 lines · Bruce Richardson
Quoted 12 lines · Ferruh Yigit
Also add missing .ini feature list documentation and document some existing features including new "Multiprocess aware" feature.
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: Kevin Laatz <[email protected]>--- 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
Quoted 2 lines
Acked-by Bruce Richardson <[email protected]>
Applied to dpdk-next-net/main, thanks.
04/03/2021 18:14, Ferruh Yigit:
Quoted 14 lines · Bruce Richardson
Quoted 13 lines · Ferruh Yigit
Quoted 12 lines
Also add missing .ini feature list documentation and document some existing features including new "Multiprocess aware" feature.
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: Kevin Laatz <[email protected]>--- 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
Quoted 4 lines
Quoted 2 lines
Acked-by Bruce Richardson <[email protected]>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
Quoted 18 lines · Thomas Monjalon
04/03/2021 18:14, Ferruh Yigit:
Quoted 17 lines · Bruce Richardson
Quoted 15 lines · Ferruh Yigit
Quoted 12 lines
Also add missing .ini feature list documentation and document some existing features including new "Multiprocess aware" feature.
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: Kevin Laatz <[email protected]>--- 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 <[email protected]>
Quoted 10 lines
Quoted 1 line
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.
PATCH v2 1/1 net/ring: support secondary process
In reply to Ferruh Yigit---
v2:
* Drop .ini file
--- drivers/net/ring/rte_eth_ring.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/net/ring/rte_eth_ring.c +17 -0
@@ -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 , ð_dev);
Signature · 1 line
2.29.2
Ferruh Yigit
AppliedQuoted 2 lines · Ferruh Yigit
Signed-off-by Ferruh Yigit <[email protected]>Acked-by Bruce Richardson <[email protected]>
Applied to dpdk-next-net/main, thanks.