On 03/02/2010 02:42 PM, Or Gerlitz wrote:
As for the IB device name and port number, indeed they don't change
normally, but OTOH the rdma-cm api which iser is using is IP base and
reolves IB local/remote addresses (= GUIDs which relate to
devices/ports) from IP addresses/routing rules and not the other way
around.
Maybe that is where I am missing your point. One of the reasons for this
is to tell the kernel to ignore the routing rules and use the port we
want. So I was saying if there is no a API to do this then just add one
like someone did for tcp and the socket code.
Assuming the interface you want to use does what we want then let's use
it and move on.
I understand using IP is a bit problematic when DHCP is used for the
initiator, let me think about that a bit, thanks
How about this.
We can add a:
ISCSI_UEVENT_TRANSPORT_EP_CONNECT_THROUGH_SRC = UEVENT_BASE + 20
And for that we can pass the src addr after the dest addr like how you
wanted.
For userspace, I think it is wrong to make the user interface based on
the kernel API. If we used something like the name you see in ifconfig
(ibX is the default for most drivers I think) then users can set the
iface.net_ifacename to it. iscsid can just loop over the interfaces and
match ibX with the ip and pass that down. The loop would be pretty much
the same as in get_hwaddress_from_netdev() where we loop over the
interfaces but it would do
transport.c:
iser_transport {
.ep_connect = iser_ep_connect;
};
somewhere.c:
getifaddrs()
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
iser_ep_connect()
if (!strcmp(ifa->ifa_name, match_name))
ktransport_ep_connect(.... ifa->ifa_addr);
netlink.c
ktransport_ep_connect(.... , struct sockaddr *src_addr)
{
if (srcaddr)
ec->type = ISCSI_UEVENT_TRANSPORT_EP_CONNECT_THROUGH_SRC
else if
else
.....
memcpy(setparam_buf + sizeof(*ev), dst_addr, addrlen)
if (srcaddr)
memcpy(setparam_buf + currlen, src_addr, src_addrlen)
}
For the userspace interface for the user we can do pretty much anything.
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.