With 3 paths the desired ratio for packets sent of the available paths is 1:1:1. These available paths correspond to buckets in the load-balance. For 4 buckets the ration is 1:1:2. For 8 buckets the ration is 2:3:3 For 16 buckets the ratio is 5:5:6
As you can see as the number of buckets increases so the actual ratio get closer to the desired. 16 buckets is considered close enough. If you dig into the code you’ll find: multipath_next_hop_error_tolerance which controls the ‘close enough’ condition. /neale From: abbas ali chezgi <che...@yahoo.com> Reply to: abbas ali chezgi <che...@gmail.com> Date: Monday 6 January 2020 at 16:05 To: "Neale Ranns (nranns)" <nra...@cisco.com> Subject: Re: [vpp-dev] multipath dpo buckets is wrong. hi Neale, power of 2 for 3 paths must be 4 dpo or maximum 8 dpo. this shows 16 dpos. thanks On Monday, January 6, 2020, 01:34:10 AM GMT+3:30, Neale Ranns via Lists.Fd.Io <nranns=cisco....@lists.fd.io> wrote: It is the correct behaviour. The number of load-balance buckets is always a power of 2. The lowest value is chosen to achieve the desired ratio to within a certain margin of error. /neale From: <vpp-dev@lists.fd.io> on behalf of "abbas ali chezgi via Lists.Fd.Io" <chezgi=yahoo....@lists.fd.io> Reply to: "che...@yahoo.com" <che...@yahoo.com> Date: Saturday 4 January 2020 at 18:53 To: Vpp-dev <vpp-dev@lists.fd.io> Cc: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: [vpp-dev] multipath dpo buckets is wrong. when adding multipath route with 2 path for a prefix it shows dpo-load-balance correctly. but when update it to 3 path it shows 16 paths with duplicate paths in dpo. -------------------------------------------------- vppctl show ip fib 10.1.1.0 -------------------------------------------------- ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] locks:[src:plugin-hi:2, src:adjacency:4, src:default-route:1, ] 10.1.1.0/24 fib:0 index:56 locks:2 src:CLI refs:1 src-flags:added,contributing,active, path-list:[74] locks:8 flags:shared, uPRF-list:80 len:3 itfs:[2, 3, 4, ] path:[103] pl-index:74 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved, 200.2.4.4 host-eth1 [@0]: ipv4 via 200.2.4.4 host-eth1: mtu:9000 02fe2d8d1e1102fe5ad4c3f80800 path:[102] pl-index:74 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved, 200.2.5.5 host-eth2 [@0]: ipv4 via 200.2.5.5 host-eth2: mtu:9000 02febd7f8d6602fe15460eb30800 path:[104] pl-index:74 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved, 200.2.6.6 host-eth3 [@0]: ipv4 via 200.2.6.6 host-eth3: mtu:9000 02fedcd5da5002fe371ba1df0800 forwarding: unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:59 buckets:16 uRPF:80 to:[0:0]] [0] [@5]: ipv4 via 200.2.4.4 host-eth1: mtu:9000 02fe2d8d1e1102fe5ad4c3f80800 [1] [@5]: ipv4 via 200.2.4.4 host-eth1: mtu:9000 02fe2d8d1e1102fe5ad4c3f80800 [2] [@5]: ipv4 via 200.2.4.4 host-eth1: mtu:9000 02fe2d8d1e1102fe5ad4c3f80800 [3] [@5]: ipv4 via 200.2.4.4 host-eth1: mtu:9000 02fe2d8d1e1102fe5ad4c3f80800 [4] [@5]: ipv4 via 200.2.4.4 host-eth1: mtu:9000 02fe2d8d1e1102fe5ad4c3f80800 [5] [@5]: ipv4 via 200.2.4.4 host-eth1: mtu:9000 02fe2d8d1e1102fe5ad4c3f80800 [6] [@5]: ipv4 via 200.2.5.5 host-eth2: mtu:9000 02febd7f8d6602fe15460eb30800 [7] [@5]: ipv4 via 200.2.5.5 host-eth2: mtu:9000 02febd7f8d6602fe15460eb30800 [8] [@5]: ipv4 via 200.2.5.5 host-eth2: mtu:9000 02febd7f8d6602fe15460eb30800 [9] [@5]: ipv4 via 200.2.5.5 host-eth2: mtu:9000 02febd7f8d6602fe15460eb30800 [10] [@5]: ipv4 via 200.2.5.5 host-eth2: mtu:9000 02febd7f8d6602fe15460eb30800 [11] [@5]: ipv4 via 200.2.6.6 host-eth3: mtu:9000 02fedcd5da5002fe371ba1df0800 [12] [@5]: ipv4 via 200.2.6.6 host-eth3: mtu:9000 02fedcd5da5002fe371ba1df0800 [13] [@5]: ipv4 via 200.2.6.6 host-eth3: mtu:9000 02fedcd5da5002fe371ba1df0800 [14] [@5]: ipv4 via 200.2.6.6 host-eth3: mtu:9000 02fedcd5da5002fe371ba1df0800 [15] [@5]: ipv4 via 200.2.6.6 host-eth3: mtu:9000 02fedcd5da5002fe371ba1df0800 is it my mistake or it is correct behavior? thanks. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15053): https://lists.fd.io/g/vpp-dev/message/15053 Mute This Topic: https://lists.fd.io/mt/69414593/1239119 Group Owner: vpp-dev+ow...@lists.fd.io<mailto:ow...@lists.fd.io> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub <https://lists.fd.io/g/vpp-dev/unsub%20> [che...@yahoo.com<mailto:che...@yahoo.com>] -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15054): https://lists.fd.io/g/vpp-dev/message/15054 Mute This Topic: https://lists.fd.io/mt/69414593/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-