From patchwork Thu Mar 26 16:07:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 46368 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D3C1121585 for ; Thu, 26 Mar 2015 16:07:35 +0000 (UTC) Received: by wghr3 with SMTP id r3sf5680423wgh.0 for ; Thu, 26 Mar 2015 09:07:35 -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: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=okblji59midOvA6U4ZCR+h0w9nQXVY2E2Qwca5f0Yag=; b=E9K+DaL7P+Rz4lsekeFYnAJDM4BdozOGCy4KCgjoty+4sesuZlmAbKnX0dMkw2PH+Z +6NrGqufvT2DjjSCvdrTDGfhV8YKaoGxfg0jsps/aY5tsPk/7YYqEGjMPiJD/PleZCVZ kCD3BaUm052zK/r/WGhSD5PxxDSJVT2uEmUu6whUPENgvvc/sdQs417tvCGUSEDcrXuH C64rUMKYh1rS/NeBFV1onNT4jRy+gqW4cKfe57KUqYQHMDpTTHO8hp8g1b0ZIHBLNEWI 0Y4RoL1gSiyq3n2VN5zt06eeRVBxRipyba8zYopBYb1rxPVTaVCNZNKXX8gW+AyTRVJ3 odxA== X-Gm-Message-State: ALoCoQl1ZBDvpU6HCew0bimNNGFVITguPqyM6702r7UEqSy8BlBQOYQGPEjaRgt9MyypGo0MSmqb X-Received: by 10.152.8.73 with SMTP id p9mr3545765laa.6.1427386055107; Thu, 26 Mar 2015 09:07:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.181.5 with SMTP id ds5ls289512lac.20.gmail; Thu, 26 Mar 2015 09:07:34 -0700 (PDT) X-Received: by 10.112.51.35 with SMTP id h3mr13701867lbo.113.1427386054757; Thu, 26 Mar 2015 09:07:34 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id y3si4944638laj.9.2015.03.26.09.07.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 09:07:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbcmq2 with SMTP id mq2so44563697lbc.0 for ; Thu, 26 Mar 2015 09:07:34 -0700 (PDT) X-Received: by 10.112.25.38 with SMTP id z6mr14022654lbf.106.1427386054597; Thu, 26 Mar 2015 09:07:34 -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.57.201 with SMTP id k9csp704329lbq; Thu, 26 Mar 2015 09:07:33 -0700 (PDT) X-Received: by 10.52.81.1 with SMTP id v1mr778668vdx.96.1427386052702; Thu, 26 Mar 2015 09:07:32 -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 gv10si7616189vdc.64.2015.03.26.09.07.30 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Mar 2015 09:07:32 -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 1YbAJc-0007m6-65; Thu, 26 Mar 2015 16:07:28 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YbAJW-0007lz-7O for lng-odp@lists.linaro.org; Thu, 26 Mar 2015 16:07:22 +0000 Received: by obdfc2 with SMTP id fc2so49482416obd.3 for ; Thu, 26 Mar 2015 09:07:16 -0700 (PDT) X-Received: by 10.60.68.20 with SMTP id r20mr12527214oet.26.1427386036821; Thu, 26 Mar 2015 09:07:16 -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 x135sm4664255oix.25.2015.03.26.09.07.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 09:07:16 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 26 Mar 2015 11:07:11 -0500 Message-Id: <1427386031-3135-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv3] api: packet: relax return code to use non-zero for true 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.217.175 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 --- Note that for v3 this patch is split. The test change doe not affect the ODP API and hence can be merged as part of the next ODP maintenance release. The API change (just doxygen) is posted to API-NEXT for inclusion in the next API update release. include/odp/api/packet_flags.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) -- 2.1.0 diff --git a/include/odp/api/packet_flags.h b/include/odp/api/packet_flags.h index b1e179e..bfbcc94 100644 --- a/include/odp/api/packet_flags.h +++ b/include/odp/api/packet_flags.h @@ -32,7 +32,7 @@ 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); @@ -41,7 +41,7 @@ int 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); @@ -50,7 +50,7 @@ int 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); @@ -59,7 +59,7 @@ int 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); @@ -68,7 +68,7 @@ int 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); @@ -77,7 +77,7 @@ int 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); @@ -86,7 +86,7 @@ int 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); @@ -95,7 +95,7 @@ int 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); @@ -104,7 +104,7 @@ int 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); @@ -113,7 +113,7 @@ int 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); @@ -122,7 +122,7 @@ int 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); @@ -131,7 +131,7 @@ int 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); @@ -140,7 +140,7 @@ int 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); @@ -149,7 +149,7 @@ int 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); @@ -158,7 +158,7 @@ int 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); @@ -167,7 +167,7 @@ int 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); @@ -176,7 +176,7 @@ int 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); @@ -185,7 +185,7 @@ int 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);