openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

The datapath is inconsistent with the flow table #297

Closed bettswang closed 11 months ago

bettswang commented 11 months ago

Hi,everyone

In my local experiments, I found a problem with the datapath not matching the actual flow table. I couldn't understand that how it be that? The flow table tell me output is port2 , but output is port4 in the datapath. I will really appreciate if someone can tell me.

root@ubuntu2204:~/faucet/inst# ovs-vsctl show
839a3e7f-b874-438f-91f5-a64087064608
    Bridge br0
        Controller "tcp:127.0.0.1:6653"
            is_connected: true
        Port ens36
            Interface ens36
        Port ens37
            Interface ens37
        Port ens39
            Interface ens39
        Port ens38
            Interface ens38
        Port br0
            Interface br0
                type: internal
    ovs_version: "3.2.90"

root@ubuntu2204:~/faucet/inst# ovs-appctl ofproto/trace br0 in_port=ens36,dl_src=00:11:11:00:00:00,dl_dst=00:22:22:00:00:00 -generate
Flow: in_port=1,vlan_tci=0x0000,dl_src=00:11:11:00:00:00,dl_dst=00:22:22:00:00:00,dl_type=0x0000

bridge("br0")
-------------
 0. in_port=1,vlan_tci=0x0000/0x1fff, priority 4096, cookie 0x5adc15c0
    push_vlan:0x8100
    set_field:4196->vlan_vid
    goto_table:1
 1. in_port=1,dl_vlan=100,dl_src=00:11:11:00:00:00, priority 8191, cookie 0x5adc15c0
    goto_table:4
 4. priority 0, cookie 0x5adc15c0
    goto_table:5
 5. dl_vlan=100, priority 8192, cookie 0x5adc15c0
    pop_vlan
    output:1
     >> skipping output to input port
    output:2

Final flow: unchanged
Megaflow: recirc_id=0,eth,in_port=1,dl_src=00:11:11:00:00:00,dl_dst=00:22:22:00:00:00,dl_type=0x0000
Datapath actions: 4
igsilya commented 11 months ago

Datapth port numbers and OpenFlow port numbers are not related. You may check which datapath port number is allocated for OpenFlow ports via ovs-appctl dpif/show command. The output format is <name> <OF port>/<datapath port>: <port type> ...

bettswang commented 11 months ago

Got. Thanks.