On Thu, 16 Nov 2023 16:11:13 +0800, Jason Wang <jasowang@xxxxxxxxxx> wrote: > On Tue, Nov 14, 2023 at 7:31 PM Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> wrote: > > > > Now, inside virtqueue_disable_and_recycle, the recycle() just has two > > parameters(vq, buf) after detach operate. > > > > But if we are in premapped mode, we may need to get some dma info when > > detach buf like virtqueue_get_buf_ctx_dma(). > > > > So we call recycle directly, this callback detaches bufs self. It should > > complete the work of detaching all the unused buffers. > > > > Signed-off-by: Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> > > --- > > drivers/net/virtio/main.c | 31 ++++++++++++++++++++++--------- > > Btw, is it better to do this before the restructure, or anything I missed? #1 is for get_buf from virtio core. This is for the next pacth. (get unused buf) So this is #2. Thanks. > > Thanks >