Hi Junghan,

In testpmd, you can easily do it by:


port stop all

# or port stop 0



flow configure 0 ......

# if there are other port(s)

# flow configure Y ......





port start all

# or port start 0

With the source code implementation, you can configure it before starting a 
device.

BR. Bing


From: Junghan Yoon <[email protected]<mailto:[email protected]>>
Sent: Friday, June 9, 2023 10:57:13 AM
To: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>
Subject: About rte_flow asynchronous API


Hi.

I'm trying to use testpmd to test rte_flow with asynchronous API in DPDK 22.11.



I turned on dv_esw_en=1 by echoing switchdev to /sys/class/net/...., and set 
dv_flow_en to 2 to use connectX-6 HWS (hardware steering).

sudo build/app/dpdk-testpmd -a 0000:8a:00.0,dv_flow_en=2 -a 
0000:8a:00.1,dv_flow_en=2 -- -i --rxq=1 --txq=1



In the prompt, I typed below

flow configure 0 queues_number 1 queues_size 10 counters_number 0 
aging_counters_number 0 meters_number 0 flags 0



but it said "Device with port_id=0 already started.".



I know rte_flow_configure() call should be in the middle of 
rte_eth_dev_configure() and rte_eth_dev_start().

So, I run testpmd by below to postpone device start,

sudo build/app/dpdk-testpmd -a 0000:8a:00.0,dv_flow_en=2 -a 
0000:8a:00.1,dv_flow_en=2 -- -i --rxq=1 --txq=1 --disable-device-start



However, now not only rte_eth_dev_start() but also rte_eth_dev_configure() does 
not start, so it said "Device with port_id=0 is not configured.".



How can I run rte_flow_configure() between rte_eth_dev_configure() and 
rte_eth_dev_start() in testpmd?

Is there any parameter to postpone only rte_eth_dev_start()?



Sincerely,

Junghan Yoon.


Reply via email to