...
 
Commits (5)
......@@ -47,17 +47,17 @@ void QueueDevice::static_initialize() {
}
Args& QueueDevice::parse(Args &args) {
args.read_p("QUEUE", firstqueue)
.read("N_QUEUES",n_queues)
.read("MAXTHREADS", _maxthreads)
.read("BURST", _burst)
.read("VERBOSE", _verbose)
.read("ACTIVE", _active)
.read("ALLOW_NONEXISTENT", allow_nonexistent);
args.read_p("QUEUE", firstqueue)
.read("N_QUEUES",n_queues)
.read("MAXTHREADS", _maxthreads)
.read("BURST", _burst)
.read("VERBOSE", _verbose)
.read("ACTIVE", _active)
.read("ALLOW_NONEXISTENT", allow_nonexistent);
n_elements ++;
n_elements ++;
return args;
return args;
}
Args& RXQueueDevice::parse(Args &args) {
......@@ -76,9 +76,9 @@ Args& RXQueueDevice::parse(Args &args) {
_set_paint_anno = false;
args.read("RSS_AGGREGATE", _set_rss_aggregate)
.read("PAINT_QUEUE", _set_paint_anno)
.read("NUMA", _use_numa)
.read("THREADOFFSET", _threadoffset);
.read("PAINT_QUEUE", _set_paint_anno)
.read("NUMA", _use_numa)
.read("THREADOFFSET", _threadoffset);
#if !HAVE_NUMA
if (_use_numa) {
......@@ -90,13 +90,13 @@ Args& RXQueueDevice::parse(Args &args) {
}
Args& TXQueueDevice::parse(Args &args, ErrorHandler* errh) {
QueueDevice::parse(args);
args.read("IQUEUE", _internal_tx_queue_size)
.read("BLOCKING", _blocking);
if ((_internal_tx_queue_size & (_internal_tx_queue_size - 1)) != 0) {
errh->error("IQUEUE must be a power of 2");
}
return args;
QueueDevice::parse(args);
args.read("IQUEUE", _internal_tx_queue_size)
.read("BLOCKING", _blocking);
if ((_internal_tx_queue_size & (_internal_tx_queue_size - 1)) != 0) {
errh->error("IQUEUE must be a power of 2");
}
return args;
}
int RXQueueDevice::configure_rx(int numa_node, int minqueues, int maxqueues, ErrorHandler *) {
......
......@@ -47,6 +47,7 @@ int ToDPDKDevice::configure(Vector<String> &conf, ErrorHandler *errh)
.read_mp("PORT", dev), errh)
.read("TIMEOUT", _timeout)
.read("NDESC",ndesc)
.read("MAXQUEUES", maxqueues)
.complete() < 0)
return -1;
if (!DPDKDeviceArg::parse(dev, _dev)) {
......
......@@ -263,10 +263,14 @@ int DPDKDevice::initialize_device(ErrorHandler *errh)
}
if (info.rx_queues.size() > dev_info.max_rx_queues) {
return errh->error("Port %d can only use %d RX queues, use MAXQUEUES to set the maximum number of queues or N_QUEUES to strictly define it.");
return errh->error("Port %d can only use %d RX queues (asked for %d), use MAXQUEUES to set the maximum "
"number of queues or N_QUEUES to strictly define it.", port_id, dev_info.max_rx_queues, info.rx_queues.size());
}
if (info.tx_queues.size() > dev_info.max_tx_queues) {
return errh->error("Port %d can only use %d TX queues, use MAXQUEUES to set the maximum number of queues or N_QUEUES to strictly define it.");
return errh->error("Port %d can only use %d TX queues (FastClick asked for %d, probably to serve that same amount of threads).\n"
"Add the argument \"MAXQUEUES %d\" to the corresponding ToDPDKDevice to set the maximum "
"number of queues to %d or \"N_QUEUES %d\" to strictly define it. "
"If the TX device has more threads than queues due to this parameter change, it will automatically rely on locking to share the queues as evenly as possible between the threads.", port_id, dev_info.max_tx_queues, info.tx_queues.size(), dev_info.max_tx_queues, dev_info.max_tx_queues, dev_info.max_tx_queues);
}
if (info.n_rx_descs < dev_info.rx_desc_lim.nb_min || info.n_rx_descs > dev_info.rx_desc_lim.nb_max) {
......