Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp142687lqr; Wed, 5 Jun 2024 01:17:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUubmKw4joZkbBYVHn/zeArw0bgjihx7ZGEcuGNgJjalSLNUvuupid5D2abbmBsfGT3j8ke7Eoe20bSrKmP3i9gobjeHHq4FMLrqYnfGw== X-Google-Smtp-Source: AGHT+IFwvNtoqV+ukBx18+KP+vO/SNhDYVNcrkFDpf6mUGlIknkYAVKfwfTqGd4WxJltFSuTzS1X X-Received: by 2002:a05:620a:404b:b0:793:8a6:a41 with SMTP id af79cd13be357-79523d4d398mr205426285a.24.1717575471644; Wed, 05 Jun 2024 01:17:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717575471; cv=pass; d=google.com; s=arc-20160816; b=vPj4tMMTXcd+A0BakTRPnPgQrMFIQXvqPxSNqUb5l8UGqxnns6UKK8244QLrBesO9Y cZJwAVSmb3dB8lptP/bZ8jv9Ky1PrHXLDq3HQ1ayEfcLHrWv76MQNnE+UafNgBYoQcGu blPqUrTG/ndafaiZClbjjaW6EyA0zEWHPrM+Fg+VsG/XpgAyXqCyHIiMFR1qNGtEHOZM k+hi1iKEg3X+r8bOsCcrtctZbxXZ/lKXu4axYsKRq/foz4GS683PY7Ww+PcaU1AEcEPy /hdYbIS5XgWXGMVM/4vvDbpa6Vdm77B0udJe2SxWqdB60YLbYo3rwIVT13tdHLf4HzFa G1BA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=+JwQCIbY5Ypjq42XxDaHhXz0TTOqxXdVtHlpkzmkxj0=; fh=ujksmUrBEjpGhQjWbrjZMx9PDXUXbYR/j4y8MAq1x1o=; b=IK3vpL3tMwTwLbwwtMFZ9itkVhwoFoQrdCCxmipI+BRjNdssWx5jZr0vghAaog393A r6Ol1RvRH2LGBJFAMbzIfvF2MW3htG8cg9JX2Wg0TDlD3y4fUTAB5zioigbQVGrFyZKp NOVFJ0XfSQf0uy82SJ+8OCNZbHSXiaFuCz9FLZS59nGE+9M6RQ/6aLg+Kl4CKXTAtzVE FfORPTJHfJnz1l5hJ84Xl4bdKfkXsqlTDFtsx/aGElIgMynptLaNbsMAXaN0TzHO0jS7 Q/fiVEeVPbUiSCm5DMc/5k08DWHg62V1RTsi6t9Ww9ZlQWZvukueNoeqOy3nBxLwTWV1 cXMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=cruCb8e5; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-201956-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201956-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43ff2582456si118501011cf.493.2024.06.05.01.17.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 01:17:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201956-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=cruCb8e5; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-201956-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201956-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 602731C2241F for ; Wed, 5 Jun 2024 08:17:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1FBB49651; Wed, 5 Jun 2024 08:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="cruCb8e5" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 982C349645; Wed, 5 Jun 2024 08:16:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717575374; cv=none; b=iCrRKGI0mrrX2DmLhvOAVWVzYn4Cc7HQbBF9/kfdys8U8vPtB3pIP2u/wJnoh/nuvPjXif8fL36Y23S9gLUf9ZVr1/bhUi0BhQQB0ZSrnn8OzAtdmANmtUhsLnLtBiIK9UGQKP2PrQZiLO2xK+ae2uCo68oE1OiSTmWkAtNOXCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717575374; c=relaxed/simple; bh=VT5Llm+2/FTQqOqTjcgziNNCx9sgvtmzD5/CyBJnOBQ=; h=From:To:Cc:Subject:Date:Message-Id; b=tWvcwxOktaU/dahjc5eWpnaaL6+swJPR5kMJ63cl1Jaci5lR9kmwJam7d5eE1TMdjahu2fwpxJMRDfU2EWsq5exfcJhBIf4H+bXvECs+lQGEnZcuexoqhi0uTU9Y/R12NNC+vphuZhflARngDMNXfFmToSOXDK+RPAZPUkfZPCM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=cruCb8e5; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 1436920B915A; Wed, 5 Jun 2024 01:16:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1436920B915A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1717575373; bh=+JwQCIbY5Ypjq42XxDaHhXz0TTOqxXdVtHlpkzmkxj0=; h=From:To:Cc:Subject:Date:From; b=cruCb8e5Yt0eL+ZPUYxpc65sDvjMh0io76wH3+4/dc7mf9Q+miaxc6yuDUVinWLa2 hT/R/ZWTMauRHajAbVRLG6vdBH6g9OJ2A57qqt21tiWTuHhyuQNxSESAtmN7l8wxkt M4fefR8ORqL8dThg+F92rp06OUDJHS9pMP3WNGB0= From: Konstantin Taranov To: kotaranov@microsoft.com, sharmaajay@microsoft.com, longli@microsoft.com, jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs Date: Wed, 5 Jun 2024 01:16:08 -0700 Message-Id: <1717575368-14879-1-git-send-email-kotaranov@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Konstantin Taranov Ignore optional ib_access_flags when an MR is created. Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter") Signed-off-by: Konstantin Taranov --- drivers/infiniband/hw/mana/mr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/mana/mr.c b/drivers/infiniband/hw/mana/mr.c index 4f13423..887b09d 100644 --- a/drivers/infiniband/hw/mana/mr.c +++ b/drivers/infiniband/hw/mana/mr.c @@ -112,6 +112,7 @@ struct ib_mr *mana_ib_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 length, "start 0x%llx, iova 0x%llx length 0x%llx access_flags 0x%x", start, iova, length, access_flags); + access_flags &= ~IB_ACCESS_OPTIONAL; if (access_flags & ~VALID_MR_FLAGS) return ERR_PTR(-EINVAL); -- 2.43.0