From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C768AA051C for ; Tue, 11 Feb 2020 12:30:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BDD3F1BFA1; Tue, 11 Feb 2020 12:30:45 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by dpdk.org (Postfix) with ESMTP id 1B9531BFA1 for ; Tue, 11 Feb 2020 12:30:44 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id c9so11921565wrw.8 for ; Tue, 11 Feb 2020 03:30:44 -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=EBM3u7mTTTisk35lKXgSR4+FZ92VReXMuDltm8efIW0=; b=VS7HM56mft3gV4qcLvsTAmfCwDcL83sMBEMPT1CiQpMCw3r5W7GifuQqcy2F23ErSu mzlPAcSWvSGdaF1GwpJ4ACNe1rdJTjRnVWuXOR1CknHvZ9KKg6DSjDJOl0JcPpUexGSe VCJdoUOpmpt7c5R76coVphJKntK15pyZBm3EcwdlKTFrdOrjpXLxP7ynkLJFc9tuiRU6 WlPrKBcjmHFA/NLaCh6228A2kL3OVfhSxfJy2/JuYlHqlptiVfh2a6CGut/6Wdeq4Hgb KGo4prx+35UpMKbfptON3zCZwrWbpqrdyo6VlWXiwfQHqAPjdhKaMyR3HU/1jRHz7gB1 K+Og== 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=EBM3u7mTTTisk35lKXgSR4+FZ92VReXMuDltm8efIW0=; b=o0FXIdSGGDWhiMK855dCjR2IqALUbm86av52usvdiXDFdtD6GeLjLsnqZIPewkndRi SOP6wMWZg2hLIGmJFfjrgDQ6zqNxvggk764LlqwJaPYS4qMWxrLpiDtwaNyWIR2/r+gF NAPq3p98vEY7EANO/swXCg6FFj/bsOJCTtQZQ4sxM+zTarNG2fnZJzgrwGSTLlM/in6h 0UCMm+P9zes25d+wpCSsjerOobZUgTq978DH03cNg1IrZ5KYc6aEcFNS+JmfT/LYHQDA NFvd4LX0s5soIgi0FTkMZplKwaoJmbYv6edSaxFn6YnwXKtXSUaZFxxP15q1P8ddVKTJ 2zRA== X-Gm-Message-State: APjAAAXzk96SWISPIBsG3Xil3mByj7phgkZJ279xcU8cRp25pUBgHp/a +wh/ZXF73snHsSMKfGAg78o= X-Google-Smtp-Source: APXvYqyO7VRMfakxXWBLU1Umw1UgkQRS99guSwNkuP9m7IcsXrJQWVAWY8Y6UbEXJVhc3fc3OV6rog== X-Received: by 2002:adf:ffc7:: with SMTP id x7mr7994215wrs.159.1581420643813; Tue, 11 Feb 2020 03:30:43 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id x7sm5026162wrq.41.2020.02.11.03.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:30:43 -0800 (PST) From: luca.boccassi@gmail.com To: Viacheslav Ovsiienko Cc: Matan Azrad , dpdk stable Date: Tue, 11 Feb 2020 11:21:02 +0000 Message-Id: <20200211112216.3929-116-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: move Tx complete request routine' has been queued to stable release 19.11.1 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.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/13/20. 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. Thanks. Luca Boccassi --- >From 58a7836b5015d81984ec7a597f8753a40589b6dd Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Thu, 9 Jan 2020 17:16:04 +0000 Subject: [PATCH] net/mlx5: move Tx complete request routine [ upstream commit 8b581c690a54be065ecb7b7fd9979c8e86898234 ] The complete request flag is set once per Tx burst call, the code of appropriate routine moved to the end of sending loop. This is preparation step to remove WQE reserved field usage to store index of elts to free. Signed-off-by: Viacheslav Ovsiienko Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxtx.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index b4702ff9f6..3234ab241e 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -2145,9 +2145,6 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq, * Pointer to TX queue structure. * @param loc * Pointer to burst routine local context. - * @param multi, - * Routine is called from multi-segment sending loop, - * do not correct the elts_head according to the pkts_copy. * @param olx * Configured Tx offloads mask. It is fully defined at * compile time and may be used for optimization. @@ -2155,13 +2152,12 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq, static __rte_always_inline void mlx5_tx_request_completion(struct mlx5_txq_data *restrict txq, struct mlx5_txq_local *restrict loc, - bool multi, unsigned int olx) { uint16_t head = txq->elts_head; unsigned int part; - part = (MLX5_TXOFF_CONFIG(INLINE) || multi) ? + part = MLX5_TXOFF_CONFIG(INLINE) ? 0 : loc->pkts_sent - loc->pkts_copy; head += part; if ((uint16_t)(head - txq->elts_comp) >= MLX5_TX_COMP_THRESH || @@ -3120,8 +3116,6 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *restrict txq, wqe->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | ds); txq->wqe_ci += (ds + 3) / 4; loc->wqe_free -= (ds + 3) / 4; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, true, olx); return MLX5_TXCMP_CODE_MULTI; } @@ -3230,8 +3224,6 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *restrict txq, } while (true); txq->wqe_ci += (ds + 3) / 4; loc->wqe_free -= (ds + 3) / 4; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, true, olx); return MLX5_TXCMP_CODE_MULTI; } @@ -3388,8 +3380,6 @@ do_align: wqe->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | ds); txq->wqe_ci += (ds + 3) / 4; loc->wqe_free -= (ds + 3) / 4; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, true, olx); return MLX5_TXCMP_CODE_MULTI; } @@ -3599,8 +3589,6 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *restrict txq, --loc->elts_free; ++loc->pkts_sent; --pkts_n; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, false, olx); if (unlikely(!pkts_n || !loc->elts_free || !loc->wqe_free)) return MLX5_TXCMP_CODE_EXIT; loc->mbuf = *pkts++; @@ -3750,7 +3738,7 @@ mlx5_tx_sdone_empw(struct mlx5_txq_data *restrict txq, struct mlx5_txq_local *restrict loc, unsigned int ds, unsigned int slen, - unsigned int olx) + unsigned int olx __rte_unused) { assert(!MLX5_TXOFF_CONFIG(INLINE)); #ifdef MLX5_PMD_SOFT_COUNTERS @@ -3765,8 +3753,6 @@ mlx5_tx_sdone_empw(struct mlx5_txq_data *restrict txq, loc->wqe_last->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | ds); txq->wqe_ci += (ds + 3) / 4; loc->wqe_free -= (ds + 3) / 4; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, false, olx); } /* @@ -3809,8 +3795,6 @@ mlx5_tx_idone_empw(struct mlx5_txq_data *restrict txq, loc->wqe_last->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | len); txq->wqe_ci += (len + 3) / 4; loc->wqe_free -= (len + 3) / 4; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, false, olx); } /** @@ -4011,8 +3995,6 @@ next_empw: txq->wqe_ci += (2 + part + 3) / 4; loc->wqe_free -= (2 + part + 3) / 4; pkts_n -= part; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, false, olx); if (unlikely(!pkts_n || !loc->elts_free || !loc->wqe_free)) return MLX5_TXCMP_CODE_EXIT; loc->mbuf = *pkts++; @@ -4496,8 +4478,6 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *restrict txq, } ++loc->pkts_sent; --pkts_n; - /* Request CQE generation if limits are reached. */ - mlx5_tx_request_completion(txq, loc, false, olx); if (unlikely(!pkts_n || !loc->elts_free || !loc->wqe_free)) return MLX5_TXCMP_CODE_EXIT; loc->mbuf = *pkts++; @@ -4776,6 +4756,8 @@ enter_send_single: /* Take a shortcut if nothing is sent. */ if (unlikely(loc.pkts_sent == loc.pkts_loop)) goto burst_exit; + /* Request CQE generation if limits are reached. */ + mlx5_tx_request_completion(txq, &loc, olx); /* * Ring QP doorbell immediately after WQE building completion * to improve latencies. The pure software related data treatment -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:42.804123071 +0000 +++ 0116-net-mlx5-move-Tx-complete-request-routine.patch 2020-02-11 11:17:38.584004787 +0000 @@ -1,8 +1,10 @@ -From 8b581c690a54be065ecb7b7fd9979c8e86898234 Mon Sep 17 00:00:00 2001 +From 58a7836b5015d81984ec7a597f8753a40589b6dd Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Thu, 9 Jan 2020 17:16:04 +0000 Subject: [PATCH] net/mlx5: move Tx complete request routine +[ upstream commit 8b581c690a54be065ecb7b7fd9979c8e86898234 ] + The complete request flag is set once per Tx burst call, the code of appropriate routine moved to the end of sending loop. This is preparation step to remove WQE reserved field @@ -15,7 +17,7 @@ 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c -index a06db01ba8..0b85634919 100644 +index b4702ff9f6..3234ab241e 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -2145,9 +2145,6 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,