[RFC,v1,4/4] examples/l3fwd: give an example for direct rearm mode
Checks
Commit Message
This is just to give an example to show how to use API to enable direct
rearm mode for user.
Command (Two flows):
./examples/dpdk-l3fwd -n 4 -l 1 -a 0001:01:00.0 -a 0001:01:00.1
-- -p 0x3 -P --config='(0,0,1),(1,0,1)'
This is one single core case, and by using API, The Rx queue 0 from
port 0 can directly rearm buffers from port 1 Tx queue 0.
And Rx queue 0 from port 1 can directly rearm buffers from port 0 Tx
queue 0.
Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
examples/l3fwd/main.c | 3 +++
1 file changed, 3 insertions(+)
@@ -1439,6 +1439,9 @@ main(int argc, char **argv)
}
}
+ rte_eth_direct_rxrearm_map(0, 0, 1, 0);
+ rte_eth_direct_rxrearm_map(1, 0, 0, 0);
+
printf("\n");
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {