From patchwork Wed May 24 18:14:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert LeBlanc X-Patchwork-Id: 9746743 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 0A01E601C2 for ; Wed, 24 May 2017 18:14:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0264F289A8 for ; Wed, 24 May 2017 18:14:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAB63289C7; Wed, 24 May 2017 18:14:57 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 CD216289A8 for ; Wed, 24 May 2017 18:14:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933374AbdEXSOz (ORCPT ); Wed, 24 May 2017 14:14:55 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:35209 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933130AbdEXSOy (ORCPT ); Wed, 24 May 2017 14:14:54 -0400 Received: by mail-oi0-f53.google.com with SMTP id l18so252185270oig.2 for ; Wed, 24 May 2017 11:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leblancnet-us.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e5zpxNiaYLOivq8GCiCJUVDFBmMgR2Zjn5S56bdIUwg=; b=YQhW43vfYb3ENi2hZ6Ed9NTqCeeNsEV+ndWH6rvT59mHuQLwApFB4cM7EJk0TB6H5u CoAfU1OrMQ/kyOsXS6WbEoLngUNfknInJ756ddeXeEaPsxf2+nGc5y9J7ZVJO/7IKDaj d/aiqWF1FqmG8k0TZWhPgtUOfq2SfTmJn0zDSjHMt+lRpvMGteoGjgoaB8DOY8kBSg4s 1R+u7bbMzuL03a3yKENO5l/tu3JGGsfAp9RFKx/B1EWqHhCvs9Q0AZJtkQbG8t2iaqsz /DUXEGUpSVQoCLgrbc4F3uRIkFLSX2MF21u55iroCJU8+rYLAkEH7h5ECH9p+VseoFYA c4cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e5zpxNiaYLOivq8GCiCJUVDFBmMgR2Zjn5S56bdIUwg=; b=Ajm/GMFBzU0OO88e9icIRRvu3NzyX3W/dG/bWL7uo7KR3sW6nl5HAIbO7G/VT7oCs7 bn7Ae1WUshysn7K9Mu4k5sf5FeCub0OOzx7+inP1aXa5StVS/x3i5mUG615LGcut/nu5 FLxsbPfhKgMdKx40vp3AiCVBIZP49tlZmv6yb/IE8gBe2G/Sc9w4UtgyNENsLNZWEjni 4U19+j0f/fLhGTNjSb3edRJuCasVXESskZz06H7KTKTy/n35V9SciBRkE20K7cZVuuC/ JjJyAbpWn0WDB4JM8/bRVYEHg6N0KZRRWiMnI3/wZydt5Ajgxf4NrHYLMQtWh7H/GllV BJiQ== X-Gm-Message-State: AODbwcAr/pvsWOjRUzBbJLI/AVH74hr++zez8TD2GDH6daZm4MJpOUy4 D2MPG/34ATeDaRHdDrXLR8OmdjYfKcZl X-Received: by 10.157.40.10 with SMTP id m10mr5647140otb.85.1495649694118; Wed, 24 May 2017 11:14:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.23.17 with HTTP; Wed, 24 May 2017 11:14:53 -0700 (PDT) X-Originating-IP: [2604:ba00:2:1:5556:2a70:9ddb:513b] In-Reply-To: References: From: Robert LeBlanc Date: Wed, 24 May 2017 12:14:53 -0600 Message-ID: Subject: Re: iSER with policy based routing error To: Or Gerlitz , Sagi Grimberg 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 On Tue, May 23, 2017 at 5:17 PM, Robert LeBlanc wrote: > I could not replicate ping6 working today without passing the -I > parameter. I created https://github.com/linux-rdma/rdma-core/pull/136 > and now you can pass -I to rping to have it bind to a source address > just like ping and the rules and additional routing table works for > rping. > > However, iSER is not able to find a network route. Where do you think > I should look next? It seems that RDMA_CM is able to work properly if > given the right information. > > Thanks, > Robert > ---------------- > Robert LeBlanc > PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1 > > Looks like the bug is in iSER, it is always passing NULL for the source address. Hard coding the source IP address allows the connection to work fine. It seems for some reason, it is not using the information from the iface that we configured. I can try to create a patch, but I'm not sure where to query the ifaces for the required info. If you can point me in the right place, I can give it a shot. Thanks, ---------------- Robert LeBlanc PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1 --- 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/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 5a887ef..e9741df 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -59,6 +59,7 @@ #include #include #include +#include #include @@ -814,6 +815,10 @@ static int iscsi_iser_get_ep_param(struct iscsi_endpoint *ep, int err; struct iser_conn *iser_conn; struct iscsi_endpoint *ep; + struct sockaddr_in s_addr; + memset(&s_addr, 0, sizeof(s_addr)); + s_addr.sin_family = AF_INET; + s_addr.sin_addr.s_addr = in_aton("192.168.13.14"); ep = iscsi_create_endpoint(0); if (!ep) @@ -829,7 +834,8 @@ static int iscsi_iser_get_ep_param(struct iscsi_endpoint *ep, iser_conn->ep = ep; iser_conn_init(iser_conn); - err = iser_connect(iser_conn, NULL, dst_addr, non_blocking); + //err = iser_connect(iser_conn, NULL, dst_addr, non_blocking); + err = iser_connect(iser_conn, (struct sockaddr *) &s_addr, dst_addr, non_blocking); if (err) goto failure; diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index c538a38..6ce1845 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -953,6 +953,7 @@ int iser_connect(struct iser_conn *iser_conn, sprintf(iser_conn->name, "%pISp", dst_addr); iser_info("connecting to: %s\n", iser_conn->name); + iser_err("connecting from: %p\n", src_addr); /* the device is known only --after-- address resolution */ ib_conn->device = NULL;