DPDK usage discussions
 help / color / mirror / Atom feed
* Aboud DPDK Multi-Process
@ 2021-11-04  8:21 赖香武
  2021-11-04  8:30 ` David Marchand
  0 siblings, 1 reply; 9+ messages in thread
From: 赖香武 @ 2021-11-04  8:21 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

Hello, I have a question about dpdk multi-process. After starting the primary process and the secondary process, when the current primary process exits, how does the secondary process become a new primary process to make the program continue? Hope to get your answer, thank you!thanks.

[-- Attachment #2: Type: text/html, Size: 540 bytes --]

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

* Re: Aboud DPDK Multi-Process
  2021-11-04  8:21 Aboud DPDK Multi-Process 赖香武
@ 2021-11-04  8:30 ` David Marchand
  2021-11-04  9:41   ` Burakov, Anatoly
  0 siblings, 1 reply; 9+ messages in thread
From: David Marchand @ 2021-11-04  8:30 UTC (permalink / raw)
  To: 赖香武; +Cc: users, Burakov, Anatoly, Bruce Richardson

On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com> wrote:
>
> Hello, I have a question about dpdk multi-process. After starting the primary process and the secondary process, when the current primary process exits, how does the secondary process become a new primary process to make the program continue? Hope to get your answer, thank you!

Not sure why you need this, but DPDK won't do for you.

The process type is decided once at DPDK init, and that is something
that affects how your program behaves after.
Switching type while running would break assumptions in the DPDK
drivers and libraries.

One thing that comes to mind, is that you could try to call
rte_eal_cleanup() and call rte_eal_init() again.
This is probably something that is not tested (so I'd expect issues,
maybe leaks etc..).

But then, you probably want to restart your process entirely.


-- 
David Marchand


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

* RE: Aboud DPDK Multi-Process
  2021-11-04  8:30 ` David Marchand
@ 2021-11-04  9:41   ` Burakov, Anatoly
  2021-11-04 13:53     ` 赖香武
  0 siblings, 1 reply; 9+ messages in thread
From: Burakov, Anatoly @ 2021-11-04  9:41 UTC (permalink / raw)
  To: David Marchand, 赖香武; +Cc: users, Richardson, Bruce

> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Thursday, November 4, 2021 8:30 AM
> To: 赖香武 <15310488637@163.com>
> Cc: users <users@dpdk.org>; Burakov, Anatoly
> <anatoly.burakov@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: Aboud DPDK Multi-Process
> 
> On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com> wrote:
> >
> > Hello, I have a question about dpdk multi-process. After starting the
> > primary process and the secondary process, when the current primary
> > process exits, how does the secondary process become a new primary
> > process to make the program continue? Hope to get your answer, thank
> > you!
> 
> Not sure why you need this, but DPDK won't do for you.
> 
> The process type is decided once at DPDK init, and that is something that
> affects how your program behaves after.
> Switching type while running would break assumptions in the DPDK drivers
> and libraries.
> 
> One thing that comes to mind, is that you could try to call
> rte_eal_cleanup() and call rte_eal_init() again.
> This is probably something that is not tested (so I'd expect issues, maybe
> leaks etc..).
> 
> But then, you probably want to restart your process entirely.

[[AB]] 
Calling rte_eal_init() twice would be a terrible idea, because not everything (not even remotely!) gets cleaned up with rte_eal_cleanup(), and a lot of stuff is allocated statically.

So, as far as I'm concerned, this usage scenario is considered to be unsupported.

> 
> 
> --
> David Marchand


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

* Re:RE: Aboud DPDK Multi-Process
  2021-11-04  9:41   ` Burakov, Anatoly
@ 2021-11-04 13:53     ` 赖香武
  2021-11-04 15:04       ` Burakov, Anatoly
  0 siblings, 1 reply; 9+ messages in thread
From: 赖香武 @ 2021-11-04 13:53 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: David Marchand, users, Richardson, Bruce

[-- Attachment #1: Type: text/plain, Size: 2218 bytes --]

Thank you for all your answer.
I asked this question because I want to use dual processes to complete the hot upgrade of ovs-vswitchd. When ovs-dpdk starts, rte_eal_init will be called to complete dpdk initialization. 
The old process dpdk uses primary to start, and the new process dpdk uses secondary to start and upgrade. After completion, the old process exits, that is, the primary exits. At this time, how does the secondary process become the primary process without disconnecting the network?













--

它山之石,可以攻玉。





在 2021-11-04 17:41:02,"Burakov, Anatoly" <anatoly.burakov@intel.com> 写道:
>> -----Original Message-----
>> From: David Marchand <david.marchand@redhat.com>
>> Sent: Thursday, November 4, 2021 8:30 AM
>> To: 赖香武 <15310488637@163.com>
>> Cc: users <users@dpdk.org>; Burakov, Anatoly
>> <anatoly.burakov@intel.com>; Richardson, Bruce
>> <bruce.richardson@intel.com>
>> Subject: Re: Aboud DPDK Multi-Process
>> 
>> On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com> wrote:
>> >
>> > Hello, I have a question about dpdk multi-process. After starting the
>> > primary process and the secondary process, when the current primary
>> > process exits, how does the secondary process become a new primary
>> > process to make the program continue? Hope to get your answer, thank
>> > you!
>> 
>> Not sure why you need this, but DPDK won't do for you.
>> 
>> The process type is decided once at DPDK init, and that is something that
>> affects how your program behaves after.
>> Switching type while running would break assumptions in the DPDK drivers
>> and libraries.
>> 
>> One thing that comes to mind, is that you could try to call
>> rte_eal_cleanup() and call rte_eal_init() again.
>> This is probably something that is not tested (so I'd expect issues, maybe
>> leaks etc..).
>> 
>> But then, you probably want to restart your process entirely.
>
>[[AB]] 
>Calling rte_eal_init() twice would be a terrible idea, because not everything (not even remotely!) gets cleaned up with rte_eal_cleanup(), and a lot of stuff is allocated statically.
>
>So, as far as I'm concerned, this usage scenario is considered to be unsupported.
>
>> 
>> 
>> --
>> David Marchand
>

[-- Attachment #2: Type: text/html, Size: 3016 bytes --]

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

* RE: Re:RE: Aboud DPDK Multi-Process
  2021-11-04 13:53     ` 赖香武
@ 2021-11-04 15:04       ` Burakov, Anatoly
  2021-11-05  2:53         ` 赖香武
  0 siblings, 1 reply; 9+ messages in thread
From: Burakov, Anatoly @ 2021-11-04 15:04 UTC (permalink / raw)
  To: 赖香武; +Cc: David Marchand, users, Richardson, Bruce

[-- Attachment #1: Type: text/plain, Size: 3109 bytes --]

Hi,

It does not become primary process. It’s not possible with current API. I mean, you can try, but mot probably it simply will not work and cause things to break. This is not a supported use case.

Thanks,
Anatoly

From: 赖香武 <15310488637@163.com>
Sent: Thursday, November 4, 2021 1:54 PM
To: Burakov, Anatoly <anatoly.burakov@intel.com>
Cc: David Marchand <david.marchand@redhat.com>; users <users@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>
Subject: Re:RE: Aboud DPDK Multi-Process

Thank you for all your answer.
I asked this question because I want to use dual processes to complete the hot upgrade of ovs-vswitchd. When ovs-dpdk starts, rte_eal_init will be called to complete dpdk initialization.
The old process dpdk uses primary to start, and the new process dpdk uses secondary to start and upgrade. After completion, the old process exits, that is, the primary exits. At this time, how does the secondary process become the primary process without disconnecting the network?









--
它山之石,可以攻玉。



在 2021-11-04 17:41:02,"Burakov, Anatoly" <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>> 写道:

>> -----Original Message-----

>> From: David Marchand <david.marchand@redhat.com<mailto:david.marchand@redhat.com>>

>> Sent: Thursday, November 4, 2021 8:30 AM

>> To: 赖香武 <15310488637@163.com<mailto:15310488637@163.com>>

>> Cc: users <users@dpdk.org<mailto:users@dpdk.org>>; Burakov, Anatoly

>> <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>>; Richardson, Bruce

>> <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>>

>> Subject: Re: Aboud DPDK Multi-Process

>>

>> On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com<mailto:15310488637@163.com>> wrote:

>> >

>> > Hello, I have a question about dpdk multi-process. After starting the

>> > primary process and the secondary process, when the current primary

>> > process exits, how does the secondary process become a new primary

>> > process to make the program continue? Hope to get your answer, thank

>> > you!

>>

>> Not sure why you need this, but DPDK won't do for you.

>>

>> The process type is decided once at DPDK init, and that is something that

>> affects how your program behaves after.

>> Switching type while running would break assumptions in the DPDK drivers

>> and libraries.

>>

>> One thing that comes to mind, is that you could try to call

>> rte_eal_cleanup() and call rte_eal_init() again.

>> This is probably something that is not tested (so I'd expect issues, maybe

>> leaks etc..).

>>

>> But then, you probably want to restart your process entirely.

>

>[[AB]]

>Calling rte_eal_init() twice would be a terrible idea, because not everything (not even remotely!) gets cleaned up with rte_eal_cleanup(), and a lot of stuff is allocated statically.

>

>So, as far as I'm concerned, this usage scenario is considered to be unsupported.

>

>>

>>

>> --

>> David Marchand

>




[-- Attachment #2: Type: text/html, Size: 11317 bytes --]

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

* Re:RE: Re:RE: Aboud DPDK Multi-Process
  2021-11-04 15:04       ` Burakov, Anatoly
@ 2021-11-05  2:53         ` 赖香武
  2021-11-05  8:55           ` Richardson, Bruce
  0 siblings, 1 reply; 9+ messages in thread
From: 赖香武 @ 2021-11-05  2:53 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: David Marchand, users, Richardson, Bruce

[-- Attachment #1: Type: text/plain, Size: 3005 bytes --]

Thank you for your answer. 
I have a question, how to enable the new and old dpdk processes to initialize (manage) the same device?
Is this theoretically feasible?



thanks.




At 2021-11-04 23:04:31, "Burakov, Anatoly" <anatoly.burakov@intel.com> wrote:

Hi,

 

It does not become primary process. It’s not possible with current API. I mean, you can try, but mot probably it simply will not work and cause things to break. This is not a supported use case.

 

Thanks,

Anatoly

 

From:赖香武 <15310488637@163.com>
Sent: Thursday, November 4, 2021 1:54 PM
To: Burakov, Anatoly <anatoly.burakov@intel.com>
Cc: David Marchand <david.marchand@redhat.com>; users <users@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>
Subject: Re:RE: Aboud DPDK Multi-Process

 

Thank you for all your answer.

I asked this question because I want to use dual processes to complete the hot upgrade of ovs-vswitchd. When ovs-dpdk starts, rte_eal_init will be called to complete dpdk initialization. 

The old process dpdk uses primary to start, and the new process dpdk uses secondary to start and upgrade. After completion, the old process exits, that is, the primary exits. At this time, how does the secondary process become the primary process without disconnecting the network?

 

 

 

 

--

它山之石,可以攻玉。

 


在 2021-11-04 17:41:02,"Burakov, Anatoly" <anatoly.burakov@intel.com> 写道:
>> -----Original Message-----
>> From: David Marchand <david.marchand@redhat.com>
>> Sent: Thursday, November 4, 2021 8:30 AM
>> To: 赖香武 <15310488637@163.com>
>> Cc: users <users@dpdk.org>; Burakov, Anatoly
>> <anatoly.burakov@intel.com>; Richardson, Bruce
>> <bruce.richardson@intel.com>
>> Subject: Re: Aboud DPDK Multi-Process
>> 
>> On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com> wrote:
>> >
>> > Hello, I have a question about dpdk multi-process. After starting the
>> > primary process and the secondary process, when the current primary
>> > process exits, how does the secondary process become a new primary
>> > process to make the program continue? Hope to get your answer, thank
>> > you!
>> 
>> Not sure why you need this, but DPDK won't do for you.
>> 
>> The process type is decided once at DPDK init, and that is something that
>> affects how your program behaves after.
>> Switching type while running would break assumptions in the DPDK drivers
>> and libraries.
>> 
>> One thing that comes to mind, is that you could try to call
>> rte_eal_cleanup() and call rte_eal_init() again.
>> This is probably something that is not tested (so I'd expect issues, maybe
>> leaks etc..).
>> 
>> But then, you probably want to restart your process entirely.
> 
>[[AB]] 
>Calling rte_eal_init() twice would be a terrible idea, because not everything (not even remotely!) gets cleaned up with rte_eal_cleanup(), and a lot of stuff is allocated statically.
> 
>So, as far as I'm concerned, this usage scenario is considered to be unsupported.
> 
>> 
>> 
>> --
>> David Marchand
> 

 


 

[-- Attachment #2: Type: text/html, Size: 10017 bytes --]

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

* RE: Re:RE: Re:RE: Aboud DPDK Multi-Process
  2021-11-05  2:53         ` 赖香武
@ 2021-11-05  8:55           ` Richardson, Bruce
  2021-11-05  9:34             ` 赖香武
  0 siblings, 1 reply; 9+ messages in thread
From: Richardson, Bruce @ 2021-11-05  8:55 UTC (permalink / raw)
  To: 赖香武, Burakov, Anatoly; +Cc: David Marchand, users

[-- Attachment #1: Type: text/plain, Size: 4427 bytes --]

It should be theoretically possible, but it is not supported in DPDK and I suspect be a large bit of work to implement.

I would suggest you look into alternatives here. For example, the easiest solution I can think of here is to use a "dummy" primary process, which initializes the devices and then just "goes to sleep" and does nothing other than manage the memory mapping requests etc. for secondary processes. All ovs-vswitchd processes could then be made to run as secondaries, so that if one crashes there are no complications on restart.

/Bruce

From: 赖香武 <15310488637@163.com>
Sent: Friday, November 5, 2021 2:53 AM
To: Burakov, Anatoly <anatoly.burakov@intel.com>
Cc: David Marchand <david.marchand@redhat.com>; users <users@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>
Subject: Re:RE: Re:RE: Aboud DPDK Multi-Process

Thank you for your answer.
I have a question, how to enable the new and old dpdk processes to initialize (manage) the same device?
Is this theoretically feasible?


thanks.



At 2021-11-04 23:04:31, "Burakov, Anatoly" <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>> wrote:
Hi,

It does not become primary process. It’s not possible with current API. I mean, you can try, but mot probably it simply will not work and cause things to break. This is not a supported use case.

Thanks,
Anatoly

From: 赖香武 <15310488637@163.com<mailto:15310488637@163.com>>
Sent: Thursday, November 4, 2021 1:54 PM
To: Burakov, Anatoly <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>>
Cc: David Marchand <david.marchand@redhat.com<mailto:david.marchand@redhat.com>>; users <users@dpdk.org<mailto:users@dpdk.org>>; Richardson, Bruce <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>>
Subject: Re:RE: Aboud DPDK Multi-Process

Thank you for all your answer.
I asked this question because I want to use dual processes to complete the hot upgrade of ovs-vswitchd. When ovs-dpdk starts, rte_eal_init will be called to complete dpdk initialization.
The old process dpdk uses primary to start, and the new process dpdk uses secondary to start and upgrade. After completion, the old process exits, that is, the primary exits. At this time, how does the secondary process become the primary process without disconnecting the network?









--
它山之石,可以攻玉。



在 2021-11-04 17:41:02,"Burakov, Anatoly" <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>> 写道:

>> -----Original Message-----

>> From: David Marchand <david.marchand@redhat.com<mailto:david.marchand@redhat.com>>

>> Sent: Thursday, November 4, 2021 8:30 AM

>> To: 赖香武 <15310488637@163.com<mailto:15310488637@163.com>>

>> Cc: users <users@dpdk.org<mailto:users@dpdk.org>>; Burakov, Anatoly

>> <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>>; Richardson, Bruce

>> <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>>

>> Subject: Re: Aboud DPDK Multi-Process

>>

>> On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com<mailto:15310488637@163.com>> wrote:

>> >

>> > Hello, I have a question about dpdk multi-process. After starting the

>> > primary process and the secondary process, when the current primary

>> > process exits, how does the secondary process become a new primary

>> > process to make the program continue? Hope to get your answer, thank

>> > you!

>>

>> Not sure why you need this, but DPDK won't do for you.

>>

>> The process type is decided once at DPDK init, and that is something that

>> affects how your program behaves after.

>> Switching type while running would break assumptions in the DPDK drivers

>> and libraries.

>>

>> One thing that comes to mind, is that you could try to call

>> rte_eal_cleanup() and call rte_eal_init() again.

>> This is probably something that is not tested (so I'd expect issues, maybe

>> leaks etc..).

>>

>> But then, you probably want to restart your process entirely.

>

>[[AB]]

>Calling rte_eal_init() twice would be a terrible idea, because not everything (not even remotely!) gets cleaned up with rte_eal_cleanup(), and a lot of stuff is allocated statically.

>

>So, as far as I'm concerned, this usage scenario is considered to be unsupported.

>

>>

>>

>> --

>> David Marchand

>







[-- Attachment #2: Type: text/html, Size: 17536 bytes --]

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

* Re:RE: Re:RE: Re:RE: Aboud DPDK Multi-Process
  2021-11-05  8:55           ` Richardson, Bruce
@ 2021-11-05  9:34             ` 赖香武
  2021-11-05  9:55               ` Richardson, Bruce
  0 siblings, 1 reply; 9+ messages in thread
From: 赖香武 @ 2021-11-05  9:34 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: Burakov, Anatoly, David Marchand, users

[-- Attachment #1: Type: text/plain, Size: 4284 bytes --]

Hi, thank you for your answer. 


I still don’t quite understand your suggestion, to complete the hot upgrade of ovs-vswitchd,how can ovs-dpdk run as a "dummy" primary process, wish you tell more in detail. 

I think that not all ovs-vswitch can run in the secondary process, there must be a primary process.










thanks.




At 2021-11-05 16:55:56, "Richardson, Bruce" <bruce.richardson@intel.com> wrote:

It should be theoretically possible, but it is not supported in DPDK and I suspect be a large bit of work to implement.

 

I would suggest you look into alternatives here. For example, the easiest solution I can think of here is to use a "dummy" primary process, which initializes the devices and then just "goes to sleep" and does nothing other than manage the memory mapping requests etc. for secondary processes. All ovs-vswitchd processes could then be made to run as secondaries, so that if one crashes there are no complications on restart.

 

/Bruce

 

From:赖香武 <15310488637@163.com>
Sent: Friday, November 5, 2021 2:53 AM
To: Burakov, Anatoly <anatoly.burakov@intel.com>
Cc: David Marchand <david.marchand@redhat.com>; users <users@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>
Subject: Re:RE: Re:RE: Aboud DPDK Multi-Process

 

Thank you for your answer. 

I have a question, how to enable the new and old dpdk processes to initialize (manage) the same device?

Is this theoretically feasible?

 

thanks.

 

At 2021-11-04 23:04:31, "Burakov, Anatoly" <anatoly.burakov@intel.com> wrote:

Hi,

 

It does not become primary process. It’s not possible with current API. I mean, you can try, but mot probably it simply will not work and cause things to break. This is not a supported use case.

 

Thanks,

Anatoly

 

From:赖香武 <15310488637@163.com>
Sent: Thursday, November 4, 2021 1:54 PM
To: Burakov, Anatoly <anatoly.burakov@intel.com>
Cc: David Marchand <david.marchand@redhat.com>; users <users@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>
Subject: Re:RE: Aboud DPDK Multi-Process

 

Thank you for all your answer.

I asked this question because I want to use dual processes to complete the hot upgrade of ovs-vswitchd. When ovs-dpdk starts, rte_eal_init will be called to complete dpdk initialization. 

The old process dpdk uses primary to start, and the new process dpdk uses secondary to start and upgrade. After completion, the old process exits, that is, the primary exits. At this time, how does the secondary process become the primary process without disconnecting the network?

 

 

 

 

--

它山之石,可以攻玉。

 


在 2021-11-04 17:41:02,"Burakov, Anatoly" <anatoly.burakov@intel.com> 写道:
>> -----Original Message-----
>> From: David Marchand <david.marchand@redhat.com>
>> Sent: Thursday, November 4, 2021 8:30 AM
>> To: 赖香武 <15310488637@163.com>
>> Cc: users <users@dpdk.org>; Burakov, Anatoly
>> <anatoly.burakov@intel.com>; Richardson, Bruce
>> <bruce.richardson@intel.com>
>> Subject: Re: Aboud DPDK Multi-Process
>> 
>> On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com> wrote:
>> >
>> > Hello, I have a question about dpdk multi-process. After starting the
>> > primary process and the secondary process, when the current primary
>> > process exits, how does the secondary process become a new primary
>> > process to make the program continue? Hope to get your answer, thank
>> > you!
>> 
>> Not sure why you need this, but DPDK won't do for you.
>> 
>> The process type is decided once at DPDK init, and that is something that
>> affects how your program behaves after.
>> Switching type while running would break assumptions in the DPDK drivers
>> and libraries.
>> 
>> One thing that comes to mind, is that you could try to call
>> rte_eal_cleanup() and call rte_eal_init() again.
>> This is probably something that is not tested (so I'd expect issues, maybe
>> leaks etc..).
>> 
>> But then, you probably want to restart your process entirely.
> 
>[[AB]] 
>Calling rte_eal_init() twice would be a terrible idea, because not everything (not even remotely!) gets cleaned up with rte_eal_cleanup(), and a lot of stuff is allocated statically.
> 
>So, as far as I'm concerned, this usage scenario is considered to be unsupported.
> 
>> 
>> 
>> --
>> David Marchand
> 

 


 

 


 

[-- Attachment #2: Type: text/html, Size: 16584 bytes --]

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

* RE: Re:RE: Re:RE: Re:RE: Aboud DPDK Multi-Process
  2021-11-05  9:34             ` 赖香武
@ 2021-11-05  9:55               ` Richardson, Bruce
  0 siblings, 0 replies; 9+ messages in thread
From: Richardson, Bruce @ 2021-11-05  9:55 UTC (permalink / raw)
  To: 赖香武; +Cc: Burakov, Anatoly, David Marchand, users

[-- Attachment #1: Type: text/plain, Size: 5677 bytes --]

For such a scheme, it would not be ovs-dpdk that would run as a dummy primary process, it would have to be another simpler DPDK process.  There would likely be some development in getting it all working, but it would probably be simpler than trying to add support to DPDK for secondary processes transitioning to primary.

From: 赖香武 <15310488637@163.com>
Sent: Friday, November 5, 2021 9:34 AM
To: Richardson, Bruce <bruce.richardson@intel.com>
Cc: Burakov, Anatoly <anatoly.burakov@intel.com>; David Marchand <david.marchand@redhat.com>; users <users@dpdk.org>
Subject: Re:RE: Re:RE: Re:RE: Aboud DPDK Multi-Process

Hi, thank you for your answer.

I still don’t quite understand your suggestion, to complete the hot upgrade of ovs-vswitchd,how can ovs-dpdk run as a "dummy" primary process, wish you tell more in detail.

I think that not all ovs-vswitch can run in the secondary process, there must be a primary process.







thanks.



At 2021-11-05 16:55:56, "Richardson, Bruce" <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>> wrote:
It should be theoretically possible, but it is not supported in DPDK and I suspect be a large bit of work to implement.

I would suggest you look into alternatives here. For example, the easiest solution I can think of here is to use a "dummy" primary process, which initializes the devices and then just "goes to sleep" and does nothing other than manage the memory mapping requests etc. for secondary processes. All ovs-vswitchd processes could then be made to run as secondaries, so that if one crashes there are no complications on restart.

/Bruce

From: 赖香武 <15310488637@163.com<mailto:15310488637@163.com>>
Sent: Friday, November 5, 2021 2:53 AM
To: Burakov, Anatoly <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>>
Cc: David Marchand <david.marchand@redhat.com<mailto:david.marchand@redhat.com>>; users <users@dpdk.org<mailto:users@dpdk.org>>; Richardson, Bruce <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>>
Subject: Re:RE: Re:RE: Aboud DPDK Multi-Process

Thank you for your answer.
I have a question, how to enable the new and old dpdk processes to initialize (manage) the same device?
Is this theoretically feasible?


thanks.



At 2021-11-04 23:04:31, "Burakov, Anatoly" <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>> wrote:
Hi,

It does not become primary process. It’s not possible with current API. I mean, you can try, but mot probably it simply will not work and cause things to break. This is not a supported use case.

Thanks,
Anatoly

From: 赖香武 <15310488637@163.com<mailto:15310488637@163.com>>
Sent: Thursday, November 4, 2021 1:54 PM
To: Burakov, Anatoly <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>>
Cc: David Marchand <david.marchand@redhat.com<mailto:david.marchand@redhat.com>>; users <users@dpdk.org<mailto:users@dpdk.org>>; Richardson, Bruce <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>>
Subject: Re:RE: Aboud DPDK Multi-Process

Thank you for all your answer.
I asked this question because I want to use dual processes to complete the hot upgrade of ovs-vswitchd. When ovs-dpdk starts, rte_eal_init will be called to complete dpdk initialization.
The old process dpdk uses primary to start, and the new process dpdk uses secondary to start and upgrade. After completion, the old process exits, that is, the primary exits. At this time, how does the secondary process become the primary process without disconnecting the network?









--
它山之石,可以攻玉。



在 2021-11-04 17:41:02,"Burakov, Anatoly" <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>> 写道:

>> -----Original Message-----

>> From: David Marchand <david.marchand@redhat.com<mailto:david.marchand@redhat.com>>

>> Sent: Thursday, November 4, 2021 8:30 AM

>> To: 赖香武 <15310488637@163.com<mailto:15310488637@163.com>>

>> Cc: users <users@dpdk.org<mailto:users@dpdk.org>>; Burakov, Anatoly

>> <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>>; Richardson, Bruce

>> <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>>

>> Subject: Re: Aboud DPDK Multi-Process

>>

>> On Thu, Nov 4, 2021 at 9:21 AM 赖香武 <15310488637@163.com<mailto:15310488637@163.com>> wrote:

>> >

>> > Hello, I have a question about dpdk multi-process. After starting the

>> > primary process and the secondary process, when the current primary

>> > process exits, how does the secondary process become a new primary

>> > process to make the program continue? Hope to get your answer, thank

>> > you!

>>

>> Not sure why you need this, but DPDK won't do for you.

>>

>> The process type is decided once at DPDK init, and that is something that

>> affects how your program behaves after.

>> Switching type while running would break assumptions in the DPDK drivers

>> and libraries.

>>

>> One thing that comes to mind, is that you could try to call

>> rte_eal_cleanup() and call rte_eal_init() again.

>> This is probably something that is not tested (so I'd expect issues, maybe

>> leaks etc..).

>>

>> But then, you probably want to restart your process entirely.

>

>[[AB]]

>Calling rte_eal_init() twice would be a terrible idea, because not everything (not even remotely!) gets cleaned up with rte_eal_cleanup(), and a lot of stuff is allocated statically.

>

>So, as far as I'm concerned, this usage scenario is considered to be unsupported.

>

>>

>>

>> --

>> David Marchand

>










[-- Attachment #2: Type: text/html, Size: 23349 bytes --]

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

end of thread, other threads:[~2021-11-05  9:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04  8:21 Aboud DPDK Multi-Process 赖香武
2021-11-04  8:30 ` David Marchand
2021-11-04  9:41   ` Burakov, Anatoly
2021-11-04 13:53     ` 赖香武
2021-11-04 15:04       ` Burakov, Anatoly
2021-11-05  2:53         ` 赖香武
2021-11-05  8:55           ` Richardson, Bruce
2021-11-05  9:34             ` 赖香武
2021-11-05  9:55               ` Richardson, Bruce

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git