[PATCH] app/testpmd: fix secondary process not forwarding

Zhang, Yuying yuying.zhang at intel.com
Mon Feb 20 06:39:37 CET 2023



> -----Original Message-----
> From: He, ShiyangX <shiyangx.he at intel.com>
> Sent: 2023年2月8日 14:39
> To: Zhang, Yuying <yuying.zhang at intel.com>
> Cc: dev at dpdk.org; Zhou, YidingX <yidingx.zhou at intel.com>;
> stable at dpdk.org; Singh, Aman Deep <aman.deep.singh at intel.com>;
> Burakov, Anatoly <anatoly.burakov at intel.com>; Li, Xiaoyun
> <xiaoyun.li at intel.com>; Alvin Zhang <alvinx.zhang at intel.com>
> Subject: RE: [PATCH] app/testpmd: fix secondary process not forwarding
> 
> 
> 
> >-----Original Message-----
> >From: Zhang, Yuying <yuying.zhang at intel.com>
> >Sent: Wednesday, February 8, 2023 11:22 AM
> >To: He, ShiyangX <shiyangx.he at intel.com>
> >Cc: dev at dpdk.org; Zhou, YidingX <yidingx.zhou at intel.com>;
> >stable at dpdk.org; Singh, Aman Deep <aman.deep.singh at intel.com>;
> Burakov,
> >Anatoly <anatoly.burakov at intel.com>; Li, Xiaoyun
> ><xiaoyun.li at intel.com>; Alvin Zhang <alvinx.zhang at intel.com>
> >Subject: RE: [PATCH] app/testpmd: fix secondary process not forwarding
> >
> >Hi Shiyang,
> >
> >> -----Original Message-----
> >> From: He, ShiyangX <shiyangx.he at intel.com>
> >> Sent: 2023年1月13日 17:08
> >> To: He, ShiyangX <shiyangx.he at intel.com>; Zhang, Yuying
> >> <yuying.zhang at intel.com>
> >> Cc: dev at dpdk.org; Zhou, YidingX <yidingx.zhou at intel.com>;
> >> stable at dpdk.org; Singh, Aman Deep <aman.deep.singh at intel.com>;
> >> Burakov, Anatoly <anatoly.burakov at intel.com>; Li, Xiaoyun
> >> <xiaoyun.li at intel.com>; Alvin Zhang <alvinx.zhang at intel.com>
> >> Subject: RE: [PATCH] app/testpmd: fix secondary process not
> >> forwarding
> >>
> >> @Zhang, Yuying Hi, please take a look at this patch! Are there any
> comments?
> >>
> >> >-----Original Message-----
> >> >From: He, ShiyangX <shiyangx.he at intel.com>
> >> >Sent: Wednesday, January 4, 2023 10:02 AM
> >> >To: Stephen Hemminger <stephen at networkplumber.org>
> >> >Cc: dev at dpdk.org; Zhou, YidingX <yidingx.zhou at intel.com>;
> >> >stable at dpdk.org; Singh, Aman Deep <aman.deep.singh at intel.com>;
> >Zhang,
> >> >Yuying <yuying.zhang at intel.com>; Burakov, Anatoly
> >> ><anatoly.burakov at intel.com>; Li, Xiaoyun <xiaoyun.li at intel.com>;
> >> >Alvin Zhang <alvinx.zhang at intel.com>
> >> >Subject: RE: [PATCH] app/testpmd: fix secondary process not
> >> >forwarding
> >> >
> >> >>> Under multi-process scenario, the secondary process gets queue
> >> >>> state from the wrong location (the global variable 'ports').
> >> >>> Therefore, the secondary process can not forward since
> >> >>> "stream_init" is
> >not called.
> >> >>>
> >> >>> This commit fixes the issue by calling 'rte_eth_rx/tx_queue_info_get'
> >> >>> to get queue state from shared memory.
> >> >>>
> >> >>> Fixes: a78040c990cb ("app/testpmd: update forward engine
> >> >>> beginning")
> >> >>> Cc: stable at dpdk.org
> >> >>>
> >> >>> Signed-off-by: Shiyang He <shiyangx.he at intel.com>

Acked-by: Yuying Zhang <yuying.zhang at intel.com>

> >> >>
> >> >>Would it be possible to fix this the initialization of ports
> >> >>variable, rather than doing a per-state fixup here?
> >> >
> >> >In multi-process scenario, the secondary process does not initialize
> >> >the queue state in the 'ports' variable, and the ethdev's queue
> >> >state may be changed by any other process, which causes 'ports'
> >> >queue state of per-process and ethdev's queue state are
> >> >inconsistent. Therefore, getting the queue state from ethdev is a feasible
> way which I can think of.
> >
> >You should fix the queue state in the 'ports' variable of secondary
> >process in the initialization of ports variable instead of fixup here.
> 
> If the ethdev's queue state is changed by other processes, the queue state in
> the 'ports' variable is inconsistent with ethdev's queue state. Therefore,
> should obtain it from ethdev when accessing the queue state in the 'ports'
> variable.


More information about the stable mailing list