Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3990311pxb; Tue, 2 Mar 2021 04:04:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7Jw0KIqHQvAfWn9cchBXmiiZmDH0+GPn6iiyoMuVrqR9dZYrG/hJBVIPlnF/p8uhdy/5/ X-Received: by 2002:aa7:d44a:: with SMTP id q10mr12133179edr.278.1614686692440; Tue, 02 Mar 2021 04:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614686692; cv=none; d=google.com; s=arc-20160816; b=gd7wwrXvPqvvTQ4Eg9U8v40Gtz+Jm/f++NaYwAtt+CpnYUothheYXxfpAsCdk2lSLH I8UMVYGLa7rkUgnZmtrAX+fCjjau0wE5XNEK+DYF+kRHUdAhPZLEEU0gNccr0kb0jDRo GSBVeg7IkWN8pT7/t3VAmrSOeReovLthyaHlJkfzefzIWcrW4fKreArZeZHc1c0FvheS UpzDTL4RGllAsY1LBMvBKmmtzg106hIweLNxvy+1acTmsRYuJ9sHbIqPBjMWRFMeLGsq wqR6NYXWIuS+oR45Mw/5B4YC34uThNMNDqZp3yAprqeZMfCZWWEEQnEH04WPDMKJ6ZEd 8IIg== 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=jTwjc1TG3UMD4ne9aku76WB9RWHL74CwxZ8LjYBittk=; b=ut/n78gbgeGWtfKhzAi8AwNyp0enBfTFXyxD0pA/90CKux5L59fzHxGXvhV322Tk7k 6liYLZoKmDr2lUpz9t9DtxmTH8KVrXGrDGChJkWFdd1yUtQy/L7PIa0yToGXgvdsBTSM v1UhoFAaW/iHDVA6yuyZgEFk0uVu52soAyUn41vgL92p1GJoibyO7euDbKPQUCw26lc9 C7EzAm89UeHUrzUQhqyl2LHn7fYGHg3WMNhgSSZAjEGSZ0P7F2bDuCnLZjFngCGidInh /hqrrG6YmVXPwYkNpFEAQ/ENgUMkG8SfpyUO0OjxxVKWghgh1BLhrD2+GgP1339lh199 5gVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zxpkqP2x; 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 f7si3024510edu.503.2021.03.02.04.04.29; Tue, 02 Mar 2021 04:04:52 -0800 (PST) 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=zxpkqP2x; 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 S1442422AbhCBCNP (ORCPT + 99 others); Mon, 1 Mar 2021 21:13:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:53008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241733AbhCATix (ORCPT ); Mon, 1 Mar 2021 14:38:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6709264F79; Mon, 1 Mar 2021 17:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618498; bh=76/f1FgCqP/TlZTPTZwz27QNoIFMNmoY2dv8gBN71nU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zxpkqP2xuzCHbb/0eB7bmfIJ6p4nIbIPH4nXM7l2RwMjdDnDdZzMoB4lM5QPj+rOg PtGNdfXnl2nZRsvuIEmEh60YwDe/zaojq1qI9g+GDpGY3K3uiqdkCyerRqj4Ow4Xta RVDEc5YpPXA1c5xB4Ep1wHwhgXJyYgl+PML/rsYw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shay Drory , Moshe Shemesh , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 109/663] net/mlx5: Disallow RoCE on multi port slave device Date: Mon, 1 Mar 2021 17:05:57 +0100 Message-Id: <20210301161147.130865623@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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: Shay Drory [ Upstream commit c70f8597fcc1399ef6d5b5ce648a31d887d5dba2 ] In dual port mode, setting roce enabled/disable for the slave device have no effect. e.g.: the slave device roce status remain unchanged. Therefore disable it and add an error message. Enable or disable roce of the master device affect both master and slave devices. Fixes: cc9defcbb8fa ("net/mlx5: Handle "enable_roce" devlink param") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c index a28f95df2901d..7ffc94c4979b2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c @@ -282,6 +282,10 @@ static int mlx5_devlink_enable_roce_validate(struct devlink *devlink, u32 id, NL_SET_ERR_MSG_MOD(extack, "Device doesn't support RoCE"); return -EOPNOTSUPP; } + if (mlx5_core_is_mp_slave(dev)) { + NL_SET_ERR_MSG_MOD(extack, "Multi port slave device can't configure RoCE"); + return -EOPNOTSUPP; + } return 0; } -- 2.27.0