After some puzzling I was able to compile, load and use the
HyperSCSI client(!) module in Xen's domain 0.
It reported that it found the eth0 interface, but that there are no
HyperSCSI servers on the local network.
The same try with booting a "normal/standard" kernel on the same machine
worked out OK, so it's a problem with Xen's VFR, I think.
Then I added the following code to ..../xen/common/network.c as a quick
hack:
net_vif_t *net_get_target_vif(u8 *data, unsigned int len, net_vif_t
*src_vif)
{
.....
nh_raw = data + ETH_HLEN;
switch ( ntohs(*(unsigned short *)(data + 12)) )
{
....
case ETH_P_IP:
if ( len < (ETH_HLEN + 20) ) goto drop;
h_raw = data + ((*(unsigned char *)(nh_raw)) & 0x0f) * 4;
/* NB. For now we ignore ports. */
target = net_find_rule((u8)ETH_P_IP, *(u8 *)(data + 9),
ntohl(*(u32 *)(nh_raw + 12)),
ntohl(*(u32 *)(nh_raw + 16)),
0,
0,
src_vif_val);
break;
// ===>> new code for routing HyperSCSI ether packets...
case ETH_P_HSCSI:
//no len drops yet...
if (src_vif != VIF_PHYS) //If it originates from a VIF....
return VIF_PHYS; //...send it to the phys. interface
else
return find_vif_by_id(0); //If it originates from the
//phys.
interface(LAN)...
//...send it to VIF0
of dom0.
break; //not reached...
}
return target;
.....
}
I tried to route any incoming ether packets of type ETH_P_HSCSI
which came from the physical interface to the first VIF
of domain 0.
Also any HSCSI packets going out from the first VIF of domain 0
should always go to the physical interface.
Currently, I don't care about MAC-Address controled routing
and other fine tuning.
I only want to make it work with domain0 for now.
How is this done correctly ???? (Of course, the above code did NOT work ;-)
Perhaps one of the Xen developers is able to give some comments ?
Thanks a lot :)
After reading a lot of the network sources of Xen, I have some
questions left:
1.) I am not sure about the exact difference between VIF_PHYS and
VIF_PHYSICAL_INTERFACE ?
2.) What exactly is the meaning and use of VIF_SPECIAL ?
3.) I am not really understanding the use of VIF_DOMAIN_SHIFT and
VIF_DOMAIN_MASK (some way to identify the domain # only from
the id by shifting ?) ?
Any help and comments are apreciated.
It would be really nice to get HyperSCSI to work in Xen.
Thanks for this great software :))
Best Regards
Sven
--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|