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 8378245E0A; Mon, 2 Dec 2024 21:31:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81BDC40270; Mon, 2 Dec 2024 21:31:08 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 73D7F4025D for ; Mon, 2 Dec 2024 21:31:07 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-7fbc65f6c72so4475413a12.1 for ; Mon, 02 Dec 2024 12:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1733171466; x=1733776266; 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=wtz5mn6thmEsFLpqajAkpmXQmjn4Tx0gOqp7285Eb6E=; b=1Ad0aA368rKo7pQ2FZzUYXy+kkN4fssD/C1jv584ZgdDGLTSA+QtHyokkaQ3ooE/d2 VnAvpbXTXDFsYyiD/lNYrot1g6owcmPbZGlTfhnzljGOJOHvhJtiDSQ3RkH2BsfnALSr V3Nmh0LIgeFG3jsygmZhhj9p6DgC05qfNbmIUd3Q5hFDxqPmIuYZQHWUd0sgu0pmt+NE 8IqW0c1Rl0CqtXh1tx9WNTDBDLtov1d8Q0mUD7RK3b8SbCsMuOl3WI6cb6P42zDXpv2r bFAwXlH8+D3ZylKZW8LVRt8GVwcw2ggZKgzgZlHGx6JUJAUz3sAQraA6zn+TFHuBEGmS w5sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733171466; x=1733776266; 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=wtz5mn6thmEsFLpqajAkpmXQmjn4Tx0gOqp7285Eb6E=; b=ach4jsRzxU2KdUNweCvHsfsWZjCIZpuYRdbeHStUNOfktWQeSEaxP8pxAjispibung qcPv4Fvxvn9Nm2ufcRWrWQGE9+lIhJZ+jPpMvNTxZe+zeO4acx0CLAAjzCHDTTIhAssm lpXub/NYUzE1E5xRGHe8OH3xFj/KOi/xwY3rSD6elOpuVzYkI8rHvBm4MkXzIiqSbkeC r+ADxVfJGFsQcui7OYCISU50haZe+Q4j1Ol8J1gnSK7knpZ/7wb+cuJ7deGD+GxSVTKL dWKkjnpJhEMuK33KdRF5BOgQaYbtqTuxMDqKjfTBakD7PoGDy3Y56tymTruakL+VIADI 7YUQ== X-Gm-Message-State: AOJu0Yx91OzYKdYdelLQhBFI2idpP9vQXvzSfQH7Jb+JZpTaFjWgqjbn uuHXQJk1cBL5fyX+95Xuuu8+5Es4GWO12PgFY4o7ziy+Wb1qkCUujjasxqDPds2uFsm29/WSU0m B X-Gm-Gg: ASbGncsrTmGS90d8T1k2WnUDuvPvaP2RmL7CJ0rVy195juFUTVeg+dfxz85dHlqHlWn yQxyLUP9rIfKvm8rPZYYgeXgWIJX4B6YcsMXYg4PF1u4fMNEXiJVgcFtv++rZLxGEM1s/z+gcTc WeR2XVCjKEk7pET8DY3puBLF7C7Fqp6V8UO9KuJHzMd1+IFlgRiqJfuf29yrQACuSNw8HiB7D7O wLpszta1zfIA/dWJbJNe5Gf89aPtnAFy6xYJ8hSosOMrZG3KAG+u9hABc3TgEZsUYJLOs4R9GZZ jYyTmskUWMigSBy9krBBy7eDtsk= X-Google-Smtp-Source: AGHT+IF+VA1Rco9bqxrXie0PADOdTA4aestpm83izrtlwxs3sQTNOokSRz1MUZuwGRc85M2zMrjU5Q== X-Received: by 2002:a05:6a20:a11e:b0:1e0:dc5b:6e21 with SMTP id adf61e73a8af0-1e0e0b20763mr36128078637.21.1733171466114; Mon, 02 Dec 2024 12:31:06 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fc9c2f7802sm8259296a12.27.2024.12.02.12.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 12:31:05 -0800 (PST) Date: Mon, 2 Dec 2024 12:31:03 -0800 From: Stephen Hemminger To: liwencheng Cc: dev@dpdk.org Subject: Re: [PATCH v2 1/3] net/macb: add new driver Message-ID: <20241202123103.70e7af2e@hermes.local> In-Reply-To: <1730863931-1309539-1-git-send-email-liwencheng@phytium.com.cn> References: <1730796099-1235390-1-git-send-email-liwencheng@phytium.com.cn> <1730863931-1309539-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, 6 Nov 2024 03:32:11 +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 | 1136 +++++++++++++++++++++ > drivers/net/macb/base/macb_type.h | 23 + > drivers/net/macb/base/macb_uio.c | 351 +++++++ > drivers/net/macb/base/macb_uio.h | 50 + > drivers/net/macb/base/meson.build | 26 + > drivers/net/macb/macb_ethdev.c | 1885 +++++++++++++++++++++++++++++= ++++++ > drivers/net/macb/macb_ethdev.h | 91 ++ > drivers/net/macb/macb_log.h | 19 + > drivers/net/macb/macb_rxtx.c | 1380 +++++++++++++++++++++++++ > drivers/net/macb/macb_rxtx.h | 325 ++++++ > drivers/net/macb/meson.build | 18 + > drivers/net/meson.build | 1 + > 17 files changed, 6753 insertions(+) > 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/meson.build Please send v3 addressing my previous comments: For better review, it is preferred that drivers be broken into smaller chunks when submitting. https://doc.dpdk.org/guides/contributing/new_driver.html 1. Missing documentation all new drivers need to have documentation in doc/guides/nics to describe hardware and features. 2. Missing license tag. These files are missing required SPDX license tags: drivers/net/macb/base/generic_phy.h drivers/net/macb/base/macb_errno.h drivers/net/macb/base/macb_hw.h 3. Missing mailmap entry 4. Missing update to MAINTAINERS 5. Build fails with lastest GCC. The problem is you chose too long a name f= or some of the xstats. Recommend choosing same name as other drivers if possible. Warnings found: [1307/3230] Compiling C object drivers/libtmp_rte_net_macb.a.p/net_macb_mac= b_ethdev.c.o In file included from ../drivers/net/macb/base/macb_common.h:36, from ../drivers/net/macb/macb_ethdev.h:10, from ../drivers/net/macb/macb_rxtx.h:8, from ../drivers/net/macb/macb_ethdev.c:11: ../drivers/net/macb/base/macb_hw.h:1063:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1063:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1088:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1088:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ [1326/3230] Compiling C object drivers/libtmp_rte_net_macb.a.p/net_macb_mac= b_rxtx.c.o In file included from ../drivers/net/macb/base/macb_common.h:36, from ../drivers/net/macb/macb_ethdev.h:10, from ../drivers/net/macb/macb_rxtx.h:8, from ../drivers/net/macb/macb_rxtx.c:24: ../drivers/net/macb/base/macb_hw.h:1063:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1063:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1088:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1088:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ [2338/3230] Compiling C object drivers/net/macb/base/libmacb_base.a.p/gener= ic_phy.c.o In file included from ../drivers/net/macb/base/macb_common.h:36, from ../drivers/net/macb/base/generic_phy.h:4, from ../drivers/net/macb/base/generic_phy.c:5: ../drivers/net/macb/base/macb_hw.h:1063:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1063:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1088:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1088:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ [2343/3230] Compiling C object drivers/net/macb/base/libmacb_base.a.p/macb_= uio.c.o In file included from ../drivers/net/macb/base/macb_common.h:36, from ../drivers/net/macb/base/macb_uio.h:4, from ../drivers/net/macb/base/macb_uio.c:6: ../drivers/net/macb/base/macb_hw.h:1063:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1063:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1088:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1088:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ [2352/3230] Compiling C object drivers/net/macb/base/libmacb_base.a.p/macb_= common.c.o In file included from ../drivers/net/macb/base/macb_common.h:36, from ../drivers/net/macb/base/macb_uio.h:4, from ../drivers/net/macb/base/macb_common.c:7: ../drivers/net/macb/base/macb_hw.h:1063:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1063:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1063 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1088:35: warning: initializer-string for= array of =E2=80=98char=E2=80=99 is too long [-Wunterminated-string-initial= ization] 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/macb/base/macb_hw.h:1043:24: note: in definition of macro = =E2=80=98GEM_STAT_TITLE_BITS=E2=80=99 1043 | .stat_string =3D title, \ | ^~~~~ ../drivers/net/macb/base/macb_hw.h:1088:9: note: in expansion of macro =E2= =80=98GEM_STAT_TITLE=E2=80=99 1088 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames= "),