DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: liwencheng <liwencheng@phytium.com.cn>
Cc: dev@dpdk.org
Subject: Re: [PATCH v1] net/macb: add new driver
Date: Wed, 30 Oct 2024 08:40:05 -0700	[thread overview]
Message-ID: <20241030084005.06391ec9@hermes.local> (raw)
In-Reply-To: <1730282009-562817-1-git-send-email-liwencheng@phytium.com.cn>

On Wed, 30 Oct 2024 09:53:29 +0000
liwencheng <liwencheng@phytium.com.cn> wrote:

> add Phytium NIC MACB ethdev PMD driver.
> 
> Signed-off-by: liwencheng <liwencheng@phytium.com.cn>
> ---
>  drivers/net/macb/base/generic_phy.c   |  276 +++++
>  drivers/net/macb/base/generic_phy.h   |  198 ++++
>  drivers/net/macb/base/macb_common.c   |  667 +++++++++++
>  drivers/net/macb/base/macb_common.h   |  253 +++++
>  drivers/net/macb/base/macb_errno.h    |   54 +
>  drivers/net/macb/base/macb_hw.h       | 1138 +++++++++++++++++++
>  drivers/net/macb/base/macb_type.h     |   23 +
>  drivers/net/macb/base/macb_uio.c      |  354 ++++++
>  drivers/net/macb/base/macb_uio.h      |   50 +
>  drivers/net/macb/base/meson.build     |   26 +
>  drivers/net/macb/macb_ethdev.c        | 1972 +++++++++++++++++++++++++++++++++
>  drivers/net/macb/macb_ethdev.h        |   92 ++
>  drivers/net/macb/macb_log.h           |   19 +
>  drivers/net/macb/macb_rxtx.c          | 1386 +++++++++++++++++++++++
>  drivers/net/macb/macb_rxtx.h          |  325 ++++++
>  drivers/net/macb/macb_rxtx_vec_neon.c |  677 +++++++++++
>  drivers/net/macb/meson.build          |   18 +
>  drivers/net/meson.build               |    1 +
>  usertools/dpdk-devbind.py             |   95 +-
>  19 files changed, 7622 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/net/macb/base/generic_phy.c
>  create mode 100644 drivers/net/macb/base/generic_phy.h
>  create mode 100644 drivers/net/macb/base/macb_common.c
>  create mode 100644 drivers/net/macb/base/macb_common.h
>  create mode 100644 drivers/net/macb/base/macb_errno.h
>  create mode 100644 drivers/net/macb/base/macb_hw.h
>  create mode 100644 drivers/net/macb/base/macb_type.h
>  create mode 100644 drivers/net/macb/base/macb_uio.c
>  create mode 100644 drivers/net/macb/base/macb_uio.h
>  create mode 100644 drivers/net/macb/base/meson.build
>  create mode 100644 drivers/net/macb/macb_ethdev.c
>  create mode 100644 drivers/net/macb/macb_ethdev.h
>  create mode 100644 drivers/net/macb/macb_log.h
>  create mode 100644 drivers/net/macb/macb_rxtx.c
>  create mode 100644 drivers/net/macb/macb_rxtx.h
>  create mode 100644 drivers/net/macb/macb_rxtx_vec_neon.c
>  create mode 100644 drivers/net/macb/meson.build


Build fails.

gcc  -o drivers/librte_net_macb.so.25.0 drivers/librte_net_macb.so.25.0.p/meson-generated_.._rte_net_macb.pmd.c.o drivers/net/macb/base/libmacb_base.a.p/macb_common.c.o drivers/net/macb/base/libmacb_base.a.p/macb_uio.c.o drivers/net/macb/base/libmacb_base.a.p/generic_phy.c.o drivers/libtmp_rte_net_macb.a.p/net_macb_macb_ethdev.c.o drivers/libtmp_rte_net_macb.a.p/net_macb_macb_rxtx.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,librte_net_macb.so.25 -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lfdt '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home/runner/work/dpdk/dpdk/build/lib -Wl,-rpath-link,/home/runner/work/dpdk/dpdk/build/drivers lib/librte_ethdev.so.25.0 lib/librte_eal.so.25.0 lib/librte_kvargs.so.25.0 lib/librte_log.so.25.0 lib/librte_telemetry.so.25.0 lib/librte_net.so.25.0 lib/librte_mbuf.so.25.0 lib/librte_mempool.so.25.0 lib/librte_ring.so.25.0 lib/librte_meter.so.25.0 drivers/librte_bus_pci.so.25.0 lib/librte_pci.so.25.0 drivers/librte_bus_vdev.so.25.0 -Wl,--version-script=/home/runner/work/dpdk/dpdk/drivers/version.map /usr/lib/x86_64-linux-gnu/libbsd.so /usr/lib/x86_64-linux-gnu/libarchive.so -Wl,--end-group
/usr/bin/ld: drivers/libtmp_rte_net_macb.a.p/net_macb_macb_rxtx.c.o: in function `macb_set_tx_function':
/home/runner/work/dpdk/dpdk/build/../drivers/net/macb/macb_rxtx.c:550: undefined reference to `eth_macb_xmit_pkts_vec'
/usr/bin/ld: drivers/libtmp_rte_net_macb.a.p/net_macb_macb_rxtx.c.o: in function `macb_set_rx_function':
/home/runner/work/dpdk/dpdk/build/../drivers/net/macb/macb_rxtx.c:1243: undefined reference to `eth_macb_recv_scattered_pkts_vec'


Ignoring the CamelCase errors in base part, see the following issues reported by checkpatch.


### [PATCH] net/macb: add new driver

WARNING:TYPO_SPELLING: 'asymetrically' may be misspelled - perhaps 'asymmetrically'?
#382: FILE: drivers/net/macb/base/generic_phy.h:85:
+#define LPA_PAUSE_ASYM		0x0800	/* Can pause asymetrically     */
                       		      	             ^^^^^^^^^^^^^

WARNING:TYPO_SPELLING: 'Master' may be misspelled - perhaps 'Primary'?
#395: FILE: drivers/net/macb/base/generic_phy.h:98:
+#define LPA_1000MSFAIL		0x8000	/* Master/Slave resolution failure */
                       		      	   ^^^^^^
WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#1495: FILE: drivers/net/macb/base/macb_hw.h:2:
+/* Atmel MACB Ethernet Controller driver
+ *

WARNING:TYPO_SPELLING: 'Trnasmit' may be misspelled - perhaps 'Transmit'?
#1886: FILE: drivers/net/macb/base/macb_hw.h:393:
+#define MACB_COMP_OFFSET	5 /* Trnasmit complete */
                         	     ^^^^^^^^

WARNING:TYPO_SPELLING: 'Trnasmit' may be misspelled - perhaps 'Transmit'?
#1888: FILE: drivers/net/macb/base/macb_hw.h:395:
+#define MACB_UND_OFFSET		6 /* Trnasmit under run */
                        		     ^^^^^^^^

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#3116: FILE: drivers/net/macb/macb_ethdev.c:2:
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022~2023 Phytium Technology Co., Ltd.

WARNING:TYPO_SPELLING: 'cehcksum' may be misspelled - perhaps 'checksum'?
#3289: FILE: drivers/net/macb/macb_ethdev.c:175:
+	/* Enable RX cehcksum offload */
 	             ^^^^^^^^

WARNING:TYPO_SPELLING: 'CAF' may be misspelled - perhaps 'CALF'?
#4028: FILE: drivers/net/macb/macb_ethdev.c:914:
+		config |= MACB_BIT(CAF);
 		                   ^^^

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#5094: FILE: drivers/net/macb/macb_ethdev.h:2:
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Phytium Technology Co., Ltd.

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#5217: FILE: drivers/net/macb/macb_rxtx.c:2:
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Phytium Technology Co., Ltd.

WARNING:TYPO_SPELLING: 'aggresive' may be misspelled - perhaps 'aggressive'?
#5808: FILE: drivers/net/macb/macb_rxtx.c:593:
+	/* force tx_rs_thresh to adapt an aggresive tx_free_thresh */
 	                                  ^^^^^^^^^

WARNING:TYPO_SPELLING: 'Regualr' may be misspelled - perhaps 'Regular'?
#6460: FILE: drivers/net/macb/macb_rxtx.c:1245:
+			MACB_INFO("Using Regualr (non-vector) "
 			                 ^^^^^^^

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#6910: FILE: drivers/net/macb/macb_rxtx_vec_neon.c:2:
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Phytium Technology Co., Ltd.

total: 0 errors, 25 warnings, 7638 lines checked

Warning in drivers/net/macb/macb_log.h:
Prefer RTE_LOG_LINE/RTE_LOG_DP_LINE
Warning in drivers/net/macb/macb_ethdev.c:
Writing to stdout or stderr
Warning in drivers/net/macb/base/macb_uio.c:

Warning in drivers/net/macb/macb_rxtx.c:
Warning in drivers/net/macb/macb_rxtx_vec_neon.c:
Using rte_smp_[r/w]mb
Warning in drivers/net/macb/macb_rxtx_vec_neon.c:
Using __builtin helpers, prefer EAL macros
Warning in drivers/net/macb/macb_log.h:
Do not use variadic argument pack in macros
Warning in drivers/net/macb/meson.build:
Using experimental build flag for in-tree compilation
Please use __rte_aligned only for struct or union types alignment.

0/1 valid patch



  parent reply	other threads:[~2024-10-30 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30  9:53 liwencheng
2024-10-30 10:14 ` Bruce Richardson
2024-10-30 15:32 ` Stephen Hemminger
2024-10-30 15:40 ` Stephen Hemminger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-30  7:59 liwencheng
2024-10-30  5:51 liwencheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241030084005.06391ec9@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=liwencheng@phytium.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).