On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> wrote: > > This commit structure the indirect desc table. > Then we can get the desc num directly when doing unmap. > > And save the dma info to the struct, then the indirect > will not use the dma fields of the desc_extra. The subsequent > commits will make the dma fields are optional. But for > the indirect case, we must record the dma info. > > Signed-off-by: Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> > --- > drivers/virtio/virtio_ring.c | 86 ++++++++++++++++++++++-------------- > 1 file changed, 52 insertions(+), 34 deletions(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index 2b41fdbce975..831667a57429 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -67,9 +67,16 @@ > #define LAST_ADD_TIME_INVALID(vq) > #endif [...] > + kfree(in_desc); > vq->split.desc_state[head].indir_desc = NULL; > - Unnecessary changes. Thanks > } > > vq->split.desc_extra[i].next = vq->free_head; > -- > 2.32.0.3.g01195cf9f >