X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fl3fwd-vf%2Fmain.c;h=572e74cf5d2e39695b2db657bb6c11c538483c7f;hb=d2ceaa7353c4e9ef925a8753bc5e5d13eb7bcbeb;hp=0ef469c299e260ebeee98866a122018cb337ff50;hpb=e73e3547ce54d7ae48dff82d87efac0b7a30692a;p=dpdk.git diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c index 0ef469c299..572e74cf5d 100644 --- a/examples/l3fwd-vf/main.c +++ b/examples/l3fwd-vf/main.c @@ -74,25 +74,6 @@ nb_lcores*MEMPOOL_CACHE_SIZE), \ (unsigned)8192) -/* - * RX and TX Prefetch, Host, and Write-back threshold values should be - * carefully set for optimal performance. Consult the network - * controller's datasheet and supporting DPDK documentation for guidance - * on how these parameters should be set. - */ -#define RX_PTHRESH 8 /**< Default values of RX prefetch threshold reg. */ -#define RX_HTHRESH 8 /**< Default values of RX host threshold reg. */ -#define RX_WTHRESH 4 /**< Default values of RX write-back threshold reg. */ - -/* - * These default values are optimized for use with the Intel(R) 82599 10 GbE - * Controller and the DPDK ixgbe PMD. Consider using other values for other - * network controllers and/or network drivers. - */ -#define TX_PTHRESH 36 /**< Default values of TX prefetch threshold reg. */ -#define TX_HTHRESH 0 /**< Default values of TX host threshold reg. */ -#define TX_WTHRESH 0 /**< Default values of TX write-back threshold reg. */ - #define MAX_PKT_BURST 32 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */ @@ -201,10 +182,10 @@ struct l3fwd_route { }; static struct l3fwd_route l3fwd_route_array[] = { - {{RTE_IPv4(100,10,0,1), RTE_IPv4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0}, - {{RTE_IPv4(100,20,0,2), RTE_IPv4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1}, - {{RTE_IPv4(100,30,0,3), RTE_IPv4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2}, - {{RTE_IPv4(100,40,0,4), RTE_IPv4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3}, + {{RTE_IPV4(100,10,0,1), RTE_IPV4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0}, + {{RTE_IPV4(100,20,0,2), RTE_IPV4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1}, + {{RTE_IPV4(100,30,0,3), RTE_IPV4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2}, + {{RTE_IPV4(100,40,0,4), RTE_IPV4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3}, }; typedef struct rte_hash lookup_struct_t; @@ -234,14 +215,14 @@ struct l3fwd_route { }; static struct l3fwd_route l3fwd_route_array[] = { - {RTE_IPv4(1,1,1,0), 24, 0}, - {RTE_IPv4(2,1,1,0), 24, 1}, - {RTE_IPv4(3,1,1,0), 24, 2}, - {RTE_IPv4(4,1,1,0), 24, 3}, - {RTE_IPv4(5,1,1,0), 24, 4}, - {RTE_IPv4(6,1,1,0), 24, 5}, - {RTE_IPv4(7,1,1,0), 24, 6}, - {RTE_IPv4(8,1,1,0), 24, 7}, + {RTE_IPV4(1,1,1,0), 24, 0}, + {RTE_IPV4(2,1,1,0), 24, 1}, + {RTE_IPV4(3,1,1,0), 24, 2}, + {RTE_IPV4(4,1,1,0), 24, 3}, + {RTE_IPV4(5,1,1,0), 24, 4}, + {RTE_IPV4(6,1,1,0), 24, 5}, + {RTE_IPV4(7,1,1,0), 24, 6}, + {RTE_IPV4(8,1,1,0), 24, 7}, }; #define L3FWD_NUM_ROUTES \ @@ -1041,13 +1022,8 @@ main(int argc, char **argv) fflush(stdout); /* init RX queues */ for(queue = 0; queue < qconf->n_rx_queue; ++queue) { - struct rte_eth_dev *dev; - struct rte_eth_conf *conf; - portid = qconf->rx_queue_list[queue].port_id; queueid = qconf->rx_queue_list[queue].queue_id; - dev = &rte_eth_devices[portid]; - conf = &dev->data->dev_conf; if (numa_on) socketid = (uint8_t)rte_lcore_to_socket_id(lcore_id); @@ -1059,7 +1035,7 @@ main(int argc, char **argv) rte_eth_dev_info_get(portid, &dev_info); rxq_conf = dev_info.default_rxconf; - rxq_conf.offloads = conf->rxmode.offloads; + rxq_conf.offloads = port_conf.rxmode.offloads; ret = rte_eth_rx_queue_setup(portid, queueid, nb_rxd, socketid, &rxq_conf, pktmbuf_pool[socketid]);