From patchwork Wed Jan 6 10:33:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matan Barak X-Patchwork-Id: 7965851 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9DADBEEE5 for ; Wed, 6 Jan 2016 10:33:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B28820165 for ; Wed, 6 Jan 2016 10:33:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA13D2015E for ; Wed, 6 Jan 2016 10:33:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbcAFKdL (ORCPT ); Wed, 6 Jan 2016 05:33:11 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:34902 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102AbcAFKdK (ORCPT ); Wed, 6 Jan 2016 05:33:10 -0500 Received: by mail-oi0-f66.google.com with SMTP id e195so10647493oig.2 for ; Wed, 06 Jan 2016 02:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HJ3VvrcaCv2ATD1z+Q9/4eJT3IFb9heYrYQquY97Y8s=; b=NdMfGtZ0Gtm4oC0OjOyFaCWGoxUvqj+m7YJFFRc0IkOXRUyq295FlonXu0OGAi+Z1H x/TnDUYkFa2pRQ7N7Zf05fQHi5E7ixB2SWZJTZ1HvLVEoUD+n9Lj7K6tE7HG56ty4trV ZcVk5WZnecvkmleEOitTv9RFgDflZ50QBSkpoFDtvZH2sNC2K1ajU2+qCOzQN52ITb23 bz5PWNdGrROV5K/N0DKsRpQHqMVPMg7k3HYxA/0Y+HjB5mfAlEYf43OIFweMbSD8CC/J bWvfEEXXC1PZUmtn6C/EJvWgYM/AmbJD+cMDSLsHbWYFFGOTdoiD/pIffCxBASaEDqvF HeaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=HJ3VvrcaCv2ATD1z+Q9/4eJT3IFb9heYrYQquY97Y8s=; b=b/29iQ6cSi/2g7jgEruSx1sEBIOnTu8wJrHgmJ/ciFj8xlucb7SmSpLKvYY8INa76+ tLoJzBe+U/suF5hgY7AD/fHcynlqTBnS5nfQCSnr0GZvJ4PJpmNGiLh14YaeB337x5E3 JtHKxy7RRLxSoLfWVv239dt9FSFZmM1jqDmRorDD1TfA/kmJkbBJOcFli/PRPU5RuwU3 ZHQDMayF7f0NY5FsUBN1a0CJ6T7Q2fBmc8zOSTPSgPImz1I1Kt7ezrjNeWENHFj8sNie IUDahEWdSukRhg0ZbGZ6OoPLlIdlW/zEl0DtyEENRNftPg45/KKLpS/bONOLaPoeZU3q UbbA== X-Gm-Message-State: ALoCoQkYMZgarnHSsymADaAKdal6XoiIkl5bLVHV0iZQZokX/GY2KpZDFRdcGUeAC2D+LQszK1ImoU60wIjyhMhe0WjP6OW4uA== MIME-Version: 1.0 X-Received: by 10.202.58.136 with SMTP id h130mr61282542oia.89.1452076389365; Wed, 06 Jan 2016 02:33:09 -0800 (PST) Received: by 10.202.71.6 with HTTP; Wed, 6 Jan 2016 02:33:09 -0800 (PST) In-Reply-To: <26E3F92EC670BD429DB5CB319D773C13C4452BD0@nice.asicdesigners.com> References: <26E3F92EC670BD429DB5CB319D773C13C4452BD0@nice.asicdesigners.com> Date: Wed, 6 Jan 2016 12:33:09 +0200 Message-ID: Subject: Re: Unable to establish rdma connection, breaks rdma basic functionality From: Matan Barak To: Hariprasad S Cc: "dledford@redhat.com" , "linux-rdma@vger.kernel.org" , SWise OGC , Nirranjan Kirubaharan , Potnuri Bharat Teja Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jan 6, 2016 at 6:43 AM, Hariprasad S wrote: > > Hi Doug, > > I am trying to rping server, but it fails when bound to any address other then IF_ANY. > # rping -s -a 102.1.1.129 -C1 -p 9999 -vd > created cm_id 0x23d7800 > rdma_bind_addr: No such file or directory > destroy cm_id 0x23d7800 > > If bound to IF_ANY address, server starts but client fails to establish connection. > # rping -s -C1 -p 9999 -vvvd > created cm_id 0xc34800 > rdma_bind_addr successful > rdma_listen > > And the commit which introduced this regression is > > commit abae1b71dd37bab506b14a6cf6ba7148f4d57232 > Author: Matan Barak > Date: Thu Oct 15 18:38:49 2015 +0300 > > IB/cma: cma_validate_port should verify the port and netdevice > > Previously, cma_validate_port searched for GIDs in IB cache and then > tried to verify the found port. This could fail when there are > identical GIDs on both ports. In addition, netdevice should be taken > into account when searching the GID table. > Fixing cma_validate_port to search only the relevant port's cache > and netdevice. > > Signed-off-by: Matan Barak > Signed-off-by: Doug Ledford > > The bug is easily reproducible with latest rc and breaks basic rdma functionality. > Since 4.4 is already in -rc8, can we have a quick fix. > > Thanks, > Hari-- Hi, I don't have a iwarp server, so could you please test this simple fix: ret = ib_find_cached_gid_by_port(device, gid, port, ndev, NULL); Regards, Matan > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 2cbf9c9..351e835 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -439,7 +439,7 @@ static inline int cma_validate_port(struct ib_device *device, u8 port, if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port)) return ret; - if (dev_type == ARPHRD_ETHER) + if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) ndev = dev_get_by_index(&init_net, bound_if_index);