From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: Re: iSER with policy based routing error Date: Thu, 25 May 2017 19:03:20 +0300 Message-ID: References: <20170524192550.GB25200@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Robert LeBlanc Cc: Jason Gunthorpe , Sagi Grimberg , linux-rdma List-Id: linux-rdma@vger.kernel.org On Wed, May 24, 2017 at 10:41 PM, Robert LeBlanc wrote: [...] > I want to get the source address (iface.ipaddress) from the iface > (eth0iser in this case) and pass that into iser_connect(). I'm just > not sure how to do that and where the best place to do that is. That > is what I need some help understanding. Any push in the right > direction is appreciated. Is the iface info parsed by the base iscsi > code and then put into a struct that I can query? I sure hope it is > that easy, but I'm having difficulty locating that code. If you get the source address into the iscsi initiator UAPI it would be very simple kernel code change to get that to iser_connect --> rdma_resolve_address as you indicated. Currently only the dst address is passed from user-space, to see it clone [1] and look $ vim usr/netlink.c +/ktransport_ep_connect see there memcpy(setparam_buf + sizeof(*ev), dst_addr, addrlen); for the kernel side of things look here $ vim drivers/scsi/scsi_transport_iscsi.c +/ep_connect see there dst_addr = (struct sockaddr *)((char*)ev + sizeof(*ev)); ep = transport->ep_connect(shost, dst_addr, non_blocking); Or. [1] https://github.com/open-iscsi/open-iscsi.git -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html