From patchwork Fri Oct 7 23:24:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parav Pandit X-Patchwork-Id: 9367825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AB53E600C8 for ; Fri, 7 Oct 2016 23:24:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9746F297FD for ; Fri, 7 Oct 2016 23:24:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B3C52984C; Fri, 7 Oct 2016 23:24:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02B82297FD for ; Fri, 7 Oct 2016 23:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754018AbcJGXYf (ORCPT ); Fri, 7 Oct 2016 19:24:35 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:35220 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbcJGXYf (ORCPT ); Fri, 7 Oct 2016 19:24:35 -0400 Received: by mail-yb0-f195.google.com with SMTP id y19so1246065ybi.2 for ; Fri, 07 Oct 2016 16:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=D8TYO0cPMjrIEYA0hjmb9Skg0GJKoeeTtWYk6WR9SwA=; b=vFx1BvylmzMV/ZUNRAtv+s9UE84iAI5+pKgxnZLzquYAO1MRu7fnfCri2WC2IP6QvU DECz0KjN6vQPVII2HCRF6zuh98zCUXcZdN8fcaNKZN83yXthi+ZrVtHOPUXVyPuQgRhU +LPYALidgRVkDfnkJgMdPOo87GEAB/AC1c8g7QiojFbctSuJLOcZXSJ2XfR00+kPmYL1 VdCjMOb3Lk4p6I0tMQUyMVLRJfBEt6bT1m6YKjhNHaYi7LuLTphtXX9MtCnZWTDZ7ZKB MDbKWY8Xhbnubslb7amzW0sLt4Ar9XCp6DBvsduPi8OBQuIbJy5gCG0X/j1sdIYcItQL AQvA== 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:from:date :message-id:subject:to:cc; bh=D8TYO0cPMjrIEYA0hjmb9Skg0GJKoeeTtWYk6WR9SwA=; b=DbGl/C8C/qoUUogbypSTDxI1ypyLYKiI5xTpEEUSj23wcOZYQ1deoXryCfDNrQ7JNz K4VFl2/GdIfPIXwJ9m2kK2G9kgb5x+3xMeFHNeZlC8wCeuCww80ZDbS90OhUxkrLsjNe HUR8HUU466Qv5dfjfBdTgynaDQHbpoY0wMJxbbY9/EgZh7EdPYCLAbKnspAHo2s5HHIb TcY77Dsek5hGxiOY9LSmxmLCXnX2BFPqDFvvnuJwuvX2gs7ayETO2/b00K86MqrUz3uH INmvSZ9xEbAOF+SwXgKcYIEw9OEyBEUs8hlKeRmVQBQOlJStcWdBydQd4sF6roDwSxcN bPsg== X-Gm-Message-State: AA6/9RlKkPvjYI5/4GFDAjzH2a5N7VKC2x2/vC7dYo7DXRS6Vwdm11Nwh8+fVLSjbRE/zMwZ9ITWu5frnKweTw== X-Received: by 10.37.231.193 with SMTP id e184mr16391378ybh.99.1475882672333; Fri, 07 Oct 2016 16:24:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.195.66 with HTTP; Fri, 7 Oct 2016 16:24:31 -0700 (PDT) In-Reply-To: <9822c558-91d0-8d6a-8f64-07949d9fdaf7@sandisk.com> References: <9822c558-91d0-8d6a-8f64-07949d9fdaf7@sandisk.com> From: Parav Pandit Date: Sat, 8 Oct 2016 04:54:31 +0530 Message-ID: Subject: Re: [Bug 176901] New: Running ib_rdma_bw over rxe loopback triggers a kernel oops To: Bart Van Assche Cc: linux-rdma Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Bart, On Fri, Oct 7, 2016 at 10:19 PM, Bart Van Assche wrote: > Hello Parav, > > > Something else I was wondering about is whether or not the rdma_rxe driver > should allow being attached to a bridge interface? My take is it should not to avoid mis configurations. Below fix is required, which I tested to not allow on bridge type devices. I will send formal patch. err = -EINVAL; > Apparently the rdma_rxe > driver allows attaching to both the non-bridged and the bridged interfaces, > resulting in duplicate GIDs: > > # modprobe rdma_rxe > # brctl addbr virbr0 > # brctl addif virbr0 eth1 > # rxe_cfg add eth1 > # rxe_cfg add virbr0 > # rxe_cfg > Name Link Driver Speed NMTU IPv4_addr RDEV RMTU > eth0 yes virtio_net 1500 192.168.1.123 > eth1 no virtio_net 1500 rxe0 > virbr0 no bridge 1500 rxe1 > # (cd /sys/class/infiniband && grep -aH '' */ports/*/gids/0) > rxe0/ports/1/gids/0:fe80:0000:0000:0000:5054:00ff:fefd:2e4e > rxe1/ports/1/gids/0:fe80:0000:0000:0000:5054:00ff:fefd:2e4e > > Should it ever be allowed that two different ports have the same GID? > Not sure. It might be allowed LAG mode (at least IP based GID). I am not upto date of recent LAG updates from Leon. --- 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/sw/rxe/rxe_sysfs.c b/drivers/infiniband/sw/rxe/rxe_sysfs.c index cf8e778..7f4e0f3 100644 --- a/drivers/infiniband/sw/rxe/rxe_sysfs.c +++ b/drivers/infiniband/sw/rxe/rxe_sysfs.c @@ -90,7 +90,11 @@ static int rxe_param_set_add(const char *val, const struct kernel_param *kp) err = -EINVAL; goto err; } - + if (netif_is_bridge_master(ndev)) { + pr_err("bridge device %s is unsupported\n", intf); + err = -EINVAL; + goto err; + } if (net_to_rxe(ndev)) { pr_err("rxe: already configured on %s\n", intf);