From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <users-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07CE943D0E for <public@inbox.dpdk.org>; Fri, 22 Mar 2024 16:08:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 710F9402A7; Fri, 22 Mar 2024 16:08:44 +0100 (CET) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02olkn2086.outbound.protection.outlook.com [40.92.48.86]) by mails.dpdk.org (Postfix) with ESMTP id 1791B40284 for <users@dpdk.org>; Fri, 22 Mar 2024 16:08:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c3uMKzfTDCCIKb21r7Lku/gf/bXj5oAq3POvN08uxeT00QQfvrgjvrnMWp19SAQtEonBm6MOxRptFwMmTBM8M71QOfIP+oq5U/8pzF8ZmvKxR9THXHoVQFC6mO3DANnSb+veUJGxZqrHQ/jSfTXYL4r+RTjlNyAhEaCU96AMCLsROubxgb8udLPcOzDnbj53jZRG1SjjNobBduP42fCEC2hJl/Yg6D7ShCDrEoVDilpgBiiWf56Y+g16QKnqT/zG2wZC7pPQ23j73LLDW4RRXyT/E2JCCFd4MLnsDMl6WzeQCXm9MSp4NHoGJ8127/YPPT0w/Sd8pN7QgY7BeUmrfA== 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=wpYsoP4spP/SKEA3heTSTy8d4dyV1yyt5ry2Q6Msav4=; b=KxbbC6XqRld1s0+u4aUTw3Q1oCczdCbCNCJG6iF8F1wVC/kVJz1VuhnYbxrukrUYUAEuKaUWzx/Caq7Ql//NyQGWPU0IP/USdMbnvs0U/d1/cEFVaCM1TwccWnOtZG6ocI+L2HeyowAf/pIa/VI/jb22JptSFqUOVAki4jk8fAJmIV7Jkvtzt5xb+0/sW2hAN7Bdjj9d2rw3y/i6CaBHxJFhAuL9tYYSVw4fxl7HaPdT+Vz3GXIodMqpsg7YuzuxY6Ndnmu/DRviXqbGRT2xcxPchHY8BJmAdNC2GmR2VYmMBUydyJNLpejImfl8uTp0eFDsn6799nbDys38rIVzvA== 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=wpYsoP4spP/SKEA3heTSTy8d4dyV1yyt5ry2Q6Msav4=; b=SCtWKNm5hxgxnsxpmM13p40MjlMOhhIbAX89MRojUtP1a1YCJP7n08eccTQHQxp2WSfKy3/IC4ZdNQXXM9dy4Xger3m9Fy+jO3FYCg6CMqGnL0s1eb7sLRVpSCzZmXwsptkX4dVnBPJu5a5dD0N/G9071GT9foT4F129pRkfAAKMlqqQ9s2nK9DWNicezHiBnljNI7lbQ2cyPi2eDDeC5Aq7ClQfBa0K3ogwkufdS2PUzZTrcqwPCrQy34yqPb98D68DkWtHo1GueB1Ewnqbzvsz8S8jeaid9GieY9S85P/mdm+oejCGlkr/Du2bwTRoXkV/TBIQuUHbIjN5YCbqNw== Received: from DB9P193MB1739.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:24f::20) by AM0P193MB0707.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:16d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.15; Fri, 22 Mar 2024 15:08:40 +0000 Received: from DB9P193MB1739.EURP193.PROD.OUTLOOK.COM ([fe80::181b:48ce:3f89:e0da]) by DB9P193MB1739.EURP193.PROD.OUTLOOK.COM ([fe80::181b:48ce:3f89:e0da%7]) with mapi id 15.20.7409.023; Fri, 22 Mar 2024 15:08:40 +0000 From: Tao Li <byteocean@hotmail.com> To: Asaf Penso <asafp@nvidia.com>, "users@dpdk.org" <users@dpdk.org> Subject: Re: Finer matching granularity with async template API Thread-Topic: Finer matching granularity with async template API Thread-Index: AQHae6BPNEwcGktAFESopA2jvtTxHrFCkUNugAAAdQaAAQY17oAARUEj Date: Fri, 22 Mar 2024 15:08:40 +0000 Message-ID: <DB9P193MB173969AD647DBBFAC4F5B7F5A3312@DB9P193MB1739.EURP193.PROD.OUTLOOK.COM> References: <DB9P193MB1739F96764E8CEEB53C3CFA3A3322@DB9P193MB1739.EURP193.PROD.OUTLOOK.COM> <SA3PR12MB881179E6B7EC4556A24D7799CD322@SA3PR12MB8811.namprd12.prod.outlook.com> <SA3PR12MB881122DD9344AD533DCD65CFCD322@SA3PR12MB8811.namprd12.prod.outlook.com> <DB9P193MB17394A00CCEB00D137FA6264A3312@DB9P193MB1739.EURP193.PROD.OUTLOOK.COM> In-Reply-To: <DB9P193MB17394A00CCEB00D137FA6264A3312@DB9P193MB1739.EURP193.PROD.OUTLOOK.COM> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tmn: [+rURiSSgy2Hji7Jmine1Spmopq6CI1GX] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB9P193MB1739:EE_|AM0P193MB0707:EE_ x-ms-office365-filtering-correlation-id: ec54a6d2-b188-403f-dca3-08dc4a81f50e x-ms-exchange-slblob-mailprops: BG3AXrlrvvrsPTJDEpWWGy24uyAizBFH3ZbnLwyBUR1MO047X+lOcf0v43itcXu/prSIr6/Teut1YUBrUATSgZtQNeug3eHwxZoj3CetdCksEXmRoWHb+y8p2nCTkEZQaZP1QuYL0MM/jc7KRc47MW7YVNaBdIxyuZRauZUAJGDlyanoH2guP6tVCFKSBvcaT2IYY+OryAKXyDj+M76fLYFZV3h4WdSX/rNUX2RTN3otLnLf21aZQaQOEMObnYiFJEXaVGduMNGeA9cilVuGhKvwHSMdgS0TeAQb0TbcWYeZgM+GzAVc7t0TfFFZSfdFyEY6D0OBY/+sZVcx624o79ZDJf6nvbFWDfuN2Yu+RP/GPhUNYTxbHvBdbKNrQu6vGACzKSPTLaKvHQOd5JBu4mNl/zevVDUIUpxNxGpBh6NK7tQ8Y6/lg5D1CJq3GKpQJYz0KjUdV/fbuOzh8LD88vPTl2rBI3icflAPP/c1dGcuhIuLv34u/uZJShD4Mm0pD4F4T6Uzo98fNDvBf02EIZP9+w+6yjUZ2AX/QgRR11A94IDwdOY9ylupkmYEWnnrKsIJp1NtJivfz1TlWbc905pPT5hGjPlYgxWQGyJZWGvju3BOTo0Jl6PLeHZzx9yc40oSKFDgHA5yll/scGBHspHi0IIM+pURjF/Hj7xo/xtDaHMIuJL4LxuKFsRwcy0SI72/6avfIUQqPIIiIzXcVWOj/zWM/ZwiJvL6quVHqfwsc9/vrAYxe8Aa/CHqG+Mv6x4a43OMqCzlIv42ndIrHYnKS+dDCEemkUC9P0t0DlhTkhKecAmy/Q== x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oq12XO85L7c0mC3W8DbwAKTLMrfipQi9jJ8W6QuNz+Z//6nG/TlmK6Zur20fuXyRlk0jvBJG8Kps+7bHXmwekWItsemuPx/EkvYko8ACg0o5txZATduuPrY0mGGFWXItmE4enVdIxSKt8Y4C7n4GDBpvtDbuxuxPCC6JJjRAmkhAMM/5aKJR77IfnVGyF+jyVLF2G3X7Xd2CyLgDRKFBYiPy6nkiPOm4BcX1QK2PggrvBoIal48HX5c44V9B4upaidwaNxA2Lq/09D/H1rS++oikVNeMPkd5zWdnDwn0/S4ZkdQ/vCIEDL7tJpdWe145QBabypXyss2enjK3XPLeoOhot4SenhNKyML9Y4h6z/b0eLfbNX8itvSrt4zqiVdehbS98guBWjtXCCZ/EH3HvbNBuvZbWflekfoaTa/A21P9CPQ7dvEJ7Kg8DAsJT2NbXEUvquOx7cT4JhYSNujYLT1Q4veLvqWnGJCzmYTWJLWGW/cUx8hDLD8cUXAUtP5nnRmjJyo2u70fiQgNsyWTzoN2ggKlGtpjXuBh6kFdyWVpOnbB52/kJ4acDpSWKT3pRhyakijXJnxQBAE0HzqE9/xRbMrbkVsotiljzsjZrXmo6slzOzthvPwymw91bOjykR+s1QxH0sJ3T5DH6Xrm9D3NGIspiC4vHBQlWJlXXX6znZSNN9BOR0DrRVZlMOvG x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?Pe6T3/AHcHZ9guHqCVDX+xW414/BaSmRWN4j8FkPveguc/5SbjJDAsEn?= =?Windows-1252?Q?qqXiLsLFIcIABLceeTR9EG8d/7Z13IxN+P7q+g9xPipsfgi8nFwLYGCW?= =?Windows-1252?Q?VbQ8kJz8sl3Fj2P+1NJG9R2yxCWv3Uee2d7vPTUgeJ6wD3UlkMz8b+hv?= =?Windows-1252?Q?9DM5zv1kYGC4pmOfdLGDwnS37RLrvd4WkXnD0WLMtrGqFoB6TvJe1XEd?= =?Windows-1252?Q?lTjks94HH7rqXkSVyHstqcKlmZlMzWOtMyG48Y51U1ipZHtr1SuWDqS8?= =?Windows-1252?Q?2DFaSMBEEH33UCRlzWkyaSr70rxYKoRs3/JH6VHnT3bzGA64WlhzX7YE?= =?Windows-1252?Q?XyT3XSO7wheNAZg018i74Zrco7D8e3mnc44JSpVkMQt83/ZoMd7YjKm/?= =?Windows-1252?Q?jnE63KGVlI8o6jDfkU37MNU6d4ktSSk7r0/0UBLP9amfxQNH7PzkKs2G?= =?Windows-1252?Q?kx1v8k6zocVokNSH0+HRk2IrJ1Q6MiCSG2P9gtRWvWBKDbIMcSwLJQkJ?= =?Windows-1252?Q?bsqEpSdvHamzGSkQHc5jiUE7f2fDJnNWap3WmqsjNHYIIo5StV8GZyG5?= =?Windows-1252?Q?hYdPw03jUz4EL3EX3eXOCBU5Jz4FedJ0aINy9U76jZpnmi9Ly6kuNsMr?= =?Windows-1252?Q?Q7L7fJJDSyCZ0ha9H12cAQi05U7BqY8DhXhJiGswOfn0hhDDaOab/nie?= =?Windows-1252?Q?GVVqN/Z7XWcZn00fVQBxxnxvvLCEo/B+43/oTj8q45zw2wR03zO1s1sM?= =?Windows-1252?Q?ol8QXdzG3Ci+WsYxRitu5yRBvkpDMbI552CzSKOpMx2mNRaXeGRe1wzT?= =?Windows-1252?Q?6S48m/1wN4LDII09yWE2k90PJSw3uUfe5TwZX3WGzzDr8hqIVivipPJQ?= =?Windows-1252?Q?+zryWwAitDhAh5XmUtQ0yH9+GvD6iLDWfxF8lU9mMyeC3FyQoF3STz6m?= =?Windows-1252?Q?GNa3Jmcb/drRg5mfrq7GbComzXki/19TieumJEGps15tqQb7EwMdgold?= =?Windows-1252?Q?BiYb4ef+PumZP3MsRF8vVZlmLLoHRFm5fVfZVQ+y50apdHkQ4ei9wbTN?= =?Windows-1252?Q?RZe3fYX2q+u6BWt2etPzn5mOB1DTE8vdTPJEDaaboRDvro+hGphVF8Vu?= =?Windows-1252?Q?XGpvss6htyCevHYMWmESZqunQmRX9K2/9lcdsMnN2c79eAW19FGw1/1B?= =?Windows-1252?Q?QcRWfQ5CuetvqLvULy3FhYA/P9s+k8FY/j/+A7JnzdzcBr1hW+EjOfNF?= =?Windows-1252?Q?JOQIR21AvhbY+swdxHtA4hNjWvgRdN+bQBaMZsMlayOGq05xdeLsER9q?= =?Windows-1252?Q?Qjl9bECV14p8rzjGYQkWobk73GKnkeVDvDy8anjrI+5/FV30?= Content-Type: multipart/alternative; boundary="_000_DB9P193MB173969AD647DBBFAC4F5B7F5A3312DB9P193MB1739EURP_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-80ceb.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB9P193MB1739.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: ec54a6d2-b188-403f-dca3-08dc4a81f50e X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2024 15:08:40.2330 (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: AM0P193MB0707 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions <users.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/users>, <mailto:users-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/users/> List-Post: <mailto:users@dpdk.org> List-Help: <mailto:users-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/users>, <mailto:users-request@dpdk.org?subject=subscribe> Errors-To: users-bounces@dpdk.org --_000_DB9P193MB173969AD647DBBFAC4F5B7F5A3312DB9P193MB1739EURP_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hello Asaf, We generate incoming IPinIP packets by using our complex solution, but belo= w you can find a Python script to generate such packets to serve this purpo= se. I hope it is helpful to reproduce this issue. Thanks again. <Code snippet to generate IPinIP packets> #!/usr/bin/python3 from scapy.all import * from scapy.layers.inet import Ether, UDP, ICMP from scapy.layers.inet6 import * ether =3D Ether() ether.src =3D "src mac" ether.dst =3D "dst mac" ether.type =3D 0x86DD ipv6 =3D IPv6() ipv6.src =3D "src ipv6 addr" ipv6.dst =3D "dst ipv6 addr" ipv6.nh =3D 4 pkt =3D ether / ipv6 / IP(src=3D"192.168.129.5",dst=3D"172.32.4.9") / ICMP(= type=3D8) print(pkt.show()) sendp(pkt, iface =3D"ens1f0np0") < /Code snippet to generate IPinIP packets > Cheers, Tao From: Tao Li <byteocean@hotmail.com> Date: Friday, 22. March 2024 at 14:19 To: Asaf Penso <asafp@nvidia.com>, users@dpdk.org <users@dpdk.org> Subject: Re: Finer matching granularity with async template API Hellp Asaf, Thanks for your speedy reply. Please find additional information based on y= our questions, and I hope they would help to understand our purpose and iss= ue. 1. Why ipv6/ipv4/icmp? We are performing IPinIP tunnelling for traffic, and in this provided test-= pmd example we encapsulate IPv4 packets from VMs into IPv6 underlay packets= . The refence RFCs for this approach are RFC 1853 and RFC 2473. This articl= e<https://www.h3c.com/en/Support/Resource_Center/HK/Switches/H3C_S7500E_X/S= 7500E-X/Technical_Documents/Configure___Deploy/Configuration_Guides/H3C_S75= 00E-X_CG-Release7178-6W100/05/201602/914694_294551_0.htm> also provides goo= d visualization on packet structures for this IPinIP tunnelling approach. 1. What output /error message? No crashing error message or similar happens, thus it is difficult for us t= o debug what is exactly going on. What is observed is that incoming packets= cannot be captured and processed by this flow rule, compared with using t= he flow rule only performs eth/ipv6 matching. After removing relevant comma= nds or code that perform inner header matching for IPv4 and ICMP, packets c= an be successfully processed. The code snippets to programmably achieve the= above described IPinIP tunnelling approach are as following: <Code snippet to initialise pattern masks> static const struct rte_flow_item_eth flow_item_eth_mask =3D { .hdr.ether_type =3D 0xffff, }; static const struct rte_flow_item_ipv6 flow_item_ipv6_dst_mask =3D { .hdr.proto =3D 0xff, }; static const struct rte_flow_item_ipv4 flow_item_ipv4_proto_mask =3D { .hdr.next_proto_id =3D 0xff, }; static const struct rte_flow_item_icmp flow_item_icmp_mask =3D { .hdr.icmp_type =3D 0xff, }; </Code snippet to initialise pattern masks> <Code snippet to create pattern template> // pattern template struct rte_flow_item pattern[] =3D { [0] =3D {.type =3D RTE_FLOW_ITEM_TYPE_REPRE= SENTED_PORT, .mask =3D &represented_port_mask}, [1] =3D {.type =3D RTE_FLOW_ITEM_TYPE_ETH, = .mask =3D &flow_item_eth_mask}, [2] =3D {.type =3D RTE_FLOW_ITEM_TYPE_IPV6,= .mask =3D &flow_item_ipv6_dst_mask}, [3] =3D {.type =3D RTE_FLOW_ITEM_TYPE_IPV4,= .mask =3D &flow_item_ipv4_proto_mask}, [4] =3D {.type =3D RTE_FLOW_ITEM_TYPE_ICMP,= .mask =3D &flow_item_icmp_mask}, [5] =3D {.type =3D RTE_FLOW_ITEM_TYPE_END,}= , }; port_template_info_pf.pattern_templates[0] =3D create_patte= rn_template(main_eswitch_port, pattern); </Code snippet to create pattern template> <Code snippet to create patterns> struct rte_flow_item_eth eth_pattern =3D {.type =3D htons(0= x86DD)}; struct rte_flow_item_ipv6 ipv6_hdr =3D {0}; ipv6_hdr.hdr.proto =3D IPPROTO_IPIP; struct rte_flow_item_ipv4 ipv4_hdr =3D {0}; ipv4_hdr.hdr.next_proto_id =3D IPPROTO_ICMP; struct rte_flow_item_icmp icmp_hdr =3D {0}; icmp_hdr.hdr.icmp_type =3D RTE_IP_ICMP_ECHO_REQUEST; struct rte_flow_item_ethdev represented_port =3D {.port_id = =3D pf_port_id}; struct rte_flow_item concrete_patterns[6]; concrete_patterns[0].type =3D RTE_FLOW_ITEM_TYPE_REPRESENTE= D_PORT; concrete_patterns[0].spec =3D &represented_port; concrete_patterns[0].mask =3D NULL; concrete_patterns[0].last =3D NULL; concrete_patterns[1].type =3D RTE_FLOW_ITEM_TYPE_ETH; concrete_patterns[1].spec =3D ð_pattern; concrete_patterns[1].mask =3D NULL; concrete_patterns[1].last =3D NULL; concrete_patterns[2].type =3D RTE_FLOW_ITEM_TYPE_IPV6; concrete_patterns[2].spec =3D &ipv6_hdr; concrete_patterns[2].mask =3D NULL; concrete_patterns[2].last =3D NULL; concrete_patterns[3].type =3D RTE_FLOW_ITEM_TYPE_IPV4; concrete_patterns[3].spec =3D &ipv4_hdr; concrete_patterns[3].mask =3D NULL; concrete_patterns[3].last =3D NULL; concrete_patterns[4].type =3D RTE_FLOW_ITEM_TYPE_ICMP; concrete_patterns[4].spec =3D &icmp_hdr; concrete_patterns[4].mask =3D NULL; concrete_patterns[4].last =3D NULL; concrete_patterns[5].type =3D RTE_FLOW_ITEM_TYPE_END; concrete_patterns[5].spec =3D NULL; concrete_patterns[5].mask =3D NULL; concrete_patterns[5].last =3D NULL; </Code snippet to create patterns> Looking forward to your further support, and many thanks in advance. Best regards, Tao From: Asaf Penso <asafp@nvidia.com> Date: Thursday, 21. March 2024 at 20:18 To: Tao Li <byteocean@hotmail.com>, users@dpdk.org <users@dpdk.org> Subject: Re: Finer matching granularity with async template API BTW, In the non working example I see ipv6 / ipv4 / ICMP. Was this your intentio= n or did you mean ipv6 / ICMP? Regards, Asaf Penso ________________________________ From: Asaf Penso <asafp@nvidia.com> Sent: Thursday, March 21, 2024 9:17:04 PM To: Tao Li <byteocean@hotmail.com>; users@dpdk.org <users@dpdk.org> Subject: Re: Finer matching granularity with async template API Hello Tao, What is the output / error message you get? Regards, Asaf Penso ________________________________ From: Tao Li <byteocean@hotmail.com> Sent: Thursday, March 21, 2024 5:44:00 PM To: users@dpdk.org <users@dpdk.org> Subject: Finer matching granularity with async template API Hi all, I am using async template API to install flow rules to perform actions on p= ackets to achieve IP(v4)inIP(v6) tunnelling. Currently I am facing an issue= where I cannot perform incoming traffic matching with finer granularity. T= he test-pmd commands in use are as following: <Not working test-pmd commands> port stop all flow configure 0 queues_number 4 queues_size 64 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 # PF0 flow configure 1 queues_number 4 queues_size 64 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 flow configure 2 queues_number 4 queues_size 64 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 flow configure 3 queues_number 4 queues_size 64 counters_number 0 aging_cou= nters_number 0 meters_number 0 flags 0 # PF1V0 port start all set verbose 1 flow pattern_template 0 create transfer relaxed no pattern_template_id 10 = template represented_port ethdev_port_id is 0 / eth / ipv6 / ipv4 / icmp = / end set raw_decap 0 eth / ipv6 / end_set set raw_encap 0 eth src is 11:22:33:44:55:66 dst is 66:9d:a7:fd:fb:43 type = is 0x0800 / end_set flow actions_template 0 create transfer actions_template_id 10 template r= aw_decap index 0 / raw_encap index 0 / represented_port / end mask raw_deca= p index 0 / raw_encap index 0 / represented_port / 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 / ipv6 /= ipv4 / icmp / end actions raw_decap index 0 / raw_encap index 0 / repres= ented_port ethdev_port_id 3 / end flow push 0 queue 0 </Not working test-pmd commands> Once I remove matching patterns for the inner packet headers( ipv4 / icmp) = as following, I can see the processed packets inside VMs using tcpdump. <Working test-pmd commands> =85 flow pattern_template 0 create transfer relaxed no pattern_template_id 10 = template represented_port ethdev_port_id is 0 / eth / ipv6 / end =85 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 / ipv6 = / end actions raw_decap index 0 / raw_encap index 0 / represented_port eth= dev_port_id 3 / end =85 </Working test-pmd commands> Similar combination works when using the synchronous rte_flow API. Any comm= ent or suggestion on this issue is much appreciated. Many thanks in advance= . Best regards, Tao --_000_DB9P193MB173969AD647DBBFAC4F5B7F5A3312DB9P193MB1739EURP_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1= 252"> <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style><![endif]--><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:DengXian; panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Aptos; panose-1:2 11 0 4 2 2 2 2 2 4;} @font-face {font-family:"\@DengXian"; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:10.0pt; font-family:"Aptos",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#467886; text-decoration:underline;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; font-size:10.0pt; font-family:"Aptos",sans-serif;} p.xxmsonormal, li.xxmsonormal, div.xxmsonormal {mso-style-name:xxmsonormal; margin:0cm; font-size:10.0pt; font-family:"Aptos",sans-serif;} span.EmailStyle21 {mso-style-type:personal-reply; font-family:"Aptos",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt; mso-ligatures:none;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.WordSection1 {page:WordSection1;} /* List Definitions */ @list l0 {mso-list-id:796604992; mso-list-template-ids:-234999042;} @list l0:level1 {mso-level-start-at:2; mso-level-tab-stop:36.0pt; mso-level-number-position:left; text-indent:-18.0pt;} @list l1 {mso-list-id:2051417849; mso-list-template-ids:-1444364668;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"en-DE" link=3D"#467886" vlink=3D"#96607D" style=3D"word-wrap:= break-word"> <div class=3D"WordSection1"> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">Hello Asaf,<o:p></o= :p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"><o:p> </o:p></= span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">We generate incomin= g IPinIP packets by using our complex solution, but below you can find a Py= thon script to generate such packets to serve this purpose. I hope it is he= lpful to reproduce this issue. Thanks again.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"><o:p> </o:p></= span></p> <p class=3D"MsoNormal"><b><span style=3D"font-size:10.5pt"><Code snippet= to generate IPinIP packets><o:p></o:p></span></b></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">#!/usr/bin/python3<= o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">from scapy.all impo= rt *<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">from scapy.layers.i= net import Ether, UDP, ICMP<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">from scapy.layers.i= net6 import *<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt"><o:p> </o:p></= span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ether =3D Ether()<o= :p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ether.src =3D "= ;src mac"<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ether.dst =3D "= ;dst mac"<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ether.type =3D 0x86= DD<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt"><o:p> </o:p></= span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ipv6 =3D IPv6()<o:p= ></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ipv6.src =3D "= src ipv6 addr"<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ipv6.dst =3D "= dst ipv6 addr"<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">ipv6.nh =3D 4<o:p><= /o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt"><o:p> </o:p></= span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">pkt =3D ether / ipv= 6 / IP(src=3D"192.168.129.5",dst=3D"172.32.4.9") / ICMP= (type=3D8)<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt"><o:p> </o:p></= span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">print(pkt.show())<o= :p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt">sendp(pkt, iface = =3D"ens1f0np0")<o:p></o:p></span></p> <p class=3D"MsoNormal"><b><span style=3D"font-size:10.5pt">< /Code snipp= et to generate IPinIP packets ><o:p></o:p></span></b></p> <p class=3D"MsoNormal"><b><span style=3D"font-size:10.5pt"><o:p> </o:p= ></span></b></p> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Cheers,<o:p></o:p><= /span></p> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Tao<o:p></o:p></spa= n></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"><o:p> </o:p></= span></p> <div id=3D"mail-editor-reference-message-container"> <div> <div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm = 0cm 0cm"> <p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt"><b><span style=3D"fon= t-size:12.0pt;color:black">From: </span></b><span style=3D"font-size:12.0pt;color:black">Tao Li <byteocea= n@hotmail.com><br> <b>Date: </b>Friday, 22. March 2024 at 14:19<br> <b>To: </b>Asaf Penso <asafp@nvidia.com>, users@dpdk.org <users@dp= dk.org><br> <b>Subject: </b>Re: Finer matching granularity with async template API<o:p>= </o:p></span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">Hellp Asaf,</span><= span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"> </span><span = style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">Thanks for your spe= edy reply. Please find additional information based on your questions, and = I hope they would help to understand our purpose and issue.</span><span sty= le=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"> </span><span = style=3D"font-size:12.0pt"><o:p></o:p></span></p> <ol style=3D"margin-top:0cm" start=3D"1" type=3D"1"> <li class=3D"MsoListParagraph" style=3D"margin-left:0cm;mso-list:l1 level1 = lfo1"><span style=3D"font-size:11.0pt">Why ipv6/ipv4/icmp? </span><span style=3D"font-size:12.0pt"><o:p></o:p></span></li></ol> <p class=3D"MsoListParagraph"><span style=3D"font-size:11.0pt">We are perfo= rming IPinIP tunnelling for traffic, and in this provided test-pmd example = we encapsulate IPv4 packets from VMs into IPv6 underlay packets. The refenc= e RFCs for this approach are RFC 1853 and RFC 2473. This <a href=3D"https://www.h3c.com/en/Support/Resource_Cent= er/HK/Switches/H3C_S7500E_X/S7500E-X/Technical_Documents/Configure___Deploy= /Configuration_Guides/H3C_S7500E-X_CG-Release7178-6W100/05/201602/914694_29= 4551_0.htm"> article</a> also provides good visualization on packet structures for this = IPinIP tunnelling approach. </span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:11.0pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <ol style=3D"margin-top:0cm" start=3D"2" type=3D"1"> <li class=3D"MsoListParagraph" style=3D"margin-left:0cm;mso-list:l0 level1 = lfo2"><span style=3D"font-size:11.0pt">What output /error message?</span><s= pan style=3D"font-size:12.0pt"><o:p></o:p></span></li></ol> <p class=3D"MsoListParagraph"><span style=3D"font-size:11.0pt">No crashing = error message or similar happens, thus it is difficult for us to debug what= is exactly going on. What is observed is that incoming packets <b>cannot</b> be captured and processed by this flow rule, compared w= ith using the flow rule only performs eth/ipv6 matching. After removing rel= evant commands <b>or</b> code that perform inner header matching for IPv4 and ICMP, packet= s can be successfully processed. The code snippets to programmably achieve = the above described IPinIP tunnelling approach are as following:</span><spa= n style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:11.0pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><b><span style=3D"font-size:10.5pt"><Code = snippet to initialise pattern masks></span></b><span style=3D"font-size:= 12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">static const struct rte_flow_item_eth flow_item_eth_mask =3D {</s= pan><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">  = ; .hdr.ether_type =3D 0xffff,</span><span style=3D"= font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">};</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt"> </span><span style=3D"font-size:12.0pt"><o:p></o:p></span><= /p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">static const struct rte_flow_item_ipv6 flow_item_ipv6_dst_mask = =3D {</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">  = ; .hdr.proto =3D 0xff,</span><span style=3D"font-si= ze:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">};</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt"> </span><span style=3D"font-size:12.0pt"><o:p></o:p></span><= /p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">static const struct rte_flow_item_ipv4 flow_item_ipv4_proto_mask = =3D {</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">  = ; .hdr.next_proto_id =3D 0xff,</span><span style=3D= "font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">};</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt"> </span><span style=3D"font-size:12.0pt"><o:p></o:p></span><= /p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">static const struct rte_flow_item_icmp flow_item_icmp_mask =3D {<= /span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">  = ; .hdr.icmp_type =3D 0xff,</span><span style=3D"fon= t-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"margin-left:72.0pt"><span style=3D"font-siz= e:10.5pt">};</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><b><span style=3D"font-size:10.5pt"></Code= snippet to initialise pattern masks></span></b><span style=3D"font-size= :12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><b><span style=3D"font-size:10.5pt"><Code = snippet to create pattern template></span></b><span style=3D"font-size:1= 2.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; // pattern template</span><span style=3D"font-size:12.0pt"><o:p></o:p><= /span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; struct rte_flow_item pattern[] =3D {</span><span style=3D"font-size:12.= 0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; = [0] =3D {.type =3D RTE_FLOW_ITEM_TYPE_REPRESENTED_= PORT, .mask =3D &represented_port_mask},</span><span style=3D"font-size= :12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; = [1] =3D {.type =3D RTE_FLOW_ITEM_TYPE_ETH, .mask = =3D &flow_item_eth_mask},</span><span style=3D"font-size:12.0pt"><o:p><= /o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; = [2] =3D {.type =3D RTE_FLOW_ITEM_TYPE_IPV6, .mask = =3D &flow_item_ipv6_dst_mask},</span><span style=3D"font-size:12.0pt"><= o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; = [3] =3D {.type =3D RTE_FLOW_ITEM_TYPE_IPV4, .mask = =3D &flow_item_ipv4_proto_mask},</span><span style=3D"font-size:12.0pt"= ><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; = [4] =3D {.type =3D RTE_FLOW_ITEM_TYPE_ICMP, .mask = =3D &flow_item_icmp_mask},</span><span style=3D"font-size:12.0pt"><o:p>= </o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; = [5] =3D {.type =3D RTE_FLOW_ITEM_TYPE_END,},</span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; }; </span> <span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; port_template_info_pf.pattern_templates[0] =3D create_pattern_template(= main_eswitch_port, pattern);</span><span style=3D"font-size:12.0pt"><o:p></= o:p></span></p> <p class=3D"MsoListParagraph"><b><span style=3D"font-size:10.5pt"></Code= snippet to create pattern template></span></b><span style=3D"font-size:= 12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><b><span style=3D"font-size:10.5pt"><Code = snippet to create patterns></span></b><span style=3D"font-size:12.0pt"><= o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; struct rte_flow_item_eth eth_pattern =3D {.type =3D htons(0x86DD)};</sp= an><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.5pt"> </span><span = style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; struct rte_flow_item_ipv6 ipv6_hdr =3D {0};</span><span style=3D"font-s= ize:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; ipv6_hdr.hdr.proto =3D IPPROTO_IPIP;</span><span style=3D"font-size:12.= 0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; struct rte_flow_item_ipv4 ipv4_hdr =3D {0};</span><span style=3D"font-s= ize:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; ipv4_hdr.hdr.next_proto_id =3D IPPROTO_ICMP;</span><span style=3D"font-= size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; struct rte_flow_item_icmp icmp_hdr =3D {0};</span><span style=3D"font-s= ize:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; icmp_hdr.hdr.icmp_type =3D RTE_IP_ICMP_ECHO_REQUEST;</span><span style= =3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; struct rte_flow_item_ethdev represented_port =3D {.port_id =3D pf_port_= id};</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; struct rte_flow_item concrete_patterns[6];</span><span style=3D"font-si= ze:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[0].type =3D RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT;</spa= n><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[0].spec =3D &represented_port;</span><span style= =3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[0].mask =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[0].last =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[1].type =3D RTE_FLOW_ITEM_TYPE_ETH;</span><span style= =3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[1].spec =3D &eth_pattern;</span><span style=3D"fo= nt-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[1].mask =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[1].last =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[2].type =3D RTE_FLOW_ITEM_TYPE_IPV6;</span><span styl= e=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[2].spec =3D &ipv6_hdr;</span><span style=3D"font-= size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[2].mask =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[2].last =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[3].type =3D RTE_FLOW_ITEM_TYPE_IPV4;</span><span styl= e=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[3].spec =3D &ipv4_hdr;</span><span style=3D"font-= size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[3].mask =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[3].last =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[4].type =3D RTE_FLOW_ITEM_TYPE_ICMP;</span><span styl= e=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[4].spec =3D &icmp_hdr;</span><span style=3D"font-= size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[4].mask =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[4].last =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[5].type =3D RTE_FLOW_ITEM_TYPE_END;</span><span style= =3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[5].spec =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[5].mask =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:10.5pt"> = &nb= sp; concrete_patterns[5].last =3D NULL;</span><span style=3D"font-size:12.0= pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><b><span style=3D"font-size:10.5pt"></Code= snippet to create patterns></span></b><span style=3D"font-size:12.0pt">= <o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:11.0pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:11.0pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">Looking forward to = your further support, and many thanks in advance.</span><span style=3D"font= -size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"> </span><span = style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">Best regards,</span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">Tao</span><span sty= le=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoListParagraph"><span style=3D"font-size:11.0pt"> </span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"> </span><span = style=3D"font-size:12.0pt"><o:p></o:p></span></p> <div id=3D"mail-editor-reference-message-container"> <div> <div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm = 0cm 0cm"> <p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt"><b><span style=3D"fon= t-size:12.0pt;color:black">From: </span></b><span style=3D"font-size:12.0pt;color:black">Asaf Penso <asaf= p@nvidia.com><br> <b>Date: </b>Thursday, 21. March 2024 at 20:18<br> <b>To: </b>Tao Li <byteocean@hotmail.com>, users@dpdk.org <users@d= pdk.org><br> <b>Subject: </b>Re: Finer matching granularity with async template API</spa= n><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">BTW,<o:p></o:p></sp= an></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">In the non working = example I see ipv6 / ipv4 / ICMP. Was this your intention or did you mean i= pv6 / ICMP?<o:p></o:p></span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"> <o:p></o:p></= span></p> </div> <div id=3D"ms-outlook-mobile-signature"> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Regards,<o:p></o:p>= </span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Asaf Penso<o:p></o:= p></span></p> </div> </div> <div class=3D"MsoNormal" align=3D"center" style=3D"text-align:center"><span= style=3D"font-size:12.0pt"> <hr size=3D"0" width=3D"100%" align=3D"center"> </span></div> <div id=3D"divRplyFwdMsg"> <p class=3D"MsoNormal"><b><span style=3D"font-size:11.0pt;font-family:"= ;Calibri",sans-serif;color:black">From:</span></b><span style=3D"font-= size:11.0pt;font-family:"Calibri",sans-serif;color:black"> Asaf P= enso <asafp@nvidia.com><br> <b>Sent:</b> Thursday, March 21, 2024 9:17:04 PM<br> <b>To:</b> Tao Li <byteocean@hotmail.com>; users@dpdk.org <users@d= pdk.org><br> <b>Subject:</b> Re: Finer matching granularity with async template API</spa= n><span style=3D"font-size:12.0pt"> <o:p></o:p></span></p> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"> <o:p></o:p></= span></p> </div> </div> <div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Hello Tao,<o:p></o:= p></span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"> <o:p></o:p></= span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">What is the output = / error message you get?<o:p></o:p></span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"> <o:p></o:p></= span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"> <o:p></o:p></= span></p> </div> <div id=3D"x_ms-outlook-mobile-signature"> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Regards,<o:p></o:p>= </span></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Asaf Penso<o:p></o:= p></span></p> </div> </div> <div class=3D"MsoNormal" align=3D"center" style=3D"text-align:center"><span= style=3D"font-size:12.0pt"> <hr size=3D"0" width=3D"100%" align=3D"center"> </span></div> <div id=3D"x_divRplyFwdMsg"> <p class=3D"MsoNormal"><b><span style=3D"font-size:11.0pt;font-family:"= ;Calibri",sans-serif;color:black">From:</span></b><span style=3D"font-= size:11.0pt;font-family:"Calibri",sans-serif;color:black"> Tao Li= <byteocean@hotmail.com><br> <b>Sent:</b> Thursday, March 21, 2024 5:44:00 PM<br> <b>To:</b> users@dpdk.org <users@dpdk.org><br> <b>Subject:</b> Finer matching granularity with async template API</span><s= pan style=3D"font-size:12.0pt"> <o:p></o:p></span></p> <div> <p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"> <o:p></o:p></= span></p> </div> </div> <div> <div> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">Hi= all,</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">&n= bsp;</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">I = am using async template API to install flow rules to perform actions on pac= kets to achieve IP(v4)inIP(v6) tunnelling. Currently I am facing an issue w= here I cannot perform incoming traffic matching with finer granularity. The test-pmd commands in use are as follo= wing:</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">&n= bsp;</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><b><span lang=3D"EN-US"><Not working test-pmd c= ommands></span></b><span style=3D"font-size:12.0pt"><o:p></o:p></span></= p> <p class=3D"xxmsonormal">port stop all<span style=3D"font-size:12.0pt"><o:p= ></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow configure 0 queues_number 4 queues_size 64 co= unters_number 0 aging_counters_number 0 meters_number 0 flags 0  = ;# PF0<span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow configure 1 queues_number 4 queues_size 64 co= unters_number 0 aging_counters_number 0 meters_number 0 flags 0<span style= =3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow configure 2 queues_number 4 queues_size 64 co= unters_number 0 aging_counters_number 0 meters_number 0 flags 0<span style= =3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow configure 3 queues_number 4 queues_size 64 co= unters_number 0 aging_counters_number 0 meters_number 0 flags 0 # PF1= V0<span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">port start all<span style=3D"font-size:12.0pt"><o:= p></o:p></span></p> <p class=3D"xxmsonormal">set verbose 1<span style=3D"font-size:12.0pt"><o:p= ></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow pattern_template 0 create transfer relaxed no= pattern_template_id 10 template represented_port ethdev_port_id is 0= / eth / ipv6 <b>/ ipv4 / icmp</b> / end<span style=3D"font-size:12.0pt"><o:p></o:p= ></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">set raw_decap 0 eth / ipv6 / end_set<span st= yle=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal">set raw_encap 0 eth src is 11:22:33:44:55:66 dst i= s 66:9d:a7:fd:fb:43 type is 0x0800 / end_set<span style=3D"font-size:12.0pt= "><o:p></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow actions_template 0 create transfer acti= ons_template_id 10 template raw_decap index 0 / raw_encap index 0 / r= epresented_port / end mask raw_decap index 0 / raw_encap index 0 / re= presented_port / end<span style=3D"font-size:12.0pt"><o:p></o:p></spa= n></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow template_table 0 create group 0 priorit= y 0 transfer wire_orig table_id 5 rules_number 8 pattern_template 10 = actions_template 10<span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow queue 0 create 0 template_table 5 pattern_tem= plate 0 actions_template 0 postpone no pattern represented_port ethdev_port= _id is 0 / eth / ipv6 <b>/ ipv4 / icmp</b> / end actions raw_decap index 0 / raw_encap inde= x 0 / represented_port ethdev_port_id 3 / end<span style=3D"font-size= :12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"> <span style=3D"font-size:12.0pt"><o:p></o:p>= </span></p> <p class=3D"xxmsonormal">flow push 0 queue 0<span style=3D"font-size:12.0pt= "><o:p></o:p></span></p> <p class=3D"xxmsonormal"><b><span lang=3D"EN-US"></Not working test-pmd = commands></span></b><span style=3D"font-size:12.0pt"><o:p></o:p></span><= /p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">&n= bsp;</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">On= ce I remove matching patterns for the inner packet headers( ipv4 / icmp) as= following, I can see the processed packets inside VMs using tcpdump.</span= ><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">&n= bsp;</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><b><span lang=3D"EN-US"><Working test-pmd comma= nds></span></b><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal">=85<span style=3D"font-size:12.0pt"><o:p></o:p></s= pan></p> <p class=3D"xxmsonormal">flow pattern_template 0 create transfer relaxed no= pattern_template_id 10 template represented_port ethdev_port_id is 0= / eth / ipv6 / end<span style=3D"font-size:12.0pt"><o:p></o:p></span= ></p> <p class=3D"xxmsonormal">=85<span style=3D"font-size:12.0pt"><o:p></o:p></s= pan></p> <p class=3D"xxmsonormal">flow queue 0 create 0 template_table 5 pattern_tem= plate 0 actions_template 0 postpone no pattern represented_port ethdev_port= _id is 0 / eth / ipv6 / end actions raw_decap index 0 / r= aw_encap index 0 / represented_port ethdev_port_id 3 / end<span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal">=85<span style=3D"font-size:12.0pt"><o:p></o:p></s= pan></p> <p class=3D"xxmsonormal"><b><span lang=3D"EN-US"></Working test-pmd comm= ands></span></b><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">&n= bsp;</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">Si= milar combination works when using the synchronous rte_flow API. Any commen= t or suggestion on this issue is much appreciated. Many thanks in advance.<= /span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">&n= bsp;</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">Be= st regards,</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">Ta= o</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> <p class=3D"xxmsonormal" style=3D"margin-bottom:12.0pt"><span style=3D"font= -size:12.0pt"> <o:p></o:p></span></p> <p class=3D"xxmsonormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt">&n= bsp;</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p> </div> </div> </div> </div> </div> </div> </div> </div> </div> </body> </html> --_000_DB9P193MB173969AD647DBBFAC4F5B7F5A3312DB9P193MB1739EURP_--