From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id CE22E5F0F for ; Tue, 27 Feb 2018 10:37:32 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id 188so21847418wme.1 for ; Tue, 27 Feb 2018 01:37:32 -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; bh=QrY/+51NFdXe8F4P+p1Od5AHQCN21iagRYX17WScxUI=; b=kOWdG/0od6npuv9cKi2CsXgoEZPrFrrA8594/Rknpun+caiM31O8qpHkHrskyR0fNH HBl05KzZBKIQnQGk5GS8pdHxqx7tZw1ByKzLh0IYmnIL/2KbuNZfip9R06VoDxqGAVaZ DvIG9F77ygNyKo8Okzbn2vKqFSHoh5NGxDHEifIExVeWaJFDX84T5p7tE/1Zs/YuGY+Z 07obMn/Phip8zSRFgeZ4Mqs2Kp3SH57lW9E3s4fdWCXYphcaRYP0hrUwLUF7M/9ZueyH oW6YTsPS6A4rxAQQQnenFbkl/EHq+v8y9xhPKA3lPSTTbD+ZL56G1EE5+23F/vyphKZd Ff0A== 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=QrY/+51NFdXe8F4P+p1Od5AHQCN21iagRYX17WScxUI=; b=VpriqVKh+VD6FG6L9RgnbvdLxbvlavb4jmZQdI6vsXxjf8XRbHzBHAT7RHEZEH4wI1 guyYOdwrnYadT5xs19J4nYXHBm7eddRFH5zRoTzZfw65G5gnDV6Y3metH7L216aW3M+d HM8fxNKURNTDb2f/DCOEkmyxkyNhotJADNH5V3ehXXsoA9dnXTZOII/Jx2zM5fvPZF1s yR4NBc5irOQ3aer0M1RwKMb0etuQvTDvlhp/Zyrieb+7h+LSsDWpv9P0+DvV6RPabvC/ x6rSUVIbQDIS2dtpincQ3IZNH7y99r+1dgwhXnM/CoztNH39eMlFZFFWFiXSYu8K56zZ hfSg== X-Gm-Message-State: APf1xPAFNDMPHruGd4BXxOxij8JUJzn/341/QcHgaGn8gZ6QpTz7aDxM V3J4F0RvoM/B9qHY9H4j33UNFpgceg== X-Google-Smtp-Source: AG47ELuI1ie2TuQFZsXeL6WpTspGGEnpTQfrQAOgDpwVkFLn13OkboI3fDlGDYT8IXG8RMGIWT9aaQ== X-Received: by 10.28.215.67 with SMTP id o64mr9913392wmg.159.1519724252347; Tue, 27 Feb 2018 01:37:32 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 01:37:31 -0800 (PST) From: Nelio Laranjeiro To: stable@dpdk.org, Yuanhan Liu Cc: Adrien Mazarguil , Yongseok Koh Date: Tue, 27 Feb 2018 10:36:43 +0100 Message-Id: <7b8e3cb89da9d10b3afffa2c297a417c59c6d82b.1519724131.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180207093155.GA31542@yliu-mob> References: <20180207093155.GA31542@yliu-mob> Subject: [dpdk-stable] [PATCH 1/3] Revert "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:33 -0000 This patch depends on another one not backported. For now it should be reverted to backport first the one missing and then re-apply this one. This reverts commit 0ec3529b056a826cee94104e20dfd3d58d64ab67. --- drivers/net/mlx5/mlx5_flow.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 82efddc5a..c18c77d48 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -882,6 +882,8 @@ priv_flow_convert_items_validate(struct priv *priv, } if (parser->drop) { parser->drop_q.offset += cur_item->dst_sz; + } else if (parser->queues_n == 1) { + parser->queue[HASH_RXQ_ETH].offset += cur_item->dst_sz; } else { for (n = 0; n != hash_rxq_init_n; ++n) parser->queue[n].offset += cur_item->dst_sz; @@ -1124,6 +1126,19 @@ priv_flow_convert(struct priv *priv, if (!parser->drop_q.ibv_attr) return ENOMEM; parser->drop_q.offset = sizeof(struct ibv_flow_attr); + } else if (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; + + parser->queue[HASH_RXQ_ETH].ibv_attr = + priv_flow_convert_allocate(priv, priority, + offset, error); + if (!parser->queue[HASH_RXQ_ETH].ibv_attr) + return ENOMEM; + parser->queue[HASH_RXQ_ETH].offset = + sizeof(struct ibv_flow_attr); } else { for (i = 0; i != hash_rxq_init_n; ++i) { unsigned int priority = @@ -1173,9 +1188,22 @@ priv_flow_convert(struct priv *priv, * Last step. Complete missing specification to reach the RSS * configuration. */ - if (!parser->drop) { + if (parser->drop) { + /* + * Drop queue priority needs to be adjusted to + * their most specific layer priority. + */ + parser->drop_q.ibv_attr->priority = + attr->priority + + hash_rxq_init[parser->layer].flow_priority; + } else if (parser->queues_n > 1) { 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