From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id D8BC91B1B6 for ; Wed, 24 Jan 2018 16:38:42 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7E07C226A9; Wed, 24 Jan 2018 10:38:42 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:38:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=vidvV1yTTD+1LAoMj rdfIxDrgItisAcgxVJi7/yQ5UE=; b=KP4VTiCebVgtIohpIWP4pGyR3uOteiYf6 vKBOggK3Vyavb3zLADz5NMGRbj1BJtOqngOhYkykURJ6aluAxD+9Y1SiDoec3ySy JDg41lK/r+VDIiPotn1xNgvFKbUUzRlf9yCz4aJY2CHKg2KTBtaN3GpG+uCCXE8f dlrlCv02wTE0scKFX2bpN2bCY57kuxd2LyU1V4AoYA3gJassgTiqq4duRpcW517F A4+b4xlMFZCm/0lC7Ak6kw2O0U3cqD5fzO1CgyngpYvTp7augQeEW/aixBoW4D0K I9x21HrcZyZfz8DaTxXzaZziuoH81TmYER3Xn7uNWrWvoEUpg9Ouw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=vidvV1yTTD+1LAoMjrdfIxDrgItisAcgxVJi7/yQ5UE=; b=X5rF8WHa EiIOMtAwYWc2LFZEAKxJ6UlMeP/gaqvSE4cXygEN+045n5Gx8HRb0X7EVbyZ7Dvv lr10zRSNB77BKVBN5Eyqs4GPpcS+L/V/4FOhWcC/3Lk4BhZzrptDEi0NGIWl09iH z2bX4GV1aRExlGWAtx7MC2IeC+AiTj4+ZYXzJiXcDidOuzWo/rBre5DsLTyuluBK r8xMpH3CUEVlf1saHmMgh/Kc9J9o2WbDTEu3jdatyYZFDmys4Lz20pOr+cLy6N6n WbW+xBwd1k1wYPxyXjKjSslAHU2ttRIrMsFnpXxfin7GZIF8N7Bz05XKjbvoRxIP CfeGlP2vcBxlGg== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C3707E448; Wed, 24 Jan 2018 10:38:40 -0500 (EST) From: Yuanhan Liu To: Wei Zhao Cc: Qi Zhang , dpdk stable Date: Wed, 24 Jan 2018 23:32:12 +0800 Message-Id: <1516808026-25523-64-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: add FDIR NVGRE parameter check' has been queued to LTS release 17.11.1 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, 24 Jan 2018 15:38:43 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From fbc91761b542e70920cee0f003032f26ac3fbe92 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Fri, 22 Dec 2017 13:11:05 +0800 Subject: [PATCH] net/i40e: add FDIR NVGRE parameter check [ upstream commit 0ecc6d6c663bc9906db9f82833f7c49c97df8321 ] Add mask parameter check to nvgre parser for flow API. Fixes: 30965ca34127 ("net/i40e: add NVGRE flow parsing") Signed-off-by: Wei Zhao Acked-by: Qi Zhang --- drivers/net/i40e/i40e_flow.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index a9e7a0d..b935ea7 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -3610,6 +3610,41 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev, "Invalid TNI mask"); return -rte_errno; } + if (nvgre_mask->protocol && + nvgre_mask->protocol != 0xFFFF) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, + item, + "Invalid NVGRE item"); + return -rte_errno; + } + if (nvgre_mask->c_k_s_rsvd0_ver && + nvgre_mask->c_k_s_rsvd0_ver != + rte_cpu_to_be_16(0xFFFF)) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, + item, + "Invalid NVGRE item"); + return -rte_errno; + } + if (nvgre_spec->c_k_s_rsvd0_ver != + rte_cpu_to_be_16(0x2000) && + nvgre_mask->c_k_s_rsvd0_ver) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, + item, + "Invalid NVGRE item"); + return -rte_errno; + } + if (nvgre_mask->protocol && + nvgre_spec->protocol != + rte_cpu_to_be_16(0x6558)) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, + item, + "Invalid NVGRE item"); + return -rte_errno; + } rte_memcpy(((uint8_t *)&tenant_id_be + 1), nvgre_spec->tni, 3); filter->tenant_id = -- 2.7.4