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 53D64A0547 for ; Wed, 29 Sep 2021 07:26:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B40DF40E3C; Wed, 29 Sep 2021 07:26:55 +0200 (CEST) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mails.dpdk.org (Postfix) with ESMTP id D84754068F for ; Wed, 29 Sep 2021 07:26:54 +0200 (CEST) Received: by mail-ed1-f47.google.com with SMTP id g7so4020373edv.1 for ; Tue, 28 Sep 2021 22:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=xajw/62gMa/VtAum7mVyzdKhCLMvgP5eR5a8QOcjMtI=; b=FQJPFilOiYIzQKLllVPG1AEWoXAXkNXZQyvsn5GQP2GEzC/gf7elufu2jCts8cYk/4 rMRJM1o4AVrsqU/XItxCMawSYicWK3ghcOPlOzdDxUSjY2aYCq53HBIXSuaHtUIwC+oB XuIxq3OeQoLaH9K+XZvUpLohVMl6VXWePDsawRuviy19LtcwJ5Kmxx5VLo+X3KwIX+RO dBKcyZ9J12v2DvMXs3ZcgaUZUpxj6lV3Vl0B309Be6eNupNxtLBt7mRLeLfOCcgoz8MO u6glBggQvf4ur8SL8HFbYvoh456tjBtZ2iGwTogtuwaMihkJkx+rttywcgGZs38a4t6F CwPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xajw/62gMa/VtAum7mVyzdKhCLMvgP5eR5a8QOcjMtI=; b=eMiW1ylny8pb+zgdamOt/DKt91OCexl/zs4YFtlhADdPJShJswUHLfXghAJy4/Zy0q nHWULFibYLtENE9CZGqA8ZecY/WafsoRzaJuo71AzK/jv5xGYWiHHwI3vI/tHlcDoMvT mW8mLhXZE0fZb5l842Q0VbQ0NyNtKHlIHykWEUoNszvrGRLB6ImFUOybI2JG+NGsEad5 oP9yTgn1OuS+aVMGtkxfC/vJAlACn5tWqFEfv5i6lLnO9tiZY7KfIW00OtLZhQz8Rl4w 4yGYc6wfiTGR+L7pqWUMrHms/qkF/MTr1i+OzSKrmMD2uO5uVU7I0PnYtlC/zSB6kZQt OuWw== X-Gm-Message-State: AOAM531SCV/0VZrvRUKYwlTVAOHeLc/swDle+s2TNNc3iHpb4AOY90oh WIM7lCfGCofCD4BkOO99DHbaCyXsAG79/Kx895s6BsO7 X-Google-Smtp-Source: ABdhPJwYXqN9NDHkhaG+V6UQiRQrrx7b4NRiN1mDFlwsCSSR9ApaGv+7ueeX2LETWg0vwgvWsoJcEUwXsXKpWTZenO8= X-Received: by 2002:aa7:dbca:: with SMTP id v10mr12495485edt.280.1632893214336; Tue, 28 Sep 2021 22:26:54 -0700 (PDT) MIME-Version: 1.0 From: Anna A Date: Tue, 28 Sep 2021 22:26:43 -0700 Message-ID: Subject: Using rte_flow to distribute single flow type among multiple Rx queues using DPDK in Mellanox ConnectX-5 Ex To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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, I'm trying to use rte_flow_action_type_rss to distribute packets all of the same flow type among multiple Rx queues on a single port. Mellanox ConnectX-5 Ex and DPDK version 20.05 is used for this purpose. It doesn't seem to work and all the packets are sent only to a single queue. My queries are : 1. What am I missing or doing differently? 2. Should I be doing any other configurations in rte_eth_conf or rte_eth_rxmode? My rte_flow configurations: struct rte_flow_item pattern[MAX_RTE_FLOW_PATTERN] = {}; struct rte_flow_action action[MAX_RTE_FLOW_ACTIONS] = {}; struct rte_flow_attr attr; struct rte_flow_item_eth eth; struct rte_flow *flow = NULL; struct rte_flow_error error; int ret; int no_queues =2; uint16_t queues[2]; struct rte_flow_action_rss rss; memset(&error, 0x22, sizeof(error)); memset(&attr, 0, sizeof(attr)); attr.egress = 0; attr.ingress = 1; memset(&pattern, 0, sizeof(pattern)); memset(&action, 0, sizeof(action)); /* setting the eth to pass all packets */ pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH; pattern[0].spec = ð pattern[1].type = RTE_FLOW_ITEM_TYPE_END; rss.types = ETH_RSS_IP; rss.level = 0; rss.func = RTE_ETH_HASH_FUNCTION_TOEPLITZ; rss.key_len =0; rss.key = NULL; rss.queue_num = no_queues; for (int i= 0; i < no_queues; i++){ queues[i] = i; } rss.queue = queues; action[0].type = RTE_FLOW_ACTION_TYPE_RSS; action[0].conf = &rss; action[1].type = RTE_FLOW_ACTION_TYPE_END; ret = rte_flow_validate(portid, &attr, pattern, action, &error); if (ret < 0) { printf( "Flow validation failed %s\n", error.message); return; } flow = rte_flow_create(portid, &attr, pattern, action, &error); if (flow == NULL) printf(" Cannot create Flow create"); And Rx queues configuration: for (int j = 0; j < no_queues; j++) { int ret = rte_eth_rx_queue_setup(portid, j, nb_rxd, rte_eth_dev_socket_id(port_id), NULL,mbuf_pool); if (ret < 0) { printf( "rte_eth_rx_queue_setup:err=%d, port=%u", ret, (unsigned) portid); exit(1); } } Thanks Anna