From patchwork Wed Jan 8 15:07:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dekel Peled X-Patchwork-Id: 64291 X-Patchwork-Delegate: ferruh.yigit@amd.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 35385A04F3; Wed, 8 Jan 2020 16:08:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 310361DA45; Wed, 8 Jan 2020 16:08:23 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 472E21D656 for ; Wed, 8 Jan 2020 16:08:21 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Jan 2020 17:08:18 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.128.130.87]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 008F8Hnm013274; Wed, 8 Jan 2020 17:08:17 +0200 From: Dekel Peled To: adrien.mazarguil@6wind.com, wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com Cc: orika@mellanox.com, dev@dpdk.org, Roman Zhukov , Andrew Rybchenko , stable@dpdk.org Date: Wed, 8 Jan 2020 17:07:02 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] app/testpmd: fix missing GENEVE item in helper func 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" Previous patch added support of GENEVE pattern item in flow rule. Function flow_item_default_mask() was not updated, so using it with GENEVE item returns null. Using testpmd command "set raw_decap" or "set raw_encap" with GENEVE item, without specifying any parameters, results in segmentation fault. This patch updates function flow_item_default_mask(), adding case to handle GENEVE item. Fixes: 0f4203fe9d18 ("app/testpmd: support GENEVE pattern item in flow rules") Cc: Roman Zhukov Cc: Andrew Rybchenko Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Ori Kam Acked-by: Andrew Rybchenko --- app/test-pmd/cmdline_flow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 99dade7..3cf05b5 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -6236,6 +6236,9 @@ static int comp_set_raw_index(struct context *, const struct token *, case RTE_FLOW_ITEM_TYPE_GTP_PSC: mask = &rte_flow_item_gtp_psc_mask; break; + case RTE_FLOW_ITEM_TYPE_GENEVE: + mask = &rte_flow_item_geneve_mask; + break; case RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID: mask = &rte_flow_item_pppoe_proto_id_mask; default: