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 4AB1FA04B5; Thu, 1 Oct 2020 12:30:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F20461DBD5; Thu, 1 Oct 2020 12:20:57 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id AC5C31DBAC for ; Thu, 1 Oct 2020 12:20:49 +0200 (CEST) IronPort-SDR: wsIXtLY+e5ftTiElaDZjaZ7QiNuZrLpYN0IMeo8zL/VmTvgkEPKItJCBrnRF4lkH3J7NcKy3b6 labP26Savdgw== X-IronPort-AV: E=McAfee;i="6000,8403,9760"; a="224297158" X-IronPort-AV: E=Sophos;i="5.77,323,1596524400"; d="scan'208";a="224297158" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2020 03:20:49 -0700 IronPort-SDR: +zCwMANY9fw6wpsHIfK1qYSeSjQJJHoHfNpKrc5l0jROHSv/nGtBD9fXFBDz4hfzS9mQcSXTZO XN2Cg/l2lSig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,323,1596524400"; d="scan'208";a="515443449" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by fmsmga005.fm.intel.com with ESMTP; 01 Oct 2020 03:20:48 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: thomas@monjalon.net, david.marchand@redhat.com Date: Thu, 1 Oct 2020 11:19:54 +0100 Message-Id: <20201001102010.36861-27-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001102010.36861-1-cristian.dumitrescu@intel.com> References: <20200930063416.68428-2-cristian.dumitrescu@intel.com> <20201001102010.36861-1-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH v7 26/42] 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 aae3d84b2..a1534b043 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