New upstream version 17.11-rc3
[deb_dpdk.git] / examples / quota_watermark / qw / init.c
index 083a37a..37b0362 100644 (file)
@@ -73,7 +73,7 @@ static struct rte_eth_fc_conf fc_conf = {
 };
 
 
-void configure_eth_port(uint8_t port_id)
+void configure_eth_port(uint16_t port_id)
 {
        int ret;
        uint16_t nb_rxd = RX_DESC_PER_QUEUE;
@@ -135,7 +135,7 @@ init_dpdk(void)
                rte_exit(EXIT_FAILURE, "Not enough ethernet port available\n");
 }
 
-void init_ring(int lcore_id, uint8_t port_id)
+void init_ring(int lcore_id, uint16_t port_id)
 {
        struct rte_ring *ring;
        char ring_name[RTE_RING_NAMESIZE];
@@ -156,12 +156,12 @@ void init_ring(int lcore_id, uint8_t port_id)
 void
 pair_ports(void)
 {
-       uint8_t i, j;
+       uint16_t i, j;
 
        /* Pair ports with their "closest neighbour" in the portmask */
        for (i = 0; i < RTE_MAX_ETHPORTS; i++)
                if (is_bit_set(i, portmask))
-                       for (j = (uint8_t) (i + 1); j < RTE_MAX_ETHPORTS; j++)
+                       for (j = i + 1; j < RTE_MAX_ETHPORTS; j++)
                                if (is_bit_set(j, portmask)) {
                                        port_pairs[i] = j;
                                        port_pairs[j] = i;