For IPv6 support with DVR the index used for rule priority and
route table needs to be generated such that the index is 32 bits
or less but greater than the system generated rule entries.
For IPv4 the numeric value of the network is used as the index.
For IPv6 the 30 bit xor-folded crc32 of the cidr is used.
Values smaller than system generated entries are extended into
the range freed up because of xor-folding.
For code modularity, index generation is wrapped into a helper
method.
Reviewed: https:/ /review. openstack. org/134676 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=7eb23f662cd 62f29700ae51ee1 6dc535d251fc27
Committed: https:/
Submitter: Jenkins
Branch: master
commit 7eb23f662cd62f2 9700ae51ee16dc5 35d251fc27
Author: rajeev <email address hidden>
Date: Wed Nov 12 11:25:55 2014 -0500
Add index generation for IPv6 rules for DVR
For IPv6 support with DVR the index used for rule priority and
route table needs to be generated such that the index is 32 bits
or less but greater than the system generated rule entries.
For IPv4 the numeric value of the network is used as the index.
For IPv6 the 30 bit xor-folded crc32 of the cidr is used.
Values smaller than system generated entries are extended into
the range freed up because of xor-folding.
For code modularity, index generation is wrapped into a helper
method.
Partial-bug: #1376325
Change-Id: I4bcde80257ef5f e7c744086019841 cdef5e3c60c