DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Handling KNI in a secondary process
@ 2020-07-01  9:48 Pavel Vajarov
  2020-07-01 13:00 ` Cliff Burdick
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Vajarov @ 2020-07-01  9:48 UTC (permalink / raw)
  To: users

Hi there,

Basically my question is whether it's possible to handle KNI packets
(rte_kni_tx_burst, rte_kni_handle_request, rte_kni_rx_burst) in a secondary
process?

My idea to do this is to avoid slowing down the primary process with KNI
handling. I'm thinking of using a shared memory ring buffer to send the
needed packets to the secondary process (just like in the
mulitprocess/client_server_mp example) and then the secondary process will
do the KNI processing. Is this setup possible?

I'm asking this because I read that the rte_kni_init function that
"This function is to be executed on the MASTER lcore only" and I was
wondering will I be able to use the kni related functions from a secondary
process?
Or maybe I need to initialize the KNI in the master process and then
use rte_kni_get before start using the KNI?

Thanks,
Pavel.

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

* Re: [dpdk-users] Handling KNI in a secondary process
  2020-07-01  9:48 [dpdk-users] Handling KNI in a secondary process Pavel Vajarov
@ 2020-07-01 13:00 ` Cliff Burdick
  2020-07-01 13:09   ` Pavel Vajarov
  0 siblings, 1 reply; 3+ messages in thread
From: Cliff Burdick @ 2020-07-01 13:00 UTC (permalink / raw)
  To: Pavel Vajarov; +Cc: users

Running it as a separate thread in your primary application will not slow
it down any more than running a second process, so I'd try that first.

Both primary and secondary processes have master lcores, which is where all
the initialization is done for pools and rings before spawning the packet
processing threads.


On Wed, Jul 1, 2020, 02:49 Pavel Vajarov <freakpv@gmail.com> wrote:

> Hi there,
>
> Basically my question is whether it's possible to handle KNI packets
> (rte_kni_tx_burst, rte_kni_handle_request, rte_kni_rx_burst) in a secondary
> process?
>
> My idea to do this is to avoid slowing down the primary process with KNI
> handling. I'm thinking of using a shared memory ring buffer to send the
> needed packets to the secondary process (just like in the
> mulitprocess/client_server_mp example) and then the secondary process will
> do the KNI processing. Is this setup possible?
>
> I'm asking this because I read that the rte_kni_init function that
> "This function is to be executed on the MASTER lcore only" and I was
> wondering will I be able to use the kni related functions from a secondary
> process?
> Or maybe I need to initialize the KNI in the master process and then
> use rte_kni_get before start using the KNI?
>
> Thanks,
> Pavel.
>

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

* Re: [dpdk-users] Handling KNI in a secondary process
  2020-07-01 13:00 ` Cliff Burdick
@ 2020-07-01 13:09   ` Pavel Vajarov
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Vajarov @ 2020-07-01 13:09 UTC (permalink / raw)
  To: Cliff Burdick; +Cc: users

Thanks for the thread suggestion. Haven't thought about that for some
reason.

On Wed, Jul 1, 2020 at 4:01 PM Cliff Burdick <shaklee3@gmail.com> wrote:

> Running it as a separate thread in your primary application will not slow
> it down any more than running a second process, so I'd try that first.
>
> Both primary and secondary processes have master lcores, which is where
> all the initialization is done for pools and rings before spawning the
> packet processing threads.
>
>
> On Wed, Jul 1, 2020, 02:49 Pavel Vajarov <freakpv@gmail.com> wrote:
>
>> Hi there,
>>
>> Basically my question is whether it's possible to handle KNI packets
>> (rte_kni_tx_burst, rte_kni_handle_request, rte_kni_rx_burst) in a
>> secondary
>> process?
>>
>> My idea to do this is to avoid slowing down the primary process with KNI
>> handling. I'm thinking of using a shared memory ring buffer to send the
>> needed packets to the secondary process (just like in the
>> mulitprocess/client_server_mp example) and then the secondary process will
>> do the KNI processing. Is this setup possible?
>>
>> I'm asking this because I read that the rte_kni_init function that
>> "This function is to be executed on the MASTER lcore only" and I was
>> wondering will I be able to use the kni related functions from a secondary
>> process?
>> Or maybe I need to initialize the KNI in the master process and then
>> use rte_kni_get before start using the KNI?
>>
>> Thanks,
>> Pavel.
>>
>

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

end of thread, other threads:[~2020-07-01 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  9:48 [dpdk-users] Handling KNI in a secondary process Pavel Vajarov
2020-07-01 13:00 ` Cliff Burdick
2020-07-01 13:09   ` Pavel Vajarov

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).