Lines Matching full:box

41  * @box: Index of byte within buffer seen as a logical big-endian big number
46 * the physical offset of the @box logical octet within it. Internally, it
59 * Return: the physical offset into the buffer corresponding to the logical box.
61 static size_t calculate_box_addr(size_t box, size_t len, u8 quirks) in calculate_box_addr() argument
63 size_t offset_of_group, offset_in_group, this_group = box / 4; in calculate_box_addr()
74 offset_in_group = box - this_group * 4; in calculate_box_addr()
76 offset_in_group = group_size - (box - this_group * 4) - 1; in calculate_box_addr()
90 int box; in __pack() local
102 * logical bit significance. "box" denotes the current logical u8. in __pack()
104 for (box = plogical_first_u8; box >= plogical_last_u8; box--) { in __pack()
105 /* Bit indices into the currently accessed 8-bit box */ in __pack()
117 if (box == plogical_first_u8) in __pack()
121 if (box == plogical_last_u8) in __pack()
126 /* We have determined the box bit start and end. in __pack()
127 * Now we calculate where this (masked) u8 box would fit in __pack()
128 * in the unpacked (CPU-readable) u64 - the u8 box's in __pack()
130 * box is u8, the projection is u64 because it may fall in __pack()
133 proj_start_bit = ((box * BITS_PER_BYTE) + box_start_bit) - endbit; in __pack()
134 proj_end_bit = ((box * BITS_PER_BYTE) + box_end_bit) - endbit; in __pack()
138 /* Determine the offset of the u8 box inside the pbuf, in __pack()
143 box_addr = calculate_box_addr(box, pbuflen, quirks); in __pack()
206 int box; in __unpack() local
213 * logical bit significance. "box" denotes the current logical u8. in __unpack()
215 for (box = plogical_first_u8; box >= plogical_last_u8; box--) { in __unpack()
216 /* Bit indices into the currently accessed 8-bit box */ in __unpack()
228 if (box == plogical_first_u8) in __unpack()
232 if (box == plogical_last_u8) in __unpack()
237 /* We have determined the box bit start and end. in __unpack()
238 * Now we calculate where this (masked) u8 box would fit in __unpack()
239 * in the unpacked (CPU-readable) u64 - the u8 box's in __unpack()
241 * box is u8, the projection is u64 because it may fall in __unpack()
244 proj_start_bit = ((box * BITS_PER_BYTE) + box_start_bit) - endbit; in __unpack()
245 proj_end_bit = ((box * BITS_PER_BYTE) + box_end_bit) - endbit; in __unpack()
249 /* Determine the offset of the u8 box inside the pbuf, in __unpack()
254 box_addr = calculate_box_addr(box, pbuflen, quirks); in __unpack()