X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fparser.c;h=fb0769fe370960ef3057169c9f59d72e7c47613c;hb=383fb5a9c7f86931720a389335268b32fb9373a5;hp=4777f9ffd832492f821f3127f369b6fb00bc27ad;hpb=6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1;p=dpdk.git diff --git a/examples/ip_pipeline/parser.c b/examples/ip_pipeline/parser.c index 4777f9ffd8..fb0769fe37 100644 --- a/examples/ip_pipeline/parser.c +++ b/examples/ip_pipeline/parser.c @@ -518,7 +518,7 @@ my_ether_aton(const char *a) { int i; char *end; - unsigned long o[ETHER_ADDR_LEN]; + unsigned long o[RTE_ETHER_ADDR_LEN]; static struct rte_ether_addr ether_addr; i = 0; @@ -528,21 +528,21 @@ my_ether_aton(const char *a) if (errno != 0 || end == a || (end[0] != ':' && end[0] != 0)) return NULL; a = end + 1; - } while (++i != sizeof(o) / sizeof(o[0]) && end[0] != 0); + } while (++i != RTE_DIM(o) && end[0] != 0); /* Junk at the end of line */ if (end[0] != 0) return NULL; /* Support the format XX:XX:XX:XX:XX:XX */ - if (i == ETHER_ADDR_LEN) { + if (i == RTE_ETHER_ADDR_LEN) { while (i-- != 0) { if (o[i] > UINT8_MAX) return NULL; ether_addr.addr_bytes[i] = (uint8_t)o[i]; } /* Support the format XXXX:XXXX:XXXX */ - } else if (i == ETHER_ADDR_LEN / 2) { + } else if (i == RTE_ETHER_ADDR_LEN / 2) { while (i-- != 0) { if (o[i] > UINT16_MAX) return NULL;