From patchwork Fri Aug 28 11:05:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 52788 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 4702E22E8B for ; Fri, 28 Aug 2015 11:07:11 +0000 (UTC) Received: by laboe4 with SMTP id oe4sf2507432lab.3 for ; Fri, 28 Aug 2015 04:07:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=Z1T+54phl2fgVcazdIZ4dCJh2daClr0huvJccR9kUzM=; b=jPGznFHm56pggWHvIdGZgpc7Vad1oqQp1xNge4JFduEv6qe23y1fQtsZdYpKbC+IR3 2KxWb51208hdJtWOsN+BUWX0ZMqU4AFE64TkbxIs5yoz1vYZTHrN62c/PxwQOb4y5m6F GwcxvUBS8xOU5EjoaSjsWRrP5CEtv7Z5NVQkR1EY4zSxbcNwYK5r3LU9VJK4+k1uqGPx feWSClIEJ9pqrt3xdzKgdoBcAmgjUDpU44I+mech9jzjqRnDoLsIK9GJV8E7DYXFkmcO lF2RziFnzjTav46Cln2jdP1QnsfQT8PpBYI/z1PPQ5NOH85oJWaaHxTzVr8h+ldQ1yKK 4IkQ== X-Gm-Message-State: ALoCoQl6fWb+AsexESEMS+V0J21v+kPC/hFe335VVNA0EERZ4n0KIXjyfu6wU6Qv7jHJBEQVA1J8 X-Received: by 10.180.82.101 with SMTP id h5mr1003436wiy.1.1440760030259; Fri, 28 Aug 2015 04:07:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.38 with SMTP id lt6ls194864lac.50.gmail; Fri, 28 Aug 2015 04:07:09 -0700 (PDT) X-Received: by 10.152.36.161 with SMTP id r1mr4484385laj.82.1440760029983; Fri, 28 Aug 2015 04:07:09 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id r1si5454318lar.2.2015.08.28.04.07.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2015 04:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by laboe4 with SMTP id oe4so4261008lab.0 for ; Fri, 28 Aug 2015 04:07:09 -0700 (PDT) X-Received: by 10.152.36.102 with SMTP id p6mr4470665laj.19.1440760029782; Fri, 28 Aug 2015 04:07:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.151.194 with SMTP id us2csp455222lbb; Fri, 28 Aug 2015 04:07:09 -0700 (PDT) X-Received: by 10.50.4.67 with SMTP id i3mr2958459igi.32.1440760028887; Fri, 28 Aug 2015 04:07:08 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c19si1900021igr.84.2015.08.28.04.07.07; Fri, 28 Aug 2015 04:07:08 -0700 (PDT) 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; Received: by lists.linaro.org (Postfix, from userid 109) id 934E961A29; Fri, 28 Aug 2015 11:07:07 +0000 (UTC) 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 CA57661B3C; Fri, 28 Aug 2015 11:05:59 +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 A95AE61A43; Fri, 28 Aug 2015 11:05:55 +0000 (UTC) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by lists.linaro.org (Postfix) with ESMTPS id 5558E619B3 for ; Fri, 28 Aug 2015 11:05:54 +0000 (UTC) Received: by wibgu7 with SMTP id gu7so5956337wib.1 for ; Fri, 28 Aug 2015 04:05:53 -0700 (PDT) X-Received: by 10.180.218.66 with SMTP id pe2mr3957753wic.69.1440759953612; Fri, 28 Aug 2015 04:05:53 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id i6sm7505091wje.33.2015.08.28.04.05.52 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Aug 2015 04:05:53 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Fri, 28 Aug 2015 12:05:40 +0100 Message-Id: <1440759940-17679-4-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440759940-17679-1-git-send-email-zoltan.kiss@linaro.org> References: <1440759940-17679-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v8 3/3] validation: packet: test flow hash X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoltan.kiss@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Set the max value, check if it is maintained, then clear the flag. Signed-off-by: Zoltan Kiss --- v8: adjust to newer API definition test/validation/packet/packet.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/validation/packet/packet.c b/test/validation/packet/packet.c index 97ffd14..18e3b59 100644 --- a/test/validation/packet/packet.c +++ b/test/validation/packet/packet.c @@ -161,6 +161,12 @@ void packet_test_basic_metadata(void) CU_ASSERT(odp_packet_pool(pkt) != ODP_POOL_INVALID); /* Packet was allocated by application so shouldn't have valid pktio. */ CU_ASSERT(odp_packet_input(pkt) == ODP_PKTIO_INVALID); + + odp_packet_flow_hash_set(pkt, UINT32_MAX); + CU_ASSERT(odp_packet_has_flow_hash(pkt)); + CU_ASSERT(odp_packet_flow_hash(pkt) == UINT32_MAX); + odp_packet_has_flow_hash_clr(pkt); + CU_ASSERT(!odp_packet_has_flow_hash(pkt)); } void packet_test_length(void)