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 8A874A0A0E for ; Mon, 10 May 2021 18:23:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80D6F4003E; Mon, 10 May 2021 18:23:24 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2075.outbound.protection.outlook.com [40.107.92.75]) by mails.dpdk.org (Postfix) with ESMTP id A0BF44003E for ; Mon, 10 May 2021 18:23:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NrXiA0nj98/u9zWimViljfEf74ofOUfETz/NF98CQ/AyolLUtmi+14+7YCN7vioNJx90c/YAJFBVVBuwnJwoCxB8CQdJTkalTT3ytP/yN+UdubQMWspeQld5WWelra5sUs/UjbTRVAJTY6w+nBE7EArAFOZ1CFw5TCk4Y1FvTlkSwW6fytaNs6la8VwcvoDaGOzHo9k2NB+QbtPOjuFuHjo2PYh1/aQGFZrkNTH87ujoSlR1VpYjnZg/LOdVkpRsVeRLYnoSq0T0Dp6Yn2sADRqZiMaDBg3KXZDiGx4GnvrZT1a3VuIfA+eoay9GrgRi2U9lHxpxPzwHNLFomVzzmQ== 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-SenderADCheck; bh=IkMK17zR4DFW2T5dgmYB+CXkzeqJy/6fqZuS+1remPI=; b=czfvMSpjWaimdXSjPMDLKafAqMNML+g2QVOMUqkackz8H3Wd6iIp1KG1mzWgnK/gJMi+4ooF/VkP8rePskw7EQEAgoFSBiVXPOESdcU4XpPICXQ4GvHnvFfcF/zmtgDgAYcqYe/JLSa/d2wpaWVIvP9yr1ikoYy9GbNHZUN5PEIdAu/UAorVjj2lY418irGNbly5IyPNjQ0RBBTt7ck2Fq3cEc6HbWIWcm806B+nfR6k8EDLiLryDXdpPmweM6b0VuN+ieO7Ew3NBKATG296+Wowh4LroFmUIuf3uW3X+Wxwu1lvzJ5n4YHPo9QaU77Qog7ONKuzz/jvIoheDN2aXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IkMK17zR4DFW2T5dgmYB+CXkzeqJy/6fqZuS+1remPI=; b=UuL1SbUKxRp5OI8jWwYwhxnawTdN5u1G7rO72rX9wpmYSzK8jzse7yE84i0DecHWg+6JDZOtckeHS1s4SUq83DvU954C+QDWSn7WuBlC7d0g5DMwl3iZQaZMrzSe5vrOUrjB+LcQR4j6elj7FZ67OKgt9fFbJ8TkSKhc1lPIju46BTBijnNcXfzhVb4MYI/tnrLrGp7BEkYH1Z5ImGPAOaUZlDJ963NiDoZM2+eMA0w7oArBBtXuX++TDHZ8KkVzDbfixhXekGob+keQF6l9Z/pwXXAwXpZg9HjRxQK6YA6B9FU7qIomi415Jewz1ZfAas9HYx0OERInO13BwVBZqw== Received: from BN9PR03CA0399.namprd03.prod.outlook.com (2603:10b6:408:111::14) by CH0PR12MB5369.namprd12.prod.outlook.com (2603:10b6:610:d4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.29; Mon, 10 May 2021 16:23:21 +0000 Received: from BN8NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:408:111:cafe::4a) by BN9PR03CA0399.outlook.office365.com (2603:10b6:408:111::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:23:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT020.mail.protection.outlook.com (10.13.176.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:23:20 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:23:18 +0000 From: Xueming Li To: Cristian Dumitrescu CC: Luca Boccassi , dpdk stable Date: Tue, 11 May 2021 00:02:30 +0800 Message-ID: <20210510160258.30982-201-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1e06716e-083c-42f3-4b54-08d913cfed6d X-MS-TrafficTypeDiagnostic: CH0PR12MB5369: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3kHt7S5Hu9jd4kGb5Zgl+elsVSDrwq5wA4Kr8XHJvxGRtnsR3RCvzLSimg4aJ8QZNMURjCb8ZnbomzYJV3Y5w6nHNu9vnR78yGj61+wlY8E3xRgInZtMeYFk+5bIdbJj/aEfSNZc6882MASlsYE3WknhQI9v+czqJUPr2mcCddWxjiQXpCy+4bTaj+vvakgR8Y67ugJVSk4+ql+rw5PUeb/4JOt4DaI0ztELVrjgKndHBpWy3xSFZoAq9aRe02UlAd2vo9965Oy1jx0s2z7NXo0Q/xLixkzFH+7CEV7b9k6R7JFQy6/OEhLWjpyxAzlJqsEldl447LlIFBQhGVMPOTlxoP+9J737ULgx6CiyqsWBEHOG5sl5nBYxFRWwoShXGZQTb4JQhbVb6NqU++Ds10eAJVQ7FMcYxDZDkucpPRj0mJTJ23rnz+4oY5ps9DfLZtIhZ45Pz2nb5+1ipnjxfP2mY9isd2H/c1mMA5azJBT/dM6crJFqdZSQmsLQmgKi8zhUVOG6ozwAlbfDExt7dri2PIn0KHCc/01wrG0604VjocvT2FKGDuXQKz3Alc5dlY5KbmOps8hLLV6iXcv/8a3vA0Nvd2CE1tL08bkL49qKviNM41r3AdIYE2Yy73OBUT/wl0xOcXqEgC3bqxBaqwU+fptImJxaT5DwGW7OMnxXyJ+2bDVo/iaIGyWXQNUueyXU1KJn5F4kG8HXYOatcB+JSI2VMOdrdemYqXXfVe0= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(396003)(36840700001)(46966006)(2906002)(5660300002)(186003)(86362001)(966005)(7696005)(8936002)(82740400003)(70206006)(6286002)(82310400003)(55016002)(426003)(83380400001)(70586007)(30864003)(47076005)(16526019)(478600001)(336012)(4326008)(356005)(7636003)(2616005)(6666004)(36756003)(36860700001)(6916009)(53546011)(8676002)(26005)(1076003)(54906003)(36906005)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:23:20.9658 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e06716e-083c-42f3-4b54-08d913cfed6d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5369 Subject: [dpdk-stable] patch 'pipeline: fix endianness conversions' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/51ca4146bb2d4ee81635868939fa764ac3d086a0 Thanks. Xueming Li --- >From 51ca4146bb2d4ee81635868939fa764ac3d086a0 Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Sat, 3 Apr 2021 01:17:09 +0100 Subject: [PATCH] pipeline: fix endianness conversions Cc: Luca Boccassi [ upstream commit 48ad58964cc3e42f3e79b5f19b8deee59e240572 ] The SWX pipeline instructions work with operands of different types: header fields (h.header.field), packet meta-data (m.field), extern object mailbox field (e.obj.field), extern function (f.field), action data read from table entries (t.field), or immediate values; hence the HMEFTI acronym. The H operands are stored in network byte order (NBO), while the MEFT operands are stored in host byte order (HBO), hence the need to operate endianness conversions. Some of the endianness conversion macros were not working correctly for some cases such as operands of different sizes, and they are fixed now. Affected instructions: mov, and, or, xor, jmpeq, jmpneq. Fixes: 7210349d5baa ("pipeline: add SWX move instruction") Fixes: 650195cf965a ("pipeline: introduce SWX and instruction") Fixes: 8f796198dcda ("pipeline: introduce SWX or instruction") Fixes: b4e607f9fd5e ("pipeline: introduce SWX XOR instruction") Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions") Signed-off-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_swx_pipeline.c | 470 ++++++++++++++++++++----- 1 file changed, 382 insertions(+), 88 deletions(-) diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c index bc619ca533..e4fbf1b1be 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.c +++ b/lib/librte_pipeline/rte_swx_pipeline.c @@ -263,9 +263,11 @@ enum instruction_type { * dst = src * dst = HMEF, src = HMEFTI */ - INSTR_MOV, /* dst = MEF, src = MEFT */ - INSTR_MOV_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */ - INSTR_MOV_I, /* dst = HMEF, src = I */ + INSTR_MOV, /* dst = MEF, src = MEFT */ + INSTR_MOV_MH, /* dst = MEF, src = H */ + INSTR_MOV_HM, /* dst = H, src = MEFT */ + INSTR_MOV_HH, /* dst = H, src = H */ + INSTR_MOV_I, /* dst = HMEF, src = I */ /* dma h.header t.field * memcpy(h.header, t.field, sizeof(h.header)) @@ -319,25 +321,31 @@ enum instruction_type { * dst &= src * dst = HMEF, src = HMEFTI */ - INSTR_ALU_AND, /* dst = MEF, src = MEFT */ - INSTR_ALU_AND_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */ - INSTR_ALU_AND_I, /* dst = HMEF, src = I */ + INSTR_ALU_AND, /* dst = MEF, src = MEFT */ + INSTR_ALU_AND_MH, /* dst = MEF, src = H */ + INSTR_ALU_AND_HM, /* dst = H, src = MEFT */ + INSTR_ALU_AND_HH, /* dst = H, src = H */ + INSTR_ALU_AND_I, /* dst = HMEF, src = I */ /* or dst src * dst |= src * dst = HMEF, src = HMEFTI */ - INSTR_ALU_OR, /* dst = MEF, src = MEFT */ - INSTR_ALU_OR_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */ - INSTR_ALU_OR_I, /* dst = HMEF, src = I */ + INSTR_ALU_OR, /* dst = MEF, src = MEFT */ + INSTR_ALU_OR_MH, /* dst = MEF, src = H */ + INSTR_ALU_OR_HM, /* dst = H, src = MEFT */ + INSTR_ALU_OR_HH, /* dst = H, src = H */ + INSTR_ALU_OR_I, /* dst = HMEF, src = I */ /* xor dst src * dst ^= src * dst = HMEF, src = HMEFTI */ - INSTR_ALU_XOR, /* dst = MEF, src = MEFT */ - INSTR_ALU_XOR_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */ - INSTR_ALU_XOR_I, /* dst = HMEF, src = I */ + INSTR_ALU_XOR, /* dst = MEF, src = MEFT */ + INSTR_ALU_XOR_MH, /* dst = MEF, src = H */ + INSTR_ALU_XOR_HM, /* dst = H, src = MEFT */ + INSTR_ALU_XOR_HH, /* dst = H, src = H */ + INSTR_ALU_XOR_I, /* dst = HMEF, src = I */ /* shl dst src * dst <<= src @@ -406,41 +414,45 @@ enum instruction_type { INSTR_JMP_ACTION_MISS, /* jmpeq LABEL a b - * Jump is a is equal to b + * Jump if a is equal to b * a = HMEFT, b = HMEFTI */ - INSTR_JMP_EQ, /* (a, b) = (MEFT, MEFT) or (a, b) = (H, H) */ - INSTR_JMP_EQ_S, /* (a, b) = (MEFT, H) or (a, b) = (H, MEFT) */ - INSTR_JMP_EQ_I, /* (a, b) = (MEFT, I) or (a, b) = (H, I) */ + INSTR_JMP_EQ, /* a = MEFT, b = MEFT */ + INSTR_JMP_EQ_MH, /* a = MEFT, b = H */ + INSTR_JMP_EQ_HM, /* a = H, b = MEFT */ + INSTR_JMP_EQ_HH, /* a = H, b = H */ + INSTR_JMP_EQ_I, /* (a, b) = (MEFT, I) or (a, b) = (H, I) */ /* jmpneq LABEL a b - * Jump is a is not equal to b + * Jump if a is not equal to b * a = HMEFT, b = HMEFTI */ - INSTR_JMP_NEQ, /* (a, b) = (MEFT, MEFT) or (a, b) = (H, H) */ - INSTR_JMP_NEQ_S, /* (a, b) = (MEFT, H) or (a, b) = (H, MEFT) */ - INSTR_JMP_NEQ_I, /* (a, b) = (MEFT, I) or (a, b) = (H, I) */ + INSTR_JMP_NEQ, /* a = MEFT, b = MEFT */ + INSTR_JMP_NEQ_MH, /* a = MEFT, b = H */ + INSTR_JMP_NEQ_HM, /* a = H, b = MEFT */ + INSTR_JMP_NEQ_HH, /* a = H, b = H */ + INSTR_JMP_NEQ_I, /* (a, b) = (MEFT, I) or (a, b) = (H, I) */ /* jmplt LABEL a b * Jump if a is less than b * a = HMEFT, b = HMEFTI */ - INSTR_JMP_LT, /* a = MEF, b = MEF */ - INSTR_JMP_LT_MH, /* a = MEF, b = H */ - INSTR_JMP_LT_HM, /* a = H, b = MEF */ + INSTR_JMP_LT, /* a = MEFT, b = MEFT */ + INSTR_JMP_LT_MH, /* a = MEFT, b = H */ + INSTR_JMP_LT_HM, /* a = H, b = MEFT */ INSTR_JMP_LT_HH, /* a = H, b = H */ - INSTR_JMP_LT_MI, /* a = MEF, b = I */ + INSTR_JMP_LT_MI, /* a = MEFT, b = I */ INSTR_JMP_LT_HI, /* a = H, b = I */ /* jmpgt LABEL a b * Jump if a is greater than b * a = HMEFT, b = HMEFTI */ - INSTR_JMP_GT, /* a = MEF, b = MEF */ - INSTR_JMP_GT_MH, /* a = MEF, b = H */ - INSTR_JMP_GT_HM, /* a = H, b = MEF */ + INSTR_JMP_GT, /* a = MEFT, b = MEFT */ + INSTR_JMP_GT_MH, /* a = MEFT, b = H */ + INSTR_JMP_GT_HM, /* a = H, b = MEFT */ INSTR_JMP_GT_HH, /* a = H, b = H */ - INSTR_JMP_GT_MI, /* a = MEF, b = I */ + INSTR_JMP_GT_MI, /* a = MEFT, b = I */ INSTR_JMP_GT_HI, /* a = H, b = I */ /* return @@ -673,7 +685,7 @@ struct thread { #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN -#define ALU_S(thread, ip, operator) \ +#define ALU_MH(thread, ip, operator) \ { \ uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id]; \ uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->alu.dst.offset]; \ @@ -691,8 +703,6 @@ struct thread { *dst64_ptr = (dst64 & ~dst64_mask) | (result & dst64_mask); \ } -#define ALU_MH ALU_S - #define ALU_HM(thread, ip, operator) \ { \ uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id]; \ @@ -713,6 +723,25 @@ struct thread { *dst64_ptr = (dst64 & ~dst64_mask) | result; \ } +#define ALU_HM_FAST(thread, ip, operator) \ +{ \ + uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id]; \ + uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->alu.dst.offset]; \ + uint64_t dst64 = *dst64_ptr; \ + uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->alu.dst.n_bits); \ + uint64_t dst = dst64 & dst64_mask; \ + \ + uint8_t *src_struct = (thread)->structs[(ip)->alu.src.struct_id]; \ + uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->alu.src.offset]; \ + uint64_t src64 = *src64_ptr; \ + uint64_t src64_mask = UINT64_MAX >> (64 - (ip)->alu.src.n_bits); \ + uint64_t src = hton64(src64 & src64_mask) >> (64 - (ip)->alu.dst.n_bits); \ + \ + uint64_t result = dst operator src; \ + \ + *dst64_ptr = (dst64 & ~dst64_mask) | result; \ +} + #define ALU_HH(thread, ip, operator) \ { \ uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id]; \ @@ -732,12 +761,31 @@ struct thread { *dst64_ptr = (dst64 & ~dst64_mask) | result; \ } +#define ALU_HH_FAST(thread, ip, operator) \ +{ \ + uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id]; \ + uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->alu.dst.offset]; \ + uint64_t dst64 = *dst64_ptr; \ + uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->alu.dst.n_bits); \ + uint64_t dst = dst64 & dst64_mask; \ + \ + uint8_t *src_struct = (thread)->structs[(ip)->alu.src.struct_id]; \ + uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->alu.src.offset]; \ + uint64_t src64 = *src64_ptr; \ + uint64_t src = (src64 << (64 - (ip)->alu.src.n_bits)) >> (64 - (ip)->alu.dst.n_bits); \ + \ + uint64_t result = dst operator src; \ + \ + *dst64_ptr = (dst64 & ~dst64_mask) | result; \ +} + #else -#define ALU_S ALU #define ALU_MH ALU #define ALU_HM ALU +#define ALU_HM_FAST ALU #define ALU_HH ALU +#define ALU_HH_FAST ALU #endif @@ -800,7 +848,7 @@ struct thread { #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN -#define MOV_S(thread, ip) \ +#define MOV_MH(thread, ip) \ { \ uint8_t *dst_struct = (thread)->structs[(ip)->mov.dst.struct_id]; \ uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->mov.dst.offset]; \ @@ -815,9 +863,44 @@ struct thread { *dst64_ptr = (dst64 & ~dst64_mask) | (src & dst64_mask); \ } +#define MOV_HM(thread, ip) \ +{ \ + uint8_t *dst_struct = (thread)->structs[(ip)->mov.dst.struct_id]; \ + uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->mov.dst.offset]; \ + uint64_t dst64 = *dst64_ptr; \ + uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->mov.dst.n_bits); \ + \ + uint8_t *src_struct = (thread)->structs[(ip)->mov.src.struct_id]; \ + uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->mov.src.offset]; \ + uint64_t src64 = *src64_ptr; \ + uint64_t src64_mask = UINT64_MAX >> (64 - (ip)->mov.src.n_bits); \ + uint64_t src = src64 & src64_mask; \ + \ + src = hton64(src) >> (64 - (ip)->mov.dst.n_bits); \ + *dst64_ptr = (dst64 & ~dst64_mask) | src; \ +} + +#define MOV_HH(thread, ip) \ +{ \ + uint8_t *dst_struct = (thread)->structs[(ip)->mov.dst.struct_id]; \ + uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->mov.dst.offset]; \ + uint64_t dst64 = *dst64_ptr; \ + uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->mov.dst.n_bits); \ + \ + uint8_t *src_struct = (thread)->structs[(ip)->mov.src.struct_id]; \ + uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->mov.src.offset]; \ + uint64_t src64 = *src64_ptr; \ + \ + uint64_t src = src64 << (64 - (ip)->mov.src.n_bits); \ + src = src >> (64 - (ip)->mov.dst.n_bits); \ + *dst64_ptr = (dst64 & ~dst64_mask) | src; \ +} + #else -#define MOV_S MOV +#define MOV_MH MOV +#define MOV_HM MOV +#define MOV_HH MOV #endif @@ -852,7 +935,7 @@ struct thread { #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN -#define JMP_CMP_S(thread, ip, operator) \ +#define JMP_CMP_MH(thread, ip, operator) \ { \ uint8_t *a_struct = (thread)->structs[(ip)->jmp.a.struct_id]; \ uint64_t *a64_ptr = (uint64_t *)&a_struct[(ip)->jmp.a.offset]; \ @@ -868,8 +951,6 @@ struct thread { (thread)->ip = (a operator b) ? (ip)->jmp.ip : ((thread)->ip + 1); \ } -#define JMP_CMP_MH JMP_CMP_S - #define JMP_CMP_HM(thread, ip, operator) \ { \ uint8_t *a_struct = (thread)->structs[(ip)->jmp.a.struct_id]; \ @@ -901,12 +982,27 @@ struct thread { (thread)->ip = (a operator b) ? (ip)->jmp.ip : ((thread)->ip + 1); \ } +#define JMP_CMP_HH_FAST(thread, ip, operator) \ +{ \ + uint8_t *a_struct = (thread)->structs[(ip)->jmp.a.struct_id]; \ + uint64_t *a64_ptr = (uint64_t *)&a_struct[(ip)->jmp.a.offset]; \ + uint64_t a64 = *a64_ptr; \ + uint64_t a = a64 << (64 - (ip)->jmp.a.n_bits); \ + \ + uint8_t *b_struct = (thread)->structs[(ip)->jmp.b.struct_id]; \ + uint64_t *b64_ptr = (uint64_t *)&b_struct[(ip)->jmp.b.offset]; \ + uint64_t b64 = *b64_ptr; \ + uint64_t b = b64 << (64 - (ip)->jmp.b.n_bits); \ + \ + (thread)->ip = (a operator b) ? (ip)->jmp.ip : ((thread)->ip + 1); \ +} + #else -#define JMP_CMP_S JMP_CMP #define JMP_CMP_MH JMP_CMP #define JMP_CMP_HM JMP_CMP #define JMP_CMP_HH JMP_CMP +#define JMP_CMP_HH_FAST JMP_CMP #endif @@ -2280,10 +2376,14 @@ instruction_is_jmp(struct instruction *instr) case INSTR_JMP_ACTION_HIT: case INSTR_JMP_ACTION_MISS: case INSTR_JMP_EQ: - case INSTR_JMP_EQ_S: + case INSTR_JMP_EQ_MH: + case INSTR_JMP_EQ_HM: + case INSTR_JMP_EQ_HH: case INSTR_JMP_EQ_I: case INSTR_JMP_NEQ: - case INSTR_JMP_NEQ_S: + case INSTR_JMP_NEQ_MH: + case INSTR_JMP_NEQ_HM: + case INSTR_JMP_NEQ_HH: case INSTR_JMP_NEQ_I: case INSTR_JMP_LT: case INSTR_JMP_LT_MH: @@ -3208,13 +3308,16 @@ instr_mov_translate(struct rte_swx_pipeline *p, fdst = struct_field_parse(p, NULL, dst, &dst_struct_id); CHECK(fdst, EINVAL); - /* MOV or MOV_S. */ + /* MOV, MOV_MH, MOV_HM or MOV_HH. */ fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_MOV; - if ((dst[0] == 'h' && src[0] != 'h') || - (dst[0] != 'h' && src[0] == 'h')) - instr->type = INSTR_MOV_S; + if (dst[0] != 'h' && src[0] == 'h') + instr->type = INSTR_MOV_MH; + if (dst[0] == 'h' && src[0] != 'h') + instr->type = INSTR_MOV_HM; + if (dst[0] == 'h' && src[0] == 'h') + instr->type = INSTR_MOV_HH; instr->mov.dst.struct_id = (uint8_t)dst_struct_id; instr->mov.dst.n_bits = fdst->n_bits; @@ -3256,15 +3359,45 @@ instr_mov_exec(struct rte_swx_pipeline *p) } static inline void -instr_mov_s_exec(struct rte_swx_pipeline *p) +instr_mov_mh_exec(struct rte_swx_pipeline *p) { struct thread *t = &p->threads[p->thread_id]; struct instruction *ip = t->ip; - TRACE("[Thread %2u] mov (s)\n", + TRACE("[Thread %2u] mov (mh)\n", p->thread_id); - MOV_S(t, ip); + MOV_MH(t, ip); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_mov_hm_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] mov (hm)\n", + p->thread_id); + + MOV_HM(t, ip); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_mov_hh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] mov (hh)\n", + p->thread_id); + + MOV_HH(t, ip); /* Thread. */ thread_ip_inc(p); @@ -3760,13 +3893,16 @@ instr_alu_and_translate(struct rte_swx_pipeline *p, fdst = struct_field_parse(p, NULL, dst, &dst_struct_id); CHECK(fdst, EINVAL); - /* AND or AND_S. */ + /* AND, AND_MH, AND_HM, AND_HH. */ fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_ALU_AND; - if ((dst[0] == 'h' && src[0] != 'h') || - (dst[0] != 'h' && src[0] == 'h')) - instr->type = INSTR_ALU_AND_S; + if (dst[0] != 'h' && src[0] == 'h') + instr->type = INSTR_ALU_AND_MH; + if (dst[0] == 'h' && src[0] != 'h') + instr->type = INSTR_ALU_AND_HM; + if (dst[0] == 'h' && src[0] == 'h') + instr->type = INSTR_ALU_AND_HH; instr->alu.dst.struct_id = (uint8_t)dst_struct_id; instr->alu.dst.n_bits = fdst->n_bits; @@ -3810,13 +3946,16 @@ instr_alu_or_translate(struct rte_swx_pipeline *p, fdst = struct_field_parse(p, NULL, dst, &dst_struct_id); CHECK(fdst, EINVAL); - /* OR or OR_S. */ + /* OR, OR_MH, OR_HM, OR_HH. */ fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_ALU_OR; - if ((dst[0] == 'h' && src[0] != 'h') || - (dst[0] != 'h' && src[0] == 'h')) - instr->type = INSTR_ALU_OR_S; + if (dst[0] != 'h' && src[0] == 'h') + instr->type = INSTR_ALU_OR_MH; + if (dst[0] == 'h' && src[0] != 'h') + instr->type = INSTR_ALU_OR_HM; + if (dst[0] == 'h' && src[0] == 'h') + instr->type = INSTR_ALU_OR_HH; instr->alu.dst.struct_id = (uint8_t)dst_struct_id; instr->alu.dst.n_bits = fdst->n_bits; @@ -3860,13 +3999,16 @@ instr_alu_xor_translate(struct rte_swx_pipeline *p, fdst = struct_field_parse(p, NULL, dst, &dst_struct_id); CHECK(fdst, EINVAL); - /* XOR or XOR_S. */ + /* XOR, XOR_MH, XOR_HM, XOR_HH. */ fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_ALU_XOR; - if ((dst[0] == 'h' && src[0] != 'h') || - (dst[0] != 'h' && src[0] == 'h')) - instr->type = INSTR_ALU_XOR_S; + if (dst[0] != 'h' && src[0] == 'h') + instr->type = INSTR_ALU_XOR_MH; + if (dst[0] == 'h' && src[0] != 'h') + instr->type = INSTR_ALU_XOR_HM; + if (dst[0] == 'h' && src[0] == 'h') + instr->type = INSTR_ALU_XOR_HH; instr->alu.dst.struct_id = (uint8_t)dst_struct_id; instr->alu.dst.n_bits = fdst->n_bits; @@ -4268,15 +4410,45 @@ instr_alu_and_exec(struct rte_swx_pipeline *p) } static inline void -instr_alu_and_s_exec(struct rte_swx_pipeline *p) +instr_alu_and_mh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] and (mh)\n", p->thread_id); + + /* Structs. */ + ALU_MH(t, ip, &); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_alu_and_hm_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] and (hm)\n", p->thread_id); + + /* Structs. */ + ALU_HM_FAST(t, ip, &); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_alu_and_hh_exec(struct rte_swx_pipeline *p) { struct thread *t = &p->threads[p->thread_id]; struct instruction *ip = t->ip; - TRACE("[Thread %2u] and (s)\n", p->thread_id); + TRACE("[Thread %2u] and (hh)\n", p->thread_id); /* Structs. */ - ALU_S(t, ip, &); + ALU_HH_FAST(t, ip, &); /* Thread. */ thread_ip_inc(p); @@ -4313,15 +4485,45 @@ instr_alu_or_exec(struct rte_swx_pipeline *p) } static inline void -instr_alu_or_s_exec(struct rte_swx_pipeline *p) +instr_alu_or_mh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] or (mh)\n", p->thread_id); + + /* Structs. */ + ALU_MH(t, ip, |); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_alu_or_hm_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] or (hm)\n", p->thread_id); + + /* Structs. */ + ALU_HM_FAST(t, ip, |); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_alu_or_hh_exec(struct rte_swx_pipeline *p) { struct thread *t = &p->threads[p->thread_id]; struct instruction *ip = t->ip; - TRACE("[Thread %2u] or (s)\n", p->thread_id); + TRACE("[Thread %2u] or (hh)\n", p->thread_id); /* Structs. */ - ALU_S(t, ip, |); + ALU_HH_FAST(t, ip, |); /* Thread. */ thread_ip_inc(p); @@ -4358,15 +4560,45 @@ instr_alu_xor_exec(struct rte_swx_pipeline *p) } static inline void -instr_alu_xor_s_exec(struct rte_swx_pipeline *p) +instr_alu_xor_mh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] xor (mh)\n", p->thread_id); + + /* Structs. */ + ALU_MH(t, ip, ^); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_alu_xor_hm_exec(struct rte_swx_pipeline *p) { struct thread *t = &p->threads[p->thread_id]; struct instruction *ip = t->ip; - TRACE("[Thread %2u] xor (s)\n", p->thread_id); + TRACE("[Thread %2u] xor (hm)\n", p->thread_id); /* Structs. */ - ALU_S(t, ip, ^); + ALU_HM_FAST(t, ip, ^); + + /* Thread. */ + thread_ip_inc(p); +} + +static inline void +instr_alu_xor_hh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] xor (hh)\n", p->thread_id); + + /* Structs. */ + ALU_HH_FAST(t, ip, ^); /* Thread. */ thread_ip_inc(p); @@ -4794,13 +5026,16 @@ instr_jmp_eq_translate(struct rte_swx_pipeline *p, fa = struct_field_parse(p, action, a, &a_struct_id); CHECK(fa, EINVAL); - /* JMP_EQ or JMP_EQ_S. */ + /* JMP_EQ, JMP_EQ_MH, JMP_EQ_HM, JMP_EQ_HH. */ fb = struct_field_parse(p, action, b, &b_struct_id); if (fb) { instr->type = INSTR_JMP_EQ; - if ((a[0] == 'h' && b[0] != 'h') || - (a[0] != 'h' && b[0] == 'h')) - instr->type = INSTR_JMP_EQ_S; + if (a[0] != 'h' && b[0] == 'h') + instr->type = INSTR_JMP_EQ_MH; + if (a[0] == 'h' && b[0] != 'h') + instr->type = INSTR_JMP_EQ_HM; + if (a[0] == 'h' && b[0] == 'h') + instr->type = INSTR_JMP_EQ_HH; instr->jmp.ip = NULL; /* Resolved later. */ instr->jmp.a.struct_id = (uint8_t)a_struct_id; @@ -4848,13 +5083,16 @@ instr_jmp_neq_translate(struct rte_swx_pipeline *p, fa = struct_field_parse(p, action, a, &a_struct_id); CHECK(fa, EINVAL); - /* JMP_NEQ or JMP_NEQ_S. */ + /* JMP_NEQ, JMP_NEQ_MH, JMP_NEQ_HM, JMP_NEQ_HH. */ fb = struct_field_parse(p, action, b, &b_struct_id); if (fb) { instr->type = INSTR_JMP_NEQ; - if ((a[0] == 'h' && b[0] != 'h') || - (a[0] != 'h' && b[0] == 'h')) - instr->type = INSTR_JMP_NEQ_S; + if (a[0] != 'h' && b[0] == 'h') + instr->type = INSTR_JMP_NEQ_MH; + if (a[0] == 'h' && b[0] != 'h') + instr->type = INSTR_JMP_NEQ_HM; + if (a[0] == 'h' && b[0] == 'h') + instr->type = INSTR_JMP_NEQ_HH; instr->jmp.ip = NULL; /* Resolved later. */ instr->jmp.a.struct_id = (uint8_t)a_struct_id; @@ -5089,14 +5327,36 @@ instr_jmp_eq_exec(struct rte_swx_pipeline *p) } static inline void -instr_jmp_eq_s_exec(struct rte_swx_pipeline *p) +instr_jmp_eq_mh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] jmpeq (mh)\n", p->thread_id); + + JMP_CMP_MH(t, ip, ==); +} + +static inline void +instr_jmp_eq_hm_exec(struct rte_swx_pipeline *p) { struct thread *t = &p->threads[p->thread_id]; struct instruction *ip = t->ip; - TRACE("[Thread %2u] jmpeq (s)\n", p->thread_id); + TRACE("[Thread %2u] jmpeq (hm)\n", p->thread_id); - JMP_CMP_S(t, ip, ==); + JMP_CMP_HM(t, ip, ==); +} + +static inline void +instr_jmp_eq_hh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] jmpeq (hh)\n", p->thread_id); + + JMP_CMP_HH_FAST(t, ip, ==); } static inline void @@ -5122,14 +5382,36 @@ instr_jmp_neq_exec(struct rte_swx_pipeline *p) } static inline void -instr_jmp_neq_s_exec(struct rte_swx_pipeline *p) +instr_jmp_neq_mh_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] jmpneq (mh)\n", p->thread_id); + + JMP_CMP_MH(t, ip, !=); +} + +static inline void +instr_jmp_neq_hm_exec(struct rte_swx_pipeline *p) +{ + struct thread *t = &p->threads[p->thread_id]; + struct instruction *ip = t->ip; + + TRACE("[Thread %2u] jmpneq (hm)\n", p->thread_id); + + JMP_CMP_HM(t, ip, !=); +} + +static inline void +instr_jmp_neq_hh_exec(struct rte_swx_pipeline *p) { struct thread *t = &p->threads[p->thread_id]; struct instruction *ip = t->ip; - TRACE("[Thread %2u] jmpneq (s)\n", p->thread_id); + TRACE("[Thread %2u] jmpneq (hh)\n", p->thread_id); - JMP_CMP_S(t, ip, !=); + JMP_CMP_HH_FAST(t, ip, !=); } static inline void @@ -6054,7 +6336,9 @@ static instr_exec_t instruction_table[] = { [INSTR_HDR_INVALIDATE] = instr_hdr_invalidate_exec, [INSTR_MOV] = instr_mov_exec, - [INSTR_MOV_S] = instr_mov_s_exec, + [INSTR_MOV_MH] = instr_mov_mh_exec, + [INSTR_MOV_HM] = instr_mov_hm_exec, + [INSTR_MOV_HH] = instr_mov_hh_exec, [INSTR_MOV_I] = instr_mov_i_exec, [INSTR_DMA_HT] = instr_dma_ht_exec, @@ -6086,15 +6370,21 @@ static instr_exec_t instruction_table[] = { [INSTR_ALU_CKSUB_FIELD] = instr_alu_cksub_field_exec, [INSTR_ALU_AND] = instr_alu_and_exec, - [INSTR_ALU_AND_S] = instr_alu_and_s_exec, + [INSTR_ALU_AND_MH] = instr_alu_and_mh_exec, + [INSTR_ALU_AND_HM] = instr_alu_and_hm_exec, + [INSTR_ALU_AND_HH] = instr_alu_and_hh_exec, [INSTR_ALU_AND_I] = instr_alu_and_i_exec, [INSTR_ALU_OR] = instr_alu_or_exec, - [INSTR_ALU_OR_S] = instr_alu_or_s_exec, + [INSTR_ALU_OR_MH] = instr_alu_or_mh_exec, + [INSTR_ALU_OR_HM] = instr_alu_or_hm_exec, + [INSTR_ALU_OR_HH] = instr_alu_or_hh_exec, [INSTR_ALU_OR_I] = instr_alu_or_i_exec, [INSTR_ALU_XOR] = instr_alu_xor_exec, - [INSTR_ALU_XOR_S] = instr_alu_xor_s_exec, + [INSTR_ALU_XOR_MH] = instr_alu_xor_mh_exec, + [INSTR_ALU_XOR_HM] = instr_alu_xor_hm_exec, + [INSTR_ALU_XOR_HH] = instr_alu_xor_hh_exec, [INSTR_ALU_XOR_I] = instr_alu_xor_i_exec, [INSTR_ALU_SHL] = instr_alu_shl_exec, @@ -6124,11 +6414,15 @@ static instr_exec_t instruction_table[] = { [INSTR_JMP_ACTION_MISS] = instr_jmp_action_miss_exec, [INSTR_JMP_EQ] = instr_jmp_eq_exec, - [INSTR_JMP_EQ_S] = instr_jmp_eq_s_exec, + [INSTR_JMP_EQ_MH] = instr_jmp_eq_mh_exec, + [INSTR_JMP_EQ_HM] = instr_jmp_eq_hm_exec, + [INSTR_JMP_EQ_HH] = instr_jmp_eq_hh_exec, [INSTR_JMP_EQ_I] = instr_jmp_eq_i_exec, [INSTR_JMP_NEQ] = instr_jmp_neq_exec, - [INSTR_JMP_NEQ_S] = instr_jmp_neq_s_exec, + [INSTR_JMP_NEQ_MH] = instr_jmp_neq_mh_exec, + [INSTR_JMP_NEQ_HM] = instr_jmp_neq_hm_exec, + [INSTR_JMP_NEQ_HH] = instr_jmp_neq_hh_exec, [INSTR_JMP_NEQ_I] = instr_jmp_neq_i_exec, [INSTR_JMP_LT] = instr_jmp_lt_exec, -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:31.779773400 +0800 +++ 0202-pipeline-fix-endianness-conversions.patch 2021-05-10 23:59:26.670000000 +0800 @@ -1 +1 @@ -From 48ad58964cc3e42f3e79b5f19b8deee59e240572 Mon Sep 17 00:00:00 2001 +From 51ca4146bb2d4ee81635868939fa764ac3d086a0 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 48ad58964cc3e42f3e79b5f19b8deee59e240572 ] @@ -23 +25,0 @@ -Cc: stable@dpdk.org @@ -31 +33 @@ -index 2956dde77f..e17b449939 100644 +index bc619ca533..e4fbf1b1be 100644 @@ -34 +36 @@ -@@ -318,9 +318,11 @@ enum instruction_type { +@@ -263,9 +263,11 @@ enum instruction_type { @@ -49 +51 @@ -@@ -374,25 +376,31 @@ enum instruction_type { +@@ -319,25 +321,31 @@ enum instruction_type { @@ -90 +92 @@ -@@ -533,41 +541,45 @@ enum instruction_type { +@@ -406,41 +414,45 @@ enum instruction_type { @@ -152 +154 @@ -@@ -901,7 +913,7 @@ struct thread { +@@ -673,7 +685,7 @@ struct thread { @@ -161 +163 @@ -@@ -919,8 +931,6 @@ struct thread { +@@ -691,8 +703,6 @@ struct thread { @@ -170 +172 @@ -@@ -941,6 +951,25 @@ struct thread { +@@ -713,6 +723,25 @@ struct thread { @@ -196 +198 @@ -@@ -960,12 +989,31 @@ struct thread { +@@ -732,12 +761,31 @@ struct thread { @@ -229 +231 @@ -@@ -1028,7 +1076,7 @@ struct thread { +@@ -800,7 +848,7 @@ struct thread { @@ -238 +240 @@ -@@ -1043,9 +1091,44 @@ struct thread { +@@ -815,9 +863,44 @@ struct thread { @@ -284 +286 @@ -@@ -1080,7 +1163,7 @@ struct thread { +@@ -852,7 +935,7 @@ struct thread { @@ -293 +295 @@ -@@ -1096,8 +1179,6 @@ struct thread { +@@ -868,8 +951,6 @@ struct thread { @@ -302 +304 @@ -@@ -1129,12 +1210,27 @@ struct thread { +@@ -901,12 +982,27 @@ struct thread { @@ -331 +333 @@ -@@ -2529,10 +2625,14 @@ instruction_is_jmp(struct instruction *instr) +@@ -2280,10 +2376,14 @@ instruction_is_jmp(struct instruction *instr) @@ -348 +350 @@ -@@ -3518,13 +3618,16 @@ instr_mov_translate(struct rte_swx_pipeline *p, +@@ -3208,13 +3308,16 @@ instr_mov_translate(struct rte_swx_pipeline *p, @@ -369 +371 @@ -@@ -3566,15 +3669,45 @@ instr_mov_exec(struct rte_swx_pipeline *p) +@@ -3256,15 +3359,45 @@ instr_mov_exec(struct rte_swx_pipeline *p) @@ -418 +420 @@ -@@ -4070,13 +4203,16 @@ instr_alu_and_translate(struct rte_swx_pipeline *p, +@@ -3760,13 +3893,16 @@ instr_alu_and_translate(struct rte_swx_pipeline *p, @@ -439 +441 @@ -@@ -4120,13 +4256,16 @@ instr_alu_or_translate(struct rte_swx_pipeline *p, +@@ -3810,13 +3946,16 @@ instr_alu_or_translate(struct rte_swx_pipeline *p, @@ -460 +462 @@ -@@ -4170,13 +4309,16 @@ instr_alu_xor_translate(struct rte_swx_pipeline *p, +@@ -3860,13 +3999,16 @@ instr_alu_xor_translate(struct rte_swx_pipeline *p, @@ -481 +483 @@ -@@ -4578,15 +4720,45 @@ instr_alu_and_exec(struct rte_swx_pipeline *p) +@@ -4268,15 +4410,45 @@ instr_alu_and_exec(struct rte_swx_pipeline *p) @@ -530 +532 @@ -@@ -4623,15 +4795,45 @@ instr_alu_or_exec(struct rte_swx_pipeline *p) +@@ -4313,15 +4485,45 @@ instr_alu_or_exec(struct rte_swx_pipeline *p) @@ -579 +581 @@ -@@ -4668,15 +4870,45 @@ instr_alu_xor_exec(struct rte_swx_pipeline *p) +@@ -4358,15 +4560,45 @@ instr_alu_xor_exec(struct rte_swx_pipeline *p) @@ -628 +630 @@ -@@ -6829,13 +7061,16 @@ instr_jmp_eq_translate(struct rte_swx_pipeline *p, +@@ -4794,13 +5026,16 @@ instr_jmp_eq_translate(struct rte_swx_pipeline *p, @@ -649 +651 @@ -@@ -6883,13 +7118,16 @@ instr_jmp_neq_translate(struct rte_swx_pipeline *p, +@@ -4848,13 +5083,16 @@ instr_jmp_neq_translate(struct rte_swx_pipeline *p, @@ -670 +672 @@ -@@ -7124,14 +7362,36 @@ instr_jmp_eq_exec(struct rte_swx_pipeline *p) +@@ -5089,14 +5327,36 @@ instr_jmp_eq_exec(struct rte_swx_pipeline *p) @@ -710 +712 @@ -@@ -7157,14 +7417,36 @@ instr_jmp_neq_exec(struct rte_swx_pipeline *p) +@@ -5122,14 +5382,36 @@ instr_jmp_neq_exec(struct rte_swx_pipeline *p) @@ -750 +752 @@ -@@ -8146,7 +8428,9 @@ static instr_exec_t instruction_table[] = { +@@ -6054,7 +6336,9 @@ static instr_exec_t instruction_table[] = { @@ -761 +763 @@ -@@ -8178,15 +8462,21 @@ static instr_exec_t instruction_table[] = { +@@ -6086,15 +6370,21 @@ static instr_exec_t instruction_table[] = { @@ -786 +788 @@ -@@ -8264,11 +8554,15 @@ static instr_exec_t instruction_table[] = { +@@ -6124,11 +6414,15 @@ static instr_exec_t instruction_table[] = {