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 CEF524576E for ; Thu, 8 Aug 2024 20:55:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CBC842D8C; Thu, 8 Aug 2024 20:55:17 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 759374278D for ; Thu, 8 Aug 2024 20:55:15 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-710afd56c99so1035738b3a.0 for ; Thu, 08 Aug 2024 11:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1723143314; x=1723748114; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=oj3KWF0KTMAbXR5Jcx1kTbEDBxq6ZuLZdUxbZnaWsEc=; b=hHRY9OiUZr269oC/rdZlMD5WnV/vq5D8D7BMJWi/MHx43478ZfLMKs8zf2MlJOwQCD tzciXwv03Zc4azBTpQgCCkTROKs1PW2R2DgYW4HrILwl8Ec6eJQ1ilWpzW6xe71hX+bc gWM6w/t0kcOkTZbVmt0fVIME3Gf+3UAb5sZaFgsrdaEJS5POI/Fv9uQ2rzD6mfRoJJ0z JBqUuAubPQXA7BfxYx+g5xzT+teiyp0Y+u50pTSNAHdlEboW9mYV7qik/HxpfMmnlsnT fIgShj4WnWnFN9LTdfrRJ0e7iqdRensynPMJxoWzYnJwK7C3+2hW7Ip8NVtOjacm/69q LDhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723143314; x=1723748114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oj3KWF0KTMAbXR5Jcx1kTbEDBxq6ZuLZdUxbZnaWsEc=; b=HEY7/utXtU++Li2B+V1Y55KwZy857IQwhbdg1uwTVIW76V6KthPKpHvjZJe6Wtwzcx 4ZVor+n0NJyisE4tw6TGCX29orQoZxHJsmvM0WifE1g0XICU57KQW6ftlRxmeMF+1qXt IXQhNnVjwwBDArfzrXgH9FF6VYomP2bAxevea0J+B7lf41gQm/qhwd1J2t57oyEdmf1R ESvPK1SS+IJkP0WJjVBJMOlSZpYcNSN4fp9eQRQOk0NAM87YrsXMzsxWDrTzgeXRlwur pg6MH3R70LGY4y6kvE2ABkSXhNDbTzgC/hyWE+oikiMTR3M6SjSqVo/voZOYB/59PQzg oZSg== X-Forwarded-Encrypted: i=1; AJvYcCXAoQqrfJxSkHQ53vqIq29NQf37TxedJIa+zILlkUQ9Dh+ANme4/5EA9G8Vz+48ZqCgCccKX08D9ENnMny4iQ== X-Gm-Message-State: AOJu0YyLe20M1phAno/oSkP629U76LReSLHzwzbs9afhhkImf7ax7+0n lLjBTMy2W8zMjKAPELVcVLNVsi85x90uwvR0d+DwJjoIDXCukT/LTXHYgeYyspA= X-Google-Smtp-Source: AGHT+IGbWyOg/7/wl/GgjR+Ei9jJOfdbjH9gagKmjj27p9B4ovfz+a4cer9FYSUUm4o+rPtATMNnGg== X-Received: by 2002:a05:6a00:3c62:b0:70d:2ab5:8677 with SMTP id d2e1a72fcca58-710cc90da20mr4086297b3a.10.1723143314361; Thu, 08 Aug 2024 11:55:14 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7b762e9c6f1sm10063942a12.19.2024.08.08.11.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 11:55:14 -0700 (PDT) Date: Thu, 8 Aug 2024 11:55:12 -0700 From: Stephen Hemminger To: Raghavan V Cc: "dev@dpdk.org" , "users@dpdk.org" Subject: Re: DPDK: Create multiple RSS flows with unique set of queues for different patterns Message-ID: <20240808115512.2e683c7f@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 On Thu, 8 Aug 2024 11:19:13 +0000 Raghavan V wrote: > Hi Team, > > Is there any possible way to create multiple RSS flows to distribute packets to set of queues when a particular Ip pattern matches. > For e.g., > I have 40 RX queues setup, > Flow 1: Match a particular IP pattern and distribute it to specified RX queues set (0 - 29) > Flow 2: Match a particular IP pattern and distribute it to specified RX queues set (30 - 39) You need to address what to with packets that do match either of the patterns. Usually best to reserve one queue (0) for those. > > Is the below code snippet possible? Also is it possible to use symmetric toeplitz hash and ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY and let me know any other config should be included. That is HW dependent I suspect most hardware doesn't support it. Probably only mlx5. You are best to read the driver source to find out if you want to do special case like this. > > uint16_t queue_indices[] = {0,...29}; > uint16_t queue_indices2[] = {30,..39}; > > action_rss1 = (struct rte_flow_action_rss){ > .types = rss_conf.rss_hf, > .key_len = rss_conf.rss_key_len, Usually best to go with default rss_key and leave key_len and key as default of 0. > .queue_num = 30, > .key = rss_key, > .queue = queue_indices, > }; > > action_rss2 = (struct rte_flow_action_rss){ > .types = rss_conf.rss_hf, > .key_len = rss_conf.rss_key_len, > .queue_num = 10, > .key = rss_key, > .queue = queue_indices2, > }; > > struct rte_flow_item pattern[] = { > [0]={ > .type = RTE_FLOW_ITEM_TYPE_ETH, > > }, > [1]={ > .type = RTE_FLOW_ITEM_TYPE_IPV4, > .spec = &ipv4_spec, > .mask = &ipv4_mask, > > > }, > [2]={ > .type = RTE_FLOW_ITEM_TYPE_UDP, > }, > > [3]={ > .type = RTE_FLOW_ITEM_TYPE_END, > } > }; > struct rte_flow_item pattern2[] = { > [0]={ > .type = RTE_FLOW_ITEM_TYPE_ETH, > > }, > > [1]={ > .type = RTE_FLOW_ITEM_TYPE_IPV4, > .spec = &ipv4_spec2, > .mask = &ipv4_mask2, > > > }, > [2]={ > .type = RTE_FLOW_ITEM_TYPE_UDP, > }, > > [3]={ > .type = RTE_FLOW_ITEM_TYPE_END, > } > }; > rte_flow_validate(bond_port, &attr, pattern, action_rss1, &error); > rte_flow_create(bond_port, &attr, pattern, action_rss1, &error); > > rte_flow_validate(bond_port, &attr, pattern2, action_rss2, &error); > rte_flow_create(bond_port, &attr, pattern2, action_rss2, &error); > > > Pls let me know any other approach will match my requirement. > > Thanks, > Raghavan V >