[dpdk-dev] [PATCH 1/2 v2] examples/l3fwd: set default schedule type as atomic

Nipun Gupta nipun.gupta at nxp.com
Tue Jan 7 13:22:00 CET 2020


Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
---
 examples/l3fwd/l3fwd_event.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h
index fcc0ce51a..470aedc61 100644
--- a/examples/l3fwd/l3fwd_event.h
+++ b/examples/l3fwd/l3fwd_event.h
@@ -100,7 +100,11 @@ l3fwd_get_eventdev_rsrc(void)
 	mz = rte_memzone_reserve(name, sizeof(struct l3fwd_event_resources),
 				 0, 0);
 	if (mz != NULL) {
+		struct l3fwd_event_resources *rsrc = mz->addr;
+
 		memset(mz->addr, 0, sizeof(struct l3fwd_event_resources));
+		rsrc->sched_type = RTE_SCHED_TYPE_ATOMIC;
+
 		return mz->addr;
 	}
 
-- 
2.17.1



More information about the dev mailing list