[PATCH v9 03/15] net/zxdh: port tables init implementations
Stephen Hemminger
stephen at networkplumber.org
Tue Feb 4 03:35:00 CET 2025
On Tue, 21 Jan 2025 11:44:21 +0800
Junlong Wang <wang.junlong1 at zte.com.cn> wrote:
> insert port tables in host.
>
> Signed-off-by: Junlong Wang <wang.junlong1 at zte.com.cn>
> ---
> drivers/net/zxdh/meson.build | 1 +
> drivers/net/zxdh/zxdh_ethdev.c | 24 ++
> drivers/net/zxdh/zxdh_msg.c | 65 ++++
> drivers/net/zxdh/zxdh_msg.h | 72 ++++
> drivers/net/zxdh/zxdh_np.c | 648 ++++++++++++++++++++++++++++++++-
> drivers/net/zxdh/zxdh_np.h | 210 +++++++++++
> drivers/net/zxdh/zxdh_pci.h | 2 +
> drivers/net/zxdh/zxdh_tables.c | 105 ++++++
> drivers/net/zxdh/zxdh_tables.h | 148 ++++++++
> 9 files changed, 1274 insertions(+), 1 deletion(-)
> create mode 100644 drivers/net/zxdh/zxdh_tables.c
> create mode 100644 drivers/net/zxdh/zxdh_tables.h
This patch won't build if RTE_ASSERT's are enabled.
$ CC=clang meson setup -Dc_args='-DRTE_ENABLE_ASSERT' build
$ ninja -C build
../drivers/net/zxdh/zxdh_msg.c:1094:33: error: use of undeclared identifier 'zxdh_msg_reply_info'; did you mean 'zxdh_msg_chan_init'?
1094 | RTE_ASSERT(reply_len < sizeof(zxdh_msg_reply_info));
| ^~~~~~~~~~~~~~~~~~~
| zxdh_msg_chan_init
../lib/eal/include/rte_debug.h:47:36: note: expanded from macro 'RTE_ASSERT'
47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp)
| ^
../lib/eal/include/rte_debug.h:52:17: note: expanded from macro 'RTE_VERIFY'
52 | if (unlikely(!(exp))) \
| ^
../lib/eal/include/rte_branch_prediction.h:43:41: note: expanded from macro 'unlikely'
43 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
../drivers/net/zxdh/zxdh_msg.c:285:1: note: 'zxdh_msg_chan_init' declared here
285 | zxdh_msg_chan_init(void)
| ^
../drivers/net/zxdh/zxdh_msg.c:1094:32: warning: invalid application of 'sizeof' to a function type [-Wpointer-arith]
1094 | RTE_ASSERT(reply_len < sizeof(zxdh_msg_reply_info));
| ^~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_debug.h:47:36: note: expanded from macro 'RTE_ASSERT'
47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp)
| ^~~
../lib/eal/include/rte_debug.h:52:17: note: expanded from macro 'RTE_VERIFY'
52 | if (unlikely(!(exp))) \
| ^~~
../lib/eal/include/rte_branch_prediction.h:43:41: note: expanded from macro 'unlikely'
43 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
../drivers/net/zxdh/zxdh_msg.c:1146:33: error: use of undeclared identifier 'zxdh_msg_reply_info'; did you mean 'zxdh_msg_chan_init'?
1146 | RTE_ASSERT(reply_len < sizeof(zxdh_msg_reply_info));
| ^~~~~~~~~~~~~~~~~~~
| zxdh_msg_chan_init
../lib/eal/include/rte_debug.h:47:36: note: expanded from macro 'RTE_ASSERT'
47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp)
| ^
../lib/eal/include/rte_debug.h:52:17: note: expanded from macro 'RTE_VERIFY'
52 | if (unlikely(!(exp))) \
| ^
../lib/eal/include/rte_branch_prediction.h:43:41: note: expanded from macro 'unlikely'
43 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
../drivers/net/zxdh/zxdh_msg.c:285:1: note: 'zxdh_msg_chan_init' declared here
285 | zxdh_msg_chan_init(void)
| ^
../drivers/net/zxdh/zxdh_msg.c:1146:32: warning: invalid application of 'sizeof' to a function type [-Wpointer-arith]
1146 | RTE_ASSERT(reply_len < sizeof(zxdh_msg_reply_info));
| ^~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_debug.h:47:36: note: expanded from macro 'RTE_ASSERT'
47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp)
| ^~~
../lib/eal/include/rte_debug.h:52:17: note: expanded from macro 'RTE_VERIFY'
52 | if (unlikely(!(exp))) \
| ^~~
../lib/eal/include/rte_branch_prediction.h:43:41: note: expanded from macro 'unlikely'
43 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
More information about the dev
mailing list