Hi,

My question has been solved. Thank you for your help!

Thanks,
Xyxue


 
From: Neale Ranns (nranns)
Date: 2018-01-10 23:47
To: Pierre Pfister (ppfister); 薛欣颖
CC: vpp-dev
Subject: Re: [vpp-dev] question about load balance
 
You could also try adjusting in vnet/dpo/load_balance.c:
 
/*
* distribution error tolerance for load-balancing
*/
const f64 multipath_next_hop_error_tolerance = 0.1;
 
to a lower values, until it meets your needs.
Note this value is not exposed to the CLI/API for adjustment.
 
/neale
 
From: "Pierre Pfister (ppfister)" <[email protected]>
Date: Wednesday, 10 January 2018 at 10:39
To: 薛欣颖 <[email protected]>
Cc: "Neale Ranns (nranns)" <[email protected]>, vpp-dev <[email protected]>
Subject: Re: [vpp-dev] question about load balance
 
Hello,
 
You will not be able to get an exact match on 1/3 - 2/3 traffic sharing since 3 
is not a power of two.
If you want to get something closer, you may try to increase the values to get 
a better approximation.
 
For instance, 43 and 85 have a sum of 128 with 43/128 = 0.3359375, which is 
close to the 0.33333 you are looking for.
 
- Pierre
 


Le 10 janv. 2018 à 07:36, 薛欣颖 <[email protected]> a écrit :
 

Hi Neale,

I know what you mean. 
What should I do to match exactly I configured?  And ignore constraints 'a 
load-balance is always a power of 2'.

Thanks,
Xyxue
 
From: Neale Ranns (nranns)
Date: 2018-01-09 20:58
To: 薛欣颖; vpp-dev
Subject: Re: [vpp-dev] question about load balance
Hi Xyxue,
 
It does match your configuration. You requested a 2:1 ratio un-equal cost load 
balancing, you got a 5:3, which VPP considers to be close enough. It’s not 
exact because the number of buckets in a load-balance is always a power of 2.
 
/neale
 
From: <[email protected]> on behalf of 薛欣颖 <[email protected]>
Date: Tuesday, 9 January 2018 at 12:26
To: vpp-dev <[email protected]>
Subject: [vpp-dev] question about load balance
 
 
Hi guys,

I'm testing routing load balance. There is a question : When I configured 1:2 , 
the actual effect 3:5. My configuration and more info is shown below:

configuration:
  ip route add 4.1.1.1/24 via ip4-address 1.1.1.2 interface host-eth0 weight 1
  ip route add 4.1.1.1/24 via ip4-address 2.1.1.2 interface host-eth4 weight 2

The actual effect:
4.1.1.0/24
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:22 buckets:8 uRPF:29 to:[0:0]]
    [0] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800
    [1] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800
    [2] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800
    [3] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800          
                                 
    [4] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800
    [5] [@5]: ipv4 via 1.1.1.2 host-eth0: 000c296db078fc4dd4dad8af0800
    [6] [@5]: ipv4 via 1.1.1.2 host-eth0: 000c296db078fc4dd4dad8af0800
    [7] [@5]: ipv4 via 1.1.1.2 host-eth0: 000c296db078fc4dd4dad8af0800

How can I make  the actual effect the  same as my configuration?

Thanks,
Xyxue


_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev
 
_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to