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 60BB0A0A0C for ; Tue, 3 Aug 2021 14:22:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AD7E411CF; Tue, 3 Aug 2021 14:22:52 +0200 (CEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id 298F840E3C for ; Tue, 3 Aug 2021 14:22:51 +0200 (CEST) Received: by mail-wr1-f41.google.com with SMTP id h13so11638034wrp.1 for ; Tue, 03 Aug 2021 05:22:51 -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 :mime-version:content-transfer-encoding; bh=P0ID+xjB2FJgqSlM9SqGpc4cZjWugrplT52ZPkpp9vo=; b=mYbsesTjs1ytUu3oK0xPc+QzQvM6eARAydFyUpz1i+OfkYybn7iJ9nXx/znvv/lKZQ ivrYYFxwsfDPBo5XNMYylGajqclvxoKAUmzv2y7HBE3TFTdZFf+RSvtCE45e09mDJ7X/ rp3854hMJPP3F5RrXOjn9lOkSEE/pguuHIVo10sJHYDawrdlZ7ODYqxXW0MRs+lnILPo vl/9NtbatZWYFR5Nzi4Af7IZoaaEQww1Cw2eRRuTe552SWtGp8x4QT8c5VpGedGAdLTn 9XlGw9m0fYL9UC7HhkLxYyd2wberSTcXl5HwLHs99UaJJKsTe+8j6z2+TTtO1XxY0XKl OhDg== 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=P0ID+xjB2FJgqSlM9SqGpc4cZjWugrplT52ZPkpp9vo=; b=kAHkhC6X2V52zLEvnH1mzqiUC+MdVsILBc5UUnnMYOJHNPx5hJDzGclEAf3oHT81oT aD6GSzSCxzlR3uNBhH5b1K7PfWir8l0L2AYBDhw398zi1MmMtpjam3jyw5fvoglsosZS M2UHmyNSrayzyU55E8bScQ8GGC53LyjO56rD95luxjnXZvFkF8Zm3/R9wKMxTHr6/vBr rxU+DCn4/OC9pglMa8h6wivEZW+vf2mHpvxFJWmqtV4x0g59W7jZWVIWdiVff61Z9+0H 8Yc8zHueGbtNU+aqV/KKFo/+KXbOBq/xGBGGsltOQEbWR7uRa9HzAZEtRXbRvXHmbZSc w1qw== X-Gm-Message-State: AOAM531euK/KCjeemXt09up+9J5m2fQIHNFpvveGhMCj3bA4CtKpBi/9 mZpUp+Kw9B2vBRieRnsDtMo= X-Google-Smtp-Source: ABdhPJw1dwyWKbyxCxwe+5/HuIBzdc2bVc0LOYu68cea4yWHHVuF8U9hsSep8c7J/CyR1VgrH1NR+g== X-Received: by 2002:a5d:55cb:: with SMTP id i11mr22670065wrw.158.1627993370970; Tue, 03 Aug 2021 05:22:50 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id u2sm12859570wmc.42.2021.08.03.05.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 05:22:50 -0700 (PDT) From: luca.boccassi@gmail.com To: Viacheslav Ovsiienko Cc: dpdk stable Date: Tue, 3 Aug 2021 13:22:01 +0100 Message-Id: <20210803122214.1094992-12-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210803122214.1094992-1-luca.boccassi@gmail.com> References: <20210726135322.149850-59-luca.boccassi@gmail.com> <20210803122214.1094992-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: add Tx scheduling check on queue creation' has been queued to stable release 20.11.3 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/05/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/72f6920480c65b060059431c91f807f0c4a831a2 Thanks. Luca Boccassi --- >From 72f6920480c65b060059431c91f807f0c4a831a2 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Thu, 29 Jul 2021 15:26:43 +0300 Subject: [PATCH] net/mlx5: add Tx scheduling check on queue creation [ upstream commit f17e4b4ffef9ecf2547ad8ee628e94db8f561b2f ] The send scheduling on timestamp offload requires the Send Queue (SQ) shares its User Access Region (UAR) with the pacing Clock Queue. The SQ can be created by mlx5 PMD either with DevX or with Verbs. If the SQ is being created with DevX, the dedicated UAR can be specified and all the SQs share the single UAR. Once SQ is being created with Verbs the SQ's UAR is allocated by the rdma-core library internally on its own and there is no UAR sharing. This caused hardware errors on WAIT WQEs and overall send scheduling malfunction. If SQs are going to be created with Verbs and the send scheduling offload is explicitly requested via tx_pp devarg the device probing is rejected as device configuration can't satisfy the requirements. Fixes: 3ec73abeed52 ("net/mlx5/linux: fix Tx queue operations decision") Fixes: 8f848f32fc24 ("net/mlx5: introduce send scheduling devargs") Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/linux/mlx5_os.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 44af6f1c4e..b191fd740e 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1507,6 +1507,21 @@ err_secondary: } else { priv->obj_ops = ibv_obj_ops; } + if (config->tx_pp && + (priv->config.dv_esw_en || + priv->obj_ops.txq_obj_new != mlx5_os_txq_obj_new)) { + /* + * HAVE_MLX5DV_DEVX_UAR_OFFSET is required to support + * packet pacing and already checked above. + * Hence, we should only make sure the SQs will be created + * with DevX, not with Verbs. + * Verbs allocates the SQ UAR on its own and it can't be shared + * with Clock Queue UAR as required for Tx scheduling. + */ + DRV_LOG(ERR, "Verbs SQs, UAR can't be shared as required for packet pacing"); + err = ENODEV; + goto error; + } priv->drop_queue.hrxq = mlx5_drop_action_create(eth_dev); if (!priv->drop_queue.hrxq) goto error; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-03 12:35:08.736171576 +0100 +++ 0012-net-mlx5-add-Tx-scheduling-check-on-queue-creation.patch 2021-08-03 12:35:08.234819128 +0100 @@ -1 +1 @@ -From f17e4b4ffef9ecf2547ad8ee628e94db8f561b2f Mon Sep 17 00:00:00 2001 +From 72f6920480c65b060059431c91f807f0c4a831a2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f17e4b4ffef9ecf2547ad8ee628e94db8f561b2f ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -31 +32 @@ -index 14a3b912cc..8f98cf1716 100644 +index 44af6f1c4e..b191fd740e 100644 @@ -34 +35 @@ -@@ -1778,6 +1778,21 @@ err_secondary: +@@ -1507,6 +1507,21 @@ err_secondary: