From patchwork Fri Oct 16 13:57:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 81122 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 854B1A04DB; Fri, 16 Oct 2020 15:57:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D19A01EE50; Fri, 16 Oct 2020 15:57:53 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7670C1EE51 for ; Fri, 16 Oct 2020 15:57:50 +0200 (CEST) IronPort-SDR: I2elxsJgmLiskfOAJJZj4ZZe0aSkgm7Ar4ZIToaGOkHvR0YENrwY6n5vVgZQeGpU85BM3mMs77 XIc2BYclmO1w== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="184173703" X-IronPort-AV: E=Sophos;i="5.77,383,1596524400"; d="scan'208";a="184173703" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2020 06:57:49 -0700 IronPort-SDR: oS556tAQHkRh01n/8P6WU3S2r03N4K+raxoAcEzCnUgf+2X5DhZilQsUl6q2NI3NPszQPhgCwY VatMsQRxnqDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,383,1596524400"; d="scan'208";a="464686095" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by orsmga004.jf.intel.com with ESMTP; 16 Oct 2020 06:57:48 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: venkata.suresh.kumar.p@intel.com, cristian.dumitrescu@intel.com Date: Fri, 16 Oct 2020 14:57:47 +0100 Message-Id: <20201016135747.76713-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH 1/2] pipeline: fix jump instruction population 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" From: Venkata Suresh Kumar P This patch fixes jump next instruction pointer population Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions") Cc: cristian.dumitrescu@intel.com Signed-off-by: Venkata Suresh Kumar P Acked-by: Cristian Dumitrescu Signed-off-by: Venkata Suresh Kumar P Acked-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_swx_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c index d5b4a1c..2c9fbf4 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.c +++ b/lib/librte_pipeline/rte_swx_pipeline.c @@ -5647,7 +5647,7 @@ struct_field_parse(struct rte_swx_pipeline *p, data->jmp_label); CHECK(found, EINVAL); - instr->jmp.ip = &instr[found - instruction_data]; + instr->jmp.ip = &instructions[found - instruction_data]; } return 0; From patchwork Fri Oct 16 13:57:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 81123 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B595A04DB; Fri, 16 Oct 2020 15:58:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54AC11EE49; Fri, 16 Oct 2020 15:58:03 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 874A81EE47 for ; Fri, 16 Oct 2020 15:58:01 +0200 (CEST) IronPort-SDR: 8bmccj7WT44pGBlyGk5yx8L+is21J9fScZXiwzTnqnRJF+6ABCloVY0WJ/X4zwldrjnc9lUrOn IGt7DkT4gwsg== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="145921596" X-IronPort-AV: E=Sophos;i="5.77,383,1596524400"; d="scan'208";a="145921596" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2020 06:57:59 -0700 IronPort-SDR: os377kEYjVXwMJS66CyLIsmfCDMMkLJEdqkyAUGm+vWykQbrhDv2W+TTqLcm1HUwZtmiF5WyIG F7aMzQmYDgRg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,383,1596524400"; d="scan'208";a="531726871" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by orsmga005.jf.intel.com with ESMTP; 16 Oct 2020 06:57:57 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: venkata.suresh.kumar.p@intel.com, Churchill Khangar , cristian.dumitrescu@intel.com Date: Fri, 16 Oct 2020 14:57:57 +0100 Message-Id: <20201016135757.76761-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH 2/2] pipeline: fix jump instruction parsing 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" From: Churchill Khangar This patch fixes the jump if not valid header instruction parsing Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions") Cc: cristian.dumitrescu@intel.com Signed-off-by: Churchill Khangar Acked-by: Cristian Dumitrescu Signed-off-by: Churchill Khangar Acked-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_swx_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c index 2c9fbf4..9d64611 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.c +++ b/lib/librte_pipeline/rte_swx_pipeline.c @@ -4658,7 +4658,7 @@ struct_field_parse(struct rte_swx_pipeline *p, { struct header *h; - CHECK(n_tokens == 2, EINVAL); + CHECK(n_tokens == 3, EINVAL); strcpy(data->jmp_label, tokens[1]);