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 F219CA0C41; Fri, 29 Oct 2021 19:54:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8139B40DDB; Fri, 29 Oct 2021 19:54:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 9481A40395 for ; Fri, 29 Oct 2021 19:54:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635530088; 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=8LN08Y7wjqYVH3DoPUvcSCTgtV1MbGUV+vKIGr6w91E=; b=S77208QWEbG3FEEGYCcDNBt3nzLuk3QThbEbuZ4ughZwvkju2FDvZDI9Fxgy8dotmzG9GP kxlzWZ9O1+mvPmn5Z3YwaIbxB9/nB5VHRzZr/PTQv0ZQnDQAjsKgAzzvuGCV85tZqdvGfb kzcatbGc889BYbYeXFFF2XZSIe4grWU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-a7VmiuUlPsOH9J3R4rAuiA-1; Fri, 29 Oct 2021 13:54:44 -0400 X-MC-Unique: a7VmiuUlPsOH9J3R4rAuiA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C65A11006AA2; Fri, 29 Oct 2021 17:54:42 +0000 (UTC) Received: from [10.39.208.11] (unknown [10.39.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B87B61280; Fri, 29 Oct 2021 17:54:37 +0000 (UTC) Message-ID: <4411ae26-3722-6091-18a8-8da01b7d822c@redhat.com> Date: Fri, 29 Oct 2021 19:54:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 To: Ferruh Yigit , dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com, david.marchand@redhat.com, andrew.rybchenko@oktetlabs.ru, michaelba@nvidia.com, viacheslavo@nvidia.com, xiaoyun.li@intel.com Cc: nelio.laranjeiro@6wind.com, yvugenfi@redhat.com, ybendito@redhat.com References: <20211027142213.556166-1-maxime.coquelin@redhat.com> <20211027142213.556166-2-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com 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: 8bit Subject: Re: [dpdk-dev] [PATCH v6 1/5] net/virtio: add initial RSS support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/29/21 19:40, Ferruh Yigit wrote: > On 10/27/2021 3:22 PM, Maxime Coquelin wrote: >> Provide the capability to update the hash key, hash types >> and RETA table on the fly (without needing to stop/start >> the device). However, the key length and the number of RETA >> entries are fixed to 40B and 128 entries respectively. This >> is done in order to simplify the design, but may be >> revisited later as the Virtio spec provides this >> flexibility. >> >> Note that only VIRTIO_NET_F_RSS support is implemented, >> VIRTIO_NET_F_HASH_REPORT, which would enable reporting the >> packet RSS hash calculated by the device into mbuf.rss, is >> not yet supported. >> >> Regarding the default RSS configuration, it has been >> chosen to use the default Intel ixgbe key as default key, >> and default RETA is a simple modulo between the hash and >> the number of Rx queues. >> >> Signed-off-by: Maxime Coquelin > > <...> > >> +static uint64_t >> +ethdev_to_virtio_rss_offloads(uint64_t ethdev_hash_types) >> +{ >> +    uint64_t virtio_hash_types = 0; >> + >> +    if (ethdev_hash_types & (ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 | >> ETH_RSS_NONFRAG_IPV4_OTHER)) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_IPV4; >> + >> +    if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV4_TCP) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_TCPV4; >> + >> +    if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV4_UDP) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_UDPV4; >> + >> +    if (ethdev_hash_types & (ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 | >> ETH_RSS_NONFRAG_IPV6_OTHER)) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_IPV6; >> + >> +    if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV6_TCP) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_TCPV6; >> + >> +    if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV6_UDP) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_UDPV6; >> + >> +    if (ethdev_hash_types & ETH_RSS_IPV6_EX) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_IP_EX; >> + >> +    if (ethdev_hash_types & ETH_RSS_IPV6_TCP_EX) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_TCP_EX; >> + >> +    if (ethdev_hash_types & ETH_RSS_IPV6_UDP_EX) >> +        virtio_hash_types |= VIRTIO_NET_HASH_TYPE_UDP_EX; > > Should use RTE_ETH_RSS macros with RTE_ prefix versions, updating in > next-net. > Same for below virtio_to_ethdev_rss_offloads(). > Thanks, for doing the change. When rebasing, I renamed most of these defines, but forgot the ones in these two functions. Maxime