From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF60342F6C for ; Fri, 28 Jul 2023 16:25:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30C1040685; Fri, 28 Jul 2023 16:25:41 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 67CBC4021E for ; Fri, 28 Jul 2023 16:25:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690554338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wU8BrjD5vncQ3HzLBnuChLAnKqeJC5B/8/9+C0YTXOk=; b=fONG28Ag9Ohn2dNRCSOVrNt1faBJU6qvo73GGgJ70rQGToGXSG4Vaa6gYJDkJruvPGTOmr 5h0Lb712GKu3q2THEfqlL49i9OMEkTwWBZro/AGuCvzesaErVXjzjimG+lMlitTJZawWKo MtOYXpF6ju7UvJe6w77Fn8mab1w3Pvo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-528-M2EXQPY8N7KkrzMjeAFYYQ-1; Fri, 28 Jul 2023 10:25:32 -0400 X-MC-Unique: M2EXQPY8N7KkrzMjeAFYYQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1EDC3185A78F; Fri, 28 Jul 2023 14:25:32 +0000 (UTC) Received: from [10.39.208.20] (unknown [10.39.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4611E40C2063; Fri, 28 Jul 2023 14:25:31 +0000 (UTC) Message-ID: <0ab514a3-79f3-5398-7857-fa1f77ee40e2@redhat.com> Date: Fri, 28 Jul 2023 16:25:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Thomas Monjalon , Matheus Stolet Cc: users@dpdk.org References: <4c9482cb3259f1e75e19a5724a67ea8d@mpi-sws.org> <2160676.Icojqenx9y@thomas> From: Maxime Coquelin Subject: Re: Supporting RSS with DPDK in a VM In-Reply-To: <2160676.Icojqenx9y@thomas> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Hi Matheus, On 7/28/23 16:12, Thomas Monjalon wrote: > Hello, > > You can have packets distributed to multiple queues without RSS. > > If you really wants to enable the RSS algorithms, > it seems not supported for now with vhost_user. > It can be enabled with vhost running in the kernel: > https://qemu.readthedocs.io/en/latest/devel/ebpf_rss.html Thomas is right, DPDK Virtio PMD supports RSS, but DPDK Vhost-user does not (yet). However, as you seem to be using a fairly recent OVS-DPDK version, you can enable Hash-based Tx packet steering mode on the vhostuser ports. It has been introduced in OVS v2.17: https://docs.openvswitch.org/en/latest/topics/userspace-tx-steering/ It is usefull if you have less PMD threads in OVS than the number of queues in your Virtio device. Traffic will be distributed on the queues based on the 5-tuple hash computed for OVS switching. The downside is that this is not configurable as RSS though (Key not configurable, no filters, ...). Regards, Maxime > > 26/07/2023 00:58, Matheus Stolet: >> Hello, >> >> I am trying to run a DPDK application with RSS enabled so that I can >> have multiple rx queues. This application is running inside a VM. This >> VM is hosted by QEMU using KVM acceleration and OvS with DPDK and >> vhost-user are used in the backend. So to clarify things there are two >> DPDK portions to this. The first is the DPDK portion used by OvS that >> bypasses the host operating system. This is working fine. The other is a >> DPDK application inside the virtual machine that will bypass the guest >> operating system. This is where I am having trouble with. >> >> When I set rte_eth_conf.rxmode.mq_mode = ETH_MQ_RX_RSS in my application >> I get the following errors: >> Warning: NIC does not support all requested RSS hash functions. >> virtio_dev_configure(): RSS support requested but not supported by the >> device >> Port0 dev_configure = -95 >> >> I setup my VM in QEMU to have mq=on and queues=10. I also set the number >> of rx_queues when creating the vhost port using ovs to 10. Before >> binding the interface to DPDK, I used ethtool to verify if the network >> interface was actually setup to have multiple queues. >> >> Running the 'ethtool -l enps02' command yields the following output: >> Pre-set maximums: >> RX: 0 >> TX: 0 >> Other: 0 >> Combined: 10 >> Current hardware settings: >> RX: 0 >> TX: 0 >> Other: 0 >> Combined: 10 >> >> From my understanding the combined values indicate that the interface >> was properly setup to have multiple queues, so why am I getting the >> unsupported RSS error? Are there other configuration steps that I have >> to take to get this to work? Is RSS with DPDK not supported at all >> inside a VM at the moment? Perhaps the "Port0 dev_configure() = -95" >> error means something else? Without the receive side scaling turned on >> my application is not able to achieve the desired throughput and won't >> scale when I assign more cores to the application. >> >> Versions: >> VM >> DPDK: 21.11.4 >> Kernel: 5.4.0-148-generic >> Distribution: Ubuntu 20.04 >> >> Host >> DPDK: 21.11.4 >> QEMU: 8.0.90 >> OvS: 3.0.5 >> Kernel: 5.15.111.1.amd64-smp >> Distribution: Debian 11 >> > > > > >