>On 7/1/2022 1:24 PM, Shijith Thotton wrote: >>>> If all devices are configured to run in IOVA mode as VA, physical >>>> address field of mbuf (buf_iova) won't be used. In such cases, buf_iova >>>> space is free to use as a dynamic field. So a new dynamic field member >>>> (dynfield2) is added in mbuf structure to make use of that space. >>>> >>>> A new mbuf flag RTE_MBUF_F_DYNFIELD2 is introduced to help identify the >>>> mbuf that can use dynfield2. >>>> >>>> Signed-off-by: Shijith Thotton <sthot...@marvell.com> >>> >>> This seems like a complex and potentially error prone way to do this. >>> What is the use case? >>> >> >> PCI drivers with the flag RTE_PCI_DRV_NEED_IOVA_AS_VA only works in IOVA >mode as >> VA. buf_iova field of mbuf is not used by those PMDs and can be used as a >> dynamic area to save space. >> > >'RTE_PCI_DRV_NEED_IOVA_AS_VA' means device can *only* work in >RTE_IOVA_VA mode, right? > >Although there are many devices that support RTE_IOVA_VA mode, only a >few of them works *only* with RTE_IOVA_VA mode, rest can prefer to use >RTE_IOVA_PA or RTE_IOVA_VA. >Also using KNI forces to use RTE_IOVA_PA mode.
I have removed reference to *only* in the latest series [1]. So all PMDs which supports IOVA as VA can be enabled with the build options iova_as_va. But it will require PMDs to not use PA field of mbuf(buf_iova) on such builds. 1. https://inbox.dpdk.org/dev/20220907134340.3629224-1-sthot...@marvell.com/ >And moving 'buf_iova' filed out of first cache will impact the >performance for RTE_IOVA_PA mode. > buf_iova is not moved from its position in default build. Mbuf next pointer uses buf_iova space in iova_as_va build. Please review https://patchwork.dpdk.org/project/dpdk/patch/20220907134340.3629224-4-sthot...@marvell.com/ >Since KNI is going away and vfio is more preferred way, it can be OK to >make 'buf_iova' dynamic filed in long term, but I think it is better to >do this slowly, like should we wait for KNI to go away first? > > >>> How much of a performance gain? >> >> No change in performance.