All of lore.kernel.org
 help / color / mirror / Atom feed
* Unable to configure ethdev in secondary process using ring PMD
@ 2015-11-30 16:17 Alexey Bogdanenko
  2015-11-30 16:53 ` Richardson, Bruce
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Bogdanenko @ 2015-11-30 16:17 UTC (permalink / raw)
  To: dev

Hello,

I would like to setup communication between two existing DPDK 
applications and run them on the same host.

"Connecting their ports" in some way in order not to rewrite the 
applications would be very desirable. Specifically, I would like one 
process to send packets and the second process to receive the packets 
using rte_eth_tx_burst() and rte_eth_rx_burst() respectively.

The most straightforward way to accomplish this seems to be by using 
ring based PMD API as described in the documentation [1] and email [2]. 
To adapt the example from the documentation to multi-process scenario, I 
call rte_ring_create() and rte_eth_from_rings() in the primary process, 
rte_ring_lookup() and rte_eth_from_rings() in the secondary process. 
After that each process calls rte_eth_dev_configure().

Unfortunately, the function returns -1001 in the secondary process, 
which is explained in debug log:

PMD: rte_eth_dev_configure: Cannot run in secondary processes

Is it possible to connect the applications as described above? Any 
advice would be appreciated.

References:

1. Network Interface Controller Drivers. Chapter 8.
Libpcap and Ring Based Poll Mode Drivers.

2. DPDK ML. Fri Dec 6 07:22:06 CET 2013. How to know corresponding 
device from port number. Tetsuya.Mukawa

Thanks,

Alexey Bogdanenko

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

* Re: Unable to configure ethdev in secondary process using ring PMD
  2015-11-30 16:17 Unable to configure ethdev in secondary process using ring PMD Alexey Bogdanenko
@ 2015-11-30 16:53 ` Richardson, Bruce
  2015-12-01 17:30   ` Alexey Bogdanenko
  0 siblings, 1 reply; 4+ messages in thread
From: Richardson, Bruce @ 2015-11-30 16:53 UTC (permalink / raw)
  To: Alexey Bogdanenko, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alexey Bogdanenko
> Sent: Monday, November 30, 2015 4:17 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] Unable to configure ethdev in secondary process using
> ring PMD
> 
> Hello,
> 
> I would like to setup communication between two existing DPDK applications
> and run them on the same host.
> 
> "Connecting their ports" in some way in order not to rewrite the
> applications would be very desirable. Specifically, I would like one
> process to send packets and the second process to receive the packets
> using rte_eth_tx_burst() and rte_eth_rx_burst() respectively.
> 
> The most straightforward way to accomplish this seems to be by using ring
> based PMD API as described in the documentation [1] and email [2].
> To adapt the example from the documentation to multi-process scenario, I
> call rte_ring_create() and rte_eth_from_rings() in the primary process,
> rte_ring_lookup() and rte_eth_from_rings() in the secondary process.
> After that each process calls rte_eth_dev_configure().
> 
> Unfortunately, the function returns -1001 in the secondary process, which
> is explained in debug log:
> 
> PMD: rte_eth_dev_configure: Cannot run in secondary processes
> 
> Is it possible to connect the applications as described above? Any advice
> would be appreciated.
> 
> References:
> 
> 1. Network Interface Controller Drivers. Chapter 8.
> Libpcap and Ring Based Poll Mode Drivers.
> 
> 2. DPDK ML. Fri Dec 6 07:22:06 CET 2013. How to know corresponding device
> from port number. Tetsuya.Mukawa
> 
> Thanks,
> 
> Alexey Bogdanenko

Hi Alexey,

The ring PMDs returned from eth_from_rings should be all ready to be used without having to explicitly configure it or set up the queues.

/Bruce


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

* Re: Unable to configure ethdev in secondary process using ring PMD
  2015-11-30 16:53 ` Richardson, Bruce
@ 2015-12-01 17:30   ` Alexey Bogdanenko
  2015-12-01 17:45     ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Bogdanenko @ 2015-12-01 17:30 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev

On 11/30/2015 07:53 PM, Richardson, Bruce wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alexey Bogdanenko
>> Sent: Monday, November 30, 2015 4:17 PM
>> To: dev@dpdk.org
>> Subject: [dpdk-dev] Unable to configure ethdev in secondary process using
>> ring PMD
>>
>> Hello,
>>
>> I would like to setup communication between two existing DPDK applications
>> and run them on the same host.
>>
>> "Connecting their ports" in some way in order not to rewrite the
>> applications would be very desirable. Specifically, I would like one
>> process to send packets and the second process to receive the packets
>> using rte_eth_tx_burst() and rte_eth_rx_burst() respectively.
>>
>> The most straightforward way to accomplish this seems to be by using ring
>> based PMD API as described in the documentation [1] and email [2].
>> To adapt the example from the documentation to multi-process scenario, I
>> call rte_ring_create() and rte_eth_from_rings() in the primary process,
>> rte_ring_lookup() and rte_eth_from_rings() in the secondary process.
>> After that each process calls rte_eth_dev_configure().
>>
>> Unfortunately, the function returns -1001 in the secondary process, which
>> is explained in debug log:
>>
>> PMD: rte_eth_dev_configure: Cannot run in secondary processes
>>
>> Is it possible to connect the applications as described above? Any advice
>> would be appreciated.
>>
>> References:
>>
>> 1. Network Interface Controller Drivers. Chapter 8.
>> Libpcap and Ring Based Poll Mode Drivers.
>>
>> 2. DPDK ML. Fri Dec 6 07:22:06 CET 2013. How to know corresponding device
>> from port number. Tetsuya.Mukawa
>>
>> Thanks,
>>
>> Alexey Bogdanenko
>
> Hi Alexey,
>
> The ring PMDs returned from eth_from_rings should be all ready to be used without having to explicitly configure it or set up the queues.
>
> /Bruce
>

Thanks for the quick reply,

I updated dpdk from v2.1.0 to a more recent version (near v2.2.0-rc2), 
removed calls to rte_eth_dev_configure(), rte_eth_rx_queue_setup(). It 
solved the problem.

Your advice was very helpful.

However, I encountered a rather minor but similar issue, which is that
rte_eth_dev_start() returns -1001 in the secondary processes. The 
message I get is:

rte_eth_dev_start: Cannot run in secondary processes

Now, I could avoid calling the function altogether, however in this case
rte_eth_link_get_nowait() reports that the link status is down which is 
a bit inconvenient.

Did I miss anything or is it just a limitation of ring PMD?

Alexey Bogdanenko

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

* Re: Unable to configure ethdev in secondary process using ring PMD
  2015-12-01 17:30   ` Alexey Bogdanenko
@ 2015-12-01 17:45     ` Bruce Richardson
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2015-12-01 17:45 UTC (permalink / raw)
  To: Alexey Bogdanenko; +Cc: dev

On Tue, Dec 01, 2015 at 08:30:15PM +0300, Alexey Bogdanenko wrote:
> On 11/30/2015 07:53 PM, Richardson, Bruce wrote:
> >
> >
> >>-----Original Message-----
> >>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alexey Bogdanenko
> >>Sent: Monday, November 30, 2015 4:17 PM
> >>To: dev@dpdk.org
> >>Subject: [dpdk-dev] Unable to configure ethdev in secondary process using
> >>ring PMD
> >>
> >>Hello,
> >>
> >>I would like to setup communication between two existing DPDK applications
> >>and run them on the same host.
> >>
> >>"Connecting their ports" in some way in order not to rewrite the
> >>applications would be very desirable. Specifically, I would like one
> >>process to send packets and the second process to receive the packets
> >>using rte_eth_tx_burst() and rte_eth_rx_burst() respectively.
> >>
> >>The most straightforward way to accomplish this seems to be by using ring
> >>based PMD API as described in the documentation [1] and email [2].
> >>To adapt the example from the documentation to multi-process scenario, I
> >>call rte_ring_create() and rte_eth_from_rings() in the primary process,
> >>rte_ring_lookup() and rte_eth_from_rings() in the secondary process.
> >>After that each process calls rte_eth_dev_configure().
> >>
> >>Unfortunately, the function returns -1001 in the secondary process, which
> >>is explained in debug log:
> >>
> >>PMD: rte_eth_dev_configure: Cannot run in secondary processes
> >>
> >>Is it possible to connect the applications as described above? Any advice
> >>would be appreciated.
> >>
> >>References:
> >>
> >>1. Network Interface Controller Drivers. Chapter 8.
> >>Libpcap and Ring Based Poll Mode Drivers.
> >>
> >>2. DPDK ML. Fri Dec 6 07:22:06 CET 2013. How to know corresponding device
> >>from port number. Tetsuya.Mukawa
> >>
> >>Thanks,
> >>
> >>Alexey Bogdanenko
> >
> >Hi Alexey,
> >
> >The ring PMDs returned from eth_from_rings should be all ready to be used without having to explicitly configure it or set up the queues.
> >
> >/Bruce
> >
> 
> Thanks for the quick reply,
> 
> I updated dpdk from v2.1.0 to a more recent version (near v2.2.0-rc2),
> removed calls to rte_eth_dev_configure(), rte_eth_rx_queue_setup(). It
> solved the problem.
> 
> Your advice was very helpful.
> 
> However, I encountered a rather minor but similar issue, which is that
> rte_eth_dev_start() returns -1001 in the secondary processes. The message I
> get is:
> 
> rte_eth_dev_start: Cannot run in secondary processes
> 
> Now, I could avoid calling the function altogether, however in this case
> rte_eth_link_get_nowait() reports that the link status is down which is a
> bit inconvenient.
> 
> Did I miss anything or is it just a limitation of ring PMD?
> 
> Alexey Bogdanenko

Sounds like a limitation that shouldn't be there. Possibly a bug.

/Bruce

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

end of thread, other threads:[~2015-12-01 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 16:17 Unable to configure ethdev in secondary process using ring PMD Alexey Bogdanenko
2015-11-30 16:53 ` Richardson, Bruce
2015-12-01 17:30   ` Alexey Bogdanenko
2015-12-01 17:45     ` Bruce Richardson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.