Code_flow

6 views
Skip to first unread message

kundra

unread,
Feb 1, 2012, 11:16:44 AM2/1/12
to open-iscsi
To Developer's
I have studied the netlink interface What i have understood from code
study is that the request goes to the iscsi layer through the netlink
interface after then the iscsi_tcp forwards the request through the
network
In response the iscsi_tcp Interface receives the response , then
response being read through the netlink interface , But issue is that
where the both netlink and iscsi_tcp interface are combining , they
are both seems to be different interfaces . Not able to find the
connection between them at any phase . Hope for instant reply

Regards
Anshul Kundra

Mike Christie

unread,
Feb 1, 2012, 5:09:12 PM2/1/12
to open-...@googlegroups.com, kundra

Not sure what you mean exactly.

iscsid will use the code in open-iscsi/usr/netlink.c to send down
netlink requests. To do this it will open a netlink socket to the kernel
code. The kernel side is in
your-linux-kernel-source/drivers/scsi/scsi_transport_iscsi.c. In there
you see when the module loads it will setup the kernel recv side of the
netlink socket.

When iscsid sends down a nl request, scsi_transport_iscsi.c will recv
it, process the header to figure out what driver (iscsi_tcp, ib_iser,
bnx2i, etc) to use, scsi_transport_iscsi.c will then call the driver's
struct iscsi_transport callout (note that the kernel and userspace have
structs called iscsi_transport, but they are not related) for the request.

Reply all
Reply to author
Forward
0 new messages