Method and system for determining a number of data packets required to transport a data block
First Claim
1. A process to determine a number of data packets required to transport a data block, wherein said data packets comprise a non-power of two number of bytes, said process comprising:
- shifting a binary equivalent of a decimal size of the data block rightward by a number of bits equal to an exponent of a decimal divisor as a power of two, wherein the decimal divisor is equal to a next power of two larger than the decimal size of the data packets;
storing bits remaining from the rightward shifting of the block size as a first value, and storing bits removed by the rightward shifting of the block size as a second value;
shifting the first value rightward by a number of bits equal to one less than the exponent of the decimal divisor as the power of two;
storing bits remaining from the rightward shifting of the first value as a third value and storing a sum of the third value and bits removed by the rightward shifting of the first value as a fourth value;
shifting the fourth value and adding the second value to calculate a fifth value;
performing at least one comparison on the fifth value to process a sixth value and a seventh value; and
determining the number of data packets required to transport the data block by summing the first value, third value, and sixth value, and adding one if the seventh value is not zero.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for determining a number of non-power of two sized data packets required to transport a data block. A data block size is shifted rightward by a number of bits equal to a base-two exponent of a divisor, with the bits remaining stored as a first value, and the bits removed stored as a second value. At least one binary shift is performed to calculate a third and fourth value. The fourth value is shifted and added to the second value to calculate a fifth value. At least one comparison is performed on the fifth value to process a sixth and seventh value. A number of non-power of two sized data packets is determined by summing the first, third, and sixth values, then adding one if the seventh value is not zero.
6 Citations
19 Claims
-
1. A process to determine a number of data packets required to transport a data block, wherein said data packets comprise a non-power of two number of bytes, said process comprising:
-
shifting a binary equivalent of a decimal size of the data block rightward by a number of bits equal to an exponent of a decimal divisor as a power of two, wherein the decimal divisor is equal to a next power of two larger than the decimal size of the data packets; storing bits remaining from the rightward shifting of the block size as a first value, and storing bits removed by the rightward shifting of the block size as a second value; shifting the first value rightward by a number of bits equal to one less than the exponent of the decimal divisor as the power of two; storing bits remaining from the rightward shifting of the first value as a third value and storing a sum of the third value and bits removed by the rightward shifting of the first value as a fourth value; shifting the fourth value and adding the second value to calculate a fifth value; performing at least one comparison on the fifth value to process a sixth value and a seventh value; and determining the number of data packets required to transport the data block by summing the first value, third value, and sixth value, and adding one if the seventh value is not zero. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer-readable medium having computer executable instructions that, when executed, perform a process to determine a number of non-power of two sized data packets required to transport a data block, said process comprising:
-
shifting a binary equivalent of a decimal size of the data block rightward by a number of bits equal to an exponent of a decimal divisor as a power of two, wherein the decimal divisor is equal to a next power of two larger than the decimal size of the data packets; storing bits remaining from the rightward shifting of the block size as a first value, and storing bits removed by the rightward shifting of the block size as a second value; shifting the first value rightward by a number of bits equal to one less than the exponent of the decimal divisor as the power of two; storing bits remaining from the rightward shifting of the first value as a third value and storing a sum of the third value and bits removed by the rightward shifting of the first value as a fourth value; shifting the fourth value and adding the second value to calculate a fifth value; performing at least one comparison on the fifth value to process a sixth value and a seventh value; and determining the number of data packets required to transport the data block by summing the first value, third value, and sixth value, and adding one if the seventh value is not zero. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer system comprising:
-
a communications link; a processor coupled to the communications link, said processor capable of executing a process to determine a number of non-power of two sized data packets required to transport a data block; a shifter coupled to said processor, said shifter to; shift a binary equivalent of a decimal size of a data block rightward by a number of bits equal to an exponent of a decimal devisor as a power of two, wherein the decimal devisor is equal to a next power of two larger than a decimal size of the data packets; shift a first value rightward by a number of bits equal to one less than the exponent of the decimal divisor as the power of two, wherein the first value comprises bits remaining from the rightward shift of the block size; and shift a fourth value; a memory coupled to said shifter, said memory to; store the first value, and bits removed by the rightward shifting as a second value; and store bits remaining from the rightward shift of the first value as a third value and store a sum of the third value and bits removed by the rightward shift of the first value as the fourth value; an adder coupled to said logic to; add the second value to the shifted fourth value to calculate a fifth value; and add the first value, the third value, and a sixth value and adding one if a seventh value is not zero; and logic coupled to said memory and to said adder, said logic to; perform at least one comparison on the fifth value to process the sixth value and the seventh value; and determine the number of data packets required to transport the data block according to the sum of the first value, third value, and sixth value and the addition of one if the seventh value is not zero. - View Dependent Claims (14, 15, 16, 17, 18, 19)
-
Specification