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 E1AD642A95; Mon, 8 May 2023 08:40:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 698F0410D0; Mon, 8 May 2023 08:40:06 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9923840DDC; Mon, 8 May 2023 08:40:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683528003; x=1715064003; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=lSvNgDwp/x+GBVSYRiazFmzeTK01NcMJwD4jeUrJr7U=; b=YpQurN4gmfmUUAxNOOchojztylyjtlWhybQT9b/4O2LhKBXBl8MH3+EH uY8+1KoNVdqAwp5tErYODBg8n/g30LSbk6f2tGoRYD3xLxDzFClIFz7hb LVyWq4N/HVCREb36eVjb2d7I7+uQwpr4L/GqKhODFsngoL8cIFFOJYrwN JLApgwGQtZVXUYo5ad+tkLynUQvNmnG7Y6sWsN2rVgBdH2KX9N2klbfVg Ywb5jIOP8ivHwB70ms55NbA3j07JYpsUnnVMgdI5DSgrwI+C8jbUUswQL q7Y8ELwavx7+/V5nlo4wMYqLT45GHgsdvaXdwqZUZeowodw1v7ryB0j0y A==; X-IronPort-AV: E=McAfee;i="6600,9927,10703"; a="435887996" X-IronPort-AV: E=Sophos;i="5.99,258,1677571200"; d="scan'208";a="435887996" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2023 23:40:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10703"; a="692502052" X-IronPort-AV: E=Sophos;i="5.99,258,1677571200"; d="scan'208";a="692502052" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga007.jf.intel.com with ESMTP; 07 May 2023 23:40:02 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sun, 7 May 2023 23:40:01 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sun, 7 May 2023 23:40:01 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Sun, 7 May 2023 23:40:01 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Sun, 7 May 2023 23:40:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NnxRrs4NcGtTvGS5kbcaNHDLCL3gnUSNjxIaUu398FgB90evt4GSf2khRGjRwpvK7bHhrjWa9p0zeDn2dgS/i/iD6ON54n3ymfLpJvMCyG5PG4wyDVlNRlMjwy5P8ahYvEvUrEAiMRYaR/6Vmm49sMRjxqAQ6oqnFAyKKoDmnMskuDL1fINGGY8x2QcfFf4tbPyYKeqOBJi5B8aVifBPUyGccaJgJzrUdOL+VE9yNb64/cAzyLOlH06d1J9irdPAUwjek2ViojPn7yfN+CCO9kO807W7MBlTB5DzEbwnDb/RxbY2Ou/e9d/AG2xYY/UBtSVi6DAfj2Y27dG09LdbZA== 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=lSvNgDwp/x+GBVSYRiazFmzeTK01NcMJwD4jeUrJr7U=; b=N2z66ATHBFAaMNbx0cdLa1V4UBx6II55VezKKUtiB5zocv/514ZkQWSoAj62Qc7Usktl2rdCj1UJIlY6FIqYyffeQBame7K4+ecTx0FqBbBE4lsW5v0J+IxcaV0Vjc9PaSSDkXBoGRg/b2a3sTGz0fHQkVt7coG5qr9006h+vgeS1lwDBRG8xBMU9/3cxhbc85CFoES6etwhe01wkh56yT7DdR8/VtgO4pT2nC17yG4uXBLDFx6saKNBiV3rcAVlDciDgTvVM9EdYDGFbJXrCBrfbPr2bsPZbbk/UTuSx0MnEHYZIoAoEiNtiOms2xa8d7COcaUFnh3K/miw6oK6UA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by DM8PR11MB5590.namprd11.prod.outlook.com (2603:10b6:8:32::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32; Mon, 8 May 2023 06:39:59 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::e570:d9a7:df1b:1589]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::e570:d9a7:df1b:1589%6]) with mapi id 15.20.6363.032; Mon, 8 May 2023 06:39:59 +0000 From: "Zhang, Qi Z" To: "dev@dpdk.org" CC: "techboard@dpdk.org" , "Richardson, Bruce" , "Burakov, Anatoly" , "Wiles, Keith" , "Liang, Cunming" , "Wu, Jingjing" , "Zhang, Helin" , "Mcnamara, John" , "Xu, Rosen" Subject: seeking community input on adapting DPDK to P4Runtime backend Thread-Topic: seeking community input on adapting DPDK to P4Runtime backend Thread-Index: AdmBdydpWI/N9jo8SXuEnV2EuOZZew== Date: Mon, 8 May 2023 06:39:58 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|DM8PR11MB5590:EE_ x-ms-office365-filtering-correlation-id: f38e19d2-baa0-4f35-d746-08db4f8f0b15 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GWrO0w2X7Aj8iwdSR3jT1rM40WoYBq2rCc8D78/nDkc+dKf4KoP5q2lFwXbDx3JTsMCsHxOEMMLQahtk1QeN7m2zT46k0gzmRtIi2zRIP/fFvu4E71HxqtS1xJgh86iFIXOpZE79mCk41Cy0LdxnEDyf/JfQKTrRWLBsdnWwOspV7r7jRsiJN46QrpqGHd+W+6wREMWDZHHes1ibVhvKHAUhEZC1xrTv2LHBDZJTQMn7t78KPswcrwWAbFiYCXONjc5ob5q/A5s0fPd4ktX/IXoSnKj/0lCaip6MQKmkFQS0KMwNhJHANEtxj/xwBEHvJbBFpquBCCVvJxT1MlmD9tSxsWcYfoZU9pBT8pR/L9fz2YSGNONT7wtz1g4q8sxArPDUD9KXgnwQn1NWS7pQFAxcaBYHJFE4UYy4ZC+cWeqDKpLv6XgwHs0nxvmI2O5zvQNcHkjC2N5rrB6PhRylKqJhKtGZCgHEgDB1WVtaKYOgOXAfrzMeOdKqQ3wPMZ9M87CquzFnqrx/P2JQqROm+1vcJjlr+8+78czbVhzLTXwMtLn+R6WK8k6ZzuAcwGEHBLBLUVlSazCCZp1ZQkPrNJdjN7bPZwfBXDOEY9JoSG8WjM1dMEE0ODpWH0bspXhmiESg1tKPnqGOL7uzTjuQZw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(366004)(396003)(376002)(39860400002)(136003)(451199021)(2906002)(52536014)(5660300002)(55016003)(33656002)(4326008)(41300700001)(8676002)(8936002)(6916009)(316002)(966005)(7696005)(450100002)(66556008)(71200400001)(64756008)(66446008)(66476007)(66946007)(76116006)(478600001)(54906003)(83380400001)(86362001)(38100700002)(38070700005)(186003)(6506007)(107886003)(9686003)(82960400001)(26005)(122000001)(193643001)(32563001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?pSZZgoZ8hQ0O+8bka8ckcVVRZ9CougOLb5kzvGHPAxG0GQi7h/gx/bdkYg?= =?iso-8859-1?Q?JUWel+7+cit5TOPc3BVzXlOdO/pQ9H1mbBWrWLu3HQfsxml2imMY94zcv+?= =?iso-8859-1?Q?NojUP++iQeX9pHm1Uf10hI30//sXQ29o2QdMUaVvGvHVSJoPHChoWeYc9B?= =?iso-8859-1?Q?xONH4rxBAvXmlVKSbUTcX7xz/4vr2jbGMhRUZeshiGaoBcq46o/g9zascQ?= =?iso-8859-1?Q?gApILzliMTj2l7RO4YwaN4WPPptknne9se65mliRQJKpxY/sXnaCz7lqyA?= =?iso-8859-1?Q?ZDTjATroQhMpJwhBHt5IXPR3Kas08HV+4V0krYue1Ow1e78wwwY9tNp4Yn?= =?iso-8859-1?Q?llHkH9jTKy8nITqxehlXy46J//8KbQhERkDDVUIKYPu6EhjF9Fj/HpSScd?= =?iso-8859-1?Q?HfDWS0f0cBP8xuSHHPHkdiZU7eFhUfC8dpBF5H6pxoLO2F3reisKTOst1G?= =?iso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djERaNfMgYPN71f8qDPRM2rq767dc?= =?iso-8859-1?Q?Ew3P1W/Yp20iPzrkc411rQseD7Nlqba+fs3fEjS2+6Hjb4QEry7ensEwe7?= =?iso-8859-1?Q?9uovGHxmISBcWi/ZBdhFbyToSN9iWFDFLvpZm6CEuuRM/SQHeDEmxMN9cT?= =?iso-8859-1?Q?xLj8NfItgMhtZrapgQrMBicdYezB8XeyPeeuiM0lq8PTOCx3fi7tFiLa4p?= =?iso-8859-1?Q?q35XasQqdDje0B2XLW0xNaIWIslQk3NDI7FUh/4MlrkQvMZnK8+K5QNZNF?= =?iso-8859-1?Q?/OPwex20eeB6Pb6LZvxsAS89gH73p6O0Cu?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f38e19d2-baa0-4f35-d746-08db4f8f0b15 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2023 06:39:58.7388 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 63tVMx9Sk1VQKa+YWHw6CfP9ksDHiwwTf3IwhTlI2zI5LeoaD+ulN+p2FHTQuYDf65c22KSRCcikP7DxjCmttw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5590 X-OriginatorOrg: intel.com 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 Hi: Our team is currently working on developing a DPDK PMD for a P4-programmed = network controller, based on customer feedback to integrate DPDK into the P= 4Runtime backend .[https://p4.org/p4-spec/p4runtime/main/P4Runtime-Spec.htm= l] (*) However, we are facing challenges in adapting DPDK's rte_flow API to th= e P4Runtime API, primarily due to the transition from a table-based API wit= h fields of arbitrary bits width at arbitrary offset to a protocol-based AP= I (more detail be described in post-script).=20 We are seeking suggestions and best practices from the open-source communit= y to help us with this integration. Specifically, we are interested in lear= ning: (*) If anyone has previously attempted to map rte_flow to P4-based devices. (*) Thoughts on how to map from table-based matching to protocol-based matc= hing like in rte_flow. (*) Any ideas on how to extend or expand the rte_flow APIs to better accomm= odate P4-based or other table-matching based devices.=20 Your insights and feedback would be greatly appreciated!=09 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Post-= Script =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D More details on the problem below, for anyone interested In P4, flow offloading can be implemented using the P4Runtime API, which pr= ovides a standard interface for controlling and configuring the data plane = behavior of network devices. P4Runtime allows network operators to dynamica= lly add, modify, and remove flow rules in the hardware forwarding tables of= P4-enabled devices. The P4Runtime API is a table-based API, it assume the packet process pipeli= ne was consists of one or more key/action units (tables). In P4Runtime, eac= h table defines the fields to be matched and the actions to be taken on inc= oming packets. During compilation, the P4 compiler assigns a unique uint32 = ID to each table, action, and field, which is associated with its correspon= ding string name. These IDs have no inherent relationship to any network pr= otocol but instead serve as a means to identify different components of a P= 4 program within the P4Runtime API.=20 If we choose to use rte_flow as the low-level API for P4Runtime, a translat= ion layer is needed in the application to map the P4 tables and actions to = the corresponding rte_flow rules. However, this translation layer can be pr= oblematic as it is not easily scalable. When the P4 pipeline is refined or = updated, the translation rules may also need to be updated, which can resul= t in errors and reduced efficiency. On the other hand, a hardware vendor that provides a P4-enabled device is r= equired to implement an rte_flow interface in their DPDK PMD. Typically, th= e P4 compiler generates hints for the driver on how to map P4 tables to har= dware resources, and how to convert table entry add/modify/delete actions i= nto low-level hardware configurations. However, because rte_flow is protoco= l-based, it poses an additional challenge for driver developers, who must c= reate another translation layer to convert rte_flow tokens into P4 object i= dentifiers. This translation layer must be carefully designed and implement= ed to ensure optimal performance and scalability, and to ensure that the dr= iver can efficiently handle the dynamic nature of P4 programs. To better understand the problem, let's consider the following example that= demonstrates how to use the P4Runtime API to program a rule for processing= a VXLAN packet. The rule matches a VXLAN packet, decapsulates the tunnel h= eader, and forwards it to a specific port. The P4 source code below describes the VXLAN decap table decap_vxlan_tcp_ta= ble, which matches the outer IP address, VNI, inner IP address, and inner T= CP port. For each rule, four action specifications can be selected. We will= focus on one action specification decap_vxlan_fwd that performs decapsulat= ion and forwards the packet to a specific port. table decap_vxlan_tcp_table { =A0=A0=A0 key =3D { =A0=A0=A0=A0=A0=A0=A0 hdrs.ipv4[meta.depth-1].src_ip: exact @name("tun_ip_s= rc"); =A0=A0=A0=A0=A0=A0=A0 hdrs.ipv4[meta.depth-1].dst_ip: exact @name("tun_ip_d= st"); =A0=A0=A0=A0=A0=A0=A0 hdrs.vxlan[meta.depth-1].vni=A0 : exact @name("vni"); =A0=A0=A0=A0=A0=A0=A0 hdrs.ipv4[meta.depth].src_ip=A0 : exact @name("ipv4_s= rc"); =A0=A0=A0=A0=A0=A0=A0 hdrs.ipv4[meta.depth].dst_ip=A0 : exact @name("ipv4_d= st"); =A0=A0=A0=A0=A0=A0=A0 hdrs.tcp.sport=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 : exact @name("src_port"); =A0=A0=A0=A0=A0=A0=A0 hdrs.tcp.dport=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 : exact @name("dst_port"); =A0=A0=A0 } =A0=A0=A0 actions =3D { =A0=A0=A0=A0=A0=A0=A0 @tableonly decap_vxlan_fwd; =A0=A0=A0=A0=A0=A0=A0 @tableonly decap_vxlan_dnat_fwd; =A0=A0=A0=A0=A0=A0=A0 @tableonly decap_vxlan_snat_fwd; =A0=A0=A0=A0=A0=A0=A0 @defaultonly set_exception; =A0=A0=A0 }=A0=A0=A0=20 } ... action decap_vxlan_fwd(PortId_t port_id) { =A0=A0=A0 meta.mod_action =3D (bit<11>)VXLAN_DECAP_OUTER_IPV4; =A0=A0=A0 send_to_port(port_id); } Below is an example of the hint that the compiler will generate for the dec= ap_vxlan_tcp_table: Table ID:=A0=A0=A0=A0=A0 8454144 Name:=A0=A0=A0=A0=A0=A0=A0=A0=A0 decap_vxlan_tcp_table Field ID=A0=A0=A0=A0=A0=A0 Name=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Match Type=A0=A0=A0=A0 Bit Width=A0=A0=A0= =A0=A0 Byte Width=A0=A0=A0=A0 Byte Order 1=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 tun_ip_src=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 exact=A0=A0=A0=A0=A0=A0=A0=A0=A0 32=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 4=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 net= work=A0=A0=20 2=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 tun_ip_dst=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 exact=A0=A0=A0=A0=A0=A0=A0=A0=A0 32=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 4=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 net= work=A0=A0=20 3=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 vni=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 exact=A0=A0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0= =A0 network=A0=A0=20 Spec ID=A0=A0=A0=A0=A0=A0=A0 Name=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 8519716=A0=A0=A0=A0=A0=A0 =A0decap_vxlan_fwd 8519718=A0=A0=A0=A0=A0=A0=A0 decap_vxlan_dnat_fwd 8519720=A0=A0=A0=A0=A0=A0=A0 decap_vxlan_snat_fwd 8519695=A0=A0=A0=A0=A0=A0=A0 set_exception And the hint of action spec "decap_vxlan_fwd" as below: Spec ID:=A0=A0=A0=A0=A0=A0 8519716 Name:=A0=A0=A0=A0=A0=A0=A0=A0=A0 decap_vxlan_fwd Field ID=A0=A0=A0=A0=A0=A0 Name=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Bit Width=A0=A0=A0=A0=A0 Byte Width=A0=A0= =A0=A0 Byte Order=A0=A0=A0=A0=20 1=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 port_id=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 32=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 4=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 host=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=20 Please note that different compilers may assign different IDs. Below is an example of how to program a rule using the P4 runtime API in JS= ON format. This rule matches fields and directs packets to port 5. { =A0=A0=A0 "type": 1,=A0 //INSERT =A0=A0=A0 "entity": { =A0=A0=A0=A0=A0=A0=A0 "table_entry": { =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "table_id": 8454144, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "match": [ =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 { "field_id": 1, "exact": { "= value": [10, 0, 0, 1] } },=A0=A0 // outer src IP =3D 10.0.0.1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 { "field_id": 2, "exact": { "= value": [10, 0, 0, 2] } },=A0 // outer dst IP =3D 10.0.0.2 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 { "field_id": 3, "exact": { "= value": [0, 0, 10] } },=A0 //=A0 vni =3D 10, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 { "field_id": 4, "exact": { "= value": [192, 0, 0, 1] } }, // inner src IP =3D 192.0.0.1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 {"field_id": 5, "exact": { "v= alue": [192, 0, 0, 2] } }, // inner dst IP =3D 192.0.0.2 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0{"field_id": 6, "exact": { "v= alue": [0, 200] } }, // tcp src port =3D 200 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 {"field_id": 7, "exact": { "v= alue": [0, 201] } }, // tcp dst port =3D 201 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ], =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "action": { =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "action": { =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "action_id": 8519= 716, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "params": [ =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 { "pa= ram_id": 1, "value": [5, 0, 0, 0] } =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ] =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ... =A0=A0=A0=A0=A0=A0=A0 } =A0=A0=A0 }=A0=A0=A0 ... } Please note that this is only a part of the full command. For more informat= ion, please refer to the p4runtime.proto[2] 1. https://p4.org/p4-spec/p4runtime/main/P4Runtime-Spec.html 2. https://github.com/p4lang/p4runtime/blob/main/proto/p4/v1/p4runtime.prot= o Thank you for your attention to this matter. Regards Qi