Lines Matching refs:offset
73 uint32_t offset; /** < Offset of the m-sequence */ member
414 get_subvalue(struct rte_thash_ctx *ctx, uint32_t offset) in get_subvalue() argument
418 tmp = (uint32_t *)(&ctx->hash_key[offset >> 3]); in get_subvalue()
420 val >>= (TOEPLITZ_HASH_LEN - ((offset & (CHAR_BIT - 1)) + in get_subvalue()
434 start = h->offset + h->len - (2 * ctx->reta_sz_log - 1); in generate_complement_table()
456 if (end < cur_ent->offset) { in insert_before()
469 } else if ((next_ent != NULL) && (end > next_ent->offset)) { in insert_before()
482 ret = generate_subkey(ctx, ent->lfsr, cur_ent->offset - 1, start); in insert_before()
518 if ((next_ent != NULL) && (end > next_ent->offset)) { in insert_after()
549 uint32_t offset) in rte_thash_add_helper() argument
556 ((offset + len + TOEPLITZ_HASH_LEN - 1) > in rte_thash_add_helper()
566 end = offset + len + TOEPLITZ_HASH_LEN - 1; in rte_thash_add_helper()
569 offset; in rte_thash_add_helper()
578 ent->offset = start; in rte_thash_add_helper()
580 ent->tuple_offset = offset; in rte_thash_add_helper()
586 uint32_t range_end = cur_ent->offset + cur_ent->len; in rte_thash_add_helper()
590 while ((next_ent != NULL) && (next_ent->offset < range_end)) { in rte_thash_add_helper()
591 range_end = RTE_MAX(next_ent->offset + next_ent->len, in rte_thash_add_helper()
593 if (start > next_ent->offset) in rte_thash_add_helper()
599 if (start < cur_ent->offset) in rte_thash_add_helper()
673 read_unaligned_byte(uint8_t *ptr, unsigned int len, unsigned int offset) in read_unaligned_byte() argument
677 ret = ptr[offset / CHAR_BIT]; in read_unaligned_byte()
678 if (offset % CHAR_BIT) { in read_unaligned_byte()
679 ret <<= (offset % CHAR_BIT); in read_unaligned_byte()
680 ret |= ptr[(offset / CHAR_BIT) + 1] >> in read_unaligned_byte()
681 (CHAR_BIT - (offset % CHAR_BIT)); in read_unaligned_byte()
688 read_unaligned_bits(uint8_t *ptr, int len, int offset) in read_unaligned_bits() argument
699 offset); in read_unaligned_bits()
700 offset += CHAR_BIT; in read_unaligned_bits()
709 get_bits_mask(unsigned int len, unsigned int offset) in get_bits_mask() argument
713 offset %= CHAR_BIT; in get_bits_mask()
715 last_bit = RTE_MIN((unsigned int)CHAR_BIT, offset + len); in get_bits_mask()
717 return ((1 << (CHAR_BIT - offset)) - 1) ^ in get_bits_mask()
723 unsigned int offset, uint8_t val) in write_unaligned_byte() argument
727 tmp = ptr[offset / CHAR_BIT]; in write_unaligned_byte()
728 tmp &= ~get_bits_mask(len, offset); in write_unaligned_byte()
729 tmp |= ((val << (CHAR_BIT - len)) >> (offset % CHAR_BIT)); in write_unaligned_byte()
730 ptr[offset / CHAR_BIT] = tmp; in write_unaligned_byte()
731 if (((offset + len) / CHAR_BIT) != (offset / CHAR_BIT)) { in write_unaligned_byte()
732 int rest_len = (offset + len) % CHAR_BIT; in write_unaligned_byte()
733 tmp = ptr[(offset + len) / CHAR_BIT]; in write_unaligned_byte()
736 ptr[(offset + len) / CHAR_BIT] = tmp; in write_unaligned_byte()
741 write_unaligned_bits(uint8_t *ptr, int len, int offset, uint32_t val) in write_unaligned_bits() argument
753 offset + len - part_len, tmp); in write_unaligned_bits()
771 int offset; in rte_thash_adjust_tuple() local
800 offset = h->tuple_offset + h->tuple_len - ctx->reta_sz_log; in rte_thash_adjust_tuple()
801 tmp = read_unaligned_bits(tuple, ctx->reta_sz_log, offset); in rte_thash_adjust_tuple()
803 write_unaligned_bits(tuple, ctx->reta_sz_log, offset, tmp); in rte_thash_adjust_tuple()
813 offset -= tmp_len; in rte_thash_adjust_tuple()
815 offset); in rte_thash_adjust_tuple()
818 write_unaligned_bits(tuple, tmp_len, offset, in rte_thash_adjust_tuple()