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 79347A0C41 for ; Thu, 30 Sep 2021 03:13:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 007B240DDA; Thu, 30 Sep 2021 03:13:15 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2042.outbound.protection.outlook.com [40.107.244.42]) by mails.dpdk.org (Postfix) with ESMTP id DF1A34067E for ; Thu, 30 Sep 2021 03:13:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X1cLzWxbyZ/zlhZLBUAcDiKX+I1P4CwWtisoFzdDF6yXspH+j3VqHh42KGvRr2FTrL9E7XGOmzJD2fP2lZO4XdmteNa39n4ZOkjdY9LJK05fAE5JK7Gwn1tz8PUtCti0700eD7KWnXazkZ35jxS7RvFjED8CRwT3B87OPCAbpiE1zFb1ggE3Ab1GUP+/pE3ah4PAzeuCBNjo0spS/ssDDs+Km2xlrEk0YErawxFSfQFoslbCgMIadYwwmffeDhTfN5LergAYj5j2fMxctdx8NXp+d63eIuaHc92DY3fzYJtcM9kn5loQG+DMsKQINslv/0jN+IL9uQy5f+dJqPSy/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SbRM4XvjPE48+HIUaI/XjY3n2yVN3tSlWQpPyyS4LTY=; b=au4+2WOQ+cdym43xb2bgvrjuSgWrgEJ+iUeSYT/MneM2aXXVs+W7nhagHahlEHce+qpD/B6nu9CtSeA7LHmdyuRJfltGymX8m1j8de4Yl4G5bfPbf3lFxMiUoKaXweFumum+Ai7Lf6ELx6sg1pBCe9PJHPyklD5C/bPYS85sYdWThZpJ1V5caDbr3YZ6PDlMNRPesDWEAtIwXmuwa3d6iwWKGCWLXsJYJTZnQ0i9X01DzgS9jQIf1iQWjB/f2G+2kzxmCPBxm6TrkLieMnGFKFwiIoRuGWOQTM8GIP6HoguOGCFKucwnRUcUHXbE9GElQGqsPnMZuLEPeMkGqksIbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SbRM4XvjPE48+HIUaI/XjY3n2yVN3tSlWQpPyyS4LTY=; b=ZZ8kaaN9NAq5YZtG+eeQDkZBkIiclzOOJHz0FiFwpU54xd5IQWTDm38nS/hc4uX6c79M6lFUcEXwxoLIbcui+8X+6z3yMfLT0km5+TDoiINX1F8syl5z+fmx8/QWQ1zMio+AOOKg4Mt1mE8gTgGTIV1h/sC3cNizDAytBQhVX5cxjj8Xz/RUAsz6Iwox+MijZMK+Qrk9fpePciyP/0R82lkwra3YjTC3iiOwT9uQjaZN7PpCCQ12mrOg8Csx0c7cSLtVdCYDXBxt2yXhgIrrtzkHTmOgyiQkE/dNmkAA3hdyW7aERoUEuaX44YH/CdFHcah0d4lkEXdBgtwhSCnwvw== Received: from DM4PR12MB5312.namprd12.prod.outlook.com (2603:10b6:5:39d::20) by DM4PR12MB5326.namprd12.prod.outlook.com (2603:10b6:5:39f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14; Thu, 30 Sep 2021 01:13:12 +0000 Received: from DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::a4bc:7da3:32e5:1665]) by DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::a4bc:7da3:32e5:1665%8]) with mapi id 15.20.4566.013; Thu, 30 Sep 2021 01:13:12 +0000 From: Raslan Darawsheh To: Anna A , Wisam Monther CC: NBU-Contact-Thomas Monjalon , "users@dpdk.org" , Matan Azrad , Slava Ovsiienko Subject: Re: Using rte_flow to distribute single flow type among multiple Rx queues using DPDK in Mellanox ConnectX-5 Ex Thread-Topic: Using rte_flow to distribute single flow type among multiple Rx queues using DPDK in Mellanox ConnectX-5 Ex Thread-Index: AQHXtPKhH0khuw8NIU2SOhSPQfH5WKu6xfAAgAAEcQCAAPBJgIAAC2QH Date: Thu, 30 Sep 2021 01:13:12 +0000 Message-ID: References: <1849453.UF46jR8BTF@thomas> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0d00f719-5f46-4a15-be54-08d983af790d x-ms-traffictypediagnostic: DM4PR12MB5326: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9hfhK07IgJNrHWe7xyyvMHa/5h7vxBeqqP1umN8hQSlORYw3ERroGCNtkdHgHN/V3q/ZDMW66yLwb2yiHVJHurdME+SM3JRRmWn4Jf2ofqDRxw+IhGnsh/FDesKOadizZKnx8s0h9CyNoyHl1I35WHhEKYJIvn/u3WfhnDKqYpcM9DMMYmownDqxyREiH3ugJBbUfRhN7Jm37BFHH5TDF1ClPzK0iY6AWErG+gk8L/SFZoIJPIvM9V67pliFjmWFnCapkuBnBDOyyk4Ay4HKwiUNeoSTgO9ulX7Nu600x7IW1TcS+QjF1Kn2fKj9a07REveHiwBNYdCd0igMD9uqv4ML2ZHVaCDk6z6d6vunfoEDU/1/8Fm1ndHS5/Vj88f8P2SKKgvAkO0H+XX5r3QZ3oByOONX5Ob7cZcIEKQ1C2tplpiR0BwvEMc2rFLTiFPo106B2wsitcewlVB9fpbOJ16EUrZgbb7F2LnWgzhP/SUtM6Oe3H/Vaf9RaiOUbevNzA44MjvPaHgBaWbmWNwSTkGy9q6bj45hT3BS1HZUh0TFhkcwdyOsu8mXbxsZWSbGOdYUeNgJcRftSKgdvSNERlIDJAThO7hmLjB22BziIGpjZh3rz4GjNnbU0Zw+G18oYkrOVX3eBrH3aVfpjauvc+o6CcCpOtLIT7bgbiE6GWWpEyZxhvVAPCnNKfa7a87L8yD1l9zK4pGq3AxIuVaHQg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5312.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(71200400001)(7696005)(8936002)(6506007)(53546011)(9686003)(55016002)(66446008)(66476007)(66556008)(64756008)(38100700002)(26005)(83380400001)(122000001)(66946007)(33656002)(91956017)(76116006)(8676002)(6636002)(107886003)(2906002)(508600001)(52536014)(38070700005)(5660300002)(110136005)(54906003)(4326008)(316002)(186003)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2IOvgSXfFi1Wud8wcmyXwCCM5TbRMwryaBLwqmtTLXOkjQn2ww7FSF/CYobT?= =?us-ascii?Q?uw0Lm0r5lGrV60dMk4Qk4/Un/1sLhsPxy9pkN1z5XdW7nGFLfO17+LnLgw79?= =?us-ascii?Q?jbUbglX5VR2uZloabNtovwvJi0B0KmUREeL/PwBb3S1TwQy9p4BgpPvtQUh1?= =?us-ascii?Q?QLh2uLT9VoYvr7gz3gs3af2cPhr8LeUoVj1j8qSAyDd2SCeoAebLO7NQf9oJ?= =?us-ascii?Q?HQVIjHfoYk4E6xjDqeF+49/A1ZPV6HFsvfwgjKtH8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fso11KcWY/DIHbBSPIl93nHRU1kI/2LtW4YqUJl2HuY52amBhTqGdCbU?= =?us-ascii?Q?W3Nn5bk09e3oVh1WsYtSh2NloRJLUKFUTGLRALdqTWp/QDd8Sd3PuvMtgw7I?= =?us-ascii?Q?8lW4VzXpzXNSV6P9iEPAiiM19ErV//J1h5BKSeUWOcQ3EdMap1wiJbWQuWwb?= =?us-ascii?Q?ShgO+EYA0tz4o2cgZMFIsuspBEavz/fggjIRCiumFQ70Rw=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5312.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d00f719-5f46-4a15-be54-08d983af790d X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2021 01:13:12.1531 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: P/vAQrLordm08srqqEP6PVcDdWsuB7+eFhbADpIC3W9e4JVggEwSY51ArvO3zSaxLi+ZJncBOBwZP8NWFRWKiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5326 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 Anna, What you are basically doing is trying to do RSS on eth layer which we don'= t support the spreading on it. To make it work you can do either adding ip layer to the items to make the = RSS happen on L3 or simply through the rss types of the rss action which wo= uld cause an automatic expansion for the items in mlx5 pmd internally. Kindest regards, Raslan Darawsheh ________________________________ From: Anna A Sent: Thursday, September 30, 2021 3:29:51 AM To: Wisam Monther Cc: NBU-Contact-Thomas Monjalon ; users@dpdk.org ; Matan Azrad ; Slava Ovsiienko Subject: Re: Using rte_flow to distribute single flow type among multiple R= x queues using DPDK in Mellanox ConnectX-5 Ex Hi Wisam, I added .rxmode.mq_mode =3D ETH_MQ_RX_RSS to rte_eth_conf before calling th= e fn, rte_eth_dev_configure() but still have the packets sent to a single queue. My order of configuration is as follows: 1. Enable .rxmode.mq_mode =3D ETH_MQ_RX_RSS 2. Initialize port by rte_eth_dev_configure() 3. Setup multiple Rxqueues for a single port by calling rte_eth_rx_queue_setup() on each queueid. 4.setup a single txqueue by rte_eth_tx_queue_setup() 5. start the device with rte_eth_dev_start() 6. Configure rte_flow with pattern -> flow create port0 ingress pattern eth / end / action RSS on multiple queues / end 7. Add Mac address 8. Check the port link status If I try to configure rte_flow before calling rte_eth_dev_start, I get the error message "net_mlx5: port 0 is not started when inserting a flow and rte_flow_create() returns NULL ". Also i enabled debug logging with "--log-level=3D*:debug", but don't see any errors for flow validation/ flow creation . Please let me know if I'm missing something, or need to add any other configurations? Thanks Anna On Wed, Sep 29, 2021 at 3:09 AM Wisam Monther wrote: > Hi Anna, > > > -----Original Message----- > > From: Thomas Monjalon > > Sent: Wednesday, September 29, 2021 12:54 PM > > To: Anna A > > Cc: users@dpdk.org; Matan Azrad ; Slava Ovsiienko > > > > Subject: Re: Using rte_flow to distribute single flow type among > multiple Rx > > queues using DPDK in Mellanox ConnectX-5 Ex > > > > 29/09/2021 07:26, Anna A: > > > 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. > > > > Adding mlx5 maintainers Cc. > > > > > 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? > > Can you please try to add? > .rxmode.mq_mode =3D ETH_MQ_RX_RSS, > in the rte_eth_conf and try again? > > > > > Do you see any error log? > > For info, you can change log level with --log-level. > > Experiment options with '--log-level help' in recent DPDK. > > > > > My rte_flow configurations: > > > > > > struct rte_flow_item pattern[MAX_RTE_FLOW_PATTERN] =3D {}; > > > struct rte_flow_action action[MAX_RTE_FLOW_ACTIONS] =3D {}; > > > struct rte_flow_attr attr; > > > struct rte_flow_item_eth eth; > > > struct rte_flow *flow =3D NULL; > > > struct rte_flow_error error; > > > int ret; > > > int no_queues =3D2; > > > uint16_t queues[2]; > > > struct rte_flow_action_rss rss; > > > memset(&error, 0x22, sizeof(error)); > > > memset(&attr, 0, sizeof(attr)); > > > attr.egress =3D 0; > > > attr.ingress =3D 1; > > > > > > memset(&pattern, 0, sizeof(pattern)); > > > memset(&action, 0, sizeof(action)); > > > /* setting the eth to pass all packets */ > > > pattern[0].type =3D RTE_FLOW_ITEM_TYPE_ETH; > > > pattern[0].spec =3D ð > > > pattern[1].type =3D RTE_FLOW_ITEM_TYPE_END; > > > > > > rss.types =3D ETH_RSS_IP; > > > rss.level =3D 0; > > > rss.func =3D RTE_ETH_HASH_FUNCTION_TOEPLITZ; > > > rss.key_len =3D0; > > > rss.key =3D NULL; > > > rss.queue_num =3D no_queues; > > > for (int i=3D 0; i < no_queues; i++){ > > > queues[i] =3D i; > > > } > > > rss.queue =3D queues; > > > action[0].type =3D RTE_FLOW_ACTION_TYPE_RSS; > > > action[0].conf =3D &rss; > > > > > > action[1].type =3D RTE_FLOW_ACTION_TYPE_END; > > > > > > ret =3D rte_flow_validate(portid, &attr, pattern, action, &error)= ; > > > if (ret < 0) { > > > printf( "Flow validation failed %s\n", error.message); > > > return; > > > } > > > flow =3D rte_flow_create(portid, &attr, pattern, action, &error); > > > > > > if (flow =3D=3D NULL) > > > printf(" Cannot create Flow create"); > > > > > > And Rx queues configuration: > > > for (int j =3D 0; j < no_queues; j++) { > > > > > > int ret =3D 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=3D%d, port=3D%u", ret, > > > (unsigned) portid); > > > exit(1); > > > } > > > } > > > > > > Thanks > > > Anna > > > > > > BRs, > Wisam Jaddo >