From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08290A0547 for ; Tue, 9 Feb 2021 11:35:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01F7F160712; Tue, 9 Feb 2021 11:35:58 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 7608916070A for ; Tue, 9 Feb 2021 11:35:55 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id u14so21025230wri.3 for ; Tue, 09 Feb 2021 02:35:55 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=TXBfO1Lv2+pFa+KeCR1w7FGaGmIgH36L8sFJIcnQyME=; b=MIoKdcMKqiwpN4VFKyeFqLtw/TrQsRVq30Q6Xtd60RuVgM6DFI4a0SfuzUeNwsiDWR MxTVco541VXmAFv8DKD33hPyEBWykJE+tvfS2UeqGPn8fwIlqKHmGYtGv1/31uJqXulX nhieutpix7TFkcEz87d5BIVpIhS5C3Lwj3CLiSgeS41unAu0rqWjhlnfUkqZwBdKiMqj EIx6yNzAOumcjiRZkq1tBHllgEugriToom8j4LlXpOVcHbuWeEqxpHkvAaLC9u/bnyCR zKWZy+9yymWM6I9pym2FfGXHSQ/mkAO9yrPrvt5UhF5XK9lPlN7m9u2wOdWdxMUjjxD2 ay5A== 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:content-transfer-encoding; bh=TXBfO1Lv2+pFa+KeCR1w7FGaGmIgH36L8sFJIcnQyME=; b=VxKjUmIXUxM9WWhKDr2HozZGz9I6z+2fDtvDqXFwKrpzKR3wipUPfyv7ZLLRPE/HmT V9a/Xa4MmdbSckAPilwT6ndMQOi1srYBAwv6KoXaGuC+aua62BOI1Ub/kBMWXeMqKl41 FiwlaDJ7zR7swVB1eb3NE7XG2Fg4Rainjrtj6CLdDZSrh6uX07zJLgH9PJV8vU749PZA J7q97HmoqcOrgZxJv7DdYaSLL93Ses9qUk8Sk97C2isYbFfmuFaLGNFMmZyGaHzUv13f Y34kZzrdCNQQfLyivA5y7rNWGyl7LEq80yhtL7+66TW3Hv7Unqg3TZPhO7oOozI+wBlj wJCA== X-Gm-Message-State: AOAM5302HcW1XEG6ixV9hNTuefdQhhLxm834YreBEBYLQ5Ep4mGcItTQ nJcCKpHr+iWe/U8z7Um36dsXzqlwkrSniA== X-Google-Smtp-Source: ABdhPJzA3OpD1O7OfnKKRPM3wmB8qso0goGfVY8i5bAQJqhyTti+UEUJjz6teaxBaOzTL1oKWlqy0g== X-Received: by 2002:a5d:698d:: with SMTP id g13mr15629827wru.30.1612866955290; Tue, 09 Feb 2021 02:35:55 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id n5sm3576515wmq.7.2021.02.09.02.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:35:54 -0800 (PST) From: luca.boccassi@gmail.com To: Alexander Kozyrev Cc: Viacheslav Ovsiienko , dpdk stable Date: Tue, 9 Feb 2021 10:35:07 +0000 Message-Id: <20210209103529.466775-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103529.466775-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> <20210209103529.466775-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix miniCQE configuration for Verbs' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.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 02/11/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/b9d6b8b4038948e84e67bfff16dd906dc5d89922 Thanks. Luca Boccassi --- >From b9d6b8b4038948e84e67bfff16dd906dc5d89922 Mon Sep 17 00:00:00 2001 From: Alexander Kozyrev Date: Mon, 1 Feb 2021 17:16:30 +0000 Subject: [PATCH] net/mlx5: fix miniCQE configuration for Verbs [ upstream commit fdc44cdc7866ecc601460941780aa53d57010dbc ] Verbs cannot be used to configure newly introduced miniCQE formats for Flow Tag and L3/L4 Header compression. Support for these formats has been added to the DevX configuration only. And the RX queue descriptor has been updated with the CQE compression format information only as well. But the datapath relies on this info no matter which method is used for Rx queues configuration. Set proper CQE compression format information in the Verbs configuration to fix the miniCQE parsing logic. Fixes: 54c2d46b160f ("net/mlx5: support flow tag and packet header miniCQEs") Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- doc/guides/nics/mlx5.rst | 6 +++++- drivers/net/mlx5/linux/mlx5_verbs.c | 17 +++++++++++++---- drivers/net/mlx5/mlx5_rxtx.h | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index b7e285b8f5..d1fb20c52e 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -433,13 +433,17 @@ Driver options A nonzero value enables the compression of CQE on RX side. This feature allows to save PCI bandwidth and improve performance. Enabled by default. Different compression formats are supported in order to achieve the best - performance for different traffic patterns. Hash RSS format is the default. + performance for different traffic patterns. Default format depends on + Multi-Packet Rx queue configuration: Hash RSS format is used in case + MPRQ is disabled, Checksum format is used in case MPRQ is enabled. Specifying 2 as a ``rxq_cqe_comp_en`` value selects Flow Tag format for better compression rate in case of RTE Flow Mark traffic. Specifying 3 as a ``rxq_cqe_comp_en`` value selects Checksum format. Specifying 4 as a ``rxq_cqe_comp_en`` value selects L3/L4 Header format for better compression rate in case of mixed TCP/UDP and IPv4/IPv6 traffic. + CQE compression format selection requires DevX to be enabled. If there is + no DevX enabled/supported the value is reset to 1 by default. Supported on: diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c index abd167ef14..6b98a4c166 100644 --- a/drivers/net/mlx5/linux/mlx5_verbs.c +++ b/drivers/net/mlx5/linux/mlx5_verbs.c @@ -213,13 +213,22 @@ mlx5_rxq_ibv_cq_create(struct rte_eth_dev *dev, uint16_t idx) if (priv->config.cqe_comp && !rxq_data->hw_timestamp) { cq_attr.mlx5.comp_mask |= MLX5DV_CQ_INIT_ATTR_MASK_COMPRESSED_CQE; + rxq_data->byte_mask = UINT32_MAX; #ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT - cq_attr.mlx5.cqe_comp_res_format = - mlx5_rxq_mprq_enabled(rxq_data) ? - MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX : - MLX5DV_CQE_RES_FORMAT_HASH; + if (mlx5_rxq_mprq_enabled(rxq_data)) { + cq_attr.mlx5.cqe_comp_res_format = + MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX; + rxq_data->mcqe_format = + MLX5_CQE_RESP_FORMAT_CSUM_STRIDX; + } else { + cq_attr.mlx5.cqe_comp_res_format = + MLX5DV_CQE_RES_FORMAT_HASH; + rxq_data->mcqe_format = + MLX5_CQE_RESP_FORMAT_HASH; + } #else cq_attr.mlx5.cqe_comp_res_format = MLX5DV_CQE_RES_FORMAT_HASH; + rxq_data->mcqe_format = MLX5_CQE_RESP_FORMAT_HASH; #endif /* * For vectorized Rx, it must not be doubled in order to diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 7989a50403..c57ccc32ed 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -126,7 +126,7 @@ struct mlx5_rxq_data { unsigned int strd_scatter_en:1; /* Scattered packets from a stride. */ unsigned int lro:1; /* Enable LRO. */ unsigned int dynf_meta:1; /* Dynamic metadata is configured. */ - unsigned int mcqe_format:3; /* Dynamic metadata is configured. */ + unsigned int mcqe_format:3; /* CQE compression format. */ volatile uint32_t *rq_db; volatile uint32_t *cq_db; uint16_t port_id; -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-09 10:34:58.282485606 +0000 +++ 0009-net-mlx5-fix-miniCQE-configuration-for-Verbs.patch 2021-02-09 10:34:57.870583228 +0000 @@ -1 +1 @@ -From fdc44cdc7866ecc601460941780aa53d57010dbc Mon Sep 17 00:00:00 2001 +From b9d6b8b4038948e84e67bfff16dd906dc5d89922 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fdc44cdc7866ecc601460941780aa53d57010dbc ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index dbd7ae1bb9..173e6ae5b3 100644 +index b7e285b8f5..d1fb20c52e 100644 @@ -29 +30 @@ -@@ -485,13 +485,17 @@ Driver options +@@ -433,13 +433,17 @@ Driver options @@ -49 +50 @@ -index 43ff85f9c4..ade241b806 100644 +index abd167ef14..6b98a4c166 100644 @@ -80 +81 @@ -index 6432030e90..0fd98af9d1 100644 +index 7989a50403..c57ccc32ed 100644