diff mbox

[prefix=API-NEXT,3/4] example: use odp_queue_param_init routine

Message ID 1436540845-2890-3-git-send-email-bill.fischofer@linaro.org
State Superseded
Headers show

Commit Message

Bill Fischofer July 10, 2015, 3:07 p.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 example/classifier/odp_classifier.c | 2 ++
 example/generator/odp_generator.c   | 1 +
 example/ipsec/odp_ipsec.c           | 3 +++
 example/packet/odp_pktio.c          | 1 +
 example/timer/odp_timer_test.c      | 2 +-
 5 files changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index 6f7b101..82a74c0 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -209,6 +209,7 @@  static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool)
 		exit(EXIT_FAILURE);
 	}
 
+	odp_queue_param_init(&qparam);
 	qparam.sched.prio  = ODP_SCHED_PRIO_DEFAULT;
 	qparam.sched.sync  = ODP_SCHED_SYNC_ATOMIC;
 	qparam.sched.group = ODP_SCHED_GROUP_ALL;
@@ -320,6 +321,7 @@  static void configure_default_queue(odp_pktio_t pktio, appl_args_t *args)
 	sprintf(cos_name, "Default%s", args->if_name);
 	cos_default = odp_cos_create(cos_name);
 
+	odp_queue_param_init(&qparam);
 	qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT;
 	qparam.sched.sync = ODP_SCHED_SYNC_NONE;
 	qparam.sched.group = ODP_SCHED_GROUP_ALL;
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 780cdf2..940ed67 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -340,6 +340,7 @@  static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool)
 	 * Create and set the default INPUT queue associated with the 'pktio'
 	 * resource
 	 */
+	odp_queue_param_init(&qparam);
 	qparam.sched.prio  = ODP_SCHED_PRIO_DEFAULT;
 	qparam.sched.sync  = ODP_SCHED_SYNC_ATOMIC;
 	qparam.sched.group = ODP_SCHED_GROUP_ALL;
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index d892803..fd44765 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -323,6 +323,7 @@  void ipsec_init_pre(void)
 	 *  - completion queue (should eventually be ORDERED)
 	 *  - sequence number queue (must be ATOMIC)
 	 */
+	odp_queue_param_init(&qparam);
 	qparam.sched.prio  = ODP_SCHED_PRIO_HIGHEST;
 	qparam.sched.sync  = ODP_SCHED_SYNC_ATOMIC;
 	qparam.sched.group = ODP_SCHED_GROUP_ALL;
@@ -448,6 +449,7 @@  void initialize_loop(char *intf)
 	}
 
 	/* Create input queue */
+	odp_queue_param_init(&qparam);
 	qparam.sched.prio  = ODP_SCHED_PRIO_DEFAULT;
 	qparam.sched.sync  = ODP_SCHED_SYNC_ATOMIC;
 	qparam.sched.group = ODP_SCHED_GROUP_ALL;
@@ -533,6 +535,7 @@  void initialize_intf(char *intf)
 	 * Create and set the default INPUT queue associated with the 'pktio'
 	 * resource
 	 */
+	odp_queue_param_init(&qparam);
 	qparam.sched.prio  = ODP_SCHED_PRIO_DEFAULT;
 	qparam.sched.sync  = ODP_SCHED_SYNC_ATOMIC;
 	qparam.sched.group = ODP_SCHED_GROUP_ALL;
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index 7dc867d..c0b7b64 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -152,6 +152,7 @@  static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool, int mode)
 					   ODP_QUEUE_TYPE_PKTIN, NULL);
 		break;
 	case APPL_MODE_PKT_SCHED:
+		odp_queue_param_init(&qparam);
 		qparam.sched.prio  = ODP_SCHED_PRIO_DEFAULT;
 		qparam.sched.sync  = ODP_SCHED_SYNC_ATOMIC;
 		qparam.sched.group = ODP_SCHED_GROUP_ALL;
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index aabc012..5d362ec 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -425,7 +425,7 @@  int main(int argc, char *argv[])
 	/*
 	 * Create a queue for timer test
 	 */
-	memset(&param, 0, sizeof(param));
+	odp_queue_param_init(&param);
 	param.sched.prio  = ODP_SCHED_PRIO_DEFAULT;
 	param.sched.sync  = ODP_SCHED_SYNC_NONE;
 	param.sched.group = ODP_SCHED_GROUP_ALL;