From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id C70331DB9 for ; Mon, 30 Apr 2018 16:43:24 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id a137so10329526wme.1 for ; Mon, 30 Apr 2018 07:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H29mnWipHOIWeuQjOXODHAnltciX0Ga6YW3vJcVZ9LY=; b=ILUl4yd13qerQvFcM7R8X200YJVj9ukD43BN5CJZhe2WqctzAETxgobotDAkt/W2CD j1cydHj3G5HX3diCXfx4WhuX/xvIlLFBJd2yqAXDdwu6ZYSvsjeppED8s75l1UgDF+2a nU27yA6ukIJS5xlPHN/NKLkcq+XGHAhZQcRFDNczwVANZfzDR0wrumL2w197qqeBWQmz mcQfuAs6ElPBFB15sglurMMGFQjcsGVzHxA52uaBV9BTKtr0cnyT/XjoJnr/sdb9kRbN n5GIiCgVvjwPpiMB9Sf4SPrK6dgBHfLHYrEekZDrLehmGku5XLDMPvROXeQH2NHH9m11 8p8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H29mnWipHOIWeuQjOXODHAnltciX0Ga6YW3vJcVZ9LY=; b=iwOsAi5RzjyO4uU/GAbeaSf57gfIkA/BGlVR4bMgFCDOR/gOeqfsl+ByLUMqyt/iG3 fKmc16TNMi4Kp+LlyGakTQ6zI9IiH/TEfOori7YBkKbuayW3lZj0/aqJ9IjDTyQbbMhk Ahp+5T0kd4KNgKOy3Wi1FnnHisPwo44hcCdGbc6v8veqpvaiZ0NCQrlC2bbWUuTFsjqK Gx1CCnSF6vamQ9UMN2GPIYaNsmX8pkFY3kGxR3052I9fuXhP+zm78hnFiL/NQDJM3Fch 2HWvsHSocN+P81m0WMpHzxiqTBOboKuCII97dZWuolPOD3Rv03UsBwwlqdv+IItO1ohy TJsg== X-Gm-Message-State: ALQs6tCFTN81uQ5/l27Q2wCAac/cBQ0biaucegaTOdPHt9UT1hEv4Y26 AbFGMYhLiGgLQXuQYn7l7ZI= X-Google-Smtp-Source: AB8JxZpU5/h4NrIP5ySAJ+OPs4Wlq3MVlWv1I7J0+W+TK+qY8tvJUoWwh/qvyIqi47ewC1aTKT1xRA== X-Received: by 10.28.11.69 with SMTP id 66mr7098608wml.155.1525099404443; Mon, 30 Apr 2018 07:43:24 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id k89sm7563175wmc.15.2018.04.30.07.43.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:43:23 -0700 (PDT) From: luca.boccassi@gmail.com To: Wei Zhao Cc: Yuan Peng , Qi Zhang , dpdk stable Date: Mon, 30 Apr 2018 15:40:52 +0100 Message-Id: <20180430144223.18657-37-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430144223.18657-1-luca.boccassi@gmail.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/i40e: fix flow RSS queue index check' has been queued to stable release 18.02.2 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: Mon, 30 Apr 2018 14:43:25 -0000 Hi, FYI, your patch has been queued to stable release 18.02.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/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From f476b111fb18a3b6ed38bc805604b3bc2c544c26 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Wed, 4 Apr 2018 16:06:03 +0800 Subject: [PATCH] net/i40e: fix flow RSS queue index check [ upstream commit 9486d60b94b58932c6da1163df2118549fa57224 ] There need a queue index check for RSS queue region in order to aviod error from configuration. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Signed-off-by: Wei Zhao Tested-by: Yuan Peng Acked-by: Qi Zhang --- drivers/net/i40e/i40e_flow.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 75bfa4af5..312c7eed0 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -4215,6 +4215,32 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, } } + if (conf_info->queue_region_number) { + for (i = 0; i < rss->num; i++) { + for (j = 0; j < rss_info->num; j++) { + if (rss->queue[i] == rss_info->queue[j]) + break; + } + if (j == rss_info->num) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "no valid queues"); + return -rte_errno; + } + } + + for (i = 0; i < rss->num - 1; i++) { + if (rss->queue[i + 1] != rss->queue[i] + 1) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "no valid queues"); + return -rte_errno; + } + } + } + for (n = 0; n < conf_info->queue_region_number; n++) { if (conf_info->region[n].user_priority_num || conf_info->region[n].flowtype_num) { -- 2.14.2