Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5002977imm; Mon, 14 May 2018 17:40:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp4PYUnv8WPmg6TQSRs7RfoEK/xKsOxjPeLUBS3jU1DqzoJnHkzK4h585bTWlKQ8QVMsMjz X-Received: by 2002:a63:b742:: with SMTP id w2-v6mr10081855pgt.343.1526344841289; Mon, 14 May 2018 17:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526344841; cv=none; d=google.com; s=arc-20160816; b=x8zGBnwtYz1MOofrgKs6dXGENwV+9MHWj/kL6Rr4PLbemEeL2wxtKrsjQNO4gy6Geh X5MHKqFo7RSNJH1S2Jg77mk6VIr/sla9q5sxKZKRYd2IQS+Pp9mM5FTolclgbuo1N8Xu MgbErE28G7b2VgXBqa7IfOxnHecJjR6Zy3LQbUjYdZwhkDfxAto55ENiO+rI9DvKBG/r 151qdOo7Mi6JXzvWXPpcFo83MOrGwrLnG+Tphd1ud88i67RIG0r2Xverai+XdxAXvTd2 poRb6yvIV8Zg20c0wC6wGU+c6phXHJf2O0Yfy2bVxvhOARt54uWw4EezVBzuNqeD0SLR v1zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=UMlOBlwBZzEVPA0YOoSveIwPzDpQgbJvcYrsAbpcFAs=; b=ZdAC2Efp80kHeOTfQ6vE5KzIwQBNzHd+hchhSSvNeB3jh4EojsADuc6+r7uaIQZ7b0 XXFu+6bJAXKq+J8ELiwNR0AG5kXnoaXEFQmtFCuTMoX1HDZFLen9jkPmANb9ecfWzmD7 H6NvX5q+8D/JeaswXeXrqYeFWnVEV6AqqsaaOeRkL/80LrR3caQf/wWmcBI09FVQYtZm zP2SliEzHoNhrzL+S8zO9nclZeEarlChQmefKC1XYmnc9MkhqpkSLnY9/sCYAdjio6/K CDABEBDJBTEQ/Xe9AsZ6/Otezf+QdXbfTngwh6zyvF7NZdkfbkJiKILe/8ZziqwFYsiG Va7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dev-mellanox-co-il.20150623.gappssmtp.com header.s=20150623 header.b=mj1sPzkk; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.co.il Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v17-v6si8212958pgb.380.2018.05.14.17.40.26; Mon, 14 May 2018 17:40:41 -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=@dev-mellanox-co-il.20150623.gappssmtp.com header.s=20150623 header.b=mj1sPzkk; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.co.il Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752537AbeEOAiy (ORCPT + 99 others); Mon, 14 May 2018 20:38:54 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:36863 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752416AbeEOAix (ORCPT ); Mon, 14 May 2018 20:38:53 -0400 Received: by mail-qk0-f181.google.com with SMTP id l132-v6so11597586qke.3 for ; Mon, 14 May 2018 17:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UMlOBlwBZzEVPA0YOoSveIwPzDpQgbJvcYrsAbpcFAs=; b=mj1sPzkkQ1cAUqs/pC1SR9gpt8QW+LpJZAq2Md82KSDNoGWsUbH6k4h5qJPHhiV7AF T2CcfFCP9spd3yxjKVys28bKYHfec3L9eX2HQLAYdMlDU2GKesYhcI7vVa/HEbl7tJWE HshfyV+pN09Ufw0nBwB6p2tQ0CrQHDXbnN+YsacH2Kju8pZYNSdibkjhbElpYN0QKYtT OUDfUPFwSsqsq7+X/Uha+un+xMMG39EnTFaLq/Q6/8GCvKF7bdcQGJUZ+Sm5VxPjigfM 6461cz7K+rhCbWUxuFKnL2JfH7DKLwS5wLxUSzx3tICvtGJiIGFVSxWRJHuVJ2PLpn5Y r5bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UMlOBlwBZzEVPA0YOoSveIwPzDpQgbJvcYrsAbpcFAs=; b=qe034z0y9st+q/6jI734W6a0r4u960NGSkMzIBcapQenHyGRzmiDvQy0DXwCGQl2cU DKJmW4MwmnPEAT3pQ2qC0sNCBLPY80C+uhEi4WXlu5zSzcByyqKbUpcuTvr3WGBuu4aK Q9YsGCQpw4ODCZ1qHEx6uJALRfUO3tcHqUqSAm9w4ceQC7s98SaSFwLgTud+vx0/A2mA C55OxxA+JxQiUyIxTqQ3bloFTuW9qK2+EgsIyLoifqEHpcIyqZUsPZ4m1K9kDx26uvR0 rDB7pRkfGQfIKDTOHMmW0sGZME7ReXIJ8rj23EVVxlaKsyY94vztZOv6J9a6qWfFQ+e+ 2zOQ== X-Gm-Message-State: ALKqPweO3NABQ4fyKrmOAqjgyJJdAH+6ZBxBh2EQxRyA7KIc9ZAYAY5D WHVA1iquVzd5yagB89zq+4xNDQw5 X-Received: by 2002:a37:7f02:: with SMTP id a2-v6mr10662498qkd.414.1526344732119; Mon, 14 May 2018 17:38:52 -0700 (PDT) Received: from [192.168.1.183] (c-73-182-207-166.hsd1.ma.comcast.net. [73.182.207.166]) by smtp.googlemail.com with ESMTPSA id d88-v6sm8897839qkj.25.2018.05.14.17.38.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 17:38:50 -0700 (PDT) Subject: Re: [PATCH IB/core 2/2] IB/cm: Send authentic pkey in REQ msg and check eligibility of the pkeys To: Jason Gunthorpe , =?UTF-8?Q?H=c3=a5kon_Bugge?= Cc: Doug Ledford , Don Hiatt , Ira Weiny , Sean Hefty , OFED mailing list , linux-kernel@vger.kernel.org References: <20180509093020.24503-1-Haakon.Bugge@oracle.com> <20180509093020.24503-3-Haakon.Bugge@oracle.com> <3bee76df-49a6-cf3c-6df4-749a6309358e@dev.mellanox.co.il> <20180514210200.GN21531@ziepe.ca> From: Hal Rosenstock Message-ID: Date: Mon, 14 May 2018 20:38:47 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180514210200.GN21531@ziepe.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/14/2018 5:02 PM, Jason Gunthorpe wrote: > 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?). CM spec for REQ just says partition key without indicating whether this means P_Key or just the partition (15 bits) so my read is that either full or limited pkey is allowed in REQ. > 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, > it is not really specified if it should be the full or limited pkey > (Hal?). Correct; it's not specified. > 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. Note that there is thorny issue with shared (physical) port virtualization. In shared port virtualization, the VF pkey assignment is a local matter. Only thing SM knows is the physical port pkeys where both full and limited membership of same partition is possible. It is conceivable that CM REQ contains limited partition key between 2 limited VFs and for that a new REJ reason code appears to be needed. -- Hal > 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 >