From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30183C742D1 for ; Fri, 12 Jul 2019 17:42:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3CBC204EC for ; Fri, 12 Jul 2019 17:42:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="LC5r0LDD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727053AbfGLRmW (ORCPT ); Fri, 12 Jul 2019 13:42:22 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:35095 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727028AbfGLRmV (ORCPT ); Fri, 12 Jul 2019 13:42:21 -0400 Received: by mail-qt1-f194.google.com with SMTP id d23so8957262qto.2 for ; Fri, 12 Jul 2019 10:42:21 -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:in-reply-to:user-agent; bh=3O32Kyq6oSJ1qa7toJHZZ9UJwAgNuju3KRmfxEHI8bQ=; b=LC5r0LDDWh4BCxxQAgMDccQsgHNbKdSIzUaME2cre/oHB3xGOfm5djQo5dU71oDT20 0kihFyTgPyY1P6nXSAF3hhpaSbHw3cixIdOyJFNDPSTdx/9z6pQgN8KTogdgIxpumS2G SL/nu+SYkLsC7Jk2Wsh8ntoveNraL10w9ipdraGe6hnPVGJXczioSrTwBYNV10HfFL8H 5YAyvHrRVuCfmgMxbuhbyFQbS6keetepHK8XxE/MtdF5kR29KXTtmlNOVMkD/kgxK3VO 7lotP2jZLki0wZrXVOx77+ww11yFk6BAy7LDmfErx7QsqWFgocmFvvn6JsxytcuyZA/K OdZA== 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:in-reply-to:user-agent; bh=3O32Kyq6oSJ1qa7toJHZZ9UJwAgNuju3KRmfxEHI8bQ=; b=j+PF6K/srVkI6Oxc2MT4og66m1ZHIuGqdh0+f77NUPKgFVmPD4v0i9YcmIoKxUYU9Y Jsvabc4708ULBD1h72ipTAcIaCMNzzUHUCpxxg+uEliodPWlw6tn5gWtOYvVIzBR/XQA SW3FpXLfwBX+sghmvg/Dd8YLAJMl7LVWfRTtPU5D0rAQWGpmCr9XQ5UOOUHXmfou3fqa r2jvEAAH+gGrwUVhC2WogjZj9mfjPOxBmgxG/90weWRqVp6ILbiTMt7AtURmQ0GNnmfS PC4za18GqZgg9+YtdWonidwpnojBySwfkxoSOVJvL1mb/t7aHhBDDOq2ssxSl4KlOkqe qXmw== X-Gm-Message-State: APjAAAUGFAztIBcucQvzK9FI3eiy8Dow5ccttR0TP5n/ntz1yrAtPMcC SB3ANEohxiA0JJIUvMfrGd+p4BbcZYVZ7w== X-Google-Smtp-Source: APXvYqwsq+dBel5Hn8pHqLq0F0nE+qD0pvdFMR/gu9SpDJgObwHHtFiugfMDsGXPAyVOZ2RX5wfsrw== X-Received: by 2002:ad4:4a92:: with SMTP id h18mr7877218qvx.235.1562953341056; Fri, 12 Jul 2019 10:42:21 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id i27sm3818246qkk.58.2019.07.12.10.42.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jul 2019 10:42:20 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hlzYq-0003pT-5V; Fri, 12 Jul 2019 14:42:20 -0300 Date: Fri, 12 Jul 2019 14:42:20 -0300 From: Jason Gunthorpe To: Selvin Xavier Cc: Parav Pandit , Yi Zhang , Daniel Jurgens , "linux-rdma@vger.kernel.org" , Devesh Sharma , "linux-nvme@lists.infradead.org" Subject: Re: regression: nvme rdma with bnxt_re0 broken Message-ID: <20190712174220.GL27512@ziepe.ca> References: <66d43fd8-18e8-8b9d-90e3-ee2804d56889@redhat.com> <20190712154044.GJ27512@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Fri, Jul 12, 2019 at 09:59:38PM +0530, Selvin Xavier wrote: > > bnxt guys: please just delete this duplicate detection code from the > > driver. Every GID provided from the core must be programmed into the > > given gid table index. > > Jason, > This check is required in bnxt_re because the HW need only one entry > in its table for RoCE V1 and RoCE v2 Gids. The HW doesn't have a 'GID table' if it has this restriction. It sounds like it has some 'IP table' or maybe 'IP and VLAN' table? So the driver must provide a full emulated 'GID Table' with all the normal semantics. Which looks sort of like what the add side is doing, other than the mis-naming it seems reasonable.. But then I see this in re_create_ah: /* * If RoCE V2 is enabled, stack will have two entries for * each GID entry. Avoiding this duplicte entry in HW. Dividing * the GID index by 2 for RoCE V2 */ ah->qplib_ah.sgid_index = grh->sgid_index / 2; Which seems completely wrong - that is making assumptions about the layout of the gid table that is just not allowed. Surely it needs to access the per-gid driver context that add_gid set and use the index into the sgid_table from there? Jason