[00/13] improve the modularization of NFP PMD

Message ID 20230920113454.739356-1-chaoyong.he@corigine.com (mailing list archive)
Headers
Series improve the modularization of NFP PMD |

Message

Chaoyong He Sept. 20, 2023, 11:34 a.m. UTC
  This patch series aims to improve the modularization of NFP PMD through:
* Make the header files self-containing by adding the correct include
  statement.
* Try to keep the interface of modules as small as possible.
* Remove the unneeded include statements to make sure a clean dependent
  relations among modules.

Chaoyong He (13):
  net/nfp: make sure header file is self-containing
  net/nfp: improve modularazation of rxtx module
  net/nfp: improve modularazation of nfd3 module
  net/nfp: improve modularazation of nfdk module
  net/nfp: improve modularazation of common module
  net/nfp: improve modularazation of flower module
  net/nfp: improve modularazation of flower representor module
  net/nfp: improve modularazation of flower ctrl module
  net/nfp: improve modularazation of flower cmsg module
  net/nfp: improve modularazation of flow module
  net/nfp: improve modularazation of meter module
  net/nfp: improve modularazation of CPP bridge module
  net/nfp: cleanup the include statement of PMD

 drivers/net/nfp/flower/nfp_flower.c           |  22 +--
 drivers/net/nfp/flower/nfp_flower.h           |   2 +
 drivers/net/nfp/flower/nfp_flower_cmsg.c      |  11 +-
 drivers/net/nfp/flower/nfp_flower_cmsg.h      |  77 +++++++-
 drivers/net/nfp/flower/nfp_flower_ctrl.c      |  13 +-
 drivers/net/nfp/flower/nfp_flower_ctrl.h      |   2 +
 .../net/nfp/flower/nfp_flower_representor.c   |  29 +--
 .../net/nfp/flower/nfp_flower_representor.h   |  14 --
 drivers/net/nfp/nfd3/nfp_nfd3.h               |  89 +--------
 drivers/net/nfp/nfd3/nfp_nfd3_dp.c            |  96 +++++++++-
 drivers/net/nfp/nfdk/nfp_nfdk.h               |  71 +------
 drivers/net/nfp/nfdk/nfp_nfdk_dp.c            |  81 +++++++-
 drivers/net/nfp/nfp_common.c                  |  51 ++---
 drivers/net/nfp/nfp_common.h                  |  34 +---
 drivers/net/nfp/nfp_cpp_bridge.c              |  14 +-
 drivers/net/nfp/nfp_cpp_bridge.h              |   8 -
 drivers/net/nfp/nfp_ctrl.h                    |   2 +
 drivers/net/nfp/nfp_ethdev.c                  |  25 +--
 drivers/net/nfp/nfp_ethdev_vf.c               |   9 +-
 drivers/net/nfp/nfp_flow.c                    |  88 ++++++++-
 drivers/net/nfp/nfp_flow.h                    |  78 +-------
 drivers/net/nfp/nfp_mtr.c                     |  16 +-
 drivers/net/nfp/nfp_mtr.h                     |  70 +------
 drivers/net/nfp/nfp_rxtx.c                    | 174 +++++++++++++++++-
 drivers/net/nfp/nfp_rxtx.h                    | 168 +----------------
 drivers/net/nfp/nfpcore/nfp_platform.h        |   2 +
 26 files changed, 579 insertions(+), 667 deletions(-)
  

Comments

Ferruh Yigit Sept. 22, 2023, 11:23 a.m. UTC | #1
On 9/20/2023 12:34 PM, Chaoyong He wrote:
> This patch series aims to improve the modularization of NFP PMD through:
> * Make the header files self-containing by adding the correct include
>   statement.
> * Try to keep the interface of modules as small as possible.
> * Remove the unneeded include statements to make sure a clean dependent
>   relations among modules.
> 
> Chaoyong He (13):
>   net/nfp: make sure header file is self-containing
>   net/nfp: improve modularazation of rxtx module
>   net/nfp: improve modularazation of nfd3 module
>   net/nfp: improve modularazation of nfdk module
>   net/nfp: improve modularazation of common module
>   net/nfp: improve modularazation of flower module
>   net/nfp: improve modularazation of flower representor module
>   net/nfp: improve modularazation of flower ctrl module
>   net/nfp: improve modularazation of flower cmsg module
>   net/nfp: improve modularazation of flow module
>   net/nfp: improve modularazation of meter module
>   net/nfp: improve modularazation of CPP bridge module
>   net/nfp: cleanup the include statement of PMD
> 

Series applied to dpdk-next-net/main, thanks.


Are these cleanups preparation for a planned work?
  
Chaoyong He Sept. 25, 2023, 1:34 a.m. UTC | #2
> On 9/20/2023 12:34 PM, Chaoyong He wrote:
> > This patch series aims to improve the modularization of NFP PMD through:
> > * Make the header files self-containing by adding the correct include
> >   statement.
> > * Try to keep the interface of modules as small as possible.
> > * Remove the unneeded include statements to make sure a clean dependent
> >   relations among modules.
> >
> > Chaoyong He (13):
> >   net/nfp: make sure header file is self-containing
> >   net/nfp: improve modularazation of rxtx module
> >   net/nfp: improve modularazation of nfd3 module
> >   net/nfp: improve modularazation of nfdk module
> >   net/nfp: improve modularazation of common module
> >   net/nfp: improve modularazation of flower module
> >   net/nfp: improve modularazation of flower representor module
> >   net/nfp: improve modularazation of flower ctrl module
> >   net/nfp: improve modularazation of flower cmsg module
> >   net/nfp: improve modularazation of flow module
> >   net/nfp: improve modularazation of meter module
> >   net/nfp: improve modularazation of CPP bridge module
> >   net/nfp: cleanup the include statement of PMD
> >
> 
> Series applied to dpdk-next-net/main, thanks.
> 
> 
> Are these cleanups preparation for a planned work?

Yes, we try to add a common 'drivers/common/nfp' library and a 'dirvers/vdpa/nfp' PMD in this or next release cycle.

For now, our cards are 1PF <--> n physical mode, and we will add support for 1PF <--> 1 physical mode and maybe m PF <--> n physical mode in the future.

The modularization and refactor will make these works easier and the commits more natural to understand.