From patchwork Tue Jan 12 18:11:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 59635 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2893608lbb; Tue, 12 Jan 2016 10:13:37 -0800 (PST) X-Received: by 10.55.80.86 with SMTP id e83mr171051949qkb.91.1452622416851; Tue, 12 Jan 2016 10:13:36 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 53si32886535qgc.0.2016.01.12.10.13.36; Tue, 12 Jan 2016 10:13:36 -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 011AD61740; Tue, 12 Jan 2016 18:13:35 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=Z9UAJSAG; 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 2AF2761737; Tue, 12 Jan 2016 18:12:11 +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 A385D61732; Tue, 12 Jan 2016 18:12:02 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by lists.linaro.org (Postfix) with ESMTPS id 16C59616E8 for ; Tue, 12 Jan 2016 18:12:00 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id 17so37681482lfz.1 for ; Tue, 12 Jan 2016 10:12:00 -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=aFmKzu9RKxXXlFFhq481Cw2aM4CyI3RLimw7l7mF+Z8=; b=Z9UAJSAG8uH1OlVNbV15L8+N11UyCaD/GxtEWu4QogUG8vmYE5v7LUIzolZpTojYst K3bD2LXxh9AlLwdUdN2UFf+gysqA6l5z7dKdheCcA0nJ7vlx/dCLUaxQEw/F0DsL3tq1 M6fUjeSAXc++m6J5Wi/I1MG4Mb8x9TC8pW61g= 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=aFmKzu9RKxXXlFFhq481Cw2aM4CyI3RLimw7l7mF+Z8=; b=VKLgOGjJSqms3SclXaBHdJPhH/Pu/8YxiaAr3TYKnwFzqfPmtPMVmETOTBA+JIetic EJp6786Q7I6tmCmE7lNcoLyAV5ihLOTE6k5k4lG6QPe99Ry4QpYSLAZ6DXREkXkWfkJi +1/OiYnV1U9fyOyzxRowIHcmndUBz24mwT3hmbbBjf/1TM48QegvzdFb3H9RB9vkBWGn M+gerL/cNS7F3hwMeYxJX5PS8IyM1VsZf3qQqAQhJ4oMcKbTWE647KcNDvG4XhO6wtkw snweRmyKGmkHlbxWskR9c2zoicGAmFW60mIKCKQfLc3dVwAGkrAVYURZ9tWfY41p6ivp xevQ== X-Gm-Message-State: ALoCoQn+V9VTzQKNKB7SABO8uD8pdX1h6zh7Ne9PhP8JvBhxMwMvex2ZVFvbnC4LGGbTysPnpJfAprS09icRXaOY+pqzfho4rQ== X-Received: by 10.25.136.139 with SMTP id k133mr11572443lfd.157.1452622319019; Tue, 12 Jan 2016 10:11:59 -0800 (PST) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id o9sm3340536lfe.15.2016.01.12.10.11.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 10:11:58 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Tue, 12 Jan 2016 20:11:44 +0200 Message-Id: <1452622307-18379-3-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 2/5] validation: cls: assign default CoS before creating chain 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 big difference when to assign default CoS to pktio, but in usual case it's done before creating any chain, if it's needed to be also checked it can be done in separate test. Signed-off-by: Ivan Khoronzhuk --- .../classification/odp_classification_test_pmr.c | 35 +++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/test/validation/classification/odp_classification_test_pmr.c b/test/validation/classification/odp_classification_test_pmr.c index 6644b53..75d2a95 100644 --- a/test/validation/classification/odp_classification_test_pmr.c +++ b/test/validation/classification/odp_classification_test_pmr.c @@ -166,6 +166,9 @@ void classification_test_pmr_term_tcp_dport(void) retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); CU_ASSERT(retval == 0); + configure_default_cos(pktio, &default_cos, + &default_queue, &default_pool); + match.term = ODP_PMR_TCP_DPORT; match.val = &val; match.mask = &mask; @@ -193,8 +196,6 @@ void classification_test_pmr_term_tcp_dport(void) retval = odp_pktio_pmr_cos(pmr, pktio, cos); CU_ASSERT(retval == 0); - configure_default_cos(pktio, &default_cos, - &default_queue, &default_pool); pkt = create_packet(pkt_pool, false, &seq, false); CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); seqno = cls_pkt_get_seq(pkt); @@ -275,6 +276,9 @@ void classification_test_pmr_term_tcp_sport(void) retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); CU_ASSERT(retval == 0); + configure_default_cos(pktio, &default_cos, + &default_queue, &default_pool); + match.term = ODP_PMR_TCP_SPORT; match.val = &val; match.mask = &mask; @@ -301,8 +305,6 @@ void classification_test_pmr_term_tcp_sport(void) retval = odp_pktio_pmr_cos(pmr, pktio, cos); CU_ASSERT(retval == 0); - configure_default_cos(pktio, &default_cos, - &default_queue, &default_pool); pkt = create_packet(pkt_pool, false, &seq, false); CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); seqno = cls_pkt_get_seq(pkt); @@ -381,6 +383,9 @@ void classification_test_pmr_term_udp_dport(void) retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); CU_ASSERT(retval == 0); + configure_default_cos(pktio, &default_cos, + &default_queue, &default_pool); + match.term = ODP_PMR_UDP_DPORT; match.val = &val; match.mask = &mask; @@ -407,8 +412,6 @@ void classification_test_pmr_term_udp_dport(void) retval = odp_pktio_pmr_cos(pmr, pktio, cos); CU_ASSERT(retval == 0); - configure_default_cos(pktio, &default_cos, - &default_queue, &default_pool); pkt = create_packet(pkt_pool, false, &seq, true); CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); seqno = cls_pkt_get_seq(pkt); @@ -488,6 +491,9 @@ void classification_test_pmr_term_udp_sport(void) retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); CU_ASSERT(retval == 0); + configure_default_cos(pktio, &default_cos, + &default_queue, &default_pool); + match.term = ODP_PMR_UDP_SPORT; match.val = &val; match.mask = &mask; @@ -514,8 +520,6 @@ void classification_test_pmr_term_udp_sport(void) retval = odp_pktio_pmr_cos(pmr, pktio, cos); CU_ASSERT(retval == 0); - configure_default_cos(pktio, &default_cos, - &default_queue, &default_pool); pkt = create_packet(pkt_pool, false, &seq, true); CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); seqno = cls_pkt_get_seq(pkt); @@ -593,6 +597,9 @@ void classification_test_pmr_term_ipproto(void) retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); CU_ASSERT(retval == 0); + configure_default_cos(pktio, &default_cos, + &default_queue, &default_pool); + match.term = ODP_PMR_IPPROTO; match.val = &val; match.mask = &mask; @@ -619,8 +626,6 @@ void classification_test_pmr_term_ipproto(void) retval = odp_pktio_pmr_cos(pmr, pktio, cos); CU_ASSERT(retval == 0); - configure_default_cos(pktio, &default_cos, - &default_queue, &default_pool); pkt = create_packet(pkt_pool, false, &seq, true); CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); seqno = cls_pkt_get_seq(pkt); @@ -694,6 +699,9 @@ static void classification_test_pmr_pool_set(void) retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); CU_ASSERT(retval == 0); + configure_default_cos(pktio, &default_cos, + &default_queue, &default_pool); + match.term = ODP_PMR_IPPROTO; match.val = &val; match.mask = &mask; @@ -727,8 +735,6 @@ static void classification_test_pmr_pool_set(void) retval = odp_pktio_pmr_cos(pmr, pktio, cos); CU_ASSERT(retval == 0); - configure_default_cos(pktio, &default_cos, - &default_queue, &default_pool); pkt = create_packet(pkt_pool, false, &seq, true); CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); seqno = cls_pkt_get_seq(pkt); @@ -788,6 +794,9 @@ static void classification_test_pmr_queue_set(void) retval = create_default_inq(pktio, ODP_QUEUE_TYPE_SCHED); CU_ASSERT(retval == 0); + configure_default_cos(pktio, &default_cos, + &default_queue, &default_pool); + match.term = ODP_PMR_IPPROTO; match.val = &val; match.mask = &mask; @@ -821,8 +830,6 @@ static void classification_test_pmr_queue_set(void) retval = odp_pktio_pmr_cos(pmr, pktio, cos); CU_ASSERT(retval == 0); - configure_default_cos(pktio, &default_cos, - &default_queue, &default_pool); pkt = create_packet(pkt_pool, false, &seq, true); CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); seqno = cls_pkt_get_seq(pkt);