Reviewed-by: Petri Savolainen <[email protected]>

> -----Original Message-----
> From: [email protected] [mailto:lng-odp-
> [email protected]] On Behalf Of ext Bill Fischofer
> Sent: Thursday, March 26, 2015 6:07 PM
> To: [email protected]
> Subject: [lng-odp] [API-NEXT PATCHv3] api: packet: relax return code to
> use non-zero for true
> 
> This change addresses Bug https://bugs.linaro.org/show_bug.cgi?id=1334
> 
> Signed-off-by: Bill Fischofer <[email protected]>
> ---
> 
> 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(-)
> 
> 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);
> --
> 2.1.0
> 
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to