From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5FBE545C16; Wed, 30 Oct 2024 16:40:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE9F04028F; Wed, 30 Oct 2024 16:40:08 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id 9A6D740281 for ; Wed, 30 Oct 2024 16:40:07 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2e2c6bc4840so5220361a91.2 for ; Wed, 30 Oct 2024 08:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1730302806; x=1730907606; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=6dyDtmD07WMucZikDNJ60k7nwuWrdFQdWcS4Fw1HkM0=; b=Lr2v/WRHdddBN4M5iqlgixKoGpR6ap0fz3vAZ3kqHAEPHo4UvKuAxX79CxOpPUvUrq NKX5EplgPQAW9S6cBZE+x7xKGMGhvT9wQhE1D7AEIte+GSdF0Cwufxv7ZFV5YrxcORzt 8e6RBMTy8YtmYpsKb3TALZTBXf/MgHreusG8eOV/m5gdD6hmLVx2NKK4NCN/XQfzjAf9 T/maQ5B+MQz3Z1khWe6kgJ9RUezU7ZgWwFT0z/XEsKmuDlBylcp4BxUuprYseunl3r7X UAIvvaUsKrofRLerL17hQihAFZqqsli0VXuGDnR987JvKy9UNPVDDi1z+u0c6P+KDsfM N5xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730302806; x=1730907606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6dyDtmD07WMucZikDNJ60k7nwuWrdFQdWcS4Fw1HkM0=; b=DkdzQOvWoIBi70TIz/58f+mVwX9ZFi5zJVgpurJzilSVL7g04ImKeyaoO8Y3D5GwKL vpC/KIO62HDt9K/RoloSEY28unrOPZueWA+HiREqUdHCiYVwhlLLxg1cMkpH1LNUlk0i AqgJkko1yo7pgk6E2vdfEt/HmdDAyCVVLSNmhgyjmQ6AWv2OcgfXsTYgRYK/hmQ2gbLC Ui48CSqxQLvx8Bl9PkWphMgU9eQQr6dWWb4dI8PnCklTmVX/qnOUFVC6Ul2/Jp3VpDrM beuNj01lf5HbFm3RJdJed2hK50sLFEut4DSDt0E5Q2HaFrmQ+Pkt0nTi+87udJRY9dE0 eOIA== X-Gm-Message-State: AOJu0YwPmMfjL36r9EpbPOtAfDt99xrdP/KmZh9UCXkeOPkhnvMjzJTU 9X6PvVRXoxyBcTsR9ON1kJ9Ewyh1bsUOQe8fb7l96uFnIfaBDsj8+wMWIzQT3HA= X-Google-Smtp-Source: AGHT+IFSNkqK0q5Rx+qw17Nr6Z/XL/xkHe7ORJZQK5KFhtjIO/4vZu+32Js6VI2J7lUM4UIzIH5nGQ== X-Received: by 2002:a17:90a:bc83:b0:2e2:d17e:1ef7 with SMTP id 98e67ed59e1d1-2e8f1054a67mr17018776a91.3.1730302806578; Wed, 30 Oct 2024 08:40:06 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e92fa3e250sm1916780a91.24.2024.10.30.08.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 08:40:06 -0700 (PDT) Date: Wed, 30 Oct 2024 08:40:05 -0700 From: Stephen Hemminger To: liwencheng Cc: dev@dpdk.org Subject: Re: [PATCH v1] net/macb: add new driver Message-ID: <20241030084005.06391ec9@hermes.local> In-Reply-To: <1730282009-562817-1-git-send-email-liwencheng@phytium.com.cn> References: <1730282009-562817-1-git-send-email-liwencheng@phytium.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 30 Oct 2024 09:53:29 +0000 liwencheng wrote: > add Phytium NIC MACB ethdev PMD driver. >=20 > Signed-off-by: liwencheng > --- > 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/m= eson-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 driv= ers/net/macb/base/libmacb_base.a.p/generic_phy.c.o drivers/libtmp_rte_net_m= acb.a.p/net_macb_macb_ethdev.c.o drivers/libtmp_rte_net_macb.a.p/net_macb_m= acb_rxtx.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-g= roup -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/ru= nner/work/dpdk/dpdk/build/lib -Wl,-rpath-link,/home/runner/work/dpdk/dpdk/b= uild/drivers lib/librte_ethdev.so.25.0 lib/librte_eal.so.25.0 lib/librte_kv= args.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/li= brte_pci.so.25.0 drivers/librte_bus_vdev.so.25.0 -Wl,--version-script=3D/ho= me/runner/work/dpdk/dpdk/drivers/version.map /usr/lib/x86_64-linux-gnu/libb= sd.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 fun= ction `macb_set_tx_function': /home/runner/work/dpdk/dpdk/build/../drivers/net/macb/macb_rxtx.c:550: unde= fined reference to `eth_macb_xmit_pkts_vec' /usr/bin/ld: drivers/libtmp_rte_net_macb.a.p/net_macb_macb_rxtx.c.o: in fun= ction `macb_set_rx_function': /home/runner/work/dpdk/dpdk/build/../drivers/net/macb/macb_rxtx.c:1243: und= efined reference to `eth_macb_recv_scattered_pkts_vec' Ignoring the CamelCase errors in base part, see the following issues report= ed by checkpatch. ### [PATCH] net/macb: add new driver WARNING:TYPO_SPELLING: 'asymetrically' may be misspelled - perhaps 'asymmet= rically'? #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: +=EF=BB=BF/* 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: +=EF=BB=BF/* 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 |=3D MACB_BIT(CAF); ^^^ WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line #5094: FILE: drivers/net/macb/macb_ethdev.h:2: +=EF=BB=BF/* 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: +=EF=BB=BF/* 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: +=EF=BB=BF/* 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