[PATCH] ethdev: fix dev close in secondary process

Stephen Hemminger stephen at networkplumber.org
Tue May 31 19:40:17 CEST 2022


On Tue, 31 May 2022 20:08:55 +0300
Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru> wrote:

> On 5/27/22 05:35, Min Hu (Connor) wrote:
> > From: Min Hu <humin29 at huawei.com>
> > 
> > Shared memory like port private resources should only be reserved
> > by primary process. Secondary process should not start dev, and
> > the state of 'dev_started' is only meaningful to primary process.
> > While secondary process need to close dev to release process private
> > resources.
> > 
> > This patch limited the scope of 'dev_started'.  
> 
> I agree with the patch since secondary process should not be
> obliged to wait for device stop before closing ethdev. In any
> case closing ethdev in secondary process should do nothing
> harmful to the primary process.
> 
> However, the patch description pretends to limit dev_started
> scope for secondary processes in general. It is wrong since
> secondary processes need the information and that's why it is
> stored in shared memory.
> 
> > 
> > Fixes: febc855b358e ("ethdev: forbid closing started device")
> > Cc: stable at dpdk.org
> > 
> > Signed-off-by: Min Hu <humin29 at huawei.com>
> > ---

Also secondary processes are used differently by different application models.

Some applications only use secondary process for information.
But some have a primary process that only inits DPDK and do everything
in a secondary process.


More information about the stable mailing list