Hi Ilya: Yes, my previous verification method was wrong. I adjusted the verification method according to your suggestion, and the problem has been fixed.
-----邮件原件----- 发件人: Ilya Maximets <i.maxim...@ovn.org> 发送时间: 2024年1月18日, 星期四 18:53 收件人: David Zhang (张同剑)-浪潮信息 <zhangt...@inspur.com>; b...@openvswitch.org 抄送: i.maxim...@ovn.org 主题: Re: 答复: [ovs-discuss] dpif-netlink: ovs flow put failed (File exist) to datapath On 1/17/24 08:38, David Zhang (张同剑)-浪潮信息 wrote: > Hi Ilya: > I have merged the path fixed by this kernel and tested my bug. The steps > are as follows, but the problem still persists. Adding a flow table failed. > step 1 : ovs-appctl dpctl/add-dp system@test > step 2: ovs-appctl dpctl/add-flow system@test > "in_port(1),eth_type(0x0800),ipv4(src=172.16.0.0/255.252,0,0,dst=172.30.48.48,frag=no)" > 2 > step 3: ovs-appctl dpctl/add-flow system@test > "in_port(1),eth_type(0x0800),ipv4(src=172.16.0.0/255.248,0,0,dst=172.3 > 0.48.48,frag=no)" 2 > > out err info : > ovs-vswitchd: updating flow table (File exists) > ovs-appctl: ovs-vswitchd:server returned an error This is expected, because you're trying to install a flow with exactly the same key, but different mask. You need to change the key in some bits that are not in the mask for the flow to be installed. The assumption here is that packet with ipv4(src=172.16.0.0,dst=172.30.48.48) will always match on the first flow, so there will be no upcall. But if you send a packet with src=172.20.0.0, it will not match the first flow and go to upcall. However, later we will fail to install a wider mask flow matching on src=172.20.0.0/255.248.0.0. This is because 16 & 252 == 16 is the same result as 20 & 248 == 16. This behavior was fixed in the kernel patch I mentioned by comparing unmasked keys during flow installation. Since 16 != 20, the second flow will be successfully installed with the fix applied. > > > > -----邮件原件----- > 发件人: Ilya Maximets <i.maxim...@ovn.org> > 发送时间: 2024年1月16日, 星期二 20:53 > 收件人: David Zhang (张同剑)-浪潮信息 <zhangt...@inspur.com>; > b...@openvswitch.org > 抄送: i.maxim...@ovn.org > 主题: Re: [ovs-discuss] dpif-netlink: ovs flow put failed (File exist) > to datapath > > On 1/15/24 12:58, David Zhang (张同剑)-浪潮信息 via discuss wrote: >> Hi: >> >> ovs flows fail to create, with file exists error, Have you met this one? >> >> The user state flow table cannot be correctly distributed to the >> datapath, resulting in the rule datapath flow table not matching correctly. >> Upcall is required. >> >> OVS LOG: >> >> >> 2024-01-12T07:12:51.657Z|00080|dpif(handler51)|DBG|system@ovs-system: >> failed to put[create] (File exists) >> ufid:5df6220d-e2d2-48f8-a6a4-5c47ccc869c4 >> recirc_id(0),dp_hash(0/0),skb_priority(0/0),in_port(3),skb_mark(0/0), >> c >> t_state(0/0x3f),ct_zone(0/0),ct_mark(0/0),ct_label(0/0x1),eth(src=c4: >> e >> 2:87:01:84:00,dst=fa:16:3e:25:b1:3b),eth_type(0x8100),vlan(vid=80,pcp >> = >> 0),encap(eth_type(0x0800), >> >> ipv4(src=172.20.226.17/255.248.0.0,dst=172.30.48.48,proto=6,tos=0/0,t >> t l=63,frag=no),tcp(src=5201/0,dst=57674/0),tcp_flags(0/0)), >> actions:ct_clear,ct_clear,set(eth(src=fa:16:3e:8f:73:57,dst=fa:16:3e: >> 5 >> 9:e8:49)),set(ipv4(dst=10.147.7.12,ttl=62)),pop_vlan,ct(zone=1),recir >> c >> (0x13b6c8) >> > > It's hard to tell for sure what is going on here, but the issue might be > caused by a kernel issue fixed in: > > https://lore.kernel.org/netdev/167111551443.359845.7122827280135116424 > .stgit@ebuild/ > > You may need to upgrade your kernel, if it doesn't include the commit above. > >> Datapath Flow : >> >> >> recirc_id(0),in_port(3),ct_state(-new-est-rel-rpl-inv-trk),ct_label(0 >> / >> 0x1),eth(src=5c:e7:47:05:34:00,dst=fa:16:3e:25:b1:3b),eth_type(0x8100 >> ) ,vlan(vid=80,pcp=0),encap(eth_type(0x0800), >> >> ipv4(src=172.16.0.0/255.252.0.0,dst=172.30.48.48,proto=6,ttl=63,frag= >> n o)), packets:2355652448, bytes:11500879337271, used:0.220s, >> flags:SFPR., >> actions:ct_clear,ct_clear,set(eth(src=fa:16:3e:8f:73:57,dst=fa:16:3e: >> 5 >> 9:e8:49)),set(ipv4(dst=10.147.7.12,ttl=62)),pop_vlan,ct(zone=1),recir >> c >> (0x13b6c8) >> >> ovs version: 2.15.2 > > Note: 2.15 is a fairly old release now and it is no longer supported. > You should upgrade to at least 2.17. > > Best regards, Ilya Maximets.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss