[v5,00/26] refact the nfpcore module

Message ID 20230919095440.45445-1-chaoyong.he@corigine.com (mailing list archive)
Headers
Series refact the nfpcore module |

Message

Chaoyong He Sept. 19, 2023, 9:54 a.m. UTC
  This patch series aims to:
- Make the coding style satisfy with DPDK.
- Sync the logic with kernel driver.
- Make the sub-module more modular.
- Extend the nfp configure BAR from 8 to 24.

---
v5:
* Fix one bug in the logic of VF using dev module.
* Remove the R-b tag as the requirement of Niklas.
* Revise logic follow the advice of reviewer.
v4:
* Drop the commit 'using the DPDK memory management API'.
* Modify the commit message of 'standard the comment style'.
* Revise some comment logic as the advice of reviewer.
v3:
* Fix one bug in the BAR find logic.
* Modify more coding style.
v2:
* Fix the compile error in Fodora 37 environment.
---

Chaoyong He (26):
  net/nfp: explicitly compare to null and 0
  net/nfp: unify the indent coding style
  net/nfp: unify the type of integer variable
  net/nfp: remove the unneeded logic
  net/nfp: standard the local variable coding style
  net/nfp: adjust the log statement
  net/nfp: standard the comment style
  net/nfp: standard the blank character
  net/nfp: unify the guide line of header file
  net/nfp: rename some parameter and variable
  net/nfp: refact the hwinfo module
  net/nfp: refact the nffw module
  net/nfp: refact the mip module
  net/nfp: refact the rtsym module
  net/nfp: refact the resource module
  net/nfp: refact the target module
  net/nfp: add a new header file
  net/nfp: refact the nsp module
  net/nfp: refact the mutex module
  net/nfp: rename data field to sync with kernel driver
  net/nfp: add the dev module
  net/nfp: add header file for PCIe module
  net/nfp: refact the cppcore module
  net/nfp: refact the PCIe module
  net/nfp: refact the cppcore and PCIe module
  net/nfp: extend the usage of nfp BAR from 8 to 24

 drivers/net/nfp/flower/nfp_flower.c           |   17 +-
 drivers/net/nfp/flower/nfp_flower.h           |    3 +-
 .../net/nfp/flower/nfp_flower_representor.c   |    6 +-
 drivers/net/nfp/meson.build                   |    3 +-
 drivers/net/nfp/nfd3/nfp_nfd3_dp.c            |    5 +-
 drivers/net/nfp/nfdk/nfp_nfdk_dp.c            |    5 +-
 drivers/net/nfp/nfp_common.c                  |   50 +-
 drivers/net/nfp/nfp_common.h                  |   52 +-
 drivers/net/nfp/nfp_cpp_bridge.c              |    2 +-
 drivers/net/nfp/nfp_ethdev.c                  |  106 +-
 drivers/net/nfp/nfp_ethdev_vf.c               |   25 +-
 drivers/net/nfp/nfp_rxtx.c                    |    5 +-
 drivers/net/nfp/nfp_rxtx.h                    |   12 -
 drivers/net/nfp/nfpcore/nfp6000/nfp6000.h     |   20 -
 drivers/net/nfp/nfpcore/nfp6000_pcie.c        | 1035 ++++++++++++++++
 drivers/net/nfp/nfpcore/nfp6000_pcie.h        |   20 +
 drivers/net/nfp/nfpcore/nfp_cpp.h             |  776 +++---------
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c    |  824 -------------
 drivers/net/nfp/nfpcore/nfp_cppcore.c         | 1080 +++++++++++------
 drivers/net/nfp/nfpcore/nfp_crc.c             |   23 +-
 drivers/net/nfp/nfpcore/nfp_dev.c             |   81 ++
 drivers/net/nfp/nfpcore/nfp_dev.h             |   44 +
 drivers/net/nfp/nfpcore/nfp_hwinfo.c          |  193 ++-
 drivers/net/nfp/nfpcore/nfp_hwinfo.h          |   74 +-
 drivers/net/nfp/nfpcore/nfp_mip.c             |   97 +-
 drivers/net/nfp/nfpcore/nfp_mip.h             |    7 +-
 drivers/net/nfp/nfpcore/nfp_mutex.c           |  379 +++---
 drivers/net/nfp/nfpcore/nfp_mutex.h           |   25 +
 drivers/net/nfp/nfpcore/nfp_nffw.c            |  202 +--
 drivers/net/nfp/nfpcore/nfp_nffw.h            |   66 +-
 drivers/net/nfp/nfpcore/nfp_nsp.c             |  574 ++++++---
 drivers/net/nfp/nfpcore/nfp_nsp.h             |  336 ++---
 drivers/net/nfp/nfpcore/nfp_nsp_cmds.c        |   19 +-
 drivers/net/nfp/nfpcore/nfp_nsp_eth.c         |  518 ++++----
 drivers/net/nfp/nfpcore/nfp_platform.h        |   42 +
 drivers/net/nfp/nfpcore/nfp_resource.c        |  208 ++--
 drivers/net/nfp/nfpcore/nfp_resource.h        |   36 +-
 drivers/net/nfp/nfpcore/nfp_rtsym.c           |  452 +++++--
 drivers/net/nfp/nfpcore/nfp_rtsym.h           |   67 +-
 drivers/net/nfp/nfpcore/nfp_target.c          |    9 +-
 drivers/net/nfp/nfpcore/nfp_target.h          |  597 +--------
 41 files changed, 4083 insertions(+), 4012 deletions(-)
 create mode 100644 drivers/net/nfp/nfpcore/nfp6000_pcie.c
 create mode 100644 drivers/net/nfp/nfpcore/nfp6000_pcie.h
 delete mode 100644 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
 create mode 100644 drivers/net/nfp/nfpcore/nfp_dev.c
 create mode 100644 drivers/net/nfp/nfpcore/nfp_dev.h
 create mode 100644 drivers/net/nfp/nfpcore/nfp_mutex.h
 create mode 100644 drivers/net/nfp/nfpcore/nfp_platform.h
  

Comments

Ferruh Yigit Sept. 19, 2023, 9:18 p.m. UTC | #1
On 9/19/2023 10:54 AM, Chaoyong He wrote:
> This patch series aims to:
> - Make the coding style satisfy with DPDK.
> - Sync the logic with kernel driver.
> - Make the sub-module more modular.
> - Extend the nfp configure BAR from 8 to 24.
> 
> ---
> v5:
> * Fix one bug in the logic of VF using dev module.
> * Remove the R-b tag as the requirement of Niklas.
> * Revise logic follow the advice of reviewer.
> v4:
> * Drop the commit 'using the DPDK memory management API'.
> * Modify the commit message of 'standard the comment style'.
> * Revise some comment logic as the advice of reviewer.
> v3:
> * Fix one bug in the BAR find logic.
> * Modify more coding style.
> v2:
> * Fix the compile error in Fodora 37 environment.
> ---
> 
> Chaoyong He (26):
>   net/nfp: explicitly compare to null and 0
>   net/nfp: unify the indent coding style
>   net/nfp: unify the type of integer variable
>   net/nfp: remove the unneeded logic
>   net/nfp: standard the local variable coding style
>   net/nfp: adjust the log statement
>   net/nfp: standard the comment style
>   net/nfp: standard the blank character
>   net/nfp: unify the guide line of header file
>   net/nfp: rename some parameter and variable
>   net/nfp: refact the hwinfo module
>   net/nfp: refact the nffw module
>   net/nfp: refact the mip module
>   net/nfp: refact the rtsym module
>   net/nfp: refact the resource module
>   net/nfp: refact the target module
>   net/nfp: add a new header file
>   net/nfp: refact the nsp module
>   net/nfp: refact the mutex module
>   net/nfp: rename data field to sync with kernel driver
>   net/nfp: add the dev module
>   net/nfp: add header file for PCIe module
>   net/nfp: refact the cppcore module
>   net/nfp: refact the PCIe module
>   net/nfp: refact the cppcore and PCIe module
>   net/nfp: extend the usage of nfp BAR from 8 to 24
> 


Hi Chaoyong,

This set has 24 patches in the mail_list/patchwork, last two patches are
missing, can you please double check?
  
Chaoyong He Sept. 20, 2023, 1:55 a.m. UTC | #2
> On 9/19/2023 10:54 AM, Chaoyong He wrote:
> > This patch series aims to:
> > - Make the coding style satisfy with DPDK.
> > - Sync the logic with kernel driver.
> > - Make the sub-module more modular.
> > - Extend the nfp configure BAR from 8 to 24.
> >
> > ---
> > v5:
> > * Fix one bug in the logic of VF using dev module.
> > * Remove the R-b tag as the requirement of Niklas.
> > * Revise logic follow the advice of reviewer.
> > v4:
> > * Drop the commit 'using the DPDK memory management API'.
> > * Modify the commit message of 'standard the comment style'.
> > * Revise some comment logic as the advice of reviewer.
> > v3:
> > * Fix one bug in the BAR find logic.
> > * Modify more coding style.
> > v2:
> > * Fix the compile error in Fodora 37 environment.
> > ---
> >
> > Chaoyong He (26):
> >   net/nfp: explicitly compare to null and 0
> >   net/nfp: unify the indent coding style
> >   net/nfp: unify the type of integer variable
> >   net/nfp: remove the unneeded logic
> >   net/nfp: standard the local variable coding style
> >   net/nfp: adjust the log statement
> >   net/nfp: standard the comment style
> >   net/nfp: standard the blank character
> >   net/nfp: unify the guide line of header file
> >   net/nfp: rename some parameter and variable
> >   net/nfp: refact the hwinfo module
> >   net/nfp: refact the nffw module
> >   net/nfp: refact the mip module
> >   net/nfp: refact the rtsym module
> >   net/nfp: refact the resource module
> >   net/nfp: refact the target module
> >   net/nfp: add a new header file
> >   net/nfp: refact the nsp module
> >   net/nfp: refact the mutex module
> >   net/nfp: rename data field to sync with kernel driver
> >   net/nfp: add the dev module
> >   net/nfp: add header file for PCIe module
> >   net/nfp: refact the cppcore module
> >   net/nfp: refact the PCIe module
> >   net/nfp: refact the cppcore and PCIe module
> >   net/nfp: extend the usage of nfp BAR from 8 to 24
> >
> 
> 
> Hi Chaoyong,
> 
> This set has 24 patches in the mail_list/patchwork, last two patches are
> missing, can you please double check?

Sorry, the send email command failed after the 24/26 patch has send out, and I'm not found that. 

$ git send-email --to dev@dpdk.org --cc oss-drivers@corigine.com --in-reply-to 20230918024612.1600536-1-chaoyong.he@corigine.com ./*.patch

Can't locate Email/Valid.pm in @INC (you may need to install the Email::Valid module) (@INC contains: /usr/share/perl5/vendor_perl /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/libexec/git-core/git-send-email line 1138.
        ...propagated at /usr/libexec/git-core/git-send-email line 1694.

This is the first time I meet this problem, and it's my fault did not notice it, and I still not sure what cause it.

I re-send the 25/26 and 26/26 patch with the same command (except the './*.patch' part), but seems they are not recognized as the same series in the patchwork:
Untitled series #29559
Untitled series #29560

How to fix that or should I send a v6 version for the whole series?
  
Ferruh Yigit Sept. 20, 2023, 8:54 a.m. UTC | #3
On 9/20/2023 2:55 AM, Chaoyong He wrote:
>> On 9/19/2023 10:54 AM, Chaoyong He wrote:
>>> This patch series aims to:
>>> - Make the coding style satisfy with DPDK.
>>> - Sync the logic with kernel driver.
>>> - Make the sub-module more modular.
>>> - Extend the nfp configure BAR from 8 to 24.
>>>
>>> ---
>>> v5:
>>> * Fix one bug in the logic of VF using dev module.
>>> * Remove the R-b tag as the requirement of Niklas.
>>> * Revise logic follow the advice of reviewer.
>>> v4:
>>> * Drop the commit 'using the DPDK memory management API'.
>>> * Modify the commit message of 'standard the comment style'.
>>> * Revise some comment logic as the advice of reviewer.
>>> v3:
>>> * Fix one bug in the BAR find logic.
>>> * Modify more coding style.
>>> v2:
>>> * Fix the compile error in Fodora 37 environment.
>>> ---
>>>
>>> Chaoyong He (26):
>>>   net/nfp: explicitly compare to null and 0
>>>   net/nfp: unify the indent coding style
>>>   net/nfp: unify the type of integer variable
>>>   net/nfp: remove the unneeded logic
>>>   net/nfp: standard the local variable coding style
>>>   net/nfp: adjust the log statement
>>>   net/nfp: standard the comment style
>>>   net/nfp: standard the blank character
>>>   net/nfp: unify the guide line of header file
>>>   net/nfp: rename some parameter and variable
>>>   net/nfp: refact the hwinfo module
>>>   net/nfp: refact the nffw module
>>>   net/nfp: refact the mip module
>>>   net/nfp: refact the rtsym module
>>>   net/nfp: refact the resource module
>>>   net/nfp: refact the target module
>>>   net/nfp: add a new header file
>>>   net/nfp: refact the nsp module
>>>   net/nfp: refact the mutex module
>>>   net/nfp: rename data field to sync with kernel driver
>>>   net/nfp: add the dev module
>>>   net/nfp: add header file for PCIe module
>>>   net/nfp: refact the cppcore module
>>>   net/nfp: refact the PCIe module
>>>   net/nfp: refact the cppcore and PCIe module
>>>   net/nfp: extend the usage of nfp BAR from 8 to 24
>>>
>>
>>
>> Hi Chaoyong,
>>
>> This set has 24 patches in the mail_list/patchwork, last two patches are
>> missing, can you please double check?
> 
> Sorry, the send email command failed after the 24/26 patch has send out, and I'm not found that. 
> 
> $ git send-email --to dev@dpdk.org --cc oss-drivers@corigine.com --in-reply-to 20230918024612.1600536-1-chaoyong.he@corigine.com ./*.patch
> 
> Can't locate Email/Valid.pm in @INC (you may need to install the Email::Valid module) (@INC contains: /usr/share/perl5/vendor_perl /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/libexec/git-core/git-send-email line 1138.
>         ...propagated at /usr/libexec/git-core/git-send-email line 1694.
> 
> This is the first time I meet this problem, and it's my fault did not notice it, and I still not sure what cause it.
> 

Same here, error is not familiar and not sure about root cause.

> I re-send the 25/26 and 26/26 patch with the same command (except the './*.patch' part), but seems they are not recognized as the same series in the patchwork:
> Untitled series #29559
> Untitled series #29560
> 
> How to fix that or should I send a v6 version for the whole series?
>

That is OK, I will get missing patches manually.
  
Ferruh Yigit Sept. 20, 2023, 9:59 a.m. UTC | #4
On 9/19/2023 10:54 AM, Chaoyong He wrote:
> This patch series aims to:
> - Make the coding style satisfy with DPDK.
> - Sync the logic with kernel driver.
> - Make the sub-module more modular.
> - Extend the nfp configure BAR from 8 to 24.
> 
> ---
> v5:
> * Fix one bug in the logic of VF using dev module.
> * Remove the R-b tag as the requirement of Niklas.
> * Revise logic follow the advice of reviewer.
> v4:
> * Drop the commit 'using the DPDK memory management API'.
> * Modify the commit message of 'standard the comment style'.
> * Revise some comment logic as the advice of reviewer.
> v3:
> * Fix one bug in the BAR find logic.
> * Modify more coding style.
> v2:
> * Fix the compile error in Fodora 37 environment.
> ---
> 
> Chaoyong He (26):
>   net/nfp: explicitly compare to null and 0
>   net/nfp: unify the indent coding style
>   net/nfp: unify the type of integer variable
>   net/nfp: remove the unneeded logic
>   net/nfp: standard the local variable coding style
>   net/nfp: adjust the log statement
>   net/nfp: standard the comment style
>   net/nfp: standard the blank character
>   net/nfp: unify the guide line of header file
>   net/nfp: rename some parameter and variable
>   net/nfp: refact the hwinfo module
>   net/nfp: refact the nffw module
>   net/nfp: refact the mip module
>   net/nfp: refact the rtsym module
>   net/nfp: refact the resource module
>   net/nfp: refact the target module
>   net/nfp: add a new header file
>   net/nfp: refact the nsp module
>   net/nfp: refact the mutex module
>   net/nfp: rename data field to sync with kernel driver
>   net/nfp: add the dev module
>   net/nfp: add header file for PCIe module
>   net/nfp: refact the cppcore module
>   net/nfp: refact the PCIe module
>   net/nfp: refact the cppcore and PCIe module
>   net/nfp: extend the usage of nfp BAR from 8 to 24
> 


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


For reference following sets merged (as set split into multiple series
because of send-email issues):
https://patchwork.dpdk.org/project/dpdk/list/?series=29547
https://patchwork.dpdk.org/project/dpdk/list/?series=29559
https://patchwork.dpdk.org/project/dpdk/list/?series=29560