[v6,00/15] A new net PMD - hinic
mbox series

Message ID cover.1561620219.git.xuanziyang2@huawei.com
Headers show
Series
  • A new net PMD - hinic
Related show

Message

Ziyang Xuan June 27, 2019, 8:10 a.m. UTC
This patch set adds support of a new net PMD
for Huawei Intelligent nic. This patch provides supoort
for basic RX/TX and the contorl path needed for it.
Later on new features will be added like VLAN, VFs, etc.

Basic features:
1. Basic device operations: probe, initialization, start/stop,
   configure, info get.
2. RX/TX queue operations: setup/release, start/stop.
3. RX/TX.

Stats:
1. statistics and extended  statistics.

---
v2:
 - Fix arm64 compilation issue.
 - Fix some checkpatch checks issues
 - Fix patches thread issue.
 - Fit to the newest rte_ prefix patch

v3:
 - Remove Rami from hinic pmd maintainers
 - Remove hinic_logs.* files and move log codes to other files
 - Remove the C++ guards within hinic pmd codes
 - Remove variable related errors shields from compilation files
 - Use lib link statu related functions but selfdefined
 - Fix x86_64-native-linuxapp-clang compilation errors
 - Fix i686-native-linuxapp-gcc compilation errors

v4:
 - Update doc hinic.ini and hinic.rst
 - Remove x86-32, i686, BSD, Power8, ARMv7 compilations
 - Fit to newest IPV4 and IPV6 uppercase

v5:
 - Update doc hinic.rst and release_19_08.rst
 - Delete unused codes
 - Optimize arch of codes and delete unnecessary files
 - Remove rte_panic
 - Subdivided patches

v6:
 - Adjust hinic pmd maintainers
 - Use "CONFIG_RTE_ARCH_X86_64" to determine X86_64 for SSE instruction
 - Fix "check-git-log.sh" checking errors
 - Move "hinic_pmd_ethdev.h" to patch 11/15, and
   "hinic_pmd_rx.h"/"hinic_pmd_tx.h" to patch 12/15

Ziyang Xuan (15):
  net/hinic/base: add HW registers definition
  net/hinic/base: add HW interfaces of bar operation
  net/hinic/base: add API command channel code
  net/hinic/base: add support for cmdq mechanism
  net/hinic/base: add eq mechanism function code
  net/hinic/base: add mgmt module function code
  net/hinic/base: add code about hardware operation
  net/hinic/base: add NIC business configurations
  net/hinic/base: add context and work queue support
  net/hinic/base: add various headers
  net/hinic: add hinic PMD build and doc files
  net/hinic: add device initailization
  net/hinic: add start stop close queue ops
  net/hinic: add Rx/Tx package burst
  net/hinic: add RSS stats promiscuous ops

 MAINTAINERS                                  |    8 +
 config/common_base                           |    5 +
 config/common_linux                          |    5 +
 config/defconfig_arm-armv7a-linuxapp-gcc     |    1 +
 config/defconfig_i686-native-linuxapp-gcc    |    5 +
 config/defconfig_i686-native-linuxapp-icc    |    5 +
 config/defconfig_ppc_64-power8-linuxapp-gcc  |    1 +
 config/defconfig_x86_64-native-linuxapp-icc  |    5 +
 config/defconfig_x86_x32-native-linuxapp-gcc |    5 +
 doc/guides/nics/features/hinic.ini           |   37 +
 doc/guides/nics/hinic.rst                    |   58 +
 doc/guides/rel_notes/release_19_08.rst       |    6 +
 drivers/net/Makefile                         |    1 +
 drivers/net/hinic/Makefile                   |   48 +
 drivers/net/hinic/base/hinic_compat.h        |  256 ++
 drivers/net/hinic/base/hinic_csr.h           |  160 ++
 drivers/net/hinic/base/hinic_pmd_api_cmd.c   | 1042 ++++++++
 drivers/net/hinic/base/hinic_pmd_api_cmd.h   |  271 ++
 drivers/net/hinic/base/hinic_pmd_cfg.c       |  208 ++
 drivers/net/hinic/base/hinic_pmd_cfg.h       |  145 ++
 drivers/net/hinic/base/hinic_pmd_cmd.h       |  453 ++++
 drivers/net/hinic/base/hinic_pmd_cmdq.c      |  849 +++++++
 drivers/net/hinic/base/hinic_pmd_cmdq.h      |  242 ++
 drivers/net/hinic/base/hinic_pmd_eqs.c       |  609 +++++
 drivers/net/hinic/base/hinic_pmd_eqs.h       |  101 +
 drivers/net/hinic/base/hinic_pmd_hwdev.c     | 1414 +++++++++++
 drivers/net/hinic/base/hinic_pmd_hwdev.h     |  485 ++++
 drivers/net/hinic/base/hinic_pmd_hwif.c      |  474 ++++
 drivers/net/hinic/base/hinic_pmd_hwif.h      |  119 +
 drivers/net/hinic/base/hinic_pmd_mgmt.c      |  773 ++++++
 drivers/net/hinic/base/hinic_pmd_mgmt.h      |  119 +
 drivers/net/hinic/base/hinic_pmd_niccfg.c    | 1276 ++++++++++
 drivers/net/hinic/base/hinic_pmd_niccfg.h    |  658 +++++
 drivers/net/hinic/base/hinic_pmd_nicio.c     |  894 +++++++
 drivers/net/hinic/base/hinic_pmd_nicio.h     |  265 ++
 drivers/net/hinic/base/hinic_pmd_wq.c        |  179 ++
 drivers/net/hinic/base/hinic_pmd_wq.h        |  137 +
 drivers/net/hinic/base/meson.build           |   24 +
 drivers/net/hinic/hinic_pmd_ethdev.c         | 2344 ++++++++++++++++++
 drivers/net/hinic/hinic_pmd_ethdev.h         |   71 +
 drivers/net/hinic/hinic_pmd_rx.c             | 1049 ++++++++
 drivers/net/hinic/hinic_pmd_rx.h             |  128 +
 drivers/net/hinic/hinic_pmd_tx.c             | 1248 ++++++++++
 drivers/net/hinic/hinic_pmd_tx.h             |  143 ++
 drivers/net/hinic/meson.build                |   13 +
 drivers/net/hinic/rte_pmd_hinic_version.map  |    4 +
 drivers/net/meson.build                      |    1 +
 mk/rte.app.mk                                |    1 +
 48 files changed, 16345 insertions(+)
 create mode 100644 doc/guides/nics/features/hinic.ini
 create mode 100644 doc/guides/nics/hinic.rst
 create mode 100644 drivers/net/hinic/Makefile
 create mode 100644 drivers/net/hinic/base/hinic_compat.h
 create mode 100644 drivers/net/hinic/base/hinic_csr.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_api_cmd.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_api_cmd.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cfg.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cfg.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cmd.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cmdq.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cmdq.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_eqs.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_eqs.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwdev.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwdev.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwif.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwif.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_mgmt.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_mgmt.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_niccfg.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_niccfg.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_nicio.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_nicio.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_wq.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_wq.h
 create mode 100644 drivers/net/hinic/base/meson.build
 create mode 100644 drivers/net/hinic/hinic_pmd_ethdev.c
 create mode 100644 drivers/net/hinic/hinic_pmd_ethdev.h
 create mode 100644 drivers/net/hinic/hinic_pmd_rx.c
 create mode 100644 drivers/net/hinic/hinic_pmd_rx.h
 create mode 100644 drivers/net/hinic/hinic_pmd_tx.c
 create mode 100644 drivers/net/hinic/hinic_pmd_tx.h
 create mode 100644 drivers/net/hinic/meson.build
 create mode 100644 drivers/net/hinic/rte_pmd_hinic_version.map

Comments

Ferruh Yigit June 27, 2019, 2:26 p.m. UTC | #1
On 6/27/2019 9:10 AM, Ziyang Xuan wrote:
> This patch set adds support of a new net PMD
> for Huawei Intelligent nic. This patch provides supoort
> for basic RX/TX and the contorl path needed for it.
> Later on new features will be added like VLAN, VFs, etc.
> 
> Basic features:
> 1. Basic device operations: probe, initialization, start/stop,
>    configure, info get.
> 2. RX/TX queue operations: setup/release, start/stop.
> 3. RX/TX.
> 
> Stats:
> 1. statistics and extended  statistics.
> 
> ---
> v2:
>  - Fix arm64 compilation issue.
>  - Fix some checkpatch checks issues
>  - Fix patches thread issue.
>  - Fit to the newest rte_ prefix patch
> 
> v3:
>  - Remove Rami from hinic pmd maintainers
>  - Remove hinic_logs.* files and move log codes to other files
>  - Remove the C++ guards within hinic pmd codes
>  - Remove variable related errors shields from compilation files
>  - Use lib link statu related functions but selfdefined
>  - Fix x86_64-native-linuxapp-clang compilation errors
>  - Fix i686-native-linuxapp-gcc compilation errors
> 
> v4:
>  - Update doc hinic.ini and hinic.rst
>  - Remove x86-32, i686, BSD, Power8, ARMv7 compilations
>  - Fit to newest IPV4 and IPV6 uppercase
> 
> v5:
>  - Update doc hinic.rst and release_19_08.rst
>  - Delete unused codes
>  - Optimize arch of codes and delete unnecessary files
>  - Remove rte_panic
>  - Subdivided patches
> 
> v6:
>  - Adjust hinic pmd maintainers
>  - Use "CONFIG_RTE_ARCH_X86_64" to determine X86_64 for SSE instruction
>  - Fix "check-git-log.sh" checking errors
>  - Move "hinic_pmd_ethdev.h" to patch 11/15, and
>    "hinic_pmd_rx.h"/"hinic_pmd_tx.h" to patch 12/15
> 
> Ziyang Xuan (15):
>   net/hinic/base: add HW registers definition
>   net/hinic/base: add HW interfaces of bar operation
>   net/hinic/base: add API command channel code
>   net/hinic/base: add support for cmdq mechanism
>   net/hinic/base: add eq mechanism function code
>   net/hinic/base: add mgmt module function code
>   net/hinic/base: add code about hardware operation
>   net/hinic/base: add NIC business configurations
>   net/hinic/base: add context and work queue support
>   net/hinic/base: add various headers
>   net/hinic: add hinic PMD build and doc files
>   net/hinic: add device initailization
>   net/hinic: add start stop close queue ops
>   net/hinic: add Rx/Tx package burst
>   net/hinic: add RSS stats promiscuous ops

For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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


This is first PMD from Huawei, welcome to dpdk, thanks for your efforts.
David Marchand Oct. 26, 2019, 2:43 p.m. UTC | #2
On Thu, Jun 27, 2019 at 4:26 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 6/27/2019 9:10 AM, Ziyang Xuan wrote:
> > This patch set adds support of a new net PMD
> > for Huawei Intelligent nic. This patch provides supoort
> > for basic RX/TX and the contorl path needed for it.
> > Later on new features will be added like VLAN, VFs, etc.
> >
> > Basic features:
> > 1. Basic device operations: probe, initialization, start/stop,
> >    configure, info get.
> > 2. RX/TX queue operations: setup/release, start/stop.
> > 3. RX/TX.
> >
> > Stats:
> > 1. statistics and extended  statistics.
> >
> > ---
> > v2:
> >  - Fix arm64 compilation issue.
> >  - Fix some checkpatch checks issues
> >  - Fix patches thread issue.
> >  - Fit to the newest rte_ prefix patch
> >
> > v3:
> >  - Remove Rami from hinic pmd maintainers
> >  - Remove hinic_logs.* files and move log codes to other files
> >  - Remove the C++ guards within hinic pmd codes
> >  - Remove variable related errors shields from compilation files
> >  - Use lib link statu related functions but selfdefined
> >  - Fix x86_64-native-linuxapp-clang compilation errors
> >  - Fix i686-native-linuxapp-gcc compilation errors
> >
> > v4:
> >  - Update doc hinic.ini and hinic.rst
> >  - Remove x86-32, i686, BSD, Power8, ARMv7 compilations
> >  - Fit to newest IPV4 and IPV6 uppercase
> >
> > v5:
> >  - Update doc hinic.rst and release_19_08.rst
> >  - Delete unused codes
> >  - Optimize arch of codes and delete unnecessary files
> >  - Remove rte_panic
> >  - Subdivided patches
> >
> > v6:
> >  - Adjust hinic pmd maintainers
> >  - Use "CONFIG_RTE_ARCH_X86_64" to determine X86_64 for SSE instruction
> >  - Fix "check-git-log.sh" checking errors
> >  - Move "hinic_pmd_ethdev.h" to patch 11/15, and
> >    "hinic_pmd_rx.h"/"hinic_pmd_tx.h" to patch 12/15
> >
> > Ziyang Xuan (15):
> >   net/hinic/base: add HW registers definition
> >   net/hinic/base: add HW interfaces of bar operation
> >   net/hinic/base: add API command channel code
> >   net/hinic/base: add support for cmdq mechanism
> >   net/hinic/base: add eq mechanism function code
> >   net/hinic/base: add mgmt module function code
> >   net/hinic/base: add code about hardware operation
> >   net/hinic/base: add NIC business configurations
> >   net/hinic/base: add context and work queue support
> >   net/hinic/base: add various headers
> >   net/hinic: add hinic PMD build and doc files
> >   net/hinic: add device initailization
> >   net/hinic: add start stop close queue ops
> >   net/hinic: add Rx/Tx package burst
> >   net/hinic: add RSS stats promiscuous ops
>
> For series,
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Series applied to dpdk-next-net/master, thanks.
>
>
> This is first PMD from Huawei, welcome to dpdk, thanks for your efforts.

This driver is explicitely disabled for FreeBSD with the make build framework.
But I am getting a build error with meson on FreeBSD.

ninja -C build-gcc-static
ninja: Entering directory `build-gcc-static'
[660/1372] Compiling C object
'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o'.
FAILED: drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o
ccache gcc -Idrivers/net/hinic/base/12a4447@@hinic_base@sta
-Idrivers/net/hinic/base -I../drivers/net/hinic/base -I. -I../
-Iconfig -I../config -Ilib/librte_eal/common/include
-I../lib/librte_eal/common/include
-I../lib/librte_eal/freebsd/eal/include -Ilib/librte_eal/common
-I../lib/librte_eal/common -Ilib/librte_eal/common/include/arch/x86
-I../lib/librte_eal/common/include/arch/x86 -Ilib/librte_eal
-I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs
-Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_net
-I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf
-Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring
-I../lib/librte_ring -Ilib/librte_meter -I../lib/librte_meter
-Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/bsd
-Ilib/librte_pci -I../lib/librte_pci -Ilib/librte_hash
-I../lib/librte_hash -fdiagnostics-color=always -pipe
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O3 -include
rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat-nonliteral
-Wformat-security -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare
-Wstrict-prototypes -Wundef -Wwrite-strings
-Wno-missing-field-initializers -D_GNU_SOURCE -D__BSD_VISIBLE -fPIC
-march=native -Wno-format-truncation -MD -MQ
'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o'
-MF 'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o.d'
-o 'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o'
-c ../drivers/net/hinic/base/hinic_pmd_cmdq.c
In file included from ../drivers/net/hinic/base/hinic_pmd_cmdq.c:5:0:
../drivers/net/hinic/base/hinic_compat.h: In function 'hinic_mutex_lock':
../drivers/net/hinic/base/hinic_compat.h:263:9: error: implicit
declaration of function 'pthread_mutex_consistent'; did you mean
'pthread_mutex_init'? [-Werror=implicit-function-declaration]
   (void)pthread_mutex_consistent(pthreadmutex);
         ^~~~~~~~~~~~~~~~~~~~~~~~
         pthread_mutex_init
../drivers/net/hinic/base/hinic_compat.h:263:9: error: nested extern
declaration of 'pthread_mutex_consistent' [-Werror=nested-externs]
cc1: all warnings being treated as errors

Please fix or disable compilation.
Thanks.
Wangxiaoyun (Cloud) Oct. 29, 2019, 6:43 a.m. UTC | #3
Hi David ,
     Thanks for your comments, I check the test-report from dpdk.org(https://mails.dpdk.org/archives/test-report/2019-October/101893.html),
which shows hinic pmd driver passed meson build on FreeBSD12-64, also I analysize the building errs, pthread_mutex_consistent is defined
in <pthread.h> on FreeBSD and we also include this head file, I don't known why it also built failed, is there any changes about the configuration?

Best regards
Xiaoyun Wang

在 2019/10/26 22:43, David Marchand 写道:
> On Thu, Jun 27, 2019 at 4:26 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>> On 6/27/2019 9:10 AM, Ziyang Xuan wrote:
>>> This patch set adds support of a new net PMD
>>> for Huawei Intelligent nic. This patch provides supoort
>>> for basic RX/TX and the contorl path needed for it.
>>> Later on new features will be added like VLAN, VFs, etc.
>>>
>>> Basic features:
>>> 1. Basic device operations: probe, initialization, start/stop,
>>>     configure, info get.
>>> 2. RX/TX queue operations: setup/release, start/stop.
>>> 3. RX/TX.
>>>
>>> Stats:
>>> 1. statistics and extended  statistics.
>>>
>>> ---
>>> v2:
>>>   - Fix arm64 compilation issue.
>>>   - Fix some checkpatch checks issues
>>>   - Fix patches thread issue.
>>>   - Fit to the newest rte_ prefix patch
>>>
>>> v3:
>>>   - Remove Rami from hinic pmd maintainers
>>>   - Remove hinic_logs.* files and move log codes to other files
>>>   - Remove the C++ guards within hinic pmd codes
>>>   - Remove variable related errors shields from compilation files
>>>   - Use lib link statu related functions but selfdefined
>>>   - Fix x86_64-native-linuxapp-clang compilation errors
>>>   - Fix i686-native-linuxapp-gcc compilation errors
>>>
>>> v4:
>>>   - Update doc hinic.ini and hinic.rst
>>>   - Remove x86-32, i686, BSD, Power8, ARMv7 compilations
>>>   - Fit to newest IPV4 and IPV6 uppercase
>>>
>>> v5:
>>>   - Update doc hinic.rst and release_19_08.rst
>>>   - Delete unused codes
>>>   - Optimize arch of codes and delete unnecessary files
>>>   - Remove rte_panic
>>>   - Subdivided patches
>>>
>>> v6:
>>>   - Adjust hinic pmd maintainers
>>>   - Use "CONFIG_RTE_ARCH_X86_64" to determine X86_64 for SSE instruction
>>>   - Fix "check-git-log.sh" checking errors
>>>   - Move "hinic_pmd_ethdev.h" to patch 11/15, and
>>>     "hinic_pmd_rx.h"/"hinic_pmd_tx.h" to patch 12/15
>>>
>>> Ziyang Xuan (15):
>>>    net/hinic/base: add HW registers definition
>>>    net/hinic/base: add HW interfaces of bar operation
>>>    net/hinic/base: add API command channel code
>>>    net/hinic/base: add support for cmdq mechanism
>>>    net/hinic/base: add eq mechanism function code
>>>    net/hinic/base: add mgmt module function code
>>>    net/hinic/base: add code about hardware operation
>>>    net/hinic/base: add NIC business configurations
>>>    net/hinic/base: add context and work queue support
>>>    net/hinic/base: add various headers
>>>    net/hinic: add hinic PMD build and doc files
>>>    net/hinic: add device initailization
>>>    net/hinic: add start stop close queue ops
>>>    net/hinic: add Rx/Tx package burst
>>>    net/hinic: add RSS stats promiscuous ops
>> For series,
>> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>
>> Series applied to dpdk-next-net/master, thanks.
>>
>>
>> This is first PMD from Huawei, welcome to dpdk, thanks for your efforts.
> This driver is explicitely disabled for FreeBSD with the make build framework.
> But I am getting a build error with meson on FreeBSD.
>
> ninja -C build-gcc-static
> ninja: Entering directory `build-gcc-static'
> [660/1372] Compiling C object
> 'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o'.
> FAILED: drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o
> ccache gcc -Idrivers/net/hinic/base/12a4447@@hinic_base@sta
> -Idrivers/net/hinic/base -I../drivers/net/hinic/base -I. -I../
> -Iconfig -I../config -Ilib/librte_eal/common/include
> -I../lib/librte_eal/common/include
> -I../lib/librte_eal/freebsd/eal/include -Ilib/librte_eal/common
> -I../lib/librte_eal/common -Ilib/librte_eal/common/include/arch/x86
> -I../lib/librte_eal/common/include/arch/x86 -Ilib/librte_eal
> -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs
> -Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_net
> -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf
> -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring
> -I../lib/librte_ring -Ilib/librte_meter -I../lib/librte_meter
> -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/bsd
> -Ilib/librte_pci -I../lib/librte_pci -Ilib/librte_hash
> -I../lib/librte_hash -fdiagnostics-color=always -pipe
> -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O3 -include
> rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat-nonliteral
> -Wformat-security -Wmissing-declarations -Wmissing-prototypes
> -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare
> -Wstrict-prototypes -Wundef -Wwrite-strings
> -Wno-missing-field-initializers -D_GNU_SOURCE -D__BSD_VISIBLE -fPIC
> -march=native -Wno-format-truncation -MD -MQ
> 'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o'
> -MF 'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o.d'
> -o 'drivers/net/hinic/base/12a4447@@hinic_base@sta/hinic_pmd_cmdq.c.o'
> -c ../drivers/net/hinic/base/hinic_pmd_cmdq.c
> In file included from ../drivers/net/hinic/base/hinic_pmd_cmdq.c:5:0:
> ../drivers/net/hinic/base/hinic_compat.h: In function 'hinic_mutex_lock':
> ../drivers/net/hinic/base/hinic_compat.h:263:9: error: implicit
> declaration of function 'pthread_mutex_consistent'; did you mean
> 'pthread_mutex_init'? [-Werror=implicit-function-declaration]
>     (void)pthread_mutex_consistent(pthreadmutex);
>           ^~~~~~~~~~~~~~~~~~~~~~~~
>           pthread_mutex_init
> ../drivers/net/hinic/base/hinic_compat.h:263:9: error: nested extern
> declaration of 'pthread_mutex_consistent' [-Werror=nested-externs]
> cc1: all warnings being treated as errors
>
> Please fix or disable compilation.
> Thanks.
>
David Marchand Oct. 29, 2019, 7:23 a.m. UTC | #4
On Tue, Oct 29, 2019 at 7:43 AM Wangxiaoyun (Cloud, Network Chip
Application Development Dept) <cloud.wangxiaoyun@huawei.com> wrote:
>
> Hi David ,
>     Thanks for your comments, I check the test-report from dpdk.org(https://mails.dpdk.org/archives/test-report/2019-October/101893.html),
> which shows hinic pmd driver passed meson build on FreeBSD12-64, also I analysize the building errs, pthread_mutex_consistent is defined
> in <pthread.h> on FreeBSD and we also include this head file, I don't known why it also built failed, is there any changes about the configuration?

Ok, my FreeBSD env could be broken, I will work on this.

I still want to understand the discrepancy between meson and make.
Is your driver supposed to compile/work on FreeBSD ?