[dpdk-dev] [RFC] remove unused functions

Zhang, Tianfei tianfei.zhang at intel.com
Tue Nov 24 13:17:38 CET 2020



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Sent: 2020年11月24日 19:31
> To: Zhang, Tianfei <tianfei.zhang at intel.com>; Jerin Jacob
> <jerinj at marvell.com>; Dumitrescu, Cristian <cristian.dumitrescu at intel.com>;
> Hemant Agrawal <hemant.agrawal at nxp.com>; Sachin Saxena
> <sachin.saxena at oss.nxp.com>; Ray Kinsella <mdr at ashroe.eu>; Neil Horman
> <nhorman at tuxdriver.com>; Xu, Rosen <rosen.xu at intel.com>; Wu, Jingjing
> <jingjing.wu at intel.com>; Xing, Beilei <beilei.xing at intel.com>; Nithin
> Dabilpuram <ndabilpuram at marvell.com>; Ajit Khaparde
> <ajit.khaparde at broadcom.com>; Raveendra Padasalagi
> <raveendra.padasalagi at broadcom.com>; Vikas Gupta
> <vikas.gupta at broadcom.com>; Gagandeep Singh <g.singh at nxp.com>;
> Somalapuram Amaranath <asomalap at amd.com>; Akhil Goyal
> <akhil.goyal at nxp.com>; Jay Zhou <jianjay.zhou at huawei.com>; McDaniel,
> Timothy <timothy.mcdaniel at intel.com>; Ma, Liang J <liang.j.ma at intel.com>;
> Mccarthy, Peter <peter.mccarthy at intel.com>; Shepard Siegel
> <shepard.siegel at atomicrules.com>; Ed Czeck <ed.czeck at atomicrules.com>;
> John Miller <john.miller at atomicrules.com>; Igor Russkikh
> <igor.russkikh at aquantia.com>; Pavel Belous <pavel.belous at aquantia.com>;
> Rasesh Mody <rmody at marvell.com>; Shahed Shaikh
> <shshaikh at marvell.com>; Somnath Kotur <somnath.kotur at broadcom.com>;
> Chas Williams <chas3 at att.com>; Min Hu (Connor) <humin29 at huawei.com>;
> Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>; Guo, Jia
> <jia.guo at intel.com>; Wang, Haiyue <haiyue.wang at intel.com>; Marcin
> Wojtas <mw at semihalf.com>; Michal Krawczyk <mk at semihalf.com>; Guy
> Tzalik <gtzalik at amazon.com>; Evgeny Schemeilin <evgenys at amazon.com>;
> Igor Chauskin <igorch at amazon.com>; Zhang, Qi Z <qi.z.zhang at intel.com>;
> Wang, Xiao W <xiao.w.wang at intel.com>; Yang, Qiming
> <qiming.yang at intel.com>; Alfredo Cardigliano <cardigliano at ntop.org>;
> Matan Azrad <matan at nvidia.com>; Shahaf Shuler <shahafs at nvidia.com>;
> Viacheslav Ovsiienko <viacheslavo at nvidia.com>; Zyta Szpak
> <zr at semihalf.com>; Liron Himi <lironh at marvell.com>; Stephen Hemminger
> <sthemmin at microsoft.com>; K. Y. Srinivasan <kys at microsoft.com>; Haiyang
> Zhang <haiyangz at microsoft.com>; Long Li <longli at microsoft.com>; Heinrich
> Kuhn <heinrich.kuhn at netronome.com>; Harman Kalra
> <hkalra at marvell.com>; Kiran Kumar K <kirankumark at marvell.com>; Andrew
> Rybchenko <andrew.rybchenko at oktetlabs.ru>; Singh, Jasvinder
> <jasvinder.singh at intel.com>; Jiawen Wu <jiawenwu at trustnetic.com>; Jian
> Wang <jianwang at trustnetic.com>; Ori Kam <orika at nvidia.com>; Guy Kaneti
> <guyk at marvell.com>; Burakov, Anatoly <anatoly.burakov at intel.com>;
> Maxime Coquelin <maxime.coquelin at redhat.com>; Xia, Chenbo
> <chenbo.xia at intel.com>
> Cc: dev at dpdk.org
> Subject: Re: [RFC] remove unused functions
> 
> On 11/24/2020 11:01 AM, Zhang, Tianfei wrote:
> >
> >
> >> -----Original Message-----
> >> From: Ferruh Yigit <ferruh.yigit at intel.com>
> >> Sent: 2020年11月24日 18:26
> >> To: Zhang, Tianfei <tianfei.zhang at intel.com>; Jerin Jacob
> >> <jerinj at marvell.com>; Dumitrescu, Cristian
> >> <cristian.dumitrescu at intel.com>; Hemant Agrawal
> >> <hemant.agrawal at nxp.com>; Sachin Saxena
> <sachin.saxena at oss.nxp.com>;
> >> Ray Kinsella <mdr at ashroe.eu>; Neil Horman <nhorman at tuxdriver.com>;
> >> Xu, Rosen <rosen.xu at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>;
> >> Xing, Beilei <beilei.xing at intel.com>; Nithin Dabilpuram
> >> <ndabilpuram at marvell.com>; Ajit Khaparde
> >> <ajit.khaparde at broadcom.com>; Raveendra Padasalagi
> >> <raveendra.padasalagi at broadcom.com>; Vikas Gupta
> >> <vikas.gupta at broadcom.com>; Gagandeep Singh <g.singh at nxp.com>;
> >> Somalapuram Amaranath <asomalap at amd.com>; Akhil Goyal
> >> <akhil.goyal at nxp.com>; Jay Zhou <jianjay.zhou at huawei.com>; McDaniel,
> >> Timothy <timothy.mcdaniel at intel.com>; Ma, Liang J
> >> <liang.j.ma at intel.com>; Mccarthy, Peter <peter.mccarthy at intel.com>;
> >> Shepard Siegel <shepard.siegel at atomicrules.com>; Ed Czeck
> >> <ed.czeck at atomicrules.com>; John Miller
> >> <john.miller at atomicrules.com>; Igor Russkikh
> >> <igor.russkikh at aquantia.com>; Pavel Belous
> >> <pavel.belous at aquantia.com>; Rasesh Mody <rmody at marvell.com>;
> Shahed
> >> Shaikh <shshaikh at marvell.com>; Somnath Kotur
> >> <somnath.kotur at broadcom.com>; Chas Williams <chas3 at att.com>; Min
> Hu
> >> (Connor) <humin29 at huawei.com>; Rahul Lakkireddy
> >> <rahul.lakkireddy at chelsio.com>; Guo, Jia <jia.guo at intel.com>; Wang,
> >> Haiyue <haiyue.wang at intel.com>; Marcin Wojtas <mw at semihalf.com>;
> >> Michal Krawczyk <mk at semihalf.com>; Guy Tzalik <gtzalik at amazon.com>;
> >> Evgeny Schemeilin <evgenys at amazon.com>; Igor Chauskin
> >> <igorch at amazon.com>; Zhang, Qi Z <qi.z.zhang at intel.com>; Wang, Xiao
> W
> >> <xiao.w.wang at intel.com>; Yang, Qiming <qiming.yang at intel.com>;
> >> Alfredo Cardigliano <cardigliano at ntop.org>; Matan Azrad
> >> <matan at nvidia.com>; Shahaf Shuler <shahafs at nvidia.com>; Viacheslav
> >> Ovsiienko <viacheslavo at nvidia.com>; Zyta Szpak <zr at semihalf.com>;
> >> Liron Himi <lironh at marvell.com>; Stephen Hemminger
> >> <sthemmin at microsoft.com>; K. Y. Srinivasan <kys at microsoft.com>;
> >> Haiyang Zhang <haiyangz at microsoft.com>; Long Li
> >> <longli at microsoft.com>; Heinrich Kuhn
> <heinrich.kuhn at netronome.com>;
> >> Harman Kalra <hkalra at marvell.com>; Kiran Kumar K
> >> <kirankumark at marvell.com>; Andrew Rybchenko
> >> <andrew.rybchenko at oktetlabs.ru>; Singh, Jasvinder
> >> <jasvinder.singh at intel.com>; Jiawen Wu <jiawenwu at trustnetic.com>;
> >> Jian Wang <jianwang at trustnetic.com>; Ori Kam <orika at nvidia.com>; Guy
> >> Kaneti <guyk at marvell.com>; Burakov, Anatoly
> >> <anatoly.burakov at intel.com>; Maxime Coquelin
> >> <maxime.coquelin at redhat.com>; Xia, Chenbo <chenbo.xia at intel.com>
> >> Cc: dev at dpdk.org
> >> Subject: Re: [RFC] remove unused functions
> >>
> >> On 11/24/2020 10:00 AM, Zhang, Tianfei wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Ferruh Yigit <ferruh.yigit at intel.com>
> >>>> Sent: 2020年11月23日 17:57
> >>>> To: Zhang, Tianfei <tianfei.zhang at intel.com>; Jerin Jacob
> >>>> <jerinj at marvell.com>; Dumitrescu, Cristian
> >>>> <cristian.dumitrescu at intel.com>; Hemant Agrawal
> >>>> <hemant.agrawal at nxp.com>; Sachin Saxena
> >> <sachin.saxena at oss.nxp.com>;
> >>>> Ray Kinsella <mdr at ashroe.eu>; Neil Horman
> <nhorman at tuxdriver.com>;
> >>>> Xu, Rosen <rosen.xu at intel.com>; Wu, Jingjing
> >>>> <jingjing.wu at intel.com>; Xing, Beilei <beilei.xing at intel.com>;
> >>>> Nithin Dabilpuram <ndabilpuram at marvell.com>; Ajit Khaparde
> >>>> <ajit.khaparde at broadcom.com>; Raveendra Padasalagi
> >>>> <raveendra.padasalagi at broadcom.com>; Vikas Gupta
> >>>> <vikas.gupta at broadcom.com>; Gagandeep Singh <g.singh at nxp.com>;
> >>>> Somalapuram Amaranath <asomalap at amd.com>; Akhil Goyal
> >>>> <akhil.goyal at nxp.com>; Jay Zhou <jianjay.zhou at huawei.com>;
> >>>> McDaniel, Timothy <timothy.mcdaniel at intel.com>; Ma, Liang J
> >>>> <liang.j.ma at intel.com>; Mccarthy, Peter <peter.mccarthy at intel.com>;
> >>>> Shepard Siegel <shepard.siegel at atomicrules.com>; Ed Czeck
> >>>> <ed.czeck at atomicrules.com>; John Miller
> >>>> <john.miller at atomicrules.com>; Igor Russkikh
> >>>> <igor.russkikh at aquantia.com>; Pavel Belous
> >>>> <pavel.belous at aquantia.com>; Rasesh Mody <rmody at marvell.com>;
> >> Shahed
> >>>> Shaikh <shshaikh at marvell.com>; Somnath Kotur
> >>>> <somnath.kotur at broadcom.com>; Chas Williams <chas3 at att.com>;
> Min
> >> Hu
> >>>> (Connor) <humin29 at huawei.com>; Rahul Lakkireddy
> >>>> <rahul.lakkireddy at chelsio.com>; Guo, Jia <jia.guo at intel.com>; Wang,
> >>>> Haiyue <haiyue.wang at intel.com>; Marcin Wojtas
> <mw at semihalf.com>;
> >>>> Michal Krawczyk <mk at semihalf.com>; Guy Tzalik
> <gtzalik at amazon.com>;
> >>>> Evgeny Schemeilin <evgenys at amazon.com>; Igor Chauskin
> >>>> <igorch at amazon.com>; Zhang, Qi Z <qi.z.zhang at intel.com>; Wang,
> Xiao
> >> W
> >>>> <xiao.w.wang at intel.com>; Yang, Qiming <qiming.yang at intel.com>;
> >>>> Alfredo Cardigliano <cardigliano at ntop.org>; Matan Azrad
> >>>> <matan at nvidia.com>; Shahaf Shuler <shahafs at nvidia.com>; Viacheslav
> >>>> Ovsiienko <viacheslavo at nvidia.com>; Zyta Szpak <zr at semihalf.com>;
> >>>> Liron Himi <lironh at marvell.com>; Stephen Hemminger
> >>>> <sthemmin at microsoft.com>; K. Y. Srinivasan <kys at microsoft.com>;
> >>>> Haiyang Zhang <haiyangz at microsoft.com>; Long Li
> >>>> <longli at microsoft.com>; Heinrich Kuhn
> >> <heinrich.kuhn at netronome.com>;
> >>>> Harman Kalra <hkalra at marvell.com>; Kiran Kumar K
> >>>> <kirankumark at marvell.com>; Andrew Rybchenko
> >>>> <andrew.rybchenko at oktetlabs.ru>; Singh, Jasvinder
> >>>> <jasvinder.singh at intel.com>; Jiawen Wu <jiawenwu at trustnetic.com>;
> >>>> Jian Wang <jianwang at trustnetic.com>; Ori Kam <orika at nvidia.com>;
> >>>> Guy Kaneti <guyk at marvell.com>; Burakov, Anatoly
> >>>> <anatoly.burakov at intel.com>; Maxime Coquelin
> >>>> <maxime.coquelin at redhat.com>; Xia, Chenbo <chenbo.xia at intel.com>
> >>>> Cc: dev at dpdk.org
> >>>> Subject: Re: [RFC] remove unused functions
> >>>>
> >>>> On 11/23/2020 2:55 AM, Zhang, Tianfei wrote:
> >>>>>>     drivers/raw/ifpga/base/opae_eth_group.c       |   25 -
> >>>>>>     drivers/raw/ifpga/base/opae_eth_group.h       |    1 -
> >
> > For those unused functions on opae_eth_group.c are release functions,
> > like eth_group_release(), it should be called by fme_eth_group_uinit(), I will
> send a patch to fix it.
> >
> >>>>>>     drivers/raw/ifpga/base/opae_hw_api.c          |  212 --
> >>>>>>     drivers/raw/ifpga/base/opae_hw_api.h          |   36 -
> >>>>>>     drivers/raw/ifpga/base/opae_i2c.c             |   12 -
> >>>>>>     drivers/raw/ifpga/base/opae_i2c.h             |    4 -
> >>>>>>     drivers/raw/ifpga/base/opae_ifpga_hw_api.c    |   99 -
> >>>>>>     drivers/raw/ifpga/base/opae_ifpga_hw_api.h    |   15 -
> >>>>>
> >>>>> The ifpga base code is want to provide fully functionality low
> >>>>> level hardware
> >>>> support for Intel FPGA card like N3000, even though some APIs are
> >>>> not used by DPDK framework now,but it will useful for end-users or
> >>>> other customers developing their own productions , my opinion is
> >>>> keeping those APIs of ifpga base code in DPDK.
> >>>>>
> >>>>
> >>>> The code is hidden behind the driver code, it is not accessible to
> >>>> user
> >> directly.
> >>>>
> >>>> If the idea is the code can be used later, it can be added when needed.
> >>>
> >>> Sound good!
> >>>>
> >>>> If the idea is the code can be needed in the field by users, can
> >>>> you please give example on the use case?
> >>>
> >>> Do you mean write some test cases in examples folder?
> >>>
> >>
> >> You mentioned end user may need some of the removed functions, can
> >> you give an example how an end user may need them?
> >
> > Currently, there is only one DPDK PMD driver using the ifpga base code, it is
> called ipn3ke, which is target for VBNG applications.
> > The ipn3ke is not using all of our APIs which provided by ifpga base
> > code. I am agree remove the unused functions firstly. And I plan to write an
> test application to test all of APIs ( including those unused functions ) and add
> those functions back in future, and I think the test applications should be a
> good example for the end-user how to use those APIs.
> >
> 
> I am not clear how a test application can help to test driver base code
> functions.
> 
> Driver should call them to configure the HW, if there is no DPDK API to request
> that configuration, or current device doesn't support it, what application can
> do?

My though is write a test rawdev PMD driver and corresponding application which are only for the ifpga APIs testing purpose, I am not sure is it workable?


More information about the dev mailing list