Skip to content

Conversation

@fcrisciani
Copy link

Previously the bitseq alloc was allocating the first available bit from the beginning of the bit sequence for each sequence handle. With this commit the bitseq alloc will proceed
from the current allocation. This change will affect the way ipam and vni
allocation is done currently. The ip allocation will prcoeeed sequentially from the previous allocation as opposed to the first available IP. So even if the IPs are released it will not be reused until the allocator rolls over to the beginner of the bit sequence.

The commit also contains a fix for byteoffset allocation which plays a role in calculating the allocated ordinal. This scenerio play when the starting ordinal is part of the head sequence block and the available bit is part of subsequent blocks in the bitseq.

Signed-off-by: Abhinandan Prativadi abhi@docker.com

@fcrisciani fcrisciani requested review from abhi and mavenugo November 15, 2017 21:21
@abhi
Copy link
Contributor

abhi commented Nov 16, 2017

#1799 this needs to be backported for smoother cherry pick similar to #1967

abhi added 5 commits November 16, 2017 08:26
The byteoffset calculation was skewed to double include
the offset value calculated. The double calculation
happens if the starting ordinal is part of the head
sequence block. This error in calculation could result
in duplicate but getting allocated eventually propogating
to ipam and vni id allocations

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
(cherry picked from commit 6ed2ad9)
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
(cherry picked from commit f766f09)
Previously the bitseq alloc was allocating the first available bit from the
begining of the sequence. With this commit the bitseq alloc will proceed
from the current allocation. This change will affect the way ipam and vni
allocation is done currently. The ip allocation will be done sequentially
from the previous allocation as opposed to the first available IP.

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
(cherry picked from commit 5790b5c)
(cherry picked from commit e673595)
Since bit allocation is no longer first available from
the start some verfications are removed/modified to
the change allocation model

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
(cherry picked from commit 0184de8)
(cherry picked from commit e68e37f)
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
(cherry picked from commit a2bcac0)
(cherry picked from commit 0031dc3)
Flavio Crisciani and others added 3 commits November 16, 2017 08:53
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
(cherry picked from commit 6f43b46)
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
(cherry picked from commit ec570ad)
@mavenugo
Copy link
Contributor

LGTM

@fcrisciani
Copy link
Author

looks like this won't happen

@fcrisciani fcrisciani closed this Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants