Hi,
It works, now i have successfully cross compiled ovs-openflowd, and i will
test it on Android later. Thanks

Now there is an interesting problem with ./ovs-dpctl show command.
It will silently create many dpx devices in /dev/net. Let me show you the
concrete process:
1.
insmod /sdcard/openvswitch_mod.ko
# ls -l /dev/net
/dev/net: No such file or directory

2.
# cd /data/local/bin/
# ./ovs-dpctl add-dp dp0
makedev 248 0
mknod /dev/net/dp0
# ls -l /dev/net/
crwx------ root     root     248,   0 2011-02-04 15:32 dp0

Here, it works normally, "makedev 248 0" and "mknod /dev/net/dp0" are the
print information i added in
the make_openvswitch_device fuction of dpif-linux.c, to track if the
function is called and device is created.

3.
# ./ovs-dpctl show dp0
makedev 248 0
system@dp0:
    flows: cur:0, soft-max:1024, hard-max:1048576
    ports: cur:1, max:1024
    groups: max:16
    lookups: frags:0, hit:0, missed:0, lost:0
    queues: max-miss:100, max-action:100
    port 0: dp0 (internal)
# ls -l /dev/net/
crwx------ root     root     248,   0 2011-02-04 15:32 dp0

Here, it works normally, because mknod in make_openvswitch_device is not
called again.

4.  but if there in argument dp0, it has a problem: it creates extra 254
devices in /dev/net/
# ./ovs-dpctl show
makedev 248 0
system@dp0:
    flows: cur:0, soft-max:1024, hard-max:1048576
    ports: cur:1, max:1024
    groups: max:16
    lookups: frags:0, hit:0, missed:0, lost:0
    queues: max-miss:100, max-action:100
    port 0: dp0 (internal)
makedev 248 1
mknod /dev/net/dp1
makedev 248 2
mknod /dev/net/dp2
makedev 248 3
mknod /dev/net/dp3
makedev 248 4
mknod /dev/net/dp4
makedev 248 5
....
....
....
....
makedev 248 252
mknod /dev/net/dp252
makedev 248 253
mknod /dev/net/dp253
makedev 248 254
mknod /dev/net/dp254
makedev 248 255
mknod /dev/net/dp255


# ls -l /dev/net/
crwx------ root     root     248, 255 2011-02-04 15:42 dp255
crwx------ root     root     248, 254 2011-02-04 15:42 dp254
crwx------ root     root     248, 253 2011-02-04 15:42 dp253
crwx------ root     root     248, 252 2011-02-04 15:42 dp252
crwx------ root     root     248, 251 2011-02-04 15:42 dp251
crwx------ root     root     248, 250 2011-02-04 15:42 dp250
crwx------ root     root     248, 249 2011-02-04 15:42 dp249
crwx------ root     root     248, 248 2011-02-04 15:42 dp248
....
....
....
crwx------ root     root     248,   6 2011-02-04 15:42 dp6
crwx------ root     root     248,   5 2011-02-04 15:42 dp5
crwx------ root     root     248,   4 2011-02-04 15:42 dp4
crwx------ root     root     248,   3 2011-02-04 15:42 dp3
crwx------ root     root     248,   2 2011-02-04 15:42 dp2
crwx------ root     root     248,   1 2011-02-04 15:42 dp1
crwx------ root     root     248,   0 2011-02-04 15:32 dp0


The problem also happens on my PC-based ovs, i don't know if it is because
my configure problem.
My configure for PC compile is as follows:
 ./configure --with-l26=/lib/modules/`uname -r`/build

My configure for Android compile is as follows:
./configure ovs_cv_use_linker_sections=no
-with-l26=~/android/kernel/droid/omap KARCH=arm

Did anyone encounter the same problem?






2011/2/4 Ben Pfaff <b...@nicira.com>

> On Fri, Feb 04, 2011 at 02:51:36PM -0800, Yongqiang Liu wrote:
> > So far there is a weird problem when i cross compiled ovs-openflowd, it
> is
> > following:
> >
> > vconn.o: In function `.LANCHOR0':
> > vconn.c:(.data.rel.ro.pvconn_classes+0x0): undefined reference to
> > `ptcp_pvconn_class'
> > vconn.c:(.data.rel.ro.pvconn_classes+0x4): undefined reference to
> > `punix_pvconn_class'
> > vconn.o: In function `.LANCHOR1':
> > vconn.c:(.data.rel.ro.vconn_classes+0x0): undefined reference to
> > `tcp_vconn_class'
> > vconn.c:(.data.rel.ro.vconn_classes+0x4): undefined reference to
> > `unix_vconn_class'
> > collect2: ld returned 1 exit status
> >
> > but i can not find the definition of the above xxx_xconn_class in ovs
> source
> > code, it is search result:
> >
> > grep tcp_vconn_class ./* -r
> >
> > ./lib/vconn.c:    &tcp_vconn_class,
> > Binary file ./lib/vconn-stream.o matches
> > ./lib/vconn-provider.h:extern struct vconn_class tcp_vconn_class;
> >
> > i also searched the keywords by google, but got nothing.
> >
> > So anyone can give me some clues to solve the problem?
>
> These are defined with macros at the end of lib/vconn-stream.c.  I can
> see how this is confusing.  I think we can do a little better; I'll send
> out a patch.
>
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org

Reply via email to