From patchwork Tue Jan 12 18:11:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 59636 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2894092lbb; Tue, 12 Jan 2016 10:14:34 -0800 (PST) X-Received: by 10.55.81.70 with SMTP id f67mr52109400qkb.28.1452622474595; Tue, 12 Jan 2016 10:14:34 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y17si36926518qgd.82.2016.01.12.10.14.33; Tue, 12 Jan 2016 10:14:34 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3F9BF61737; Tue, 12 Jan 2016 18:14:33 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=Ne29cI3q; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C7671616F8; Tue, 12 Jan 2016 18:12:12 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5173261735; Tue, 12 Jan 2016 18:12:05 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id 497E0616ED for ; Tue, 12 Jan 2016 18:12:01 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id 17so37681787lfz.1 for ; Tue, 12 Jan 2016 10:12:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wadzIl2OwpYgGNOy53D7XbAt2G2hUTqByrzgDUs3Xrk=; b=Ne29cI3q2lR64ZySDqWinqz61n+a34b5txrGge71kGH62mukY1KrQ/cT6xjmVtXlDv AK0zqyIPXDAxeBIy03KLSH8ABRdOmrwYFLvt1Tb9da7dD7KfTdOCCrffB/67wwwXK/aZ 98iCdB1s8hNlixnrH0KLH/fDPvuHMXzwcDaLE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wadzIl2OwpYgGNOy53D7XbAt2G2hUTqByrzgDUs3Xrk=; b=VNthaEExREbCtYZtuVz1kj7Akid7h1VWVKX8zZTqEqIkhQ9FRvKy1y9nCnxWN0l93C kQkhCMmPqrJ6YW1eRuLvgcdjcOc8atygiaQyI2E1knxirTmGjD0eZDJHMJHF0K3R+34b FOPgDvFLT7gwhe9kQm4O7d/C66frFNWd3+6bwb8NYmzrwkBxW9s/182e3gAanLFzGDsf sQ7CI5Dz8f4u41ZSL4vFjieM3WCi4ac8K56a8dffWAnfNuhvLm1iP1g+ZbDIhrbEV5J/ 7R76kXGi+PprTNdXq8k3LM1s+02n0hGALXouX7Z8fGIn0/9XTrLMO4OIpc00CwedyFqr KSQw== X-Gm-Message-State: ALoCoQmAys5OC9/V/045Lb2jPf9T6QxRNJA1S6mBpwrQm3uAY4KXPYqQgYyjT1v9ARp4ZIET3QuGAFx+HCTslVzfiKrXJRWqkw== X-Received: by 10.25.150.68 with SMTP id y65mr29103532lfd.106.1452622320252; Tue, 12 Jan 2016 10:12:00 -0800 (PST) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id o9sm3340536lfe.15.2016.01.12.10.11.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 10:11:59 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Tue, 12 Jan 2016 20:11:45 +0200 Message-Id: <1452622307-18379-4-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452622307-18379-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1452622307-18379-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 3/5] validation: cls: test_pmr: don't create default input queue X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" There is no need to create default input queue for pktio if default CoS is assigned. Signed-off-by: Ivan Khoronzhuk --- .../classification/odp_classification_test_pmr.c | 54 ---------------------- 1 file changed, 54 deletions(-) diff --git a/test/validation/classification/odp_classification_test_pmr.c b/test/validation/classification/odp_classification_test_pmr.c index 75d2a95..0b3f279 100644 --- a/test/validation/classification/odp_classification_test_pmr.c +++ b/test/validation/classification/odp_classification_test_pmr.c @@ -55,39 +55,6 @@ odp_pktio_t create_pktio(odp_queue_type_t q_type) return pktio; } -int create_default_inq(odp_pktio_t pktio, odp_queue_type_t qtype) -{ - odp_queue_param_t qparam; - odp_queue_t inq_def; - char inq_name[ODP_QUEUE_NAME_LEN]; - - 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; - - snprintf(inq_name, sizeof(inq_name), "inq-pktio-%" PRIu64, - odp_pktio_to_u64(pktio)); - inq_def = odp_queue_lookup(inq_name); - if (inq_def == ODP_QUEUE_INVALID) - inq_def = odp_queue_create( - inq_name, - ODP_QUEUE_TYPE_PKTIN, - qtype == ODP_QUEUE_TYPE_POLL ? NULL : &qparam); - - CU_ASSERT_FATAL(inq_def != ODP_QUEUE_INVALID); - - if (0 > odp_pktio_inq_setdef(pktio, inq_def)) - return -1; - - if (odp_pktio_start(pktio)) { - fprintf(stderr, "unable to start loop\n"); - return -1; - } - - return 0; -} - void configure_default_cos(odp_pktio_t pktio, odp_cos_t *cos, odp_queue_t *queue, odp_pool_t *pool) { @@ -163,8 +130,6 @@ void classification_test_pmr_term_tcp_dport(void) pktio = create_pktio(ODP_QUEUE_TYPE_SCHED); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); - CU_ASSERT(retval == 0); configure_default_cos(pktio, &default_cos, &default_queue, &default_pool); @@ -237,7 +202,6 @@ void classification_test_pmr_term_tcp_dport(void) odp_cos_destroy(cos); odp_cos_destroy(default_cos); odp_pmr_destroy(pmr); - destroy_inq(pktio); odp_queue_destroy(queue); odp_queue_destroy(default_queue); odp_pool_destroy(pool); @@ -273,8 +237,6 @@ void classification_test_pmr_term_tcp_sport(void) pktio = create_pktio(ODP_QUEUE_TYPE_SCHED); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); - CU_ASSERT(retval == 0); configure_default_cos(pktio, &default_cos, &default_queue, &default_pool); @@ -344,7 +306,6 @@ void classification_test_pmr_term_tcp_sport(void) odp_cos_destroy(cos); odp_cos_destroy(default_cos); odp_pmr_destroy(pmr); - destroy_inq(pktio); odp_pool_destroy(default_pool); odp_pool_destroy(pool); odp_queue_destroy(queue); @@ -380,8 +341,6 @@ void classification_test_pmr_term_udp_dport(void) pktio = create_pktio(ODP_QUEUE_TYPE_SCHED); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); - CU_ASSERT(retval == 0); configure_default_cos(pktio, &default_cos, &default_queue, &default_pool); @@ -452,7 +411,6 @@ void classification_test_pmr_term_udp_dport(void) odp_cos_destroy(cos); odp_cos_destroy(default_cos); odp_pmr_destroy(pmr); - destroy_inq(pktio); odp_queue_destroy(queue); odp_queue_destroy(default_queue); odp_pool_destroy(default_pool); @@ -488,8 +446,6 @@ void classification_test_pmr_term_udp_sport(void) pktio = create_pktio(ODP_QUEUE_TYPE_SCHED); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); - CU_ASSERT(retval == 0); configure_default_cos(pktio, &default_cos, &default_queue, &default_pool); @@ -559,7 +515,6 @@ void classification_test_pmr_term_udp_sport(void) odp_cos_destroy(cos); odp_cos_destroy(default_cos); odp_pmr_destroy(pmr); - destroy_inq(pktio); odp_pool_destroy(default_pool); odp_pool_destroy(pool); odp_queue_destroy(queue); @@ -594,8 +549,6 @@ void classification_test_pmr_term_ipproto(void) pktio = create_pktio(ODP_QUEUE_TYPE_SCHED); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); - CU_ASSERT(retval == 0); configure_default_cos(pktio, &default_cos, &default_queue, &default_pool); @@ -660,7 +613,6 @@ void classification_test_pmr_term_ipproto(void) odp_cos_destroy(default_cos); odp_pmr_destroy(pmr); odp_packet_free(pkt); - destroy_inq(pktio); odp_pool_destroy(default_pool); odp_pool_destroy(pool); odp_queue_destroy(queue); @@ -696,8 +648,6 @@ static void classification_test_pmr_pool_set(void) pktio = create_pktio(ODP_QUEUE_TYPE_SCHED); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); - CU_ASSERT(retval == 0); configure_default_cos(pktio, &default_cos, &default_queue, &default_pool); @@ -754,7 +704,6 @@ static void classification_test_pmr_pool_set(void) odp_cos_destroy(default_cos); odp_pmr_destroy(pmr); odp_packet_free(pkt); - destroy_inq(pktio); odp_pool_destroy(default_pool); odp_pool_destroy(pool); odp_pool_destroy(pool_new); @@ -791,8 +740,6 @@ static void classification_test_pmr_queue_set(void) pktio = create_pktio(ODP_QUEUE_TYPE_SCHED); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); - CU_ASSERT(retval == 0); configure_default_cos(pktio, &default_cos, &default_queue, &default_pool); @@ -849,7 +796,6 @@ static void classification_test_pmr_queue_set(void) odp_cos_destroy(default_cos); odp_pmr_destroy(pmr); odp_packet_free(pkt); - destroy_inq(pktio); odp_pool_destroy(default_pool); odp_pool_destroy(pool); odp_queue_destroy(queue_new);