Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4919309imc; Mon, 25 Feb 2019 13:38:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IaR0hMcTEC9oSNuXToUcSQjpXkDKt9s/kPI792gpjKEVUnYz24+IbtLC/oV/qvusM2/whAL X-Received: by 2002:a62:4743:: with SMTP id u64mr21920637pfa.95.1551130700018; Mon, 25 Feb 2019 13:38:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551130700; cv=none; d=google.com; s=arc-20160816; b=MRc4jUCtJbo96XS9VQCVs0GlHIpNzywDoH8Z2kNNPZBGQN5FF7Eg4dW1f1v9e8886l uuFoxUURvsl39wA1tv8aXp9GZeII8KxsF+yvaGwgAtmkcefglzo0YamrokHioyJICw5c v4EL11q75G12M3sITaljFupo8qlPlqDbKWBhjykj7hVMvZHbkP+nkcfw4hZG78+n+t+/ y7PPVrOtAtc+N3D+1Un/kF4c2pD1uBMaR1YvSh/F40ef529zJmvjnZSJdnfFhpZo+1o4 O3BRzeZwpThT+H/c79vHWzngUWDUlMf8Q/BMLTximXTew+vhWCVJUtlEui32UFTRBC6G yppA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MpVrxOYA4aeeA9rklHf2jEFb070WucOzsnA3b6zgSjM=; b=l+LQ21YBq2SNek7lmYeuVP01PbZtyBgi3N8Pw2X6sYwipSxeLcdVlZD5KV4CzfRY3x WL9zO5oCmzoKG4DkeIuTpfi6eY5GB0VPTeqao0YZzilYxMRQzTvgD8qh+8Amw3mJDdUI qMzFDFBCkR5ANn4A3wojouhnDK83NDMvN4Ta2ACqME/EUxbZcERZIH/JdYT9b0bCpnuZ ZKTVebyQxVqNGGbAPsV2qwmsg51iswX9dtxpkeVqYc5f+BinxO8FWKYGhB5jeGe2FOKE xHp7QefU9dUtSRs4DLwyzD3k0FkCUOg97mGirSSLMfL8uMKuJ1cZHCKaQHE1Y/2L/QKm 4OvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=abUjYOD7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p186si7665833pfp.85.2019.02.25.13.38.04; Mon, 25 Feb 2019 13:38:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=abUjYOD7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387398AbfBYVhH (ORCPT + 99 others); Mon, 25 Feb 2019 16:37:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:44234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732428AbfBYVhF (ORCPT ); Mon, 25 Feb 2019 16:37:05 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F288420578; Mon, 25 Feb 2019 21:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551130624; bh=/QF1Hm9IS59sxj5Q5pwzBOTye1WXbRCw4/zO4+vQDrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=abUjYOD7RomJxQjBVihxfDudWPgRnFicrVzKcfqcGAFtJOggBbVu0Xf9fLt245lvj JMPSd5amAbK8FlUV7fZLMz5IsUgLkbuwnjdwzEp1HKZE1yqSyaEQCui7vR9vVCMZHN CmxxCtDOSVdxkvLzPQGU5vO5OFCFzSQYEcJH8M4g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raed Salem , Tariq Toukan , Saeed Mahameed Subject: [PATCH 4.20 143/183] net/mlx5e: FPGA, fix Innova IPsec TX offload data path performance Date: Mon, 25 Feb 2019 22:11:56 +0100 Message-Id: <20190225195118.975094325@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190225195054.748060397@linuxfoundation.org> References: <20190225195054.748060397@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Raed Salem [ Upstream commit 82eaa1fa0448da1852d7b80832e67e80a08dcc27 ] At Innova IPsec TX offload data path a special software parser metadata is used to pass some packet attributes to the hardware, this metadata is passed using the Ethernet control segment of a WQE (a HW descriptor) header. The cited commit might nullify this header, hence the metadata is lost, this caused a significant performance drop during hw offloading operation. Fix by restoring the metadata at the Ethernet control segment in case it was nullified. Fixes: 37fdffb217a4 ("net/mlx5: WQ, fixes for fragmented WQ buffers API") Signed-off-by: Raed Salem Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -387,8 +387,14 @@ netdev_tx_t mlx5e_sq_xmit(struct mlx5e_t num_wqebbs = DIV_ROUND_UP(ds_cnt, MLX5_SEND_WQEBB_NUM_DS); contig_wqebbs_room = mlx5_wq_cyc_get_contig_wqebbs(wq, pi); if (unlikely(contig_wqebbs_room < num_wqebbs)) { +#ifdef CONFIG_MLX5_EN_IPSEC + struct mlx5_wqe_eth_seg cur_eth = wqe->eth; +#endif mlx5e_fill_sq_frag_edge(sq, wq, pi, contig_wqebbs_room); mlx5e_sq_fetch_wqe(sq, &wqe, &pi); +#ifdef CONFIG_MLX5_EN_IPSEC + wqe->eth = cur_eth; +#endif } /* fill wqe */