remove extra parentheses in return statement
[dpdk.git] / examples / ip_reassembly / main.c
index f1c47ad..262820e 100644 (file)
@@ -304,7 +304,7 @@ send_burst(struct lcore_queue_conf *qconf, uint32_t thresh, uint8_t port)
                        txmb->tail = 0;
        }
 
-       return (fill);
+       return fill;
 }
 
 /* Enqueue a single packet, and send burst if queue is filled */
@@ -335,7 +335,7 @@ send_single_packet(struct rte_mbuf *m, uint8_t port)
        if(++txmb->head == len)
                txmb->head = 0;
 
-       return (0);
+       return 0;
 }
 
 static inline void
@@ -356,11 +356,7 @@ reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue,
        dst_port = portid;
 
        /* if packet is IPv4 */
-#ifdef RTE_NEXT_ABI
        if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
-#else
-       if (m->ol_flags & (PKT_RX_IPV4_HDR)) {
-#endif
                struct ipv4_hdr *ip_hdr;
                uint32_t ip_dst;
 
@@ -400,14 +396,8 @@ reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue,
                }
 
                eth_hdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4);
-#ifdef RTE_NEXT_ABI
        } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
                /* if packet is IPv6 */
-#else
-       }
-       /* if packet is IPv6 */
-       else if (m->ol_flags & (PKT_RX_IPV6_HDR | PKT_RX_IPV6_HDR_EXT)) {
-#endif
                struct ipv6_extension_fragment *frag_hdr;
                struct ipv6_hdr *ip_hdr;
 
@@ -571,13 +561,13 @@ parse_flow_num(const char *str, uint32_t min, uint32_t max, uint32_t *val)
        errno = 0;
        v = strtoul(str, &end, 10);
        if (errno != 0 || *end != '\0')
-               return (-EINVAL);
+               return -EINVAL;
 
        if (v < min || v > max)
-               return (-EINVAL);
+               return -EINVAL;
 
        *val = (uint32_t)v;
-       return (0);
+       return 0;
 }
 
 static int
@@ -593,20 +583,20 @@ parse_flow_ttl(const char *str, uint32_t min, uint32_t max, uint32_t *val)
        errno = 0;
        v = strtoul(str, &end, 10);
        if (errno != 0)
-               return (-EINVAL);
+               return -EINVAL;
 
        if (*end != '\0') {
                if (strncmp(frmt_sec, end, sizeof(frmt_sec)) == 0)
                        v *= MS_PER_S;
                else if (strncmp(frmt_msec, end, sizeof (frmt_msec)) != 0)
-                       return (-EINVAL);
+                       return -EINVAL;
        }
 
        if (v < min || v > max)
-               return (-EINVAL);
+               return -EINVAL;
 
        *val = (uint32_t)v;
-       return (0);
+       return 0;
 }
 
 static int
@@ -699,7 +689,7 @@ parse_args(int argc, char **argv)
                                                optarg,
                                                lgopts[option_index].name);
                                        print_usage(prgname);
-                                       return (ret);
+                                       return ret;
                                }
                        }
 
@@ -712,7 +702,7 @@ parse_args(int argc, char **argv)
                                                optarg,
                                                lgopts[option_index].name);
                                        print_usage(prgname);
-                                       return (ret);
+                                       return ret;
                                }
                        }