Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2246023imm; Wed, 16 May 2018 09:58:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpqVTFqlfZz8wZZmigpsD6ncDdPrPmGyLzGi8clh3rWLYn+4M4AfZXDDrvXR/JaHHbjIwWu X-Received: by 2002:a63:bd49:: with SMTP id d9-v6mr1387012pgp.14.1526489896775; Wed, 16 May 2018 09:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526489896; cv=none; d=google.com; s=arc-20160816; b=gfFu6kBRYUSiDRv526x8xwwGPAW/BssH9Y+e3iBkYs2dtZ1tAh0RTXih9ap1QWRoWO qjA2agh9IvRWkiF5SMY2yj4NMWcPdIwvhRG5XdVIcHE3nFjW25HGDxurAmL62v97T6na bJLhydY8efNQdw1sDNZ4EgmT/0TJgaTGPqTywAM8lRLII9dzg5dblLWEqbmvyN4tVot4 Z2sH211Ne/MqIcbVDTgiefsgTA8zG3Vmouh1d1S0NPESL5z/qKHZc6GoOgThoHzoFTWO yC5WNO7l7xxxJLdvTwylpGYjeVKGlky45tz1KbqvK3cwLNZls3TZbAvu8ScZynr16mdT YzZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=VGgJv9B3uWzgGLNZBlcE+RNlueo1kX7z7SWjxZ6B4vQ=; b=ikkyAumhQK9kQSv9pm7K9oXSYuza0Bep5msYIidG31J1fl/Bb3dgd4LnrFqoqwdc4q pwyg8CNuDrbqKSGgm0hN7msaGeozTqaFj6GFJtKGcs4sXGFevJpOVG8roiTzYBjhVqc2 Y9pFA5xhbtIL+mTKgI+9jm1QW8kkTKDUQDRRqRvhupoacKk1Isa6pKtu5aWE6A75pvjw sAfrNjV74udaIANQ202ZLNE9t4X+OW8bEYEzLpxRnbTs0qyJV57Fm6bZxNRwmuPKw+5U 53tU7TVNI+l3Folxwc8by8VDDBrRjR4Hf8BGultewpwkNYne5fBvZbm+XJB9tBl9cGCE iqPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=eVg5GzlP; 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 z4-v6si2455330pgr.366.2018.05.16.09.58.02; Wed, 16 May 2018 09:58:16 -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=@ziepe.ca header.s=google header.b=eVg5GzlP; 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 S1751315AbeEPQ5s (ORCPT + 99 others); Wed, 16 May 2018 12:57:48 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36396 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbeEPQ5p (ORCPT ); Wed, 16 May 2018 12:57:45 -0400 Received: by mail-wm0-f65.google.com with SMTP id n10-v6so3388573wmc.1 for ; Wed, 16 May 2018 09:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=VGgJv9B3uWzgGLNZBlcE+RNlueo1kX7z7SWjxZ6B4vQ=; b=eVg5GzlPW0nkSHOFFIyj10kJHliyzcEAuGaHsMmLWYWn9bliTvsjKmJ0wiJeh25owx HEoPcMyvmVDPMtm8SrynFAjqN6Ut/vgaU+UM7Oj2lNdh0NTsELcypZDGogqKGJ6vCy+V fZqAU5m3CUIh2tBJ9T/APwHfhkrV+kyQysXAk3mCpxBWOWp1OwxeZecNGHZFTB/+OT3N nxQJ7mADZ4nDIfYH3IaEUX1BU/Zc6/3bgUg995yd5zVAjB81EvnDZ4dLuRC0qYnyQ+L5 PxtNpnUXOQxywjr3ZApd21SEKJD4ydfvfbIl15OQwZA7pEgRLNNBLDAVc7AhYO5q/qmW q4kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=VGgJv9B3uWzgGLNZBlcE+RNlueo1kX7z7SWjxZ6B4vQ=; b=UxCyFsU+KfjJLUYF2wEphUmO32caw/WX7R8w00ohRYtgMN2y3AujlP9T9QraXm2k1j rTfGPLFwCq5D31+N5Rc9jBC6u7LeP1q1JBnNbunTzp8FlqYDQLAfJxQJtTWSw5+/tIuD UDo44nIiKN9DEhVM13QW0nzZLuYI+Q9/3wKwKyfjf6MZ7K36M3KQ0c3dkmAxaVca65wG 2Bs6l8wH9M/vj5M4B8Bsu3+JCHPWT7uiaWLaqKXt71pD1C/VEF1tEUVryRbTCIeONEFd 2d/hrGjHkh4YTwL8e0Eww3nLVhe1Oi6GN9FBc4ceZUr+V4SuNQZcRWqnNCysCIy55jN8 nRYg== X-Gm-Message-State: ALKqPwfk5OVAX80a6TDtn1OduH1J347wwXf72ovzrDMmj1nSQclCyAG+ xuVTyUJ7JKA7mC03L97UOdp7eA== X-Received: by 2002:a1c:6489:: with SMTP id y131-v6mr1152869wmb.82.1526489864470; Wed, 16 May 2018 09:57:44 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id e50-v6sm6936732wre.4.2018.05.16.09.57.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 May 2018 09:57:43 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1fIzkB-00081i-8a; Wed, 16 May 2018 10:57:39 -0600 Date: Wed, 16 May 2018 10:57:39 -0600 From: Jason Gunthorpe To: Hal Rosenstock Cc: =?utf-8?B?SMOla29u?= Bugge , Doug Ledford , Don Hiatt , Ira Weiny , Sean Hefty , OFED mailing list , linux-kernel@vger.kernel.org Subject: Re: [PATCH IB/core 2/2] IB/cm: Send authentic pkey in REQ msg and check eligibility of the pkeys Message-ID: <20180516165739.GD25661@ziepe.ca> References: <3bee76df-49a6-cf3c-6df4-749a6309358e@dev.mellanox.co.il> <20180514210200.GN21531@ziepe.ca> <20180515190424.GL5615@ziepe.ca> <3E15B62F-E705-43BD-8A72-9E74F784D40E@oracle.com> <20180516151201.GA25661@ziepe.ca> <695ae613-931a-50ba-2b83-9d172e0ac2bc@dev.mellanox.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <695ae613-931a-50ba-2b83-9d172e0ac2bc@dev.mellanox.co.il> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 16, 2018 at 12:42:37PM -0400, Hal Rosenstock wrote: > >>> The only time you could need a new REJ code is if the GMP is using a > >>> PKey different from the REQ - which is a pretty goofy thing to do > >>> considering this VM case. > >> > >> Its goofy. In the CX-3 shared port model, the BTH.PKey is the > >> default one and the REQ.PKey is the full one even if the sending > >> VM’s port only is a limited member. This patch series fixes the last > >> issue. > > > > Again, this is wrong, the BTH.Pkey and REQ.Pkey should be the same - > > I do not believe there is anything in the spec that requires this. I > agree it's the simplest use model though. The spec doesn't require it, but the design of the Linux CM certainly does. > > If BTH.Pkey != REQ.PKey then the requestor side has to obviously > > select two PKeys, which is basically impossible. > > > > The VM should not be part of the default partition, for instance. > > I think that the VM is at least a limited member of the default partition. Well, being a limited member still means the default pkey cannot be used for CM GMPs. I actually can't think of why you'd want to do this, better to put the SM nodes in all the pkeys and reserve the default pkey completely for the network management control plane. Jason