RE: [EXTERNAL] Re: [net-next PATCH v5 1/6] octeontx2-pf: use xdp_return_frame() to free xdp buffers

From: Suman Ghosh
Date: Wed Feb 12 2025 - 01:45:55 EST


>> > - u64 pa;
>> > + u64 pa, iova;
>> >
>> > sg = &sq->sg[snd_comp->sqe_id];
>> >
>> > - pa = otx2_iova_to_phys(pfvf->iommu_domain, sg->dma_addr[0]);
>> > - otx2_dma_unmap_page(pfvf, sg->dma_addr[0],
>> > - sg->size[0], DMA_TO_DEVICE);
>> > + iova = sg->dma_addr[0];
>> > + pa = otx2_iova_to_phys(pfvf->iommu_domain, iova);
>> > page = virt_to_page(phys_to_virt(pa));
>> > - put_page(page);
>>
>> Hi Suman,
>>
>> With this patch applied page is assigned but otherwise unused in this
>> function. So unless there are some side effects of the above, I think
>> page and in turn pa and iova can be removed.
>
>I now see that page and pa are removed in patch 6/6, although iova is
>left behind. I think it would be best to move the cleanup forward to
>this patch.
[Suman] ack, will update in v6