I was testing the bond ECMP, and the load sharing behavior and factors. According to the Docs and the output of cat /proc/net/bonding/bondx output, it shows that hash is based on layer3+4.
Then I tested the traffic with different DMAC addresses and same layer3 and layer4 factors. In that, I was expecting no load-sharing in the bond.
But the result is that only Dmac change could also achieve load balance on the usable paths.
And the more samples of the traffic (mac address varies more but keeps the layer 3 and 4 info consistent), the better even result we got.
This makes me believe that the Hash algorithm may involve more factors than the docs mentioned.
e.g, incoming port id? or other factors that not elaborated on the Doc...
I appreciate Cumulus Gurus could share me more on the topic.