From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AFF72A2F6B for ; Wed, 9 Oct 2019 05:12:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4E44F1C11A; Wed, 9 Oct 2019 05:12:35 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id C67721C10A for ; Wed, 9 Oct 2019 05:12:32 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id d22so327579pll.7 for ; Tue, 08 Oct 2019 20:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gZLy4FrwK8LfizzxxtuEf4NhDVOZGnwrmAAUVLnfDvM=; b=YaFuPAOehM9oAMb68JJsSPLMfx5fSzTEWoE/giOBiooVKJegB5wfrSCqvlfXGQm6s1 GKUQJzffoCoMhIOubSnTGTa6KQ0utF3MMBUsH+NHHpiDDCDiPhyHjwdR/RA++rKnUQp4 0PH+P0JhpAEVftsMUx51T4JQC114VI4RWQKIS1xCM4LelIl2KlflDMjxxJpZXbbPVkk+ tXHbkbSiQ8V9ruCswisHNq0n7QpfCsO7DTTXSQowiHC7tONVv73cSDyKKrdfQBtzfHVj Nx928fhb7VdmKJHjJDnic0mMXLcYuym7RtQ86Q2UPD4FGK3r1YV1ePdvrR+XWs7Juibb c2WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gZLy4FrwK8LfizzxxtuEf4NhDVOZGnwrmAAUVLnfDvM=; b=b4HJc5ClHty66cQFeP3TkNJajID1drY399bQwhNQRizzmUHoLN3UaqRsJr3/f3afHm EROrJlEUFtPT9ScjCpa87DOSTKIhVp4bt4j8SPOgfvpl18AGabT7B6es4twUW0PsHlSn 47Ni77i+Ju1N3komb62NHN3zC95ee6jf6LhvtQE/xe8SxzxHzrP4g1PHZG3UdZq9fWjU 96V0VjBJNER54cJuxGied2bbuhAZ4oFcqKXzIC4WYx3SRmmULnjXIeLctTBlV7CSNezu jQ8lOYzJJ+O1LSqWYl9XtjzzMEKW7WTKPl2dQ+JisC8GBGMnfSQU+eqrXPXioN4ZEebU imKg== X-Gm-Message-State: APjAAAW0WZdVWFZ1CrLIF7laieMCPjDCUJzW4ZVLdPMw4njXAI86xJ9Q hziZ4BctQ6julvtKgjvlDkTg0Q== X-Google-Smtp-Source: APXvYqz5ciDql4frhPGlkwtBeOVIFtqj9LHKxi/H47jvJ2aBCutictUObvLv9cojht8jxyCkIZ+7+A== X-Received: by 2002:a17:902:563:: with SMTP id 90mr946107plf.13.1570590751599; Tue, 08 Oct 2019 20:12:31 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id k15sm528704pgt.25.2019.10.08.20.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 20:12:31 -0700 (PDT) Date: Tue, 8 Oct 2019 20:12:24 -0700 From: Stephen Hemminger To: Jun Gan Cc: Asaf Penso , "users@dpdk.org" , Technical Support Message-ID: <20191008201224.083c9625@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Same 5 tuple UDP packets have been delivered to different queues. X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Tue, 8 Oct 2019 18:56:31 -0700 Jun Gan wrote: > Hi Asaf, > > Thank you so much for your help! > > I tend to think there is something missing in my code, do you have any code > example how to enable RSS? > > I did following setup: > > eth_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; > eth_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_UDP > eth_conf..rx_adv_conf.rss_conf.rss_hf &= dev_info.flow_type_rss_offloads; > > I also tried to add a flow rule, and I found mlx5 doesn't support > "rte_eth_dev_rss_hash_conf_get"? > > Here is the action, all the UDP packets applied this action: > > struct rte_flow_action_rss action_rss = { > .types = ETH_RSS_IP | ETH_RSS_UDP, > .key_len = 40, > .queue_num = 4, > .key = rss_key, > .queue = queue, > }; > > > And I use spdk reactor to launch multiple threads polling different queue. > > > Thanks, > Jun Gan > > > > > On Tue, Oct 8, 2019 at 4:52 AM Asaf Penso wrote: > > > Hello Jun Gan, > > > > Thanks for reaching out and posting this query. > > I'm adding here our support team for further assistance. > > > > Regards, > > Asaf Penso > > > > > -----Original Message----- > > > From: users On Behalf Of Jun Gan > > > Sent: Monday, October 7, 2019 6:13 AM > > > To: users@dpdk.org > > > Subject: [dpdk-users] Same 5 tuple UDP packets have been delivered to > > > different queues. > > > > > > Hi All, > > > > > > I just added multiple queues and enabled RSS in our application, I set > > > "rss_hf" to "ETH_RSS_IP | ETH_RSS_UDP", but I can see that same 5 tuple > > > packets, will be delivered to different queues. Do I miss something? > > > > > > Here is the code: > > > > > > eth_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; > > > eth_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_UDP > > > eth_conf..rx_adv_conf.rss_conf.rss_hf &= > > > dev_info.flow_type_rss_offloads; > > > > > > > > > I actually have two queues, and two different threads(lcore) busy > > > polling(rx_burst) on these two queues, I also met other weird issues > > like: > > > > > > dpdk-stable-18.11.2/drivers/net/mlx5/mlx5_rxtx_vec_sse.h:743: > > > rxq_burst_v: > > > Assertion `rxq->rq_pi == rxq->cq_ci' failed. > > > > > > I don't understand what does this means, I think rx_burst on the same nic > > > different queue should be thread-safe, isn't it? > > > > > > I'm using dpdk 18.11.2, OS is centos 7.6 and NIC is MLX CX-5. > > > > > > I really appreciate it if anyone can help!! I think you might have confused base RSS and rte_flow RSS. The base RSS is about spreading incoming across all receive queues. This is the part in rx_add_conf. The flow RSS is about spreading matching flows (based on pattern) across a restricted subset of queues. My recommendation is use one or the others. Don't use base RSS and rte_flow at the same time (it doesn't make sense).