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 86D104404F for ; Wed, 12 Jun 2024 16:44:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86A2D4029A; Wed, 12 Jun 2024 16:44:52 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04olkn2057.outbound.protection.outlook.com [40.92.75.57]) by mails.dpdk.org (Postfix) with ESMTP id 7FD6540151 for ; Wed, 12 Jun 2024 16:44:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fkIes0CBL6StCohTaJD8q4O9M8JYKHw7K8xDhDYlR9ZaJ4EsgewURyLu0tzkrY2baXNO6H2D7XSZNhbWM8lBEIvK//emut6YBUyzjEUfxA+rNcDgNVkoPUJW5eLQ5YOsxumLDfLBqcIP7p80C0sL18SxRZh6qRzfBJlLFrIjdXzJPyKlJNmYlTkXox8dwvi8ne6tU8w9HeDi6+upstSCDpHShRF/kUkmr2GziWiTfvHOd5JjLTYmo856QOGAlFzP4sdCwo7Nd9lRkkJc1gjEfTnox9c5ieWGfA3TYzWpXUsyRjWahCF/REDQx967wrHZSyYSBwZQu5mfCcIRrdoauA== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pieIxMEqGfum1tdYZwAZY/9+zuD0s6J88QxEKvS9YoA=; b=hWSmSN4KS5Rzfnx95rayhCIx4yBIZbuQyUSV24gQPPfiKVpSegIlnB6cQ3Ekk2swKCh26NKY7fKkdNEZFxPe+Xs1upfjVJXBbHruProm6xFVdybg2bpFcHAju5glLaTNTjmp/u/eWMTKB6+OlIWY0zN79pLQ4yOh2jpncb+YJNn7KrJMwmQTX87f7XSFKLP/je5yNHe2HczIq605mmmw0dglGbSuD6Dn6XmZt8R9PTYaGEP04A0/A/OqAFtUqCIH5oEKP443BaFIaENcLDjyeL7yEirj0lYKRmmAAfilYyPIz83bH4yN/vPaR+VwdJ8b0RJaFV6IVjRDYNecvEbyvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pieIxMEqGfum1tdYZwAZY/9+zuD0s6J88QxEKvS9YoA=; b=Takj40RjKj0c6TnECXDKO2UY2+h5iGOZObuB0pjT+mIXX5MWjes/rvZFkJZk2op67grt/WGp2miTBJx93cIJpa33xbf2HCxRMWpgr1cPIYP5AyORAIVLMnOQxz3J1IAesl/IRWq1vSxaim2QXlzaSJllCLJDjYnnhC01D2DrHTK8nImvM1l6W3OkLvGqHhITWDt83Qk2HaAxY7wKiE3KFfEhhh+PdGvPusLaPBscfIgw1mz6tHSDVUfuEY23Gjah7jIGtG8OhMcQPLIxHBSKozNSCbx4Ivf0qec65jCgr+2GHOa7Pnay2/XYj8cmUpajX25pl/OEko9l627toxmOVA== Received: from PR2PR09MB3081.eurprd09.prod.outlook.com (2603:10a6:101:28::12) by AM7PR09MB3574.eurprd09.prod.outlook.com (2603:10a6:20b:10e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Wed, 12 Jun 2024 14:44:49 +0000 Received: from PR2PR09MB3081.eurprd09.prod.outlook.com ([fe80::6c30:b9dd:9296:2060]) by PR2PR09MB3081.eurprd09.prod.outlook.com ([fe80::6c30:b9dd:9296:2060%6]) with mapi id 15.20.7633.037; Wed, 12 Jun 2024 14:44:49 +0000 From: Tao Li To: "users@dpdk.org" CC: "tao.li06@sap.com" Subject: Failed to install QUEUE action using async API on ConnectX-6 NIC Thread-Topic: Failed to install QUEUE action using async API on ConnectX-6 NIC Thread-Index: AQHavNXYpyAbIHzDf0S+B52tsDu4xw== Date: Wed, 12 Jun 2024 14:44:49 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tmn: [fhFnV7gtCGkkB1rf17AqcV1zgECMFShK] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PR2PR09MB3081:EE_|AM7PR09MB3574:EE_ x-ms-office365-filtering-correlation-id: 9408afcd-b7d3-41ed-5c3d-08dc8aee360a x-microsoft-antispam: BCL:0; ARA:14566002|461199020|9400799016|1602099004|440099020|3412199017|102099026; x-microsoft-antispam-message-info: WQJJsxTGkLZIuxDn40k3L3WCXJpuHfQjYA+RggXvMUL7V/lTFDncHTA6pqnyCUlEm8hrobYZ1aAum+akdHi4Yx9PCEUUbsSbmmqgK2aUKE0aBmz1WxFeHdop0HlR+MrxSU8TpEHbwNCCa7lRyxCBe/oVgkHqux+zIzNoutHgKxRd7cGSi40ioOpjsxZgbjYopAC7ouIruHC4o/J7RTheIk4wE06Qy93ehBKy22lHf/f7Pp1ypXeS99pGZcERBBV88TVF3siFIPwB49V1jkIfSSRGZii9YEY8P/y7zret53JJFd3WwJSYockZm4RHnhJEc3mq9YLdPV9t17H1ZtXIUPw8e+jPJmBJvJetSbZFrx3wXaZ30v7hrwqMS+CHUfR4N1ojMWTlrIdFBps6aOPlLh/K5KhxM2IBi5AAjkqzc9an0NL+GkSS3kxAd5hWUntXN3XWk7PuzE7XD2Bagb1AKsm62f3O8asxnKmICIM1xf8itqC+agW/6J1y6BlAQjC1Yujqu+OjMsODa9r3m938eXM/96Hgb29DjaujuEeKtrVL0xVRB9E5v6Ax75mjVVW67M3OeecRCmlWGQ4qcaOWrwLXItmnJc4DEIsMsOVdn1/ROg8dHa8SQyQ3245rJMiZyN+5CKytfUabJXlZL8cpXmPIiAtv4nLjpaRG6v+mTXDvsC7+c5stGwS5kc6Z1pcV x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UlgypuAkUAai9mC5E4W77KPCeBWmStOHmKv4rmbDobQImEUbaUDgHytOwT1V?= =?us-ascii?Q?afVHUPIMgYipl41DQ9xYHDLp4zEuCQkWfcjnfFGQaU6FfMlFsKQWmCX37Ins?= =?us-ascii?Q?lfqB6L7smJQp2B1PLt0xEfSdXklQWH2LmCLUayou5VFzZ+STao7jWsHVXQX0?= =?us-ascii?Q?bbh34ff8t9gsJOccGz0ZYZzJo3vlzBr8x3SX1EZIpTH86WvRM3ElQbLWMewe?= =?us-ascii?Q?aDnPxPJysJ1/VRBysj91sLxh2ly0P3qsUO5pJio540Isc1/BWQYOKk5fMeNB?= =?us-ascii?Q?F705UuFfZoQqNmh5FOeQeYpkhB1oexXa0Zx8Vhey1fkPjklcCx0IxFJJaEn/?= =?us-ascii?Q?mSG9SSnMY6o7ofM9DHdrSInZhqp88gWLKO2OJ/Jll5lGNXx6KGGPff+agNuV?= =?us-ascii?Q?MgKDL39l95kVM2Yvomw98EY2MDApQ68YLZ6SiAk7+GmCUyNZsb0A5s1cW8UG?= =?us-ascii?Q?5JUv19vi9JXDnPfL1Nvfsmmzzyg5gM5LpSYegoV8KBNOHwxBhXaqVx26TD1O?= =?us-ascii?Q?/BXJMYhHO6E48efGs+j6JJFk/ezXXnGvR3l3vmMo0UxeKfivO4s6kji1OG+5?= =?us-ascii?Q?1iriCeRNLxsfP8GmEyL9bazZtqdGSZ1Z5A4U4vkP618YBe+TBGpCEEn8WF+l?= =?us-ascii?Q?zMEwVIGwVURZc1dcRQ49IyomDGH5pvsmJBhM7GL2ou9+rdtJbQNSuCUoXCWz?= =?us-ascii?Q?ITfABHylQ9gFxPNIkN5kbd5V+UP9hJX5HTiT4jNkNndPDuXgfNRXpl9CMpE/?= =?us-ascii?Q?BvcKibtlvNaAGP7nsprYsPMXGW6ZSPJpp/TmUsYJiurjss8l8KEqrmqRKEiF?= =?us-ascii?Q?0+EzO/Ybf+Of08iM2FsgeS/gHi0HBkw3yg8cvL7qkXoACLET/IkogV+kMqiv?= =?us-ascii?Q?PNE1Vd/QKbF7DGCE02RLlLI3IMmSjBF3iysK5nld1kzYJYqM6UUwxagtOmyN?= =?us-ascii?Q?HQckypFfOSpplOEoEbql4flzQwGQLvUf1Y+lIF88vkQh2ldyJCGlO1+uv0tR?= =?us-ascii?Q?RFJ0MtDXe9iicvTnVDF/ebn1UwWuseipuTNJkRGooPMHgxCdnDkhODcmWSa+?= =?us-ascii?Q?0QMvWeeLniw5rmuhw4XUUoG78GOKN3c1UdCNw/+bRdIhPnh3Ewf4w6CixwGC?= =?us-ascii?Q?kphvIY8o6MFAFenVCFA88tL0RG3K5E44ERhtLTdVbFWvhAsEeQOL8KhslhA9?= =?us-ascii?Q?iV0/wZURIEILxqVFGtRmKG9xlujUPEcMN860LIGU5jog7pyRQ7/wuTe4jBMH?= =?us-ascii?Q?XWEYodwu1b97GqFqDnu0?= Content-Type: multipart/alternative; boundary="_000_PR2PR09MB3081319CA0F2FD9754EE6FEEA3C02PR2PR09MB3081eurp_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR2PR09MB3081.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 9408afcd-b7d3-41ed-5c3d-08dc8aee360a X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2024 14:44:49.2804 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR09MB3574 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 --_000_PR2PR09MB3081319CA0F2FD9754EE6FEEA3C02PR2PR09MB3081eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, I am using the async API to install flow rules to perform the QUEUE action = to capture packets matching a certain pattern for processing by a DPDK appl= ication. The ConnectX-6 NIC is configured in multiport e-switch mode, as ou= tlined in the documentation (https://doc.dpdk.org/guides/nics/mlx5.html#mul= tiport-e-switch). Currently, I am facing an issue where I cannot create the= corresponding templates for this purpose. The command to start test-pmd an= d create pattern and action templates are as follows: sudo ./dpdk-testpmd -a 3b:00.0,dv_flow_en=3D2,representor=3Dpf0-1vf0 -- -i = --rxq=3D1 --txq=3D1 --flow-isolate-all port stop all flow configure 0 queues_number 1 queues_size 10 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 flow configure 1 queues_number 1 queues_size 10 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 flow configure 2 queues_number 1 queues_size 10 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 flow configure 3 queues_number 1 queues_size 10 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 port start all flow pattern_template 0 create transfer relaxed no pattern_template_id 10 = template represented_port ethdev_port_id is 0 / eth type is 0x86dd / end flow actions_template 0 create ingress actions_template_id 10 template qu= eue / end mask queue index 0xffff / end flow template_table 0 create group 0 priority 0 transfer wire_orig table_= id 5 rules_number 8 pattern_template 10 actions_template 10 flow queue 0 create 0 template_table 5 pattern_template 0 actions_template = 0 postpone no pattern represented_port ethdev_port_id is 0 / eth type is 0x= 86dd / end actions queue index 0 / end flow push 0 queue 0 The error encountered during the execution of the above test-pmd commands i= s: mlx5_net: [mlx5dr_action_print_combo]: Invalid action_type sequence mlx5_net: [mlx5dr_action_print_combo]: TIR mlx5_net: [mlx5dr_matcher_check_and_process_at]: Invalid combination in act= ion template mlx5_net: [mlx5dr_matcher_bind_at]: Invalid at 0 Upon closer inspection of the driver code in DPDK 23.11 (also the latest D= PDK main branch), it appears that the error is due to the fact that MLX5DR_= ACTION_TYP_TIR is not listed as a valid action in the MLX5DR_TABLE_TYPE_FDB= field. If the following patch is applied, the error is resolved, and the D= PDK application is able to capture matching packets: diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/ml= x5dr_action.c index 862ee3e332..c444ec761e 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.c +++ b/drivers/net/mlx5/hws/mlx5dr_action.c @@ -85,6 +85,7 @@ static const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_= MAX][MLX5DR_ACTION_TYP_ BIT(MLX5DR_ACTION_TYP_VPORT) | BIT(MLX5DR_ACTION_TYP_DROP) | BIT(MLX5DR_ACTION_TYP_DEST_ROOT) | + BIT(MLX5DR_ACTION_TYP_TIR) | BIT(MLX5DR_ACTION_TYP_DEST_ARRAY), BIT(MLX5DR_ACTION_TYP_LAST), }, I would greatly appreciate it if anyone could provide insight into whether = this behavior is intentional or if it is a bug in the driver. Many thanks i= n advance. Best regards, Tao --_000_PR2PR09MB3081319CA0F2FD9754EE6FEEA3C02PR2PR09MB3081eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all,<= /span>

 

I am using the asyn= c API to install flow rules to perform the QUEUE action to capture packets = matching a certain pattern for processing by a DPDK application. The Connec= tX-6 NIC is configured in multiport e-switch mode, as outlined in the documentation (https://doc.dpdk.org/guide= s/nics/mlx5.html#multiport-e-switch). Currently, I am facing an issue w= here I cannot create the corresponding templates for this purpose. The command to start test-pmd and create patte= rn and action templates are as follows:

 

<Command to s= tart test-pmd>

sudo ./dpdk-testpmd= -a 3b:00.0,dv_flow_en=3D2,representor=3Dpf0-1vf0 -- -i --rxq=3D1 --txq=3D1= --flow-isolate-all

</Command to = start test-pmd>

 

<Not working = test-pmd commands>

port stop all<= /o:p>

flow configure 0 qu= eues_number 1 queues_size 10 counters_number 0 aging_counters_number 0 mete= rs_number 0 flags 0

flow configure 1 qu= eues_number 1 queues_size 10 counters_number 0 aging_counters_number 0 mete= rs_number 0 flags 0

flow configure 2 qu= eues_number 1 queues_size 10 counters_number 0 aging_counters_number 0 mete= rs_number 0 flags 0

flow configure 3 qu= eues_number 1 queues_size 10 counters_number 0 aging_counters_number 0 mete= rs_number 0 flags 0

port start all=

 

flow pattern_templa= te 0 create transfer relaxed no pattern_template_id 10  template repre= sented_port ethdev_port_id is 0 / eth type is 0x86dd  / end=

flow actions_templa= te 0 create ingress  actions_template_id 10  template queue / end= mask queue index 0xffff / end

flow template_table= 0 create  group 0 priority 0  transfer wire_orig table_id 5 rule= s_number 8 pattern_template 10 actions_template 10

flow queue 0 create= 0 template_table 5 pattern_template 0 actions_template 0 postpone no patte= rn represented_port ethdev_port_id is 0 / eth type is 0x86dd  / end ac= tions queue index 0 / end

flow push 0 queue 0=

</Not working= test-pmd commands>

 

The error encounter= ed during the execution of the above test-pmd commands is:

 

<Encounted er= ror>

mlx5_net: [mlx5dr_a= ction_print_combo]: Invalid action_type sequence

mlx5_net: [mlx5dr_a= ction_print_combo]: TIR

mlx5_net: [mlx5dr_m= atcher_check_and_process_at]: Invalid combination in action template

mlx5_net: [mlx5dr_m= atcher_bind_at]: Invalid at 0

</Encounted e= rror>

 

Upon closer inspect= ion of the driver code in DPDK 23.11 (also  the latest DPDK main branch), it appears that the error is due to the fact that MLX5DR_ACTION_TYP_TIR is not listed as a valid act= ion in the MLX5DR_TABLE_TYPE_FDB field. If the following patch is applied, = the error is resolved, and the DPDK application is able to capture matching= packets:

 

<patch to app= ly>

diff --git a/driver= s/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c<= /o:p>

index 862ee3e332..c= 444ec761e 100644

--- a/drivers/net/m= lx5/hws/mlx5dr_action.c

+++ b/drivers/net/m= lx5/hws/mlx5dr_action.c

@@ -85,6 +85,7 @@ s= tatic const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_MAX][MLX5DR_ACTION_= TYP_

   &= nbsp;            BIT= (MLX5DR_ACTION_TYP_VPORT) |

   &= nbsp;            BIT= (MLX5DR_ACTION_TYP_DROP) |

   &= nbsp;            BIT= (MLX5DR_ACTION_TYP_DEST_ROOT) |

+   =             BIT(MLX5= DR_ACTION_TYP_TIR) |

   &= nbsp;            BIT= (MLX5DR_ACTION_TYP_DEST_ARRAY),

   &= nbsp;            BIT= (MLX5DR_ACTION_TYP_LAST),

   &= nbsp;    },

</patch to ap= ply>

 

I would greatly app= reciate it if anyone could provide insight into whether this behavior is in= tentional or if it is a bug in the driver. Many thanks in advance.

<= /p>

Best regards,<= /o:p>

Tao

--_000_PR2PR09MB3081319CA0F2FD9754EE6FEEA3C02PR2PR09MB3081eurp_--