<div dir="ltr">Thanks Bing for quick response.<div><br></div><div>The virtio driver version 1.0.0 is included in the Linux kernel version 4.9 that powers VM.<br><br>ethtool -i eth1<br>driver: virtio_net<br>version: 1.0.0<br>firmware-version:<br>expansion-rom-version:<br>bus-info: 0000:00:04.0<br><br>Nutanix document stats that "Ensure the AHV UVM is running the latest Nutanix VirtIO driver package. Nutanix VirtIO 1.1.6 or higher is required for RSS support. " Linux kernel version: 5.4 and later will have Virtio 1.1.6.<br><br>Since the programme is built on the dpdk, the PMD driver will use the eth interface rather than the one that the kernel provides. I apologise if I'm mistaken. RSS is supported by the dpdk PMD version in use. <br><br>Because of the client-centric nature of this application, upgrading the kernel will be challenging. <br><br>Do you believe that the only option is to upgrade the vm kernel version?</div><div><br></div><div>Thanks ,</div><div>Shiv <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 26, 2023 at 12:33 PM Bing Zhao <<a href="mailto:bingz@nvidia.com">bingz@nvidia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg3660181322120527484">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_3660181322120527484WordSection1">
<p class="MsoNormal">IIRC, the “VIRTIO_NET_F_RSS” is some capability reported and decided during the driver setup/communication stage. It is mostly like that your libs/drivers running on the host for the VM does not support this feature.<u></u><u></u></p>
<p class="MsoNormal">Have you tried to update the versions of VM or the package/lib of VirtIO for this VM?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> shiv chittora <<a href="mailto:shiv.chittora@gmail.com" target="_blank">shiv.chittora@gmail.com</a>> <br>
<b>Sent:</b> Wednesday, July 26, 2023 1:05 PM<br>
<b>To:</b> <a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a><br>
<b>Subject:</b> Enable RSS for virtio application ( dpdk version 21.11)<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<table border="1" cellpadding="0" style="background:rgb(255,235,156)">
<tbody>
<tr>
<td style="padding:0.75pt">
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:Verdana,sans-serif;color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt;font-family:Verdana,sans-serif;color:black">
</span><u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">I'm using a Nutanix virtual machine to run a DPDK(Version 21.11)-based application.
<br>
Application is failing during rte_eth_dev_configure . For our application, RSS support is required.
<br>
<br>
eth_config.rxmode.mq_mode = ETH_MQ_RX_RSS;<br>
static uint8_t hashKey[] = {<br>
            0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,<br>
            0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,<br>
            0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,<br>
            0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,<br>
            0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,<br>
        };<br>
<br>
        eth_config.rx_adv_conf.rss_conf.rss_key = hashKey;<br>
        eth_config.rx_adv_conf.rss_conf.rss_key_len = sizeof(hashKey);<br>
eth_config.rx_adv_conf.rss_conf.rss_hf = 260 <br>
<br>
<br>
<br>
With the aforementioned RSS configuration, the application is not coming up. The same application runs without any issues on a VMware virtual machine.  <br>
<br>
When I set <br>
<br>
    eth_config.rxmode.mq_mode = ETH_MQ_RX_NONE<br>
eth_config.rx_adv_conf.rss_conf.rss_hf = 0<br>
<br>
Application starts working fine. Since we need RSS support for our application I cannot set eth_config.rxmode.mq_mode = ETH_MQ_RX_NONE.
<br>
<br>
I looked at the DPDK 21.11 release notes, and it mentions that virtio_net supports RSS support.
<br>
<br>
<br>
In this application traffic is tapped to capture port. I have also created two queues using ACLI comments.  <br>
<br>
<acropolis> vm.nic_create nutms1-ms type=kNetworkFunctionNic network_function_nic_type=kTap queues=2<br>
<br>
<acropolis> vm.nic_get testvm<br>
xx:xx:xx:xx:xx:xx {<br>
  mac_addr: "xx:xx:xx:xx:xx:xx"<br>
  network_function_nic_type: "kTap"<br>
  network_type: "kNativeNetwork"<br>
  queues: 2<br>
  type: "kNetworkFunctionNic"<br>
  uuid: "9c26c704-bcb3-4483-bdaf-4b64bb9233ef"<br>
} <br>
<br>
<br>
Additionally, I've turned on dpdk logging. PFB the dpdk log's output. <br>
<br>
EAL: PCI device 0000:00:05.0 on NUMA socket 0<br>
EAL:   probe driver: 1af4:1000 net_virtio<br>
EAL: Probe PCI driver: net_virtio (1af4:1000) device: 0000:00:05.0 (socket 0)<br>
EAL:   PCI memory mapped at 0x940000000<br>
EAL:   PCI memory mapped at 0x940001000<br>
virtio_read_caps(): [98] skipping non VNDR cap id: 11<br>
virtio_read_caps(): [84] cfg type: 5, bar: 0, offset: 0000, len: 0<br>
virtio_read_caps(): [70] cfg type: 2, bar: 4, offset: 3000, len: 4096<br>
virtio_read_caps(): [60] cfg type: 4, bar: 4, offset: 2000, len: 4096<br>
virtio_read_caps(): [50] cfg type: 3, bar: 4, offset: 1000, len: 4096<br>
virtio_read_caps(): [40] cfg type: 1, bar: 4, offset: 0000, len: 4096<br>
virtio_read_caps(): found modern virtio pci device.<br>
virtio_read_caps(): common cfg mapped at: 0x940001000<br>
virtio_read_caps(): device cfg mapped at: 0x940003000<br>
virtio_read_caps(): isr cfg mapped at: 0x940002000<br>
virtio_read_caps(): notify base: 0x940004000, notify off multiplier: 4<br>
vtpci_init(): modern virtio pci detected.<br>
virtio_ethdev_negotiate_features(): guest_features before negotiate = 8000005f10ef8028<br>
virtio_ethdev_negotiate_features(): host_features before negotiate = 130ffffa7<br>
virtio_ethdev_negotiate_features(): features after negotiate = 110ef8020<br>
virtio_init_device(): PORT MAC: 50:6B:8D:A9:09:62<br>
virtio_init_device(): link speed = -1, duplex = 1<br>
virtio_init_device(): config->max_virtqueue_pairs=2<br>
virtio_init_device(): config->status=1<br>
virtio_init_device(): PORT MAC: 50:6B:8D:A9:09:62<br>
virtio_init_queue(): setting up queue: 0 on NUMA node 0<br>
virtio_init_queue(): vq_size: 256<br>
virtio_init_queue(): vring_size: 10244, rounded_vring_size: 12288<br>
virtio_init_queue(): vq->vq_ring_mem: 0x7fffab000<br>
virtio_init_queue(): vq->vq_ring_virt_mem: 0x17ffab000<br>
virtio_init_vring():  >><br>
modern_setup_queue(): queue 0 addresses:<br>
modern_setup_queue():    desc_addr: 7fffab000<br>
modern_setup_queue():    aval_addr: 7fffac000<br>
modern_setup_queue():    used_addr: 7fffad000<br>
modern_setup_queue():    notify addr: 0x940004000 (notify offset: 0)<br>
virtio_init_queue(): setting up queue: 1 on NUMA node 0<br>
virtio_init_queue(): vq_size: 256<br>
virtio_init_queue(): vring_size: 10244, rounded_vring_size: 12288<br>
virtio_init_queue(): vq->vq_ring_mem: 0x7fffa6000<br>
virtio_init_queue(): vq->vq_ring_virt_mem: 0x17ffa6000<br>
virtio_init_vring():  >><br>
modern_setup_queue(): queue 1 addresses:<br>
modern_setup_queue():    desc_addr: 7fffa6000<br>
modern_setup_queue():    aval_addr: 7fffa7000<br>
modern_setup_queue():    used_addr: 7fffa8000<br>
modern_setup_queue():    notify addr: 0x940004004 (notify offset: 1)<br>
virtio_init_queue(): setting up queue: 2 on NUMA node 0<br>
virtio_init_queue(): vq_size: 256<br>
virtio_init_queue(): vring_size: 10244, rounded_vring_size: 12288<br>
virtio_init_queue(): vq->vq_ring_mem: 0x7fff98000<br>
virtio_init_queue(): vq->vq_ring_virt_mem: 0x17ff98000<br>
virtio_init_vring():  >><br>
modern_setup_queue(): queue 2 addresses:<br>
modern_setup_queue():    desc_addr: 7fff98000<br>
modern_setup_queue():    aval_addr: 7fff99000<br>
modern_setup_queue():    used_addr: 7fff9a000<br>
modern_setup_queue():    notify addr: 0x940004008 (notify offset: 2)<br>
virtio_init_queue(): setting up queue: 3 on NUMA node 0<br>
virtio_init_queue(): vq_size: 256<br>
virtio_init_queue(): vring_size: 10244, rounded_vring_size: 12288<br>
virtio_init_queue(): vq->vq_ring_mem: 0x7fff93000<br>
virtio_init_queue(): vq->vq_ring_virt_mem: 0x17ff93000<br>
virtio_init_vring():  >><br>
modern_setup_queue(): queue 3 addresses:<br>
modern_setup_queue():    desc_addr: 7fff93000<br>
modern_setup_queue():    aval_addr: 7fff94000<br>
modern_setup_queue():    used_addr: 7fff95000<br>
modern_setup_queue():    notify addr: 0x94000400c (notify offset: 3)<br>
virtio_init_queue(): setting up queue: 4 on NUMA node 0<br>
virtio_init_queue(): vq_size: 64<br>
virtio_init_queue(): vring_size: 4612, rounded_vring_size: 8192<br>
virtio_init_queue(): vq->vq_ring_mem: 0x7fff87000<br>
virtio_init_queue(): vq->vq_ring_virt_mem: 0x17ff87000<br>
virtio_init_vring():  >><br>
modern_setup_queue(): queue 4 addresses:<br>
modern_setup_queue():    desc_addr: 7fff87000<br>
modern_setup_queue():    aval_addr: 7fff87400<br>
modern_setup_queue():    used_addr: 7fff88000<br>
modern_setup_queue():    notify addr: 0x940004010 (notify offset: 4)<br>
eth_virtio_pci_init(): port 0 vendorID=0x1af4 deviceID=0x1000<br>
EAL: Module /sys/module/vfio not found! error 2 (No such file or directory)<br>
EAL: lib.telemetry log level changed from disabled to debug<br>
TELEMETRY: Attempting socket bind to path '/var/run/dpdk/rte/dpdk_telemetry.v2'<br>
TELEMETRY: Initial bind to socket '/var/run/dpdk/rte/dpdk_telemetry.v2' failed.<br>
TELEMETRY: Attempting unlink and retrying bind<br>
TELEMETRY: Socket creation and binding ok<br>
TELEMETRY: Telemetry initialized ok<br>
TELEMETRY: No legacy callbacks, legacy socket not created<br>
[Wed Jul 26 04:44:42 2023][ms_dpi: 28098] DPDK Initialised<br>
[Wed Jul 26 04:44:42 2023][ms_dpi: 28098] Finished DPDK logging session<br>
<br>
<br>
The following result is produced when testpmd runs the RSS configuration command.
<br>
<br>
testpmd> port config all rss all<br>
Port 0 modified RSS hash function based on hardware support,requested:0x17f83fffc configured:0<br>
Multi-queue RSS mode isn't enabled.<br>
Configuration of RSS hash at ethernet port 0 failed with error (95): Operation not supported.<br>
<br>
<br>
Any suggestions on how to enable RSS support in this situation would be greatly appreciated.
<br>
<br>
Thank you for your assistance. <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>

</div></blockquote></div>