Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4833973imm; Mon, 14 May 2018 14:03:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoB+toIV8S4QLR3ayu25KBa+kxIE36CdfrFi4WZ+6led5vgmzlKEYhSIWtmVfW5jv6Cn58b X-Received: by 2002:a17:902:b490:: with SMTP id y16-v6mr11230920plr.92.1526331800425; Mon, 14 May 2018 14:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526331800; cv=none; d=google.com; s=arc-20160816; b=uTbqOfza0Cjg1pvKyYX0i2htrzNY6eOs5nHEOW1kgU0TS/+blR53acC1PnqXikE4Q2 MVLg1zI4qpz0SLtNHSQxgmVi5SFDF9ZAQMC+jImS1qcxltaSd+IR8dLkFMuz4N60BvUx HP0zOAILa81ymqkOLDkcdvNh7iIU1HJNb6Ct+SGBsV5MH3BGHBfBoL+KnAXuMxrq6tHA zQ67ijUd4ylJ/XLh/hgzfqv8fAfWv4ArD4obnKHEwojMcLmIhJbxRcY7juSYsDNNbIZZ mV3V4G6DfPV7a/ZXOqjnB72IfWNiD2jlV6NZJ3HTMYWxvOZqOaUxQ73e/+j90A/GkL7Y 45zg== 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=0AUqrKzOP9InkaD/3QmRZ2tpqk8aTspg6rW01m6Y5Mo=; b=wr+ofy6elCVMyNyqsPWBlw8TT8Oqvkt4SbWrrToHU1VCRVRWesPfbnS2Epqq1fmf7a SAsK8HeHPZf3pjKKSoF8UFyFlckZc4e5ori9ekSq8PUZiz8qz3MfMV5OAVQwPlTOnhNr lTs6EHUGGiQXsS3Dl9a2Kzh4wWyg0fPCdvkVyNCI92VFH25OBuSNXt2izlGlQH+DUUpS po7gzO4nMnXrfXL0xxj2LmgFzPTuUjFg3GMr2h+GXEn0SzioB5ZTMdYTMl0f4ZwC8oPv iegC7vnJDbBnA2GJVcUR0tjjJ8D6dOHibZyYwc/0mgTLdgT2204A9mI+MBoiTsU8o6yA V1ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=iAOUF5Dq; 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 e8-v6si8265121pgt.185.2018.05.14.14.03.06; Mon, 14 May 2018 14:03:20 -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=iAOUF5Dq; 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 S1752319AbeENVCL (ORCPT + 99 others); Mon, 14 May 2018 17:02:11 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:40155 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752101AbeENVCH (ORCPT ); Mon, 14 May 2018 17:02:07 -0400 Received: by mail-wm0-f43.google.com with SMTP id j5-v6so17670121wme.5 for ; Mon, 14 May 2018 14:02:07 -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=0AUqrKzOP9InkaD/3QmRZ2tpqk8aTspg6rW01m6Y5Mo=; b=iAOUF5DqXb2jpMVCGm4pcV+SAsXZPD7+YoTUZLrkWIADTpoJmr1+a8+YziMUi4CTOi GzSM3wRPlCR2V2FX6mO5G0ZoWj5W5tSQfpt+vMQ7JEzKFXt6JzHb178wA/UDTDwq0JG7 Rxg5W6EhU8+9cVz828IliCKVUUrXN/ejQxso4EB0EDoQeIOVXyo2uca//BU8q1U7LTv8 EPjdAGHBMN0Cmuppe4JC5OmKSzQfeM2EWeOvHO/fFDC4bMXhOFTN02fy0OqnqQH551HD E3IyObuhLuvGkTHafD6QjJpUGPoe7I+DeV+fmVFHhbQ5ClN8i+v28sEdRWIgfNwt2WS9 m5eg== 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=0AUqrKzOP9InkaD/3QmRZ2tpqk8aTspg6rW01m6Y5Mo=; b=rCnPMuNlI7CP9vyM2awIE/PRVLjMO3SceI8CzDZWqrOzzJMxf7mVH7Jq41ORtL8fIZ oDD81c3hdeSXA4qU/3Mhx0mTm5e2lxcQleVTEWze+mrmjVlfnQ6CWHPiMbBo63qQGr9t mfKkdVRfViqrk2Q1cNontFSw8FdXc+9e4J9BHNg55+Z/z1JNeH2YOzPPmj8CPxKE/nNm 906cTa5JVWQE3C384+S1JY4f24DELn61TImfNEuffTHKVSWUDpieWhBKTB4TN650auEx ynKb0zaUvYMUdTs75x6E3qd3LqDaF/TToFrNKup1X8AFKy2ArzJ60J3DT2X08q/18+SV KxaA== X-Gm-Message-State: ALKqPwfHfscCK4+wDKowZztbucNgiMGU1AOF732XljgsJ5N7SDMuntBO fGoRQ18MUzWv61zG8u3Pd7ysCw== X-Received: by 2002:a1c:8350:: with SMTP id f77-v6mr6101667wmd.1.1526331726699; Mon, 14 May 2018 14:02:06 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id u89-v6sm13698856wma.4.2018.05.14.14.02.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 14:02:05 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1fIKbY-0007JP-N5; Mon, 14 May 2018 15:02:00 -0600 Date: Mon, 14 May 2018 15:02:00 -0600 From: Jason Gunthorpe To: =?utf-8?B?SMOla29u?= Bugge Cc: Hal Rosenstock , 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: <20180514210200.GN21531@ziepe.ca> References: <20180509093020.24503-1-Haakon.Bugge@oracle.com> <20180509093020.24503-3-Haakon.Bugge@oracle.com> <3bee76df-49a6-cf3c-6df4-749a6309358e@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: 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 Thu, May 10, 2018 at 05:16:28PM +0200, HÃ¥kon Bugge wrote: > We are talking about two things here. The PKey in the BTH and the > PKey in the CM REQ payload. They differ. > > I am out of office, but if my memory serves me correct, the PKey in > the BTH in the MAD packet will be the default PKey. Further, we have > per IBTA: This sounds like a Linux bug. Linux does not do a PR to get a reversible path dedicated to the GMP, so it always uses the data flow path, thus the GMP path paramenters and those in the REQ should always exactly match. Where is Linux setting the BTH.PKey and how did it choose to use the default pkey? Lets fix that at least for sure. Once that is fixed the rest of the series makes no sense since a REQ with invalid PKey will never arrive. However... This series seems inconsistent with the spec. IIRC the spec doesn't say if a full or limited pkey should be placed in the REQ (Hal?). It is designed so that the requestor can get a single reversible path and put that results into the REQ without additional processing, however the PR returns only one PKey and again, itis not really specified if it should be the full or limited pkey (Hal?). Basically this means that any pkey in the REQ could randomly be the full or limited value, and that in-of-itself has not bearing on the connection. So it is quite wrong to insist that the pkey be limited or full when processing the REQ. The end port is expected to match against the local table. The real answer to your trap problem is to fix the SM to not create paths that are non-functional, that is just flat out broken SM behavior. Jason