I have configured 8 multiple queues on my CentOS VM box (running on KVM).
<interface type='direct' trustGuestRxFilters='yes'> <source dev='ens113f0' mode='passthrough'/> <model type='virtio'/> <driver name='vhost' queues='8'/>
</interface>I can find 8 queues are created on VM using ethtool.
[centos@vm ~]$ ethtool -l eth1
Channel parameters for eth1:
Pre-set maximums:
RX: 0
TX: 0
Other: 0
Combined: 8
Current hardware settings:
RX: 0
TX: 0
Other: 0
Combined: 4Now, I wanted to restrict 1 RX queue and 2 TX queues for my DPDK application. I am trying to set the same using ethtool but it is throwing below error:
[centos@vm ~]$ sudo ethtool -L eth1 rx 1 tx 2
Cannot set device channel parameters: Invalid argumentI can set combined queues = 2 but not specific RX / TX queues.
[centos@vm ~]$ sudo ethtool -L eth1 combined 2
[centos@vm ~]$ ethtool -l eth1
Channel parameters for eth1:
Pre-set maximums:
RX: 0
TX: 0
Other: 0
Combined: 8
Current hardware settings:
RX: 0
TX: 0
Other: 0
Combined: 2Any reason / justification of it??
Is there any other way I can set RX queues and TX queues in linux?
Is there any way I can specify RX & TX queues size in libvirt XML / Qemu command? I googled it before posting this question but couldn't find anything.
Thank you.
1 Answer
DPDK RX-TX configuration is controlled by using rte_eth_dev_configure. Hence it only makes sense to bind the NIC to igb_uio, uio_pci_generic or vfio-pci and execute the configure API with apt number of RX and TX queue. Setting from ethtool is incorrect for DPDK port.