/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "main.h"
/* basic constants used in application */
-#define SOCKET0 0
-#define SOCKET1 1
-
#define NUM_QUEUES 128
#define NUM_MBUFS 64*1024
/* empty vmdq+dcb configuration structure. Filled in programatically */
static const struct rte_eth_conf vmdq_dcb_conf_default = {
.rxmode = {
- .mq_mode = ETH_VMDQ_DCB,
+ .mq_mode = ETH_MQ_RX_VMDQ_DCB,
.split_hdr_size = 0,
.header_split = 0, /**< Header Split disabled */
.hw_ip_checksum = 0, /**< IP checksum offload disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
},
.txmode = {
- .mq_mode = ETH_DCB_NONE,
+ .mq_mode = ETH_MQ_TX_NONE,
},
.rx_adv_conf = {
/*
for (q = 0; q < rxRings; q ++) {
retval = rte_eth_rx_queue_setup(port, q, rxRingSize,
- SOCKET0, &rx_conf_default,
+ rte_eth_dev_socket_id(port), &rx_conf_default,
mbuf_pool);
if (retval < 0)
return retval;
for (q = 0; q < txRings; q ++) {
retval = rte_eth_tx_queue_setup(port, q, txRingSize,
- SOCKET0, &tx_conf_default);
+ rte_eth_dev_socket_id(port), &tx_conf_default);
if (retval < 0)
return retval;
}
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init, NULL,
rte_pktmbuf_init, NULL,
- SOCKET0, 0);
+ rte_socket_id(), 0);
if (mbuf_pool == NULL)
rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");