From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1891A04AA; Mon, 7 Sep 2020 23:44:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CEAC41C21F; Mon, 7 Sep 2020 23:41:14 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5AACC1C1B1 for ; Mon, 7 Sep 2020 23:40:59 +0200 (CEST) IronPort-SDR: JweD2jLgukP5Eo5QBdN7TFINZlFAOibLvXw2+tmzGOVXCyeJfoC845iwfKWfiW+5XCVWWNNYjF CnUDTjxh20vw== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="176099133" X-IronPort-AV: E=Sophos;i="5.76,403,1592895600"; d="scan'208";a="176099133" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2020 14:40:59 -0700 IronPort-SDR: e4YzCA3rJPZD8sKR6Wh3TePbsOW2HYTYUlLiVGsIIiCtN+YNTivd2+6gXL09z0RqKlq2raGfQC A3lMWLzaiFcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,403,1592895600"; d="scan'208";a="336190195" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by fmsmga002.fm.intel.com with ESMTP; 07 Sep 2020 14:40:58 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Mon, 7 Sep 2020 22:40:17 +0100 Message-Id: <20200907214032.95052-27-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200907214032.95052-1-cristian.dumitrescu@intel.com> References: <20200826151445.51500-2-cristian.dumitrescu@intel.com> <20200907214032.95052-1-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH v2 26/41] pipeline: add SWX instruction description X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added SWX instruction set reference table. Signed-off-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_swx_pipeline.h | 109 +++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/lib/librte_pipeline/rte_swx_pipeline.h b/lib/librte_pipeline/rte_swx_pipeline.h index fb83a8820..d6c086e27 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.h +++ b/lib/librte_pipeline/rte_swx_pipeline.h @@ -345,6 +345,115 @@ int rte_swx_pipeline_packet_metadata_register(struct rte_swx_pipeline *p, const char *struct_type_name); +/* + * Instructions + */ + +/** + * Instruction operands: + * + *
+-----+---------------------------+------------------+-----+-----+
+ *
|     | Description               | Format           | DST | SRC |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| hdr | Header                    | h.header         |     |     |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| act | Action                    | ACTION           |     |     |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| tbl | Table                     | TABLE            |     |     |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| H   | Header field              | h.header.field   | YES | YES |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| M   | Meta-data field           | m.field          | YES | YES |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| E   | Extern obj mailbox field  | e.ext_obj.field  | YES | YES |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| F   | Extern func mailbox field | f.ext_func.field | YES | YES |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| T   | Table action data field   | t.header.field   | NO  | YES |
+ *
+-----+---------------------------+------------------+-----+-----+
+ *
| I   | Immediate value (32-bit)  | h.header.field   | NO  | YES |
+ *
+-----+---------------------------+------------------+-----+-----+
+ * + * Instruction set: + * + *
+------------+----------------------+-------------------+------+--------+
+ *
| Instr.     | Instruction          | Instruction       | 1st  | 2nd    |
+ *
| Name       | Description          | Format            | opnd.| opnd.  |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| rx         | Receive one pkt      | rx m.port_in      | M    |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| tx         | Transmit one pkt     | tx m.port_out     | M    |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| extract    | Extract one hdr      | extract h.hdr     | hdr  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| emit       | Emit one hdr         | emit h.hdr        | hdr  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| validate   | Validate one hdr     | validate h.hdr    | hdr  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| invalidate | Invalidate one hdr   | invalidate h.hdr  | hdr  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| mov        | dst = src            | mov dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| dma        | memcpy(h.hdr,        | dma h.hdr t.field | hdr  | T      |
+ *
|            |    &t.field,         |                   |      |        |
+ *
|            |    sizeof(h.hdr)     |                   |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| add        | dst += src           | add dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| sub        | dst -= src           | add dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| ckadd      | Checksum add: dst =  | add dst src       | HMEF | HMEFTI |
+ *
|            | dst '+ src[0:1] '+   |                   |      | or hdr |
+ *
|            | src[2:3] '+ ...      |                   |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| cksub      | Checksum subtract:   | add dst src       | HMEF | HMEFTI |
+ *
|            | dst = dst '- src     |                   |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| and        | dst &= src           | and dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| or         | dst |= src           | or  dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| xor        | dst ^= src           | xor dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| shl        | dst <<= src          | shl dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| shr        | dst >>= src          | shr dst src       | HMEF | HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| table      | Table lookup         | table TABLE       | tbl  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| extern     | Ext obj member func  | extern e.obj.mfunc| ext  |        |
+ *
|            | call or ext func call| extern f.func     |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmp        | Unconditional jump   | jmp LABEL         |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpv       | Jump if hdr is valid | jmpv LABEL h.hdr  | hdr  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpnv      | Jump if hdr is inval | jmpnv LABEL h.hdr | hdr  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmph       | Jump if tbl lkp hit  | jmph LABEL        |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpnh      | Jump if tbl lkp miss | jmpnh LABEL       |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpa       | Jump if action run   | jmpa LABEL ACTION | act  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpna      | Jump if act not run  | jmpna LABEL ACTION| act  |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpeq      | Jump if (a == b)     | jmpeq LABEL a b   | HMEFT| HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpneq     | Jump if (a != b)     | jmpneq LABEL a b  | HMEFT| HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmplt      | Jump if (a < b)      | jmplt LABEL a b   | HMEFT| HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| jmpgt      | Jump if (a > b)      | jmpgt LABEL a b   | HMEFT| HMEFTI |
+ *
+------------+----------------------+-------------------+------+--------+
+ *
| return     | Return from action   | return            |      |        |
+ *
+------------+----------------------+-------------------+------+--------+
+ * + * At initialization time, the pipeline and action instructions (including the + * symbolic name operands) are translated to internal data structures that are + * used at run-time. + */ + /* * Pipeline action */ -- 2.17.1