Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2827112pxb; Mon, 1 Nov 2021 02:38:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUzYKc/UZRnYjbM7J6keMjMBVA0KsckZCPQasvnjax5ZI8NdbFSytPohLkZ+IHYYhxxQSu X-Received: by 2002:aa7:c508:: with SMTP id o8mr26198690edq.393.1635759523161; Mon, 01 Nov 2021 02:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635759523; cv=none; d=google.com; s=arc-20160816; b=F/5N72fSLXTheRsO2N7XU03SHifgecyRvSAKG2037Bcp5OTPI8CyJLhF11L2FHPudK geunc8laLxeP5Z4hQDZEhdD5YvvtVGwm0xSgVo4wzKNCVpUJSy34JUHj6x0PIxnUQKg6 jfdBGN68DQet0+4Ni+UJWPjYMBdsdKXFbzTV+m7MpL/2Bdhr89RAIgSUGnyjr5q45M8g bwRvShcQffSbQs9bw7I4QWU5Y0hhufUxKlsb5zGG0LlWkncL+esH6Q1MBR0wK34Ttxts lUFRBkiWKS4dQITgX19Xf/G5/8/H7Et0Lsb+it78Zh9OwcufRHvl8cvcrkJAih7zBSk/ 8/Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U7KHbdBUYtKgFgxsl/TtLPnj6PyTNOgTi1ekb15To8o=; b=Hg1i6JVv1kgjkPw4tDEGpyFbZNmQ+gtNWeRC7fRhY2ZexAHHBRL1a2KfpS5NzJCjYK lJylAZ8aCbCt8Lc/9/DhGOiK5CToq2m9r6onTluMr5AeYAFbJoucpuVftGzR9C8CeF5W rq3/HIgEFHDAt042Ei7kuHazvvcQODh0CZya4j5NeH5KlHGv69UWJjxQ7M/o0Me1SuWf Qzb6rxYvLO5ls6nM4hE6ULZgrqzl4ZwXeRzsgltGwDdLkt7KZFS/gQZ1L5SuXdf+iZ61 /AkUiLwhtAIl34hWkNkXBKBFZewkTaqoVN2rh/CIKuXy5n8xCJDdwLTvOP8Zw4PjUK3Q plyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fZlUNULC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ah14si1855810ejc.107.2021.11.01.02.38.20; Mon, 01 Nov 2021 02:38:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fZlUNULC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232686AbhKAJjC (ORCPT + 99 others); Mon, 1 Nov 2021 05:39:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:43568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233094AbhKAJfq (ORCPT ); Mon, 1 Nov 2021 05:35:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 609DE61177; Mon, 1 Nov 2021 09:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758753; bh=memkdyxxsb5u+Yl76SXN8m6MGXPhYJxiRBQ7YJHv/9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fZlUNULCDb714140vWAUCvSJngkgtzRX0YvxrP62k5cLnXiJY0Ndv8fdFmS4zUo0R ff9d5Cr8bZ0oMyxXOaHT5lpw2tGJq11dJOU/h2/s2C0ZrdLfAIHkg568ULtJm1S2k5 ziyKm4Ib0XgLWkWjB0B8fga2snIY/92WuoARpiBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Patrisious Haddad , Maor Gottlieb , Leon Romanovsky , Jason Gunthorpe Subject: [PATCH 5.10 45/77] RDMA/mlx5: Set user priority for DCT Date: Mon, 1 Nov 2021 10:17:33 +0100 Message-Id: <20211101082521.303669681@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082511.254155853@linuxfoundation.org> References: <20211101082511.254155853@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Patrisious Haddad commit 1ab52ac1e9bc9391f592c9fa8340a6e3e9c36286 upstream. Currently, the driver doesn't set the PCP-based priority for DCT, hence DCT response packets are transmitted without user priority. Fix it by setting user provided priority in the eth_prio field in the DCT context, which in turn sets the value in the transmitted packet. Fixes: 776a3906b692 ("IB/mlx5: Add support for DC target QP") Link: https://lore.kernel.org/r/5fd2d94a13f5742d8803c218927322257d53205c.1633512672.git.leonro@nvidia.com Signed-off-by: Patrisious Haddad Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/mlx5/qp.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -4216,6 +4216,8 @@ static int mlx5_ib_modify_dct(struct ib_ MLX5_SET(dctc, dctc, mtu, attr->path_mtu); MLX5_SET(dctc, dctc, my_addr_index, attr->ah_attr.grh.sgid_index); MLX5_SET(dctc, dctc, hop_limit, attr->ah_attr.grh.hop_limit); + if (attr->ah_attr.type == RDMA_AH_ATTR_TYPE_ROCE) + MLX5_SET(dctc, dctc, eth_prio, attr->ah_attr.sl & 0x7); err = mlx5_core_create_dct(dev, &qp->dct.mdct, qp->dct.in, MLX5_ST_SZ_BYTES(create_dct_in), out,