X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvmdq_dcb%2Fmain.c;h=83a6843ee5b0f3bc5b1f42add6c761b4f4299c0c;hb=9339a1ec6102e4e018abdc5bc844f617185c1baf;hp=594c4f1959a3f1368d9c35fd3c0d2413b6856660;hpb=70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8;p=dpdk.git diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index 594c4f1959..83a6843ee5 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -424,10 +424,7 @@ parse_portmask(const char *portmask) /* parse hexadecimal string */ pm = strtoul(portmask, &end, 16); if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0')) - return -1; - - if (pm == 0) - return -1; + return 0; return pm; } @@ -582,7 +579,7 @@ lcore_main(void *arg) for (;;) { struct rte_mbuf *buf[MAX_PKT_BURST]; - const uint16_t buf_size = sizeof(buf) / sizeof(buf[0]); + const uint16_t buf_size = RTE_DIM(buf); for (p = 0; p < num_ports; p++) { const uint8_t src = ports[p]; const uint8_t dst = ports[p ^ 1]; /* 0 <-> 1, 2 <-> 3 etc */