osinstom / P4-OvS

Bringing the power of P4 to OvS!
Apache License 2.0
73 stars 15 forks source link

fail to add br0 with ovs-vsctl: "No column p4 in table Bridge." #8

Open Benature opened 3 years ago

Benature commented 3 years ago

hello, I follow the demo but the output is different, and br0 is failed to add.

> sudo ovs-vsctl add-br br0 -- set bridge br0 datapath_type=ubpf p4=true
2021-04-09T07:18:16Z|00002|ovsdb_idl|WARN|Bridge table in Open_vSwitch database lacks p4 column (database needs upgrade?)
2021-04-09T07:18:16Z|00003|ovsdb_idl|WARN|transaction error: {"details":"No column p4 in table Bridge.","error":"unknown column","syntax":"{\"datapath_type\":\"ubpf\",\"name\":\"br0\",\"p4\":true,\"ports\":[\"named-uuid\",\"row1e100d69_6852_4639_adec_6757a9d3cabf\"]}"}
ovs-vsctl: transaction error: {"details":"No column p4 in table Bridge.","error":"unknown column","syntax":"{\"datapath_type\":\"ubpf\",\"name\":\"br0\",\"p4\":true,\"ports\":[\"named-uuid\",\"row1e100d69_6852_4639_adec_6757a9d3cabf\"]}"}

> sudo ovs-vsctl show
2021-04-09T07:18:33Z|00001|ovsdb_idl|WARN|Bridge table in Open_vSwitch database lacks p4 column (database needs upgrade?)
0c65f634-62bc-47e6-9b60-f5698f360229
    Manager "ptcp:6640"
    ovs_version: "2.15.0"

which is different from

Add OVS bridge of type "p4" without any initial P4 program configured:

$ ovs-vsctl add-br br0 -- set bridge br0 datapath_type=ubpf p4=true

You should see the following message in the logs:

bridge|WARN|bridge br0: P4 target binary not provided. Initializing P4 datapath with no P4 program!
osinstom commented 3 years ago

Hi, please make sure you use a correct version of ovsdb (compiled from the P4-OvS repository). The output of ovs-vsctl show shows ovs_version: "2.15.0", while this repository is based on 2.13.

Benature commented 3 years ago

thank you, I reinstall ovs with version 2.13.0, no WARN anymore.

However, I face the same issue that is similar to the first question in #9

user@user-VirtualBox ~/p/P4-OvS> 
sudo ovs-vsctl add-br br0 -- set bridge br0 datapath_type=ubpf p4=true

^C2021-05-07T06:29:12Z|00002|fatal_signal|WARN|terminating with signal 2 (Interrupt)

The output stucked and I wait for a long time without any response.

Benature commented 3 years ago

I follow https://github.com/osinstom/P4-OvS/blob/p4/Documentation/intro/install/general.rst to install ovs

git clone https://github.com/openvswitch/ovs.git
git checkout v2.13.0
./boot.sh
./configure --prefix=/usr 
make
sudo make install

but when I run ovs-vsctl show, the output is

user@user-VirtualBox ~/p/P4-OvS> sudo ovs-vsctl show
96c7683c-52cf-46e0-bd6d-709b2f37bf5c
    Bridge br0
        p4: true
        datapath_type: ubpf
        Port br0
            Interface br0
                type: internal
    ovs_version: "2.14.90"

Seems that the ovs version is not 2.13.0 but 2.14.90. Are there some steps that I miss?

wangshuai199398 commented 2 years ago

I have the same problem. Have you solved it now?

Benature commented 2 years ago

@wangshuai199398 nop

AaryaaRam commented 1 year ago

I am also facing the same issue, I am using the 2.17.7 ovs_version