You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.9 KiB
80 lines
2.9 KiB
4 years ago
|
From caac2c9de56837381f547ae1c0d9d180f1a1546c Mon Sep 17 00:00:00 2001
|
||
|
From: Alaa Hleihel <ahleihel@redhat.com>
|
||
|
Date: Sun, 10 May 2020 14:52:34 -0400
|
||
|
Subject: [PATCH 059/312] [netdrv] net/mlx5e: kTLS, Save by-value copy of the
|
||
|
record frags
|
||
|
|
||
|
Message-id: <20200510145245.10054-72-ahleihel@redhat.com>
|
||
|
Patchwork-id: 306613
|
||
|
Patchwork-instance: patchwork
|
||
|
O-Subject: [RHEL8.3 BZ 1789378 v2 71/82] net/mlx5e: kTLS, Save by-value copy of the record frags
|
||
|
Bugzilla: 1789378
|
||
|
RH-Acked-by: Kamal Heib <kheib@redhat.com>
|
||
|
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
||
|
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
||
|
RH-Acked-by: Jonathan Toppins <jtoppins@redhat.com>
|
||
|
|
||
|
Bugzilla: http://bugzilla.redhat.com/1789378
|
||
|
Upstream: v5.4-rc6
|
||
|
|
||
|
commit 310d9b9d37220b590909e90e724fc5f346a98775
|
||
|
Author: Tariq Toukan <tariqt@mellanox.com>
|
||
|
Date: Wed Sep 18 13:57:40 2019 +0300
|
||
|
|
||
|
net/mlx5e: kTLS, Save by-value copy of the record frags
|
||
|
|
||
|
Access the record fragments only under the TLS ctx lock.
|
||
|
In the resync flow, save a copy of them to be used when
|
||
|
preparing and posting the required DUMP WQEs.
|
||
|
|
||
|
Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support")
|
||
|
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
|
||
|
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
|
||
|
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
|
||
|
|
||
|
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
|
||
|
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
|
||
|
---
|
||
|
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 8 ++++----
|
||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
|
||
|
index 6dfb22d705b2..334808b1863b 100644
|
||
|
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
|
||
|
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
|
||
|
@@ -179,7 +179,7 @@ struct tx_sync_info {
|
||
|
u64 rcd_sn;
|
||
|
s32 sync_len;
|
||
|
int nr_frags;
|
||
|
- skb_frag_t *frags[MAX_SKB_FRAGS];
|
||
|
+ skb_frag_t frags[MAX_SKB_FRAGS];
|
||
|
};
|
||
|
|
||
|
static bool tx_sync_info_get(struct mlx5e_ktls_offload_context_tx *priv_tx,
|
||
|
@@ -212,11 +212,11 @@ static bool tx_sync_info_get(struct mlx5e_ktls_offload_context_tx *priv_tx,
|
||
|
|
||
|
get_page(skb_frag_page(frag));
|
||
|
remaining -= skb_frag_size(frag);
|
||
|
- info->frags[i++] = frag;
|
||
|
+ info->frags[i++] = *frag;
|
||
|
}
|
||
|
/* reduce the part which will be sent with the original SKB */
|
||
|
if (remaining < 0)
|
||
|
- skb_frag_size_add(info->frags[i - 1], remaining);
|
||
|
+ skb_frag_size_add(&info->frags[i - 1], remaining);
|
||
|
info->nr_frags = i;
|
||
|
out:
|
||
|
spin_unlock_irqrestore(&tx_ctx->lock, flags);
|
||
|
@@ -365,7 +365,7 @@ mlx5e_ktls_tx_handle_ooo(struct mlx5e_ktls_offload_context_tx *priv_tx,
|
||
|
tx_post_resync_params(sq, priv_tx, info.rcd_sn);
|
||
|
|
||
|
for (i = 0; i < info.nr_frags; i++)
|
||
|
- if (tx_post_resync_dump(sq, info.frags[i], priv_tx->tisn, !i))
|
||
|
+ if (tx_post_resync_dump(sq, &info.frags[i], priv_tx->tisn, !i))
|
||
|
goto err_out;
|
||
|
|
||
|
/* If no dump WQE was sent, we need to have a fence NOP WQE before the
|
||
|
--
|
||
|
2.13.6
|
||
|
|