examples/l2fwd: add forwarding port mapping option
[dpdk.git] / examples / l2fwd-event / l2fwd_common.h
index a4e17ab..939221d 100644 (file)
@@ -69,6 +69,7 @@ struct l2fwd_resources {
        uint8_t sched_type;
        uint8_t mac_updating;
        uint8_t rx_queue_per_lcore;
+       bool port_pairs;
        uint16_t nb_rxd;
        uint16_t nb_txd;
        uint32_t enabled_port_mask;
@@ -114,6 +115,7 @@ l2fwd_get_rsrc(void)
 
                memset(rsrc, 0, sizeof(struct l2fwd_resources));
                rsrc->mac_updating = true;
+               rsrc->event_mode = true;
                rsrc->rx_queue_per_lcore = 1;
                rsrc->sched_type = RTE_SCHED_TYPE_ATOMIC;
                rsrc->timer_period = 10 * rte_get_timer_hz();