Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3284486ybb; Tue, 31 Mar 2020 02:05:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvdAmfMYW3jdXD3WK/FitPJYsPyOFdRcK9wXXgXbNbayH90l4K0iUdJ+PmQ6N7tNBq0hN42 X-Received: by 2002:a4a:6f0d:: with SMTP id h13mr12249780ooc.99.1585645504971; Tue, 31 Mar 2020 02:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585645504; cv=none; d=google.com; s=arc-20160816; b=rDkJaug3jeo+w1XIPnnFlCy3J/d5hPk+c5ynaZw6yHay9HcBPXey2cLGkASCwotMYm Tn/v8w5nJCnYiME0RI75j+8/xCmSNnHnXHtvNPbAfl2HAU4Lh7ffylv0DDcsP3oxRhN1 2CZJTrt0Umd44oWPCuuhCOetxoJE4m8HmK+YfNGeq8p06eYK5v5/2f/5Y8ZKCZ+06diL R0eqC8DDyRHt8VOi0/B1+Q70fnWARDAn29dMXLv4Z97uVvpxTD+mwJuEy8s8eWEje9sC YF9V4878L8pRIcMgH2T/0+6xxGRYfoynhLVlldxpED5pFUNzw9Ej+AVOo68EajT/piL6 rrug== 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=Lu8PPo3h41+h/HWxD+eGRUzFMlW5LvrU0DjfPDPXeto=; b=lS/qlWJaGM9r1msJj9ESQdi/rpGQtRA1WpqK/yxS2id0jpLZf+UadBUs+nkThi2TxK YFG8XpN/vRHOgcINpv/r4KIxABbBHHefQ4ofn084HrzXUrUAbDZI38ajGorexxjKIdXK 2m9PCtIvGE5vDaHVh/hckW5utUHF0o8X5xodm2CghoR8zzMQPT4e/bjySby/FyVsdrrO xrqhviYQtCfhjtVtVos5vhv2bWk+p//EnXzrQzwdk6WDaC0BDbhad654sgBpf69YcEji HJdVzVQXrC6HOWiduHfL6/qhi8c092rulK3ZBgf7NjkggHdzI5wNNj9mqgcuAWa690t0 EFsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=obWwzDJJ; 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 e8si7170927oif.218.2020.03.31.02.04.53; Tue, 31 Mar 2020 02:05:04 -0700 (PDT) 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=obWwzDJJ; 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 S1730933AbgCaJEP (ORCPT + 99 others); Tue, 31 Mar 2020 05:04:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:43988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730711AbgCaJEJ (ORCPT ); Tue, 31 Mar 2020 05:04:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 4F6DE20848; Tue, 31 Mar 2020 09:04:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645448; bh=ekxXhCUKXOs9ws/GijlIMZQF0eVgK3d5d0v5/txDExY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obWwzDJJ6nihqtnGHIBsxdxK9rNkIKvY14trILLrNw570ou6Z4iNQaGQW/9i3LM7n njMRHA8WgT8hN+ohlGexPWdXjh3KvBJ62gpXADXdB1jTo9Z05lAnd+rNUt+BC+ta+t ddN3b86zEEzgHp0HVGkIkhSvS6Rw7szYeX9jnRHU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hamdan Igbaria , Alex Vesker , Saeed Mahameed , "David S. Miller" Subject: [PATCH 5.5 056/170] net/mlx5: DR, Fix postsend actions write length Date: Tue, 31 Mar 2020 10:57:50 +0200 Message-Id: <20200331085430.556499638@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331085423.990189598@linuxfoundation.org> References: <20200331085423.990189598@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Hamdan Igbaria [ Upstream commit 692b0399a22530b2de8490bea75a7d20d59391d0 ] Fix the send info write length to be (actions x action) size in bytes. Fixes: 297cccebdc5a ("net/mlx5: DR, Expose an internal API to issue RDMA operations") Signed-off-by: Hamdan Igbaria Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c @@ -930,7 +930,6 @@ static int dr_actions_l2_rewrite(struct action->rewrite.data = (void *)ops; action->rewrite.num_of_actions = i; - action->rewrite.chunk->byte_size = i * sizeof(*ops); ret = mlx5dr_send_postsend_action(dmn, action); if (ret) { --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c @@ -558,7 +558,8 @@ int mlx5dr_send_postsend_action(struct m int ret; send_info.write.addr = (uintptr_t)action->rewrite.data; - send_info.write.length = action->rewrite.chunk->byte_size; + send_info.write.length = action->rewrite.num_of_actions * + DR_MODIFY_ACTION_SIZE; send_info.write.lkey = 0; send_info.remote_addr = action->rewrite.chunk->mr_addr; send_info.rkey = action->rewrite.chunk->rkey;