Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2338193imm; Wed, 16 May 2018 11:17:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrZfIQjf8d6Sao6GZbaNYhZ8GfF6XARX2AFOMNpssQGefp2KZY5ENECGYxOwfiJUlpAkzuA X-Received: by 2002:a17:902:7446:: with SMTP id e6-v6mr1902138plt.369.1526494665933; Wed, 16 May 2018 11:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526494665; cv=none; d=google.com; s=arc-20160816; b=El6Vb42JR7h/ogXgE7sC7Uie+8trSdk1HEHh4dMmi3aO1eTf7V5/i5++pD+emjk+UC 3Ha5SSgvgiNPEznO+djnW4jklkuXqK7aqmmflIyu13ArHyd1qZyuGxYHWZvJut0GwyL8 JnsSIKqMBVep+10uouSPaYH5HVNz103WL/tZ8IvOVpk1wLQbskSJNgkC8QFp/ihMZiaF eMj2YgkzlMoDZtrz1mRlYi7MdyUtMNDho81G1xuZxIu5/MHDm7sc3sW9wk7flBqIUyKn 8DObqMCZL1/Ared3OyEMycfUSZiLAfVqEglP1VfxkXay1R3oy0UMpqK6VyxPPA5r0cf3 pu8g== 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=4Ui0T13EYoPw31IKojDdQnONR+JLugf26KDEGVgR0EA=; b=TOMlc2hbx7jI1ep/ckfIn3MeepZWl1c4jXD9Q1G+8Q+moVtMU+ftYLwv1WJ4WjRB+c habJHWnSSOyDRwf9E0xPSDFrN65lgHu8xk2rgZx+0y5PHHpL/oDlMfCR68Fv5FFVy57j RIcOP76QT5ORo4QvS27AP9OOaezt+knVW5AsXceM0xj0yBvqzqFKqRB2uOSBSJQxPyaw acEh8bMIqTMz633/TP8jaCGGdH7xu41GVmpw6MDLhQu/bQtMz39E7NB4JAX4Juw9J9Sz l8fN6en79BQF6EtwCKyHjm8fNHrzGiKHFoK1MT0zDChNqz9lmWGV/PLzu2+XNfQEhs0D dSOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=Br+///LK; 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 h14-v6si3102697plk.535.2018.05.16.11.17.30; Wed, 16 May 2018 11:17:45 -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=Br+///LK; 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 S1751098AbeEPSRC (ORCPT + 99 others); Wed, 16 May 2018 14:17:02 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37099 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbeEPSRA (ORCPT ); Wed, 16 May 2018 14:17:00 -0400 Received: by mail-wm0-f67.google.com with SMTP id l1-v6so4021471wmb.2 for ; Wed, 16 May 2018 11:17:00 -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=4Ui0T13EYoPw31IKojDdQnONR+JLugf26KDEGVgR0EA=; b=Br+///LK/KzPLONrzhhU1MnWUuESFYUgM14FtNHxrplT3f4S2xsGHH+n5vBGOB8gfc ySkJ6M52/lK45SWB4HJL7uBtqKAblUVk8IBN/vxGvZCzPP7p5CxcuLPP677hwnj+3hWn /6Gkr/Ezrj4iJ+T9i0cO7XTAej6JxvfZWCV4tKveRqz9BprpC36uHsl2R+bSpnekIsH3 truPRl4nivMC/n3E8t7Dzr1EAkzRpBbO9r2Mp3SOqoRoX3sXDgNuLETd8IFyKIjGMcmx I6Y+0A01G1XaQcW6muP8dmcHHF/SvB4iforsmA4R0C+mai8UtdXkjiOQJ5CvuFmgTKNZ b5tg== 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=4Ui0T13EYoPw31IKojDdQnONR+JLugf26KDEGVgR0EA=; b=LDPzRMfrXdo0ZZLZPuQWWdN04meda415/sOJQZ3n07RVqvHqJm7unpJ6DDWufVIivf KL4qbGVvXTcmlLyL6SKAIEIOZc/OpyfsKbxjp4CjCmkKUL3ypRHGU+6wALt01NTQsLB2 3G9niYL8iyvdaynwEzKLrOG5JRpTupxhAMgnEKLXPQwVq543IqePoYZbQtBOizKeEjht S8Eju/VwOu3JrsKlxpwUOQwA1rIZ6l6ny70b0sQiBAAadv6SLNJ+EFH4UX+CpZVgqjNl v07iGlTLB2boVM/gBhgIi/GaCsOmo+YdRtW+zCRJDwPgr3BD4XWTTdiQW7Bt/Ieots5G nuqQ== X-Gm-Message-State: ALKqPwf2Xdwf8cvcC5LGGpXZK8kjm+8L7DGA/n2KFOabv2mLY+M8QUVT hRE535LmwWExOQVpjCtzhsxQUA== X-Received: by 2002:a1c:355:: with SMTP id 82-v6mr1248615wmd.96.1526494619494; Wed, 16 May 2018 11:16:59 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id y84-v6sm2994516wmg.44.2018.05.16.11.16.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 May 2018 11:16:58 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1fJ0yt-0007cS-DU; Wed, 16 May 2018 12:16:55 -0600 Date: Wed, 16 May 2018 12:16:55 -0600 From: Jason Gunthorpe To: =?utf-8?B?SMOla29u?= Bugge Cc: Doug Ledford , Don Hiatt , Ira Weiny , Sean Hefty , OFED mailing list , linux-kernel@vger.kernel.org, Hal Rosenstock Subject: Re: [PATCH IB/core 2/2] IB/cm: Send authentic pkey in REQ msg and check eligibility of the pkeys Message-ID: <20180516181655.GH25661@ziepe.ca> References: <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> <151B2A36-28F0-4A88-8633-31AE7E55F848@oracle.com> <20180516180115.GF25661@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 08:14:50PM +0200, Håkon Bugge wrote: > > > > On 16 May 2018, at 20:01, Jason Gunthorpe wrote: > > > > On Wed, May 16, 2018 at 07:46:10PM +0200, Håkon Bugge wrote: > > > >> OK. Lets take one example. The pkey table contains 0xFFFF, 0x8001, > >> 0x0001. > >> > >> The wce.pkey_index is 1 (i.e., pointing to 0x8001). Now, tell me, was > >> BTH.PKey 0x8001 (matches 0x8001) or was it 0x0001 (also matching > >> 0x8001) ? > > > > As far as the Linux core is concerned, it must have been 0x8001, > > because the only way the pkey_index feature works properly is if > > exact-match takes precedence over in-exact match. > > And now if the table only contains 0xFFFF, 0x8001, how do you tell? It doesn't matter. The delgation of Pkeys to VMs are on a pkey-table-index basis, so if it matches table entry 1 and entry 1 is passed to the VM, then the packet can be passed to the VM. Jason