From patchwork Fri Mar 20 18:14:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 46151 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5397F21418 for ; Fri, 20 Mar 2015 18:14:31 +0000 (UTC) Received: by labgq15 with SMTP id gq15sf18800738lab.0 for ; Fri, 20 Mar 2015 11:14:30 -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:from:to:date:message-id:cc: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=4o2vXfOSYoqHXSlV/Cf16CIomJutm2YCGvpy1dk4SPI=; b=l/f67NW5B8uE8DTlOk4q1UwX3Fx3MFWHw6Zxr25yJ/7nETRtNcdcLpiorUIak55KdO 7ZEoYPxd5I3yxniRU2aNxtVQR4FVpuSW4XXtJNwRLsm4+Lq59S6YwOVaRoOjZ9Killj9 nKNwQTJyIYnpvPfk4gH4Qg/3O4C5DB6sehhVZeR/YuRSMZw4q8pqV5tvLWGNrtYcbSIf n+tll9Lmf2e8VGyobqB1RF7Q9ygCnQsvu1eFZ0ztLu2ziBcVcHurlmZKySvokrn4SVUm OtdR4Var+nNYcle54Okf1hU5Nm5cb3hlDjHcc9qpIyWwCWgP40r5rz7OfYQCl7E0p0BC /M3Q== X-Gm-Message-State: ALoCoQlIsuSh1GbZeDX4OqnPFN6haEKBZTi7kJGM4BPef3gj2nRFLLDRpeLqCL4YalyREzO43AMy X-Received: by 10.112.180.74 with SMTP id dm10mr5725713lbc.11.1426875270365; Fri, 20 Mar 2015 11:14:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.2 with SMTP id iq2ls463921lac.100.gmail; Fri, 20 Mar 2015 11:14:30 -0700 (PDT) X-Received: by 10.112.8.101 with SMTP id q5mr68539103lba.19.1426875270056; Fri, 20 Mar 2015 11:14:30 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id k2si3644177lah.93.2015.03.20.11.14.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Mar 2015 11:14:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by ladw1 with SMTP id w1so93304518lad.0 for ; Fri, 20 Mar 2015 11:14:30 -0700 (PDT) X-Received: by 10.112.25.38 with SMTP id z6mr23524286lbf.106.1426875269948; Fri, 20 Mar 2015 11:14:29 -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.35.133 with SMTP id h5csp209390lbj; Fri, 20 Mar 2015 11:14:29 -0700 (PDT) X-Received: by 10.52.34.70 with SMTP id x6mr5659276vdi.84.1426875265851; Fri, 20 Mar 2015 11:14:25 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id gj9si4413803vdc.102.2015.03.20.11.14.24 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Mar 2015 11:14:25 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YZ1R8-0001nv-Av; Fri, 20 Mar 2015 18:14:22 +0000 Received: from mail-ob0-f173.google.com ([209.85.214.173]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YZ1R2-0001ng-Gx for lng-odp@lists.linaro.org; Fri, 20 Mar 2015 18:14:16 +0000 Received: by obcxo2 with SMTP id xo2so83971389obc.0 for ; Fri, 20 Mar 2015 11:14:11 -0700 (PDT) X-Received: by 10.60.120.36 with SMTP id kz4mr67012246oeb.47.1426875251190; Fri, 20 Mar 2015 11:14:11 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id by10sm2915225oec.8.2015.03.20.11.14.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2015 11:14:10 -0700 (PDT) From: Bill Fischofer To: petri.savolainen@linaro.org Date: Fri, 20 Mar 2015 13:14:02 -0500 Message-Id: <1426875244-23072-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [API-NEXT PATCHv2 1/3] api: packet: use odp_bool_t for packet flag APIs X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@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.51 as permitted sender) smtp.mail=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 This change addresses Bug https://bugs.linaro.org/show_bug.cgi?id=1334 Signed-off-by: Bill Fischofer --- v2 adds doxygen fix to this patch. Petri: Please review this for API conformance. include/odp/api/packet_flags.h | 72 +++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/include/odp/api/packet_flags.h b/include/odp/api/packet_flags.h index b1e179e..ccfb747 100644 --- a/include/odp/api/packet_flags.h +++ b/include/odp/api/packet_flags.h @@ -32,163 +32,163 @@ extern "C" { * Checks all error flags at once. * * @param pkt Packet handle - * @retval 1 packet has errors + * @retval non-zero packet has errors * @retval 0 packet has no errors */ -int odp_packet_has_error(odp_packet_t pkt); +odp_bool_t odp_packet_has_error(odp_packet_t pkt); /** * Check for L2 header, e.g. ethernet * * @param pkt Packet handle - * @retval 1 if packet contains a valid & known L2 header + * @retval non-zero if packet contains a valid & known L2 header * @retval 0 if packet does not contain a valid & known L2 header */ -int odp_packet_has_l2(odp_packet_t pkt); +odp_bool_t odp_packet_has_l2(odp_packet_t pkt); /** * Check for L3 header, e.g. IPv4, IPv6 * * @param pkt Packet handle - * @retval 1 if packet contains a valid & known L3 header + * @retval non-zero if packet contains a valid & known L3 header * @retval 0 if packet does not contain a valid & known L3 header */ -int odp_packet_has_l3(odp_packet_t pkt); +odp_bool_t odp_packet_has_l3(odp_packet_t pkt); /** * Check for L4 header, e.g. UDP, TCP, SCTP (also ICMP) * * @param pkt Packet handle - * @retval 1 if packet contains a valid & known L4 header + * @retval non-zero if packet contains a valid & known L4 header * @retval 0 if packet does not contain a valid & known L4 header */ -int odp_packet_has_l4(odp_packet_t pkt); +odp_bool_t odp_packet_has_l4(odp_packet_t pkt); /** * Check for Ethernet header * * @param pkt Packet handle - * @retval 1 if packet contains a valid eth header + * @retval non-zero if packet contains a valid eth header * @retval 0 if packet does not contain a valid & known eth header */ -int odp_packet_has_eth(odp_packet_t pkt); +odp_bool_t odp_packet_has_eth(odp_packet_t pkt); /** * Check for jumbo frame * * @param pkt Packet handle - * @retval 1 if packet contains a jumbo frame + * @retval non-zero if packet contains a jumbo frame * @retval 0 if packet does not contain a jumbo frame */ -int odp_packet_has_jumbo(odp_packet_t pkt); +odp_bool_t odp_packet_has_jumbo(odp_packet_t pkt); /** * Check for VLAN * * @param pkt Packet handle - * @retval 1 if packet contains a VLAN header + * @retval non-zero if packet contains a VLAN header * @retval 0 if packet does not contain a VLAN header */ -int odp_packet_has_vlan(odp_packet_t pkt); +odp_bool_t odp_packet_has_vlan(odp_packet_t pkt); /** * Check for VLAN QinQ (stacked VLAN) * * @param pkt Packet handle - * @retval 1 if packet contains a VLAN QinQ header + * @retval non-zero if packet contains a VLAN QinQ header * @retval 0 if packet does not contain a VLAN QinQ header */ -int odp_packet_has_vlan_qinq(odp_packet_t pkt); +odp_bool_t odp_packet_has_vlan_qinq(odp_packet_t pkt); /** * Check for ARP * * @param pkt Packet handle - * @retval 1 if packet contains an ARP message + * @retval non-zero if packet contains an ARP message * @retval 0 if packet does not contain an ARP message */ -int odp_packet_has_arp(odp_packet_t pkt); +odp_bool_t odp_packet_has_arp(odp_packet_t pkt); /** * Check for IPv4 * * @param pkt Packet handle - * @retval 1 if packet contains an IPv4 header + * @retval non-zero if packet contains an IPv4 header * @retval 0 if packet does not contain an IPv4 header */ -int odp_packet_has_ipv4(odp_packet_t pkt); +odp_bool_t odp_packet_has_ipv4(odp_packet_t pkt); /** * Check for IPv6 * * @param pkt Packet handle - * @retval 1 if packet contains an IPv6 header + * @retval non-zero if packet contains an IPv6 header * @retval 0 if packet does not contain an IPv6 header */ -int odp_packet_has_ipv6(odp_packet_t pkt); +odp_bool_t odp_packet_has_ipv6(odp_packet_t pkt); /** * Check for IP fragment * * @param pkt Packet handle - * @retval 1 if packet is an IP fragment + * @retval non-zero if packet is an IP fragment * @retval 0 if packet is not an IP fragment */ -int odp_packet_has_ipfrag(odp_packet_t pkt); +odp_bool_t odp_packet_has_ipfrag(odp_packet_t pkt); /** * Check for IP options * * @param pkt Packet handle - * @retval 1 if packet contains IP options + * @retval non-zero if packet contains IP options * @retval 0 if packet does not contain IP options */ -int odp_packet_has_ipopt(odp_packet_t pkt); +odp_bool_t odp_packet_has_ipopt(odp_packet_t pkt); /** * Check for IPSec * * @param pkt Packet handle - * @retval 1 if packet requires IPSec processing + * @retval non-zero if packet requires IPSec processing * @retval 0 if packet does not require IPSec processing */ -int odp_packet_has_ipsec(odp_packet_t pkt); +odp_bool_t odp_packet_has_ipsec(odp_packet_t pkt); /** * Check for UDP * * @param pkt Packet handle - * @retval 1 if packet contains a UDP header + * @retval non-zero if packet contains a UDP header * @retval 0 if packet does not contain a UDP header */ -int odp_packet_has_udp(odp_packet_t pkt); +odp_bool_t odp_packet_has_udp(odp_packet_t pkt); /** * Check for TCP * * @param pkt Packet handle - * @retval 1 if packet contains a TCP header + * @retval non-zero if packet contains a TCP header * @retval 0 if packet does not contain a TCP header */ -int odp_packet_has_tcp(odp_packet_t pkt); +odp_bool_t odp_packet_has_tcp(odp_packet_t pkt); /** * Check for SCTP * * @param pkt Packet handle - * @retval 1 if packet contains a SCTP header + * @retval non-zero if packet contains a SCTP header * @retval 0 if packet does not contain a SCTP header */ -int odp_packet_has_sctp(odp_packet_t pkt); +odp_bool_t odp_packet_has_sctp(odp_packet_t pkt); /** * Check for ICMP * * @param pkt Packet handle - * @retval 1 if packet contains an ICMP header + * @retval non-zero if packet contains an ICMP header * @retval 0 if packet does not contain an ICMP header */ -int odp_packet_has_icmp(odp_packet_t pkt); +odp_bool_t odp_packet_has_icmp(odp_packet_t pkt); /** * Set flag for L2 header, e.g. ethernet