From: Stephen Hemminger <stephen@networkplumber.org>
To: Wenbo Cao <caowenbo@mucse.com>
Cc: thomas@monjalon.net, dev@dpdk.org, ferruh.yigit@amd.com,
andrew.rybchenko@oktetlabs.ru, yaojun@mucse.com
Subject: Re: [PATCH v13 00/28] [v13]drivers/net Add Support mucse N10 Pmd Driver
Date: Thu, 20 Feb 2025 09:44:24 -0800 [thread overview]
Message-ID: <CAOaVG14Xh899t0auHc+ePdV0tzg9Oa+2O29aA5M1bbRBQ5RkzQ@mail.gmail.com> (raw)
In-Reply-To: <1739951849-67601-1-git-send-email-caowenbo@mucse.com>
[-- Attachment #1: Type: text/plain, Size: 11014 bytes --]
Ran PVS studio against this patchset. The resulting warnings for
drivers/net/rnp were:
MESSAGES
LocationCodeMessage
Fails/Info
rnp_mac.c (251)
V610 <https://pvs-studio.com/en/docs/warnings/v610/> Undefined behavior.
Check the shift operator '>>='. The right operand ('....' = [0..65535]) is
greater than or equal to the length in bits of the promoted left operand.
rnp_mac.c (198)
V525 <https://pvs-studio.com/en/docs/warnings/v525/> The code contains the
collection of similar blocks. Check items 'flt_reg', 'vlan_reg', 'vlan_reg'
in lines 198, 199, 200.
rnp_mac.c (202)
V525 <https://pvs-studio.com/en/docs/warnings/v525/> The code contains the
collection of similar blocks. Check items 'flt_reg', 'vlan_reg', 'vlan_reg'
in lines 202, 203, 204.
rnp_osdep.h (129)
V576 <https://pvs-studio.com/en/docs/warnings/v576/> Incorrect format.
Consider checking the fourth actual argument of the 'snprintf' function.
The memsize type argument is expected.
rnp_osdep.h (33)
V677 <https://pvs-studio.com/en/docs/warnings/v677/> Custom declaration of
a standard 'dma_addr_t' type. The declaration from system header files
should be used instead.
rnp_ethdev.c (106)
V1032 <https://pvs-studio.com/en/docs/warnings/v1032/> The pointer 'msgbuf'
is cast to a more strictly aligned pointer type.
rnp_ethdev.c (254)
V1051 <https://pvs-studio.com/en/docs/warnings/v1051/> Consider checking
for misprints. It's possible that the 'dma_ctrl' should be checked here.
rnp_ethdev.c (1325)
V525 <https://pvs-studio.com/en/docs/warnings/v525/> The code contains the
collection of similar blocks. Check items 'eth_stats', 'mac_stats',
'mac_stats' in lines 1325, 1331, 1337.
rnp_ethdev.c (110)
V641 <https://pvs-studio.com/en/docs/warnings/v641/> The size of the
'msgbuf' buffer is not a multiple of the element size of the type 'struct
rnp_mbx_fw_cmd_reply'.
rnp_ethdev.c (113)
V641 <https://pvs-studio.com/en/docs/warnings/v641/> The size of the
'msgbuf' buffer is not a multiple of the element size of the type 'struct
rnp_mbx_fw_cmd_req'.
rnp_ethdev.c (725)
V1027 <https://pvs-studio.com/en/docs/warnings/v1027/> Pointer to an object
of the 'rte_device' class is cast to unrelated 'rte_pci_device' class.
rnp_ethdev.c (1646)
V1027 <https://pvs-studio.com/en/docs/warnings/v1027/> Pointer to an object
of the 'rte_device' class is cast to unrelated 'rte_pci_device' class.
rnp_ethdev.c (1777)
V1027 <https://pvs-studio.com/en/docs/warnings/v1027/> Pointer to an object
of the 'rte_device' class is cast to unrelated 'rte_pci_device' class.
rnp_link.c (192)
V519 <https://pvs-studio.com/en/docs/warnings/v519/> The
'link.link_autoneg' variable is assigned values twice successively. Perhaps
this is a mistake. Check lines: 186, 192.
rnp_link.c (359)
V547 <https://pvs-studio.com/en/docs/warnings/v547/> Expression
'!port->attr.link_ready' is always true.
rnp_link.c (113)
V1048 <https://pvs-studio.com/en/docs/warnings/v1048/> The 'lane' variable
was assigned the same value.
rnp_rxtx.c (1412)
V684 <https://pvs-studio.com/en/docs/warnings/v684/> A value of the
variable 'txbd->d.cmd' is not modified. Consider inspecting the expression.
It is possible that '1' should be present instead of '0'.
rnp_rxtx.c (1226)
V1027 <https://pvs-studio.com/en/docs/warnings/v1027/> Pointer to an object
of the 'rte_ether_hdr' class is cast to unrelated 'rte_vlan_hdr' class.
On Tue, Feb 18, 2025 at 11:58 PM Wenbo Cao <caowenbo@mucse.com> wrote:
> For This patchset just to support the basic chip init work
> and user can just found the eth_dev, but can't control more.
> For Now just support 2*10g nic,the chip can support
> 2*10g,4*10g,4*1g,8*1g,8*10g.
> The Feature rx side can support rx-cksum-offload,rss,vlan-filter
> flow_clow,uncast_filter,mcast_filter,1588,Jumbo-frame
> The Feature tx side can support tx-cksum-offload,tso,vxlan-tso
> flow director base on ntuple pattern of tcp/udp/ip/ eth_hdr->type
> for sriov is also support.
>
> Because of the chip design defect, for multiple-port mode
> one pci-bdf will have multiple-port (max can have four ports)
> so this code must be care of one bdf init multiple-port.
> v13:
> * Supplementary document about n10 network card characteristics.
> * update release_25_03.rst.
> * fixed the code style advisea Stephen Hemminger.
> * fixed the code issue check PVS-stdio for Static compilation error.
>
> v12:
> * fixed __rte_packed __deprecated__ compile issue.
>
> v11:
> * fixed array-bounds issue when used rte_memcpy src addr is
> * not enough to hold align dst.
> * improve efficient_code advised by Stephen
>
> v10:
> * fixed mingw windows meson issue
> * rnp not support windows for now.
>
> v9:
> * fixed commit log format check by devtools.
> * fixed code compile issue.
>
> v8:
> * fixed codespell issue.
> * fixed MAINTAINERS file
>
> v7:
> * add support nic basic feature such as rss vlan strip/filter,
> * mtu-change recv/send scater-recv/mutltiple-send.
> * fixed code rationality, advised by Ferruh Yigit.
> v6:
> * fixed the doc(rst) format problem advise by Thomas Monjalon
>
> v5:
> * fixed the symbol name require by the style documentation
>
> v4:
> * one patch has been forgot to upload :(
>
> v3:
> * fixed http://dpdk.org/patch/129830 FreeBSD 13 compile Issue
> * change iobar type to void suggest by Stephen Hemminger
> * add KMOD_DEP support for vfio-pci
> * change run-cmd argument parse check for invalid extra_args
>
> v2:
> * fixed MAINTAIN maillist fullname format
> * fixed driver/net/meson the order issue of new driver to driver list
> * improve virtual point function usage suggest by Stephen Hemminger
>
> Wenbo Cao (28):
> net/rnp: add skeleton
> net/rnp: add ethdev probe and remove
> net/rnp: add log
> net/rnp: support mailbox basic operate
> net/rnp: add device init and uninit
> net/rnp: add get device information operation
> net/rnp: add support MAC promisc mode
> net/rnp: add queue setup and release operations
> net/rnp: add queue stop and start operations
> net/rnp: add support device start stop operations
> net/rnp: add RSS support operations
> net/rnp: add support link update operations
> net/rnp: add support link setup operations
> net/rnp: add Rx burst simple support
> net/rnp: add Tx burst simple support
> net/rnp: add MTU set operation
> net/rnp: add Rx scatter segment version
> net/rnp: add Tx multiple segment version
> net/rnp: add support basic stats operation
> net/rnp: add support xstats operation
> net/rnp: add unicast MAC filter operation
> net/rnp: add supported packet types
> net/rnp: add support Rx checksum offload
> net/rnp: add support Tx TSO offload
> net/rnp: support VLAN offloads
> net/rnp: add support VLAN filters operations
> net/rnp: add queue info operation
> net/rnp: support Rx/Tx burst mode info
>
> .mailmap | 1 +
> MAINTAINERS | 6 +
> doc/guides/nics/features/rnp.ini | 33 +
> doc/guides/nics/img/mucse_nic_port.svg | 4023 ++++++++++++++++++++++++
> doc/guides/nics/index.rst | 1 +
> doc/guides/nics/rnp.rst | 124 +
> doc/guides/rel_notes/release_25_03.rst | 5 +
> drivers/net/meson.build | 1 +
> drivers/net/rnp/base/meson.build | 17 +
> drivers/net/rnp/base/rnp_bdq_if.c | 398 +++
> drivers/net/rnp/base/rnp_bdq_if.h | 154 +
> drivers/net/rnp/base/rnp_bitrev.h | 64 +
> drivers/net/rnp/base/rnp_common.c | 103 +
> drivers/net/rnp/base/rnp_common.h | 17 +
> drivers/net/rnp/base/rnp_crc32.c | 37 +
> drivers/net/rnp/base/rnp_crc32.h | 10 +
> drivers/net/rnp/base/rnp_dma_regs.h | 68 +
> drivers/net/rnp/base/rnp_eth_regs.h | 91 +
> drivers/net/rnp/base/rnp_fw_cmd.c | 162 +
> drivers/net/rnp/base/rnp_fw_cmd.h | 357 +++
> drivers/net/rnp/base/rnp_hw.h | 136 +
> drivers/net/rnp/base/rnp_mac.c | 358 +++
> drivers/net/rnp/base/rnp_mac.h | 34 +
> drivers/net/rnp/base/rnp_mac_regs.h | 208 ++
> drivers/net/rnp/base/rnp_mbx.c | 510 +++
> drivers/net/rnp/base/rnp_mbx.h | 58 +
> drivers/net/rnp/base/rnp_mbx_fw.c | 493 +++
> drivers/net/rnp/base/rnp_mbx_fw.h | 24 +
> drivers/net/rnp/base/rnp_osdep.h | 172 +
> drivers/net/rnp/meson.build | 27 +
> drivers/net/rnp/rnp.h | 258 ++
> drivers/net/rnp/rnp_ethdev.c | 1845 +++++++++++
> drivers/net/rnp/rnp_link.c | 439 +++
> drivers/net/rnp/rnp_link.h | 52 +
> drivers/net/rnp/rnp_logs.h | 36 +
> drivers/net/rnp/rnp_rss.c | 367 +++
> drivers/net/rnp/rnp_rss.h | 44 +
> drivers/net/rnp/rnp_rxtx.c | 1818 +++++++++++
> drivers/net/rnp/rnp_rxtx.h | 162 +
> 39 files changed, 12713 insertions(+)
> create mode 100644 doc/guides/nics/features/rnp.ini
> create mode 100644 doc/guides/nics/img/mucse_nic_port.svg
> create mode 100644 doc/guides/nics/rnp.rst
> create mode 100644 drivers/net/rnp/base/meson.build
> create mode 100644 drivers/net/rnp/base/rnp_bdq_if.c
> create mode 100644 drivers/net/rnp/base/rnp_bdq_if.h
> create mode 100644 drivers/net/rnp/base/rnp_bitrev.h
> create mode 100644 drivers/net/rnp/base/rnp_common.c
> create mode 100644 drivers/net/rnp/base/rnp_common.h
> create mode 100644 drivers/net/rnp/base/rnp_crc32.c
> create mode 100644 drivers/net/rnp/base/rnp_crc32.h
> create mode 100644 drivers/net/rnp/base/rnp_dma_regs.h
> create mode 100644 drivers/net/rnp/base/rnp_eth_regs.h
> create mode 100644 drivers/net/rnp/base/rnp_fw_cmd.c
> create mode 100644 drivers/net/rnp/base/rnp_fw_cmd.h
> create mode 100644 drivers/net/rnp/base/rnp_hw.h
> create mode 100644 drivers/net/rnp/base/rnp_mac.c
> create mode 100644 drivers/net/rnp/base/rnp_mac.h
> create mode 100644 drivers/net/rnp/base/rnp_mac_regs.h
> create mode 100644 drivers/net/rnp/base/rnp_mbx.c
> create mode 100644 drivers/net/rnp/base/rnp_mbx.h
> create mode 100644 drivers/net/rnp/base/rnp_mbx_fw.c
> create mode 100644 drivers/net/rnp/base/rnp_mbx_fw.h
> create mode 100644 drivers/net/rnp/base/rnp_osdep.h
> create mode 100644 drivers/net/rnp/meson.build
> create mode 100644 drivers/net/rnp/rnp.h
> create mode 100644 drivers/net/rnp/rnp_ethdev.c
> create mode 100644 drivers/net/rnp/rnp_link.c
> create mode 100644 drivers/net/rnp/rnp_link.h
> create mode 100644 drivers/net/rnp/rnp_logs.h
> create mode 100644 drivers/net/rnp/rnp_rss.c
> create mode 100644 drivers/net/rnp/rnp_rss.h
> create mode 100644 drivers/net/rnp/rnp_rxtx.c
> create mode 100644 drivers/net/rnp/rnp_rxtx.h
>
> --
> 2.25.1
>
>
[-- Attachment #2: Type: text/html, Size: 18763 bytes --]
prev parent reply other threads:[~2025-02-20 17:44 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 7:57 Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 01/28] net/rnp: add skeleton Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 02/28] net/rnp: add ethdev probe and remove Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 03/28] net/rnp: add log Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 04/28] net/rnp: support mailbox basic operate Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 05/28] net/rnp: add device init and uninit Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 06/28] net/rnp: add get device information operation Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 07/28] net/rnp: add support MAC promisc mode Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 08/28] net/rnp: add queue setup and release operations Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 09/28] net/rnp: add queue stop and start operations Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 10/28] net/rnp: add support device start stop operations Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 11/28] net/rnp: add RSS support operations Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 12/28] net/rnp: add support link update operations Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 13/28] net/rnp: add support link setup operations Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 14/28] net/rnp: add Rx burst simple support Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 15/28] net/rnp: add Tx " Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 16/28] net/rnp: add MTU set operation Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 17/28] net/rnp: add Rx scatter segment version Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 18/28] net/rnp: add Tx multiple " Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 19/28] net/rnp: add support basic stats operation Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 20/28] net/rnp: add support xstats operation Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 21/28] net/rnp: add unicast MAC filter operation Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 22/28] net/rnp: add supported packet types Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 23/28] net/rnp: add support Rx checksum offload Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 24/28] net/rnp: add support Tx TSO offload Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 25/28] net/rnp: support VLAN offloads Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 26/28] net/rnp: add support VLAN filters operations Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 27/28] net/rnp: add queue info operation Wenbo Cao
2025-02-19 7:57 ` [PATCH v13 28/28] net/rnp: support Rx/Tx burst mode info Wenbo Cao
2025-02-19 16:14 ` [PATCH v13 00/28] [v13]drivers/net Add Support mucse N10 Pmd Driver Stephen Hemminger
2025-02-20 5:06 ` 11
2025-02-20 17:44 ` Stephen Hemminger [this message]
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=CAOaVG14Xh899t0auHc+ePdV0tzg9Oa+2O29aA5M1bbRBQ5RkzQ@mail.gmail.com \
--to=stephen@networkplumber.org \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=caowenbo@mucse.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=thomas@monjalon.net \
--cc=yaojun@mucse.com \
/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).