From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 9D3E65F3C for ; Tue, 27 Feb 2018 10:37:34 +0100 (CET) Received: by mail-wr0-f193.google.com with SMTP id m5so24124288wrg.1 for ; Tue, 27 Feb 2018 01:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:in-reply-to:references:content-transfer-encoding; bh=yEG6IrfDffRSjFQBX0kR2RDOPTFz9zdj2t/lY5uS4xA=; b=bnPIM9yyTHk0400RXwOXYTDdb9x5AHFAfWssVnZtvi67mip1nsQoL3zpqY/MjQuHbA 7Eoc4tIAntFdNaoZ5BHmdIwl0ZQOg3SKGcVRjjD6XG2E13iv+CSlY40gS2H2nXSksyn3 D/XAqffbRW9tA1Bw+xH7pJeRy4sdVpjClqosbIBnpu1A7WnS1j2Ag8480YrFB0Mk6rvf /rjdOXNpeZ5t0oWkgSh6899kOzrHsLnXIer+jWUWLQL9otrjK6BYf1UODcwZOa69DtHl Q9GjIfEoAdhHvdgc7tPKNA1jaoj0DxY1kyL1dFk5CHgQbMrVo0sw2qn6uazbbD0m3mQw A9og== 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:mime-version:in-reply-to:references :content-transfer-encoding; bh=yEG6IrfDffRSjFQBX0kR2RDOPTFz9zdj2t/lY5uS4xA=; b=Lmtj1Bm0MLtosHFFpbiN3JeuWpC/781WdNZxyIiB+UHcSH8ZCQShQRl1dO1MgUFVP4 v/8IVV44mgMDmHoSZjsj4MFprXSIj1aueiopduq8nmkw5UVpGJQ2XGEEos6llmVGoPrf 4sZNtvNCxN3X66B+I2SevjUSnMQKmojzmj/H1c6xoIlxWg0gNbtUwFY9M96oERN2KEyW HJsmKPQc/JAlqlZlxgHBpJmShSpFVA2hGFtr8XEW8k6I4jaWdMPopikLo0B2Nk8g8bgO Q+9RK2WevWTKAqVCat8iU56Uu2Jyx7DKQYXP/Xdsfw71BkfQXn9bUQK/B7KKoimFatLn b0sw== X-Gm-Message-State: APf1xPD/WB+c6D1nz/6cj533+TB/hdi4lUjNmK+jTeswLMepMT0IsfKj KNkXXu+0xguZX7COLmncazyYRRtaCw== X-Google-Smtp-Source: AH8x2253O4971p0jQVc+cTdomaZkFvtECWuTUzzkHFOGin3s1rxbaWUdAKZvyVo0s8jUopqrkfwTXw== X-Received: by 10.223.128.75 with SMTP id 69mr12687349wrk.139.1519724254138; Tue, 27 Feb 2018 01:37:34 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id m129sm4363550wma.44.2018.02.27.01.37.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 01:37:33 -0800 (PST) From: Nelio Laranjeiro To: stable@dpdk.org, Yuanhan Liu Cc: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= , Adrien Mazarguil , Yongseok Koh Date: Tue, 27 Feb 2018 10:36:45 +0100 Message-Id: <097114bc2ce60833804089c85fc684dce667eb66.1519724131.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <7b8e3cb89da9d10b3afffa2c297a417c59c6d82b.1519724131.git.nelio.laranjeiro@6wind.com> References: <7b8e3cb89da9d10b3afffa2c297a417c59c6d82b.1519724131.git.nelio.laranjeiro@6wind.com> MIME-Version: 1.0 In-Reply-To: <20180207093155.GA31542@yliu-mob> References: <20180207093155.GA31542@yliu-mob> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 3/3] net/mlx5: fix flow priority on queue action 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: Tue, 27 Feb 2018 09:37:34 -0000 From: NĂ©lio Laranjeiro [ backported from upstream commit c3299d76867f23e595d8e1b3e6b9ad4d6aa87155 ] A single queue should have the same verbs priority as an RSS one. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index bc2bba21b..092644ff1 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -865,7 +865,7 @@ priv_flow_convert_items_validate(struct priv *priv, } parser->inner = IBV_FLOW_SPEC_INNER; } - if (parser->drop || parser->queues_n == 1) { + if (parser->drop) { parser->queue[HASH_RXQ_ETH].offset += cur_item->dst_sz; } else { for (n = 0; n != hash_rxq_init_n; ++n) @@ -1097,15 +1097,12 @@ priv_flow_convert(struct priv *priv, * Second step. * Allocate the memory space to store verbs specifications. */ - if (parser->drop || parser->queues_n == 1) { - unsigned int priority = - attr->priority + - hash_rxq_init[HASH_RXQ_ETH].flow_priority; - unsigned int offset = parser->queue[HASH_RXQ_ETH].offset; - + if (parser->drop) { parser->queue[HASH_RXQ_ETH].ibv_attr = - priv_flow_convert_allocate(priv, priority, - offset, error); + priv_flow_convert_allocate + (priv, attr->priority, + parser->queue[HASH_RXQ_ETH].offset, + error); if (!parser->queue[HASH_RXQ_ETH].ibv_attr) return ENOMEM; parser->queue[HASH_RXQ_ETH].offset = @@ -1159,14 +1156,9 @@ priv_flow_convert(struct priv *priv, * Last step. Complete missing specification to reach the RSS * configuration. */ - if (parser->queues_n > 1) { + if (!parser->drop) { priv_flow_convert_finalise(priv, parser); } else { - /* - * Action queue have their priority overridden with - * Ethernet priority, this priority needs to be adjusted to - * their most specific layer priority. - */ parser->queue[HASH_RXQ_ETH].ibv_attr->priority = attr->priority + hash_rxq_init[parser->layer].flow_priority; -- 2.11.0