gsi_ring_index
tre_index = gsi_ring_index(&channel->tre_ring, tre_offset);
index = gsi_ring_index(ring, ioread32(gsi->virt + offset));