diff options
author | Damjan Marion <damarion@cisco.com> | 2016-06-06 13:21:04 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-06-06 13:29:30 +0200 |
commit | 39da6211a3371cee46642602f6d16b4afba37f83 (patch) | |
tree | e04e0de62fe2317ad4719877283258af5d832913 /vnet/vnet/devices/dpdk/init.c | |
parent | 3535222f979742d65c28a312d415aa6831f816d6 (diff) |
Add startup conf options to set per-interface descriptor ring size
This patch introduces following 2 startup options:
num-rx-desc
num-tx-desc
Which can be specified under the dpdk { dev PCI_ADDR {...} } or
dpdk { dev default {...} } .
"show hardware" output is extended to display what is set:
TenGigabitEthernet2/0/0 5 down TenGigabitEthernet2/0/0
Ethernet address 90:e2:ba:96:d0:54
Intel 82599
carrier up full duplex speed 10000 mtu 9216
rx queues 2, rx desc 512, tx queues 2, tx desc 1024
cpu socket 0
Change-Id: Ia832885c8e5cf0eb0575367e97581e7065934753
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/devices/dpdk/init.c')
-rw-r--r-- | vnet/vnet/devices/dpdk/init.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c index 58e16ee71e0..b49c405504c 100644 --- a/vnet/vnet/devices/dpdk/init.c +++ b/vnet/vnet/devices/dpdk/init.c @@ -504,7 +504,11 @@ dpdk_lib_init (dpdk_main_t * dm) xd->port_type = VNET_DPDK_PORT_TYPE_NETMAP; } #endif + if (devconf->num_rx_desc) + xd->nb_rx_desc = devconf->num_rx_desc; + if (devconf->num_tx_desc) + xd->nb_tx_desc = devconf->num_tx_desc; } /* @@ -871,7 +875,11 @@ dpdk_device_config (dpdk_config_main_t * conf, vlib_pci_addr_t pci_addr, unforma { if (unformat (input, "num-rx-queues %u", &devconf->num_rx_queues)) ; - if (unformat (input, "num-tx-queues %u", &devconf->num_tx_queues)) + else if (unformat (input, "num-tx-queues %u", &devconf->num_tx_queues)) + ; + else if (unformat (input, "num-rx-desc %u", &devconf->num_rx_desc)) + ; + else if (unformat (input, "num-tx-desc %u", &devconf->num_tx_desc)) ; else { |