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 4A7DB4576E; Thu, 8 Aug 2024 20:55:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 260CD4278D; Thu, 8 Aug 2024 20:55:16 +0200 (CEST) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 614A54066F for ; Thu, 8 Aug 2024 20:55:15 +0200 (CEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-70d18112b60so865017b3a.1 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=NJAcIjB8daDZNBFIga7y8+A5Ul+RnezCGOJLyWDBwoDqPrRE9uTecvzBZ1hIZecu5M R7d2KYwd2AdCYO7gPDOMxIjzwM1/IrruDXxiAheFin4vmBGfzGTrOesb6f2nMItcDCDN hZrasH669Pri4ckxa9v0hb5tCLAU+BwylCaL6EqP0JtX+i2NkWM42enqANgyYLG1msSj OMxNChyyUMPFvR6Gb09eubAHriUIlg2ktcqJ9m75yEwPkEZ8UErILRx9jTrE+eiRMcM9 YELe8hOeiz+/z5YDnadYGcQWEdXgRv+rWgs3eiI5KVRy/4J5OloY5Zd+W/j6LOcWWW6t bdOA== X-Gm-Message-State: AOJu0Yxg5x8CQ0RhAATZlhcbYkH2BhfDaUwKXAAqio5jeFRxUiwqFeWC 56CwYw71diHgnT5KRCS8weNyZYNrfaMKOCrGKoVO6AcYEOkj6jcCF7syRf12S80= 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: 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 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 >