Can somebody confirm that this is a bug? Note I'm not talking about the trace 
command but about the fact that when I add a bucket then only the last bucket 
functionally gets selected. It has rather serious implications when you want to 
build systems that can dynamically scale by adding buckets on demand.
________________________________
From: Gerrie Roos <gr...@xiplink.com>
Sent: Thursday, February 9, 2023 4:53 PM
To: Ilya Maximets <i.maxim...@ovn.org>; ovs-discuss@openvswitch.org 
<ovs-discuss@openvswitch.org>
Subject: Re: [ovs-discuss] 'Select' group always selecting the last bucket

Thanks Ilya! That explains the trace anomaly.

I.r.t. the last bucket always getting selected I got more info. This happens 
only when I add a bucket to an existing group. If I create the group and its 
buckets in one command, all buckets are correctly used.


________________________________
From: Ilya Maximets <i.maxim...@ovn.org>
Sent: Thursday, February 9, 2023 4:02 PM
To: Gerrie Roos <gr...@xiplink.com>; ovs-discuss@openvswitch.org 
<ovs-discuss@openvswitch.org>
Cc: i.maxim...@ovn.org <i.maxim...@ovn.org>
Subject: Re: [ovs-discuss] 'Select' group always selecting the last bucket

On 2/7/23 22:39, Gerrie Roos via discuss wrote:
> More info on this: Using selection_method=hash works OK. Looks like it's only 
> dp_hash that breaks.
>
> I've also tried dp_hash without selection_method_param=1 and it does not 
> work. I also tried with '1' in the upper 32 bits and no luck.
>
> Looking at the code I think the trace giving 'no live bucket' is a red 
> herring - if the packet is going to be circulated the bucket will be NULL, 
> right?

Right.  You need to specify a value for dp_hash in the trace command
in order to get realistic result.  The flow should be in odp_flow
format for that, AFAICT. e.g.:

ovs-appctl ofproto/trace ovs-system 
'dp_hash(0xabcd),in_port(1),eth(src=55:55:55:55:55:55,dst=66:66:66:66:66:66),eth_type(0x0800),ipv4(src=192.168.22.1,dst=192.168.22.13,proto=17,tos=0,ttl=255,frag=no),udp(src=23865/0,dst=80)'

Best regards, Ilya Maximets.

> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Gerrie Roos
> *Sent:* Monday, February 6, 2023 4:12 PM
> *To:* ovs-discuss@openvswitch.org <ovs-discuss@openvswitch.org>
> *Subject:* 'Select' group always selecting the last bucket
>
> Hi there
>
> I have a simple group with two buckets:
>
> group_id=3,type=select,selection_method=dp_hash,selection_method_param=1,bucket=bucket_id:1,actions=load:0x1->OXM_OF_PKT_REG0[],output:4,bucket=bucket_id:2,actions=load:0x2->OXM_OF_PKT_REG0[],output:7
>
> I have a healthy mix of UDP with different src/dst IP's and ports hitting 
> this group but I always get hits only on the last bucket:
>
>  
> group_id=3,duration=2391.520s,ref_count=1,packet_count=73932,byte_count=94881408,bucket0:packet_count=0,byte_count=0,bucket1:packet_count=264177,byte_count=176152324
>
> This also happens even if I add a bucket with a huge weight and another 
> bucket after that with a weight of 1.
>
> Tracing a packet also looks weird:
>
> ovs-appctl ofproto/trace xipbr 
> in_port=1G-01,udp,nw_src=192.168.22.1,nw_dst=192.168.22.139,nw_tos=0,nw_ecn=0,udp_src=23865,udp_dst=80,dl_src=55:55:55:55:55:55,dl_dst=66:66:66:66:66:66
> Flow: 
> udp,in_port=2,vlan_tci=0x0000,dl_src=55:55:55:55:55:55,dl_dst=66:66:66:66:66:66,nw_src=192.168.22.1,nw_dst=192.168.22.139,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=23865,tp_dst=80
>
> bridge("xipbr")
> ---------------
>  0. in_port=2, priority 200
>     load:0x1->OXM_OF_PKT_REG1[]
>     resubmit(,3)
>  3. reg2=0,reg3=0x1, priority 0
>     group:3
>      -> no live bucket
>
> Final flow: 
> udp,reg3=0x1,in_port=2,vlan_tci=0x0000,dl_src=55:55:55:55:55:55,dl_dst=66:66:66:66:66:66,nw_src=192.168.22.1,nw_dst=192.168.22.139,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=23865,tp_dst=80
> Megaflow: recirc_id=0,eth,ip,in_port=2,dl_dst=66:66:66:66:66:66,nw_frag=no
> Datapath actions: hash(l4(1)),recirc(0x50)
>
> See 'no live bucket'.
>
> Note the ports/interfaces in question are Linux virtual tunnel interfaces 
> connected to KVM VMs.
>
> This is on Ubuntu 20.04 (kernel 5.4.0) and OVS 2.13.8. OVS 2.13.0 shows the 
> same.
>
> Another setup of mine on Ubuntu 18.04 and OVS 2.9.8 does not have this issue.
>
> I've tried adding 'watch_port=4' to the buckets but then the kernel complains 
> with OFPGMFC_WATCH_UNSUPPORTED. I tried 'watch_port=ANY', which the kernel 
> accepts, but the behavior remains the same.
>
> Any ideas/help much appreciated!
> Gerrie
>
> _______________________________________________
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to