mbox series

[v3,0/5] FSLMC bus enchancements

Message ID 20190715084442.14686-1-hemant.agrawal@nxp.com (mailing list archive)
Headers
Series FSLMC bus enchancements |

Message

Hemant Agrawal July 15, 2019, 8:44 a.m. UTC
  Changes since v2: remove rte_experimental from c file

This patch series makes few enhancements w.r.t functionality and usabilty of FSLMC bus.

1. Applications like OVS has mandated the use of hotplug of dpdk ports. The fslmc bus shall support hotplug now to support dpaa2 ports with OVS.

2. DPAA2 usages it hw based mempool. So, if applications like VPP are using external memory to configure buffer pool, it shall be provisition in FSLMC bus VFIO as well. 

3. Performance improvement for LS1088 to avoid few corruption issues with cache enabled mode for Tx FQ EQCR.


Nipun Gupta (1):
  bus/fslmc: use cinh read for eqcr ci on ls1088 platform

Sachin Saxena (1):
  mempool/dpaa2: vfio dmamap for user allocated memory

Shreyansh Jain (3):
  bus/fslmc: support device iteration
  bus/fslmc: enhance error handling for dev parsing
  bus/fslmc: dynamic iommu mode detection

 drivers/bus/fslmc/fslmc_bus.c                 | 156 ++++++++--
 drivers/bus/fslmc/fslmc_vfio.c                |  77 ++++-
 drivers/bus/fslmc/fslmc_vfio.h                |   5 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h      |   2 -
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |   5 -
 .../fslmc/qbman/include/fsl_qbman_portal.h    |   9 +
 drivers/bus/fslmc/qbman/qbman_portal.c        | 278 +++++++++++++++++-
 drivers/bus/fslmc/qbman/qbman_sys.h           |  22 +-
 drivers/bus/fslmc/rte_bus_fslmc_version.map   |   6 +
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |  13 +
 10 files changed, 521 insertions(+), 52 deletions(-)
  

Comments

Thomas Monjalon July 15, 2019, 9:53 p.m. UTC | #1
15/07/2019 10:44, Hemant Agrawal:
> Nipun Gupta (1):
>   bus/fslmc: use cinh read for eqcr ci on ls1088 platform
> 
> Sachin Saxena (1):
>   mempool/dpaa2: vfio dmamap for user allocated memory
> 
> Shreyansh Jain (3):
>   bus/fslmc: support device iteration
>   bus/fslmc: enhance error handling for dev parsing
>   bus/fslmc: dynamic iommu mode detection

I had the following comments on v1:
	The title should start with a verb.
	VFIO and DMA should be uppercase.
I tried to fix it.

Applied, thanks
  
Ferruh Yigit July 16, 2019, 11:40 a.m. UTC | #2
On 7/15/2019 10:53 PM, Thomas Monjalon wrote:
> 15/07/2019 10:44, Hemant Agrawal:
>> Nipun Gupta (1):
>>   bus/fslmc: use cinh read for eqcr ci on ls1088 platform
>>
>> Sachin Saxena (1):
>>   mempool/dpaa2: vfio dmamap for user allocated memory
>>
>> Shreyansh Jain (3):
>>   bus/fslmc: support device iteration
>>   bus/fslmc: enhance error handling for dev parsing
>>   bus/fslmc: dynamic iommu mode detection
> 
> I had the following comments on v1:
> 	The title should start with a verb.
> 	VFIO and DMA should be uppercase.
> I tried to fix it.
> 
> Applied, thanks
> 
> 


Getting build error with "ppc_64-power8-linuxapp-gcc" target [1], related to the
wrong format specifier. Not sure it is only ppc one.

$ /opt/ppc/bin/powerpc64le-linux-gcc --version
powerpc64le-linux-gcc.br_real (Buildroot 2018.08-git-00807-g0184fa3) 8.2.0


[1]
In file included from .../drivers/bus/fslmc/fslmc_vfio.c:37:


                                           [75/3669]
.../drivers/bus/fslmc/fslmc_vfio.c: In function ‘rte_fslmc_vfio_mem_dmamap’:
.../drivers/bus/fslmc/fslmc_logs.h:18:44: error: format ‘%llx’ expects argument
of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka ‘long
unsigned int’} [-Werror=format=]
  rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \
                                            ^~~~~~~~~~~~~~~
.../drivers/bus/fslmc/fslmc_vfio.c:387:2: note: in expansion of macro
‘DPAA2_BUS_DEBUG’
  DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",
  ^~~~~~~~~~~~~~~
.../drivers/bus/fslmc/fslmc_vfio.c:387:36: note: format string is defined here
  DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",
                                 ~~~^
                                 %lx
In file included from .../drivers/bus/fslmc/fslmc_vfio.c:37:
.../drivers/bus/fslmc/fslmc_logs.h:18:44: error: format ‘%llx’ expects argument
of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ {aka ‘long
unsigned int’} [-Werror=format=]
  rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \
                                            ^~~~~~~~~~~~~~~
.../drivers/bus/fslmc/fslmc_vfio.c:387:2: note: in expansion of macro
‘DPAA2_BUS_DEBUG’
  DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",
  ^~~~~~~~~~~~~~~
.../drivers/bus/fslmc/fslmc_vfio.c:387:43: note: format string is defined here
  DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",
                                        ~~~^
                                        %lx
In file included from .../drivers/bus/fslmc/fslmc_vfio.c:37:
.../drivers/bus/fslmc/fslmc_logs.h:18:44: error: format ‘%llx’ expects argument
of type ‘long long unsigned int’, but argument 7 has type ‘__u64’ {aka ‘long
unsigned int’} [-Werror=format=]
  rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \
                                            ^~~~~~~~~~~~~~~
.../drivers/bus/fslmc/fslmc_vfio.c:387:2: note: in expansion of macro
‘DPAA2_BUS_DEBUG’
  DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",
  ^~~~~~~~~~~~~~~
.../drivers/bus/fslmc/fslmc_vfio.c:387:56: note: format string is defined here
  DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",
                                                     ~~~^
                                                     %lx
  
Thomas Monjalon July 16, 2019, 1:36 p.m. UTC | #3
16/07/2019 13:40, Ferruh Yigit:
> On 7/15/2019 10:53 PM, Thomas Monjalon wrote:
> > 15/07/2019 10:44, Hemant Agrawal:
> >> Nipun Gupta (1):
> >>   bus/fslmc: use cinh read for eqcr ci on ls1088 platform
> >>
> >> Sachin Saxena (1):
> >>   mempool/dpaa2: vfio dmamap for user allocated memory
> >>
> >> Shreyansh Jain (3):
> >>   bus/fslmc: support device iteration
> >>   bus/fslmc: enhance error handling for dev parsing
> >>   bus/fslmc: dynamic iommu mode detection
> > 
> > I had the following comments on v1:
> > 	The title should start with a verb.
> > 	VFIO and DMA should be uppercase.
> > I tried to fix it.
> > 
> > Applied, thanks
> 
> Getting build error with "ppc_64-power8-linuxapp-gcc" target [1], related to the
> wrong format specifier. Not sure it is only ppc one.

It's so disappointing.
I don't know how many times I tried to explain the issue with %lx.
Should we just forbid %lx and %llx usage?
  
Bruce Richardson July 16, 2019, 1:43 p.m. UTC | #4
On Tue, Jul 16, 2019 at 03:36:53PM +0200, Thomas Monjalon wrote:
> 16/07/2019 13:40, Ferruh Yigit:
> > On 7/15/2019 10:53 PM, Thomas Monjalon wrote:
> > > 15/07/2019 10:44, Hemant Agrawal:
> > >> Nipun Gupta (1):
> > >>   bus/fslmc: use cinh read for eqcr ci on ls1088 platform
> > >>
> > >> Sachin Saxena (1):
> > >>   mempool/dpaa2: vfio dmamap for user allocated memory
> > >>
> > >> Shreyansh Jain (3):
> > >>   bus/fslmc: support device iteration
> > >>   bus/fslmc: enhance error handling for dev parsing
> > >>   bus/fslmc: dynamic iommu mode detection
> > > 
> > > I had the following comments on v1:
> > > 	The title should start with a verb.
> > > 	VFIO and DMA should be uppercase.
> > > I tried to fix it.
> > > 
> > > Applied, thanks
> > 
> > Getting build error with "ppc_64-power8-linuxapp-gcc" target [1], related to the
> > wrong format specifier. Not sure it is only ppc one.
> 
> It's so disappointing.
> I don't know how many times I tried to explain the issue with %lx.
> Should we just forbid %lx and %llx usage?
> 
We could, I suppose, so long as there never is a case where we actually do
use long, or long long variables. A checkpatch-style warning when one is
used probably is the best option, since it may help with catching these
earlier, while still allowing flexibility and human judgement as to whether
an instance is correct or not.

/Bruce
  
Ferruh Yigit July 19, 2019, 7:09 p.m. UTC | #5
On 7/16/2019 2:36 PM, Thomas Monjalon wrote:
> 16/07/2019 13:40, Ferruh Yigit:
>> On 7/15/2019 10:53 PM, Thomas Monjalon wrote:
>>> 15/07/2019 10:44, Hemant Agrawal:
>>>> Nipun Gupta (1):
>>>>   bus/fslmc: use cinh read for eqcr ci on ls1088 platform
>>>>
>>>> Sachin Saxena (1):
>>>>   mempool/dpaa2: vfio dmamap for user allocated memory
>>>>
>>>> Shreyansh Jain (3):
>>>>   bus/fslmc: support device iteration
>>>>   bus/fslmc: enhance error handling for dev parsing
>>>>   bus/fslmc: dynamic iommu mode detection
>>>
>>> I had the following comments on v1:
>>> 	The title should start with a verb.
>>> 	VFIO and DMA should be uppercase.
>>> I tried to fix it.
>>>
>>> Applied, thanks
>>
>> Getting build error with "ppc_64-power8-linuxapp-gcc" target [1], related to the
>> wrong format specifier. Not sure it is only ppc one.
> 
> It's so disappointing.
> I don't know how many times I tried to explain the issue with %lx.
> Should we just forbid %lx and %llx usage?
> 

Hi Hemant,

Is there any update on this? Has any fix sent?
  
Hemant Agrawal July 22, 2019, 6:56 a.m. UTC | #6
Hi Ferruh,

> 
> On 7/16/2019 2:36 PM, Thomas Monjalon wrote:
> > 16/07/2019 13:40, Ferruh Yigit:
> >> On 7/15/2019 10:53 PM, Thomas Monjalon wrote:
> >>> 15/07/2019 10:44, Hemant Agrawal:
> >>>> Nipun Gupta (1):
> >>>>   bus/fslmc: use cinh read for eqcr ci on ls1088 platform
> >>>>
> >>>> Sachin Saxena (1):
> >>>>   mempool/dpaa2: vfio dmamap for user allocated memory
> >>>>
> >>>> Shreyansh Jain (3):
> >>>>   bus/fslmc: support device iteration
> >>>>   bus/fslmc: enhance error handling for dev parsing
> >>>>   bus/fslmc: dynamic iommu mode detection
> >>>
> >>> I had the following comments on v1:
> >>> 	The title should start with a verb.
> >>> 	VFIO and DMA should be uppercase.
> >>> I tried to fix it.
> >>>
> >>> Applied, thanks
> >>
> >> Getting build error with "ppc_64-power8-linuxapp-gcc" target [1],
> >> related to the wrong format specifier. Not sure it is only ppc one.
> >
> > It's so disappointing.
> > I don't know how many times I tried to explain the issue with %lx.
> > Should we just forbid %lx and %llx usage?
> >
> 
> Hi Hemant,
> 
> Is there any update on this? Has any fix sent?
[Hemant]  I have just sent the fix.

Regards,
Hemant