From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30105.outbound.protection.outlook.com [40.107.3.105]) by dpdk.org (Postfix) with ESMTP id 9E19511D4; Wed, 23 May 2018 03:52:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U89vzgQpXHZ3d0OJr6JVJnZjJb14LUBi7R+pyh14gi4=; b=Kf0vGHm+kNAiMr+zke5PE1Ul9Y9VC2IFLhh94i9gY69+AhSWYJWxzGXXtDRQ3rlVzNqBmCXL12mlHdmNRzi2HtWfxdXhpI73TguSIubgmhGlp0+HR7esPYuzFOkaF+pnZz3pJqw+8ObHAT9K+42R/8q2y1Pub+tytTkyrazSG+0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by AM5PR0501MB2034.eurprd05.prod.outlook.com (2603:10a6:203:1a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.797.11; Wed, 23 May 2018 01:52:10 +0000 From: Yongseok Koh To: shahafs@mellanox.com, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, Yongseok Koh , stable@dpdk.org Date: Tue, 22 May 2018 18:51:57 -0700 Message-Id: <20180523015157.35716-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BYAPR01CA0025.prod.exchangelabs.com (2603:10b6:a02:80::38) To AM5PR0501MB2034.eurprd05.prod.outlook.com (2603:10a6:203:1a::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2034; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2034; 3:P6MROHWPzsPOZJYPXSGR+xjaxya5p2CQcOb2nR+PamNsumA5RDgOiEBfpKmLrALfOAAeBdrEkNJcn3iNX2PCEFn3pcI1vf4edqTHNI/MslZCxhzJtgzpel9MGZ7DoV8nCaSEikClxTX89Ys2FYcdRJSPu3ijKQDEn8casu4sqhFJjFEktJdG/81iFrGrG9FgfTDPs9JLxPpPZ1wG7m6eBFSSR4UR2VgSgKxv9BYXwvpiYYksrUTZYpnMSCpBqnrG; 25:glEQGzasOVCkbvHYiN9ExzkUuU7CWZH+7lpS0BtQtxfqDdrISeqx1Qz1n6dMJZOzDrgYnTdGE/X91lqyL3an3IRFZb3wZ6u+QH6y36DVXZqI3lc5EjgQQYQaaOP0f44nS8oM8jGMBJ9frQhgl3Lny68ppxfRx1buPuzwDWZPmyguIoTpjH989lPCTydmIsRlmQc8Wxyf24oreGMBMWlRlhDVRdFJyqPbvR14UYBsbfUkqfBvnQqD/iM/V3ZFJ4Dt+Xdaz1FSAjEAy9iJq9Px8Q7Yeu/el3DkKVdvHukvTymcNuhBpiR+sIkv6bH8yg+uKnQJzzrc+/uBqSf142VraA==; 31:Q5WCmLMbU2iaUx5I4pqlW+jk33APo+tcm2857verFI7QANvZ11VAHaAWFUDzXVD+Su3GVOIOFFPJ0A5PAxLf1WZ1Wev2MB16cmq9I6w2suWJCL651vbHiGVe8NKQPTgUN2u8BQ/Tnc8p04bDOKdW30pOjwmfBxzt68fLJemi/XdcOSHsMOcS64Ed3tdFBv/hmRemj2l0xX5ewJ0BcNpXPJnv3zaWpJrQZuFqJwl0gpU= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2034: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2034; 20:N9P5FmLb2QuHrWYrM/foszZxt1d95HmH7936Re1XGZP+59S5HvuDVZ9d385WWIXD99JbW+WQSbhjtr44rJ0rRZQlY5S01s56yJK7Jbk28oWkmGPnIsa8IcZDOnAQlQr+Lq2nnLG1yUc8ALA3L8+J6aknbjoi1pdTWELRqID887rPsFh/MYGx2F0ikCEfLPzoB4cmK+JX4viiaCW1y/sBQbYHARxk26PWpI8K9H27PpSeTFdnBPz5X5WvOXU1dlzZ8jjy2j/WUXWMdW+CMg+lC0ql8yJGApaltSAXFjjFZyjS8UJ8oPD8bcooarVeCZq+EuX8hGoVvlUUetjk6qqa6G0dNQEFgkuLnW268e/hXwDCGqNghjMf9U4PxJ6scXmAmv48+dc3zMLUWeHlE1H3cpaxBnm7lBxutQ9hAW0gmfrOXcRH15AZ1sxTq9AkSeDkOVmQNTZE4Hp4WQtO6NJ1REPDywrUtoEUgIFavxzZYay3drKr1V4GNNaqviBW8xok; 4:8yL7XV0hyvZkRZmygyciCqAX9/h8LOpEsfHOkKcqsXk7DHRLUgxCKgxqbFjffVaQk7TYiGxp7H8xFpqytPLPw2WOCU2HTs8GfVUUWRXGBjyNarAR9x+fXGBtWU0EpLO09PxLbKZauwsAq7bu0tYTt4AxQLxYLa2hB6d1afxvss4voJDupNd792dCoFQ87yxCUVfSY8L5j9orwiS3rgdZEZTkeFPIv+X9hTe0Zz+oC5A1xmNerEQhEeatA8dMmqC46en5ZZfE+vqTymee9REedw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM5PR0501MB2034; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2034; X-Forefront-PRVS: 06818431B9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019001)(6009001)(428001)(199002)(189002)(20776003)(69226001)(63696002)(47776003)(74876001)(62966002)(74706001)(36756003)(77096001)(77156001)(76786001)(76796001)(81542001)(42186004)(93136001)(76176001)(92566001)(46102001)(64706001)(81342001)(92726001)(48376002)(77982001)(59766001)(56816005)(33646001)(80022001)(66066001)(76482001)(90146001)(89996001)(65816001)(87936001)(81156002)(56776001)(88136002)(54316002)(74366001)(44376005)(87286001)(87266001)(50226001)(4396001)(47976001)(50986001)(95666003)(49866001)(47736001)(51856001)(50466002)(85306002)(79102001)(85852003)(83072002)(21056001)(97336001)(94946001)(93516002)(95416001)(94316002)(86362001)(97186001)(80976001)(93916002)(575784001)(81686001)(83322001)(19580405001)(81816001)(69596002)(31966008)(74662001)(19580395003)(53806001)(74502001)(47446002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0501MB2034; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2034; 23:/b90RGHqez48r+MdYZTqO0satVecz+LVsuDiWqN?= =?us-ascii?Q?fc3jrWbjjDzxvLJb1Qon0kWD0/V2ieDMhnPXSheCAmOZ4lrfBym18AZNRR9O?= =?us-ascii?Q?6DxTuMs1pL+3CR3QEld7OTg/6OvDWAFilLmWPKYIbyv+D/7sMvvoaYoTBf0D?= =?us-ascii?Q?D0C6o2ov/ztLQ7gQp7kVNE9DcX55awnfMEMSSzlDil4THBbZ7Jo1tnyJnpJp?= =?us-ascii?Q?rGW85C631g9rOPl20YA8GhNo94WhlNqYOLXISION7J3SMxQmke0IErvJrrUE?= =?us-ascii?Q?cqo2GEp1eReBexzOjl9sk0B6hiLOpKK++6gfFn75Plb0UddD+oJKd5+S5853?= =?us-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SA1zJ6dLS4PvF1Dn9qw1Ea6qxVCVm5?= =?us-ascii?Q?dNuKOKdCA/NAhxQmGvxzuFJB+mQCOdJFnSRRwdE6JiWXxV5E1YHo6RCyzz06?= =?us-ascii?Q?jeY1IEJ/RBFpAvO15tGM8M7IfUd/7uWdmjrr3Kc3ii9+7AEoVfJl8D4v8tLa?= =?us-ascii?Q?sc2igrUu7NpIYjFGXTXmHULm+Kn1J6+liUY5PN/dVkWvfhBiKey0fepmnnT9?= =?us-ascii?Q?xjwPOt8JKEpoaLRBW9Iw1gT/JLVgpN+22/4BN3izm1YaW8Bb0aTstNE1GNDi?= =?us-ascii?Q?v34brVlUR8lCONKISIVJ15xGEXW1eQ2LOLv/Hvvm/yBQPID28H/kG0erGR8c?= =?us-ascii?Q?X1CmWRN+Tl1YCx6Jk0oDhmVa1FleXUBVDwLtO2FhzrUu4FkrkSWDgmjLHGra?= =?us-ascii?Q?xZpYn++av7HeMoRFjYv0Iz3SOg2MZ/pheQ317U/ZILJEZS7Fr5guqW/A3sZR?= =?us-ascii?Q?plJtpwYRLAqjovpVMyaQ6JTzv9g5TL542onvThps2jTb8hQFgYWJ0grWCAZT?= =?us-ascii?Q?AePvkWqLM5OOHfBQXRaygh1DheQ6x6akQodz88FOndvx0oKudunzX9PsKy0a?= =?us-ascii?Q?DqLhjPLuYQGcj5YTX5tnBe8LMq6ZRKTFesgHB2gOpwETM65AxiItcr90zlrp?= =?us-ascii?Q?oeoGuS2RH9tpf7saJ?= X-Microsoft-Antispam-Message-Info: RuZPMmTgvz+eIpBMWYGYt+7KHC60VuTyJX/4MW0Uza7IE5G+Guet8z0ALpE4CXjjWvdtx1oMEYxauDD+SwPgZhiFS7yzt9D5br6/az8rGS8c9H8qKIllIYYYuwfOOfVMWILa0AuAhCYuoAujGFxgKk9fc54njSDYzh/x5H6Y/UeW27F94fu87geHZXfM9KX8 X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2034; 6:bfmJmHBBTXh5UMG7b1k5mN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office365-Filtering-Correlation-Id: 82c3d76e-2805-463a-294d-08d5c04fcd44 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2018 01:52:10.9194 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82c3d76e-2805-463a-294d-08d5c04fcd44 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2034 Subject: [dpdk-stable] [PATCH] net/mlx5: fix GRE flow rule X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 01:52:13 -0000 Creating a flow having pattern from the middle of a packet is allowed. For example, testpmd> flow create 0 ingress pattern vxlan vni is 20 / end actions ... Device can parse GRE header but without proper support from library and firmware (HAVE_IBV_DEVICE_MPLS_SUPPORT), a field in GRE header can't be specified when creating a rule. As a result, the following rule will be interpreted as a wildcard rule, which always matches any packet. testpmd> flow create 0 ingress pattern gre / end actions ... Fixes: 96c6c65a10d2 ("net/mlx5: support GRE tunnel flow") Fixes: 1f106da2bf7b ("net/mlx5: support MPLS-in-GRE and MPLS-in-UDP") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 994be05be..526fe6b0e 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -330,9 +330,11 @@ static const enum rte_flow_action_type valid_actions[] = { static const struct mlx5_flow_items mlx5_flow_items[] = { [RTE_FLOW_ITEM_TYPE_END] = { .items = ITEMS(RTE_FLOW_ITEM_TYPE_ETH, +#ifdef HAVE_IBV_DEVICE_MPLS_SUPPORT + RTE_FLOW_ITEM_TYPE_GRE, +#endif RTE_FLOW_ITEM_TYPE_VXLAN, - RTE_FLOW_ITEM_TYPE_VXLAN_GPE, - RTE_FLOW_ITEM_TYPE_GRE), + RTE_FLOW_ITEM_TYPE_VXLAN_GPE), }, [RTE_FLOW_ITEM_TYPE_ETH] = { .items = ITEMS(RTE_FLOW_ITEM_TYPE_VLAN, -- 2.11.0