so in total there are 3 network devices as seen by the kernel
now how does the kernel decide to which network interface. to use while forwarding IP packet.
can some one please specify any link or document which answers the above question ?
I'm not sure that I'd understand your question correctly.
Linux will use a existing routing table and route a packet to the network interface depending from that.
You can google for 'linux route table' yourself, can't post a link, sorry.
Let's me explain you with a little example.
You can have a route table looking like this:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.1.0 * 255.255.255.0 U 0 0 0 wifi0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
So if IP packet dst field will be in 192.168.1.0/24 network, it will be forwarded to eth0, and if it will be at 172.16.1.0/24 it will be forwarded to wifi0. Other way it will be sent to default gateway.
Did I answered your question?
You can find more relevant info here.