Hi, all, I know this, it's NOT bug.
The design of this command is right. The option carried is use for read, the flow FILE is used for write. User need to ensure the version of option and flow FILE matches, like, If your flow FILE is written by openflow13, then you should use -O OpenFlow13. Thank you~ ---- Simon Jones Simon Jones <[email protected]> 于2023年10月27日周五 17:51写道: > Hi all, > > I'm using ovs-dpdk version 2.17.1. > > Now I found ovs-ofctl replace xxx will cause flow_mod even if openflow is > same. > > Detail: > ``` > [root@localhost ~]# cat flows > in_port="p0",dl_vlan=11,ip,nw_proto=17,actions=output:vf2 > [root@localhost ~]# cat flows2 > in_port="p0",dl_vlan=11,ip,nw_proto=17,actions=mod_vlan_pcp(2),output:vf2 > [root@localhost ~]# cat flows3 > > in_port="p0",dl_vlan=11,ip,nw_proto=17,actions=set_field:2->vlan_pcp,output:vf2 > > [root@localhost ~]# ovs-ofctl del-flows br-phy > [root@localhost ~]# ovs-ofctl -O OpenFlow13 replace-flows br-phy flows > # 1st add this openflow > [root@localhost ~]# ovs-ofctl -O OpenFlow13 replace-flows br-phy flows > # then add this openflow again > # then this command will NOT cause flow_mods > > [root@localhost ~]# ovs-ofctl del-flows br-phy > [root@localhost ~]# ovs-ofctl -O OpenFlow13 replace-flows br-phy flows2 > # 1st add this openflow > [root@localhost ~]# ovs-ofctl -O OpenFlow13 replace-flows br-phy flows2 > # then add this openflow again > # This will cause flow_mods > # log: xxx|connmgr|INFO|br-phy<->unix#48: 1 flow_mods in the last 0 s > (1 adds) > > [root@localhost ~]# ovs-ofctl del-flows br-phy > [root@localhost ~]# ovs-ofctl -O OpenFlow13 replace-flows br-phy flows3 > # 1st add this openflow > [root@localhost ~]# ovs-ofctl -O OpenFlow13 replace-flows br-phy flows3 > # then add this openflow again > # this will NOT cause flow_mods > [root@localhost ~]# ovs-ofctl replace-flows br-phy flows3 > # This will cause flow_mods > # log: xxx|connmgr|INFO|br-phy<->unix#48: 1 flow_mods in the last 0 s > (1 adds) > ``` > > The reason cause flow_mods is because these function, fte_version_equals > - ofpacts_equal_stringwise . > Which is different openflow version process between mod and set_field > actions. > > As the flow_mods will cause ovs-vswitchd to delete megaflow and then add > same megaflow again. > So the rte_flow rule which is offload by this megaflow will delete and add. > Then the network flow will interrupt and miss upcall. > > Is this a bug? > > As the openflow controller is NOT controlled by us. > Which means the command is NOT controlled by us. > But the ovs-ofctl and ovs-vswitchd is code by us. > > So how to deal with this? > Is a good idea to change the behavior of fte_version_equals > - ofpacts_equal_stringwise, which could process all version? > > Thank you~ > > > ---- > Simon Jones > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
