* [Qemu-devel] problems with dual ethernet networking
@ 2004-11-02 18:44 marco ghidinelli
2004-11-03 2:45 ` Jim C. Brown
0 siblings, 1 reply; 5+ messages in thread
From: marco ghidinelli @ 2004-11-02 18:44 UTC (permalink / raw)
To: qemu-devel
i'm unable to get a running configuration with a dual ethernet card with
qemu and vdeq.
i try with this commands:
vde_switch -daemon -sock /tmp/vde1.ctl
chmod 777 /tmp/vde1.ctl
vde_switch -daemon -sock /tmp/vde2.ctl
chmod 777 /tmp/vde2.ctl
vdeq qemu -sock /tmp/vde1.ctl,/tmp/vde2.ctl -nics 2 -hda vivian.img
and i got this message:
qemu: invalid fd for network interface 0
running:
vdeq echo -sock /tmp/vde1.ctl,/tmp/vde2.ctl -nics 2 -hda vivian.img
i got:
-tun-fd 3,5 -nics 2 -hda images/vivian.img
and looking in vl.c seems that qemu doesn't like very much the option
-tun-fd 3,5
is this option implemented? where i am wrong?
let me know.
bye!
--
BOFH excuse #10:
hardware stress fractures
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] problems with dual ethernet networking
2004-11-02 18:44 [Qemu-devel] problems with dual ethernet networking marco ghidinelli
@ 2004-11-03 2:45 ` Jim C. Brown
2004-11-03 9:35 ` Renzo Davoli
0 siblings, 1 reply; 5+ messages in thread
From: Jim C. Brown @ 2004-11-03 2:45 UTC (permalink / raw)
To: qemu-devel
On Tue, Nov 02, 2004 at 07:44:43PM +0100, marco ghidinelli wrote:
> i'm unable to get a running configuration with a dual ethernet card with
> qemu and vdeq.
>
> i try with this commands:
>
> vde_switch -daemon -sock /tmp/vde1.ctl
> chmod 777 /tmp/vde1.ctl
> vde_switch -daemon -sock /tmp/vde2.ctl
> chmod 777 /tmp/vde2.ctl
>
> vdeq qemu -sock /tmp/vde1.ctl,/tmp/vde2.ctl -nics 2 -hda vivian.img
>
> and i got this message:
>
> qemu: invalid fd for network interface 0
>
> running:
>
> vdeq echo -sock /tmp/vde1.ctl,/tmp/vde2.ctl -nics 2 -hda vivian.img
>
> i got:
>
> -tun-fd 3,5 -nics 2 -hda images/vivian.img
>
> and looking in vl.c seems that qemu doesn't like very much the option
> -tun-fd 3,5
>
> is this option implemented? where i am wrong?
No it is not implemented. vdeq is meant for only one sock at a time.
You may be able to get qemu to work by using -tun-fd 3 -tun-fd 5 tho (not sure),
but vdeq won't support that unless you change it.
> let me know.
>
> bye!
>
> --
> BOFH excuse #10:
>
> hardware stress fractures
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] problems with dual ethernet networking
2004-11-03 2:45 ` Jim C. Brown
@ 2004-11-03 9:35 ` Renzo Davoli
2004-11-03 12:40 ` [Qemu-devel] [patch] " Renzo Davoli
0 siblings, 1 reply; 5+ messages in thread
From: Renzo Davoli @ 2004-11-03 9:35 UTC (permalink / raw)
To: qemu-devel
> > vdeq qemu -sock /tmp/vde1.ctl,/tmp/vde2.ctl -nics 2 -hda vivian.img
> No it is not implemented. vdeq is meant for only one sock at a time.
Actually, it was implemented in qemu and vdeq used the multiple
-tun-fd option provided bu qemu.
Now I'll try to see what has happened inside the qemu code.
Stay tuned.
renzo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [patch] problems with dual ethernet networking
2004-11-03 9:35 ` Renzo Davoli
@ 2004-11-03 12:40 ` Renzo Davoli
2004-11-03 13:48 ` marco ghidinelli
0 siblings, 1 reply; 5+ messages in thread
From: Renzo Davoli @ 2004-11-03 12:40 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
On Wed, Nov 03, 2004 at 10:35:53AM +0100, Renzo Davoli wrote:
> Actually, it was implemented in qemu and vdeq used the multiple
> -tun-fd option provided bu qemu.
>
qemu has changed recently the option management, now it wants multiple
-tun-fd options for several tun interfaces (previously it accepted several
comma separated numbers).
I have just committed on cvs an updated version of vde that should be able
to work with multiple interfaces.
the -nics option should not be needed.
Sourceforge sometimes is late in updating the public access cvs, thus I
am sending here enclosed the patch for vdeq.c.
I have had no time to test it personally, please let me know if it works
correctly.
BTW: if you are connecting also several qemu machines on the same vde
network remember to change the MAC addresses!
The default configuration MAC is 52:54:00:12:34:56. (for eth0,
52:54:00:12:34:57 for eth1 etc.).
Several machines on the same network using the standard configuration
end up having the same MAC: networking does not work. i.e. it is a
net-does-not-work.
renzo
[-- Attachment #2: vdeq.diff --]
[-- Type: text/plain, Size: 1556 bytes --]
--- vde-1.5.7/qemu/vdeq.c 2004-11-03 12:57:35.185373176 +0100
+++ vde-1.5.8/qemu/vdeq.c 2004-11-03 13:11:43.333435072 +0100
@@ -78,12 +78,10 @@
unsigned char bufin[BUFSIZE];
-//struct pollfd pollv[]={{STDIN_FILENO,POLLIN|POLLHUP,0},{0,POLLIN|POLLHUP,0}};
struct pollfd *pollv;
char *filename;
char *vdeqname;
-char *numfd;
#define NUMW 10
static int countnics(const char *s)
@@ -169,19 +167,12 @@
perror("malloc nics");
exit(1);
}
- if ((numfd= (char *) malloc(nb_nics * NUMW * sizeof (char)))<0) {
- perror("malloc numfd");
- exit(1);
- }
for (i=0; i<nb_nics; i++) {
- char curfd[NUMW];
if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sp[i]) < 0){
perror("socketpair");
exit(1);
}
- snprintf(curfd,NUMW,"%d%c",sp[i][0],(i<nb_nics-1)?',':0);
- strcat(numfd,curfd);
}
if ((sockname= (char **) malloc(sizeof(char *) * nb_nics))<0) {
@@ -207,17 +198,21 @@
printf("as %s\n",argsock);
for (i=0; i<nb_nics; i++)
printf("%d -> %s\n",i,sockname[i]); */
- newargc=argc+3-args;
+ newargc=argc+1+(2*nb_nics)-args;
if ((newargv=(char **) malloc ((newargc+1)* sizeof(char *))) <0) {
perror("malloc");
exit(1);
}
newargv[0]=filename;
- newargv[1]="-tun-fd";
- newargv[2]=numfd;
+ for (i=0; i<nb_nics; i++) {
+ char numfd[10];
+ sprintf(numfd,"%d",sp[i][0]);
+ newargv[2*i+1]="-tun-fd";
+ newargv[2*i+2]=strdup(numfd);
+ }
- for (i=3;args<argc;i++,args++) newargv[i]=argv[args];
+ for (i=(2*nb_nics)+1;args<argc;i++,args++) newargv[i]=argv[args];
newargv[i]=0;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [patch] problems with dual ethernet networking
2004-11-03 12:40 ` [Qemu-devel] [patch] " Renzo Davoli
@ 2004-11-03 13:48 ` marco ghidinelli
0 siblings, 0 replies; 5+ messages in thread
From: marco ghidinelli @ 2004-11-03 13:48 UTC (permalink / raw)
To: qemu-devel
On Wed, Nov 03, 2004 at 01:40:25PM +0100, Renzo Davoli wrote:
> On Wed, Nov 03, 2004 at 10:35:53AM +0100, Renzo Davoli wrote:
> > Actually, it was implemented in qemu and vdeq used the multiple
> > -tun-fd option provided bu qemu.
> >
> qemu has changed recently the option management, now it wants multiple
> -tun-fd options for several tun interfaces (previously it accepted several
> comma separated numbers).
>
> I have just committed on cvs an updated version of vde that should be able
> to work with multiple interfaces.
> the -nics option should not be needed.
>
> Sourceforge sometimes is late in updating the public access cvs, thus I
> am sending here enclosed the patch for vdeq.c.
>
> I have had no time to test it personally, please let me know if it works
> correctly.
it works perfectly.
great.
> BTW: if you are connecting also several qemu machines on the same vde
> network remember to change the MAC addresses!
> The default configuration MAC is 52:54:00:12:34:56. (for eth0,
> 52:54:00:12:34:57 for eth1 etc.).
yes, of course! :)
> renzo
thankyou very much! :)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-03 13:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-02 18:44 [Qemu-devel] problems with dual ethernet networking marco ghidinelli
2004-11-03 2:45 ` Jim C. Brown
2004-11-03 9:35 ` Renzo Davoli
2004-11-03 12:40 ` [Qemu-devel] [patch] " Renzo Davoli
2004-11-03 13:48 ` marco ghidinelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).