mbox series

[v5,00/24] net: ngbe PMD

Message ID 20210602094108.1575640-1-jiawenwu@trustnetic.com (mailing list archive)
Headers show
Series net: ngbe PMD | expand

Message

Jiawen Wu June 2, 2021, 9:40 a.m. UTC
This patch set provides a skeleton of ngbe PMD,
which adapted to Wangxun WX1860 series NICs.

v5:
- Extend patches with device initialization and RxTx functions.

v4:
- Fix compile error.

v3:
- Use rte_ether functions to define marcos.

v2:
- Correct some clerical errors.
- Use ethdev debug flags instead of driver own.

Jiawen Wu (24):
  net/ngbe: add build and doc infrastructure
  net/ngbe: add device IDs
  net/ngbe: support probe and remove
  net/ngbe: add device init and uninit
  net/ngbe: add log type and error type
  net/ngbe: define registers
  net/ngbe: set MAC type and LAN id
  net/ngbe: init and validate EEPROM
  net/ngbe: add HW initialization
  net/ngbe: identify PHY and reset PHY
  net/ngbe: store MAC address
  net/ngbe: add info get operation
  net/ngbe: support link update
  net/ngbe: setup the check PHY link
  net/ngbe: add Rx queue setup and release
  net/ngbe: add Tx queue setup and release
  net/ngbe: add Rx and Tx init
  net/ngbe: add packet type
  net/ngbe: add simple Rx and Tx flow
  net/ngbe: support bulk and scatter Rx
  net/ngbe: support full-featured Tx path
  net/ngbe: add device start operation
  net/ngbe: start and stop RxTx
  net/ngbe: add device stop operation

 MAINTAINERS                            |    6 +
 doc/guides/nics/features/ngbe.ini      |   25 +
 doc/guides/nics/index.rst              |    1 +
 doc/guides/nics/ngbe.rst               |   58 +
 doc/guides/rel_notes/release_21_08.rst |    6 +
 drivers/net/meson.build                |    1 +
 drivers/net/ngbe/base/meson.build      |   26 +
 drivers/net/ngbe/base/ngbe.h           |   11 +
 drivers/net/ngbe/base/ngbe_devids.h    |   84 +
 drivers/net/ngbe/base/ngbe_dummy.h     |  209 ++
 drivers/net/ngbe/base/ngbe_eeprom.c    |  203 ++
 drivers/net/ngbe/base/ngbe_eeprom.h    |   17 +
 drivers/net/ngbe/base/ngbe_hw.c        | 1069 +++++++++
 drivers/net/ngbe/base/ngbe_hw.h        |   59 +
 drivers/net/ngbe/base/ngbe_mng.c       |  198 ++
 drivers/net/ngbe/base/ngbe_mng.h       |   65 +
 drivers/net/ngbe/base/ngbe_osdep.h     |  178 ++
 drivers/net/ngbe/base/ngbe_phy.c       |  451 ++++
 drivers/net/ngbe/base/ngbe_phy.h       |   62 +
 drivers/net/ngbe/base/ngbe_phy_mvl.c   |  251 +++
 drivers/net/ngbe/base/ngbe_phy_mvl.h   |   97 +
 drivers/net/ngbe/base/ngbe_phy_rtl.c   |  240 ++
 drivers/net/ngbe/base/ngbe_phy_rtl.h   |   89 +
 drivers/net/ngbe/base/ngbe_phy_yt.c    |  272 +++
 drivers/net/ngbe/base/ngbe_phy_yt.h    |   76 +
 drivers/net/ngbe/base/ngbe_regs.h      | 1490 +++++++++++++
 drivers/net/ngbe/base/ngbe_status.h    |  125 ++
 drivers/net/ngbe/base/ngbe_type.h      |  210 ++
 drivers/net/ngbe/meson.build           |   22 +
 drivers/net/ngbe/ngbe_ethdev.c         | 1266 +++++++++++
 drivers/net/ngbe/ngbe_ethdev.h         |  146 ++
 drivers/net/ngbe/ngbe_logs.h           |   46 +
 drivers/net/ngbe/ngbe_ptypes.c         |  640 ++++++
 drivers/net/ngbe/ngbe_ptypes.h         |  351 +++
 drivers/net/ngbe/ngbe_rxtx.c           | 2829 ++++++++++++++++++++++++
 drivers/net/ngbe/ngbe_rxtx.h           |  366 +++
 drivers/net/ngbe/version.map           |    3 +
 37 files changed, 11248 insertions(+)
 create mode 100644 doc/guides/nics/features/ngbe.ini
 create mode 100644 doc/guides/nics/ngbe.rst
 create mode 100644 drivers/net/ngbe/base/meson.build
 create mode 100644 drivers/net/ngbe/base/ngbe.h
 create mode 100644 drivers/net/ngbe/base/ngbe_devids.h
 create mode 100644 drivers/net/ngbe/base/ngbe_dummy.h
 create mode 100644 drivers/net/ngbe/base/ngbe_eeprom.c
 create mode 100644 drivers/net/ngbe/base/ngbe_eeprom.h
 create mode 100644 drivers/net/ngbe/base/ngbe_hw.c
 create mode 100644 drivers/net/ngbe/base/ngbe_hw.h
 create mode 100644 drivers/net/ngbe/base/ngbe_mng.c
 create mode 100644 drivers/net/ngbe/base/ngbe_mng.h
 create mode 100644 drivers/net/ngbe/base/ngbe_osdep.h
 create mode 100644 drivers/net/ngbe/base/ngbe_phy.c
 create mode 100644 drivers/net/ngbe/base/ngbe_phy.h
 create mode 100644 drivers/net/ngbe/base/ngbe_phy_mvl.c
 create mode 100644 drivers/net/ngbe/base/ngbe_phy_mvl.h
 create mode 100644 drivers/net/ngbe/base/ngbe_phy_rtl.c
 create mode 100644 drivers/net/ngbe/base/ngbe_phy_rtl.h
 create mode 100644 drivers/net/ngbe/base/ngbe_phy_yt.c
 create mode 100644 drivers/net/ngbe/base/ngbe_phy_yt.h
 create mode 100644 drivers/net/ngbe/base/ngbe_regs.h
 create mode 100644 drivers/net/ngbe/base/ngbe_status.h
 create mode 100644 drivers/net/ngbe/base/ngbe_type.h
 create mode 100644 drivers/net/ngbe/meson.build
 create mode 100644 drivers/net/ngbe/ngbe_ethdev.c
 create mode 100644 drivers/net/ngbe/ngbe_ethdev.h
 create mode 100644 drivers/net/ngbe/ngbe_logs.h
 create mode 100644 drivers/net/ngbe/ngbe_ptypes.c
 create mode 100644 drivers/net/ngbe/ngbe_ptypes.h
 create mode 100644 drivers/net/ngbe/ngbe_rxtx.c
 create mode 100644 drivers/net/ngbe/ngbe_rxtx.h
 create mode 100644 drivers/net/ngbe/version.map

Comments

Jiawen Wu June 11, 2021, 1:38 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Jiawen Wu <jiawenwu@trustnetic.com>
> Sent: Wednesday, June 2, 2021 5:41 PM
> To: dev@dpdk.org
> Cc: Jiawen Wu <jiawenwu@trustnetic.com>
> Subject: [PATCH v5 00/24] net: ngbe PMD
> 
> This patch set provides a skeleton of ngbe PMD, which adapted to Wangxun
> WX1860 series NICs.
> 
> v5:
> - Extend patches with device initialization and RxTx functions.
> 
> v4:
> - Fix compile error.
> 
> v3:
> - Use rte_ether functions to define marcos.
> 
> v2:
> - Correct some clerical errors.
> - Use ethdev debug flags instead of driver own.
> 
> Jiawen Wu (24):
>   net/ngbe: add build and doc infrastructure
>   net/ngbe: add device IDs
>   net/ngbe: support probe and remove
>   net/ngbe: add device init and uninit
>   net/ngbe: add log type and error type
>   net/ngbe: define registers
>   net/ngbe: set MAC type and LAN id
>   net/ngbe: init and validate EEPROM
>   net/ngbe: add HW initialization
>   net/ngbe: identify PHY and reset PHY
>   net/ngbe: store MAC address
>   net/ngbe: add info get operation
>   net/ngbe: support link update
>   net/ngbe: setup the check PHY link
>   net/ngbe: add Rx queue setup and release
>   net/ngbe: add Tx queue setup and release
>   net/ngbe: add Rx and Tx init
>   net/ngbe: add packet type
>   net/ngbe: add simple Rx and Tx flow
>   net/ngbe: support bulk and scatter Rx
>   net/ngbe: support full-featured Tx path
>   net/ngbe: add device start operation
>   net/ngbe: start and stop RxTx
>   net/ngbe: add device stop operation
> 
>  MAINTAINERS                            |    6 +
>  doc/guides/nics/features/ngbe.ini      |   25 +
>  doc/guides/nics/index.rst              |    1 +
>  doc/guides/nics/ngbe.rst               |   58 +
>  doc/guides/rel_notes/release_21_08.rst |    6 +
>  drivers/net/meson.build                |    1 +
>  drivers/net/ngbe/base/meson.build      |   26 +
>  drivers/net/ngbe/base/ngbe.h           |   11 +
>  drivers/net/ngbe/base/ngbe_devids.h    |   84 +
>  drivers/net/ngbe/base/ngbe_dummy.h     |  209 ++
>  drivers/net/ngbe/base/ngbe_eeprom.c    |  203 ++
>  drivers/net/ngbe/base/ngbe_eeprom.h    |   17 +
>  drivers/net/ngbe/base/ngbe_hw.c        | 1069 +++++++++
>  drivers/net/ngbe/base/ngbe_hw.h        |   59 +
>  drivers/net/ngbe/base/ngbe_mng.c       |  198 ++
>  drivers/net/ngbe/base/ngbe_mng.h       |   65 +
>  drivers/net/ngbe/base/ngbe_osdep.h     |  178 ++
>  drivers/net/ngbe/base/ngbe_phy.c       |  451 ++++
>  drivers/net/ngbe/base/ngbe_phy.h       |   62 +
>  drivers/net/ngbe/base/ngbe_phy_mvl.c   |  251 +++
>  drivers/net/ngbe/base/ngbe_phy_mvl.h   |   97 +
>  drivers/net/ngbe/base/ngbe_phy_rtl.c   |  240 ++
>  drivers/net/ngbe/base/ngbe_phy_rtl.h   |   89 +
>  drivers/net/ngbe/base/ngbe_phy_yt.c    |  272 +++
>  drivers/net/ngbe/base/ngbe_phy_yt.h    |   76 +
>  drivers/net/ngbe/base/ngbe_regs.h      | 1490 +++++++++++++
>  drivers/net/ngbe/base/ngbe_status.h    |  125 ++
>  drivers/net/ngbe/base/ngbe_type.h      |  210 ++
>  drivers/net/ngbe/meson.build           |   22 +
>  drivers/net/ngbe/ngbe_ethdev.c         | 1266 +++++++++++
>  drivers/net/ngbe/ngbe_ethdev.h         |  146 ++
>  drivers/net/ngbe/ngbe_logs.h           |   46 +
>  drivers/net/ngbe/ngbe_ptypes.c         |  640 ++++++
>  drivers/net/ngbe/ngbe_ptypes.h         |  351 +++
>  drivers/net/ngbe/ngbe_rxtx.c           | 2829
> ++++++++++++++++++++++++
>  drivers/net/ngbe/ngbe_rxtx.h           |  366 +++
>  drivers/net/ngbe/version.map           |    3 +
>  37 files changed, 11248 insertions(+)
>  create mode 100644 doc/guides/nics/features/ngbe.ini  create mode
> 100644 doc/guides/nics/ngbe.rst  create mode 100644
> drivers/net/ngbe/base/meson.build  create mode 100644
> drivers/net/ngbe/base/ngbe.h  create mode 100644
> drivers/net/ngbe/base/ngbe_devids.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_dummy.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_eeprom.c
>  create mode 100644 drivers/net/ngbe/base/ngbe_eeprom.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_hw.c  create mode
> 100644 drivers/net/ngbe/base/ngbe_hw.h  create mode 100644
> drivers/net/ngbe/base/ngbe_mng.c  create mode 100644
> drivers/net/ngbe/base/ngbe_mng.h  create mode 100644
> drivers/net/ngbe/base/ngbe_osdep.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_phy.c  create mode
> 100644 drivers/net/ngbe/base/ngbe_phy.h  create mode 100644
> drivers/net/ngbe/base/ngbe_phy_mvl.c
>  create mode 100644 drivers/net/ngbe/base/ngbe_phy_mvl.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_phy_rtl.c
>  create mode 100644 drivers/net/ngbe/base/ngbe_phy_rtl.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_phy_yt.c
>  create mode 100644 drivers/net/ngbe/base/ngbe_phy_yt.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_regs.h  create mode
> 100644 drivers/net/ngbe/base/ngbe_status.h
>  create mode 100644 drivers/net/ngbe/base/ngbe_type.h  create mode
> 100644 drivers/net/ngbe/meson.build  create mode 100644
> drivers/net/ngbe/ngbe_ethdev.c  create mode 100644
> drivers/net/ngbe/ngbe_ethdev.h  create mode 100644
> drivers/net/ngbe/ngbe_logs.h  create mode 100644
> drivers/net/ngbe/ngbe_ptypes.c  create mode 100644
> drivers/net/ngbe/ngbe_ptypes.h  create mode 100644
> drivers/net/ngbe/ngbe_rxtx.c  create mode 100644
> drivers/net/ngbe/ngbe_rxtx.h  create mode 100644
> drivers/net/ngbe/version.map
> 
> --
> 2.27.0
Andrew Rybchenko June 14, 2021, 8:56 p.m. UTC | #2
On 6/2/21 12:40 PM, Jiawen Wu wrote:
> This patch set provides a skeleton of ngbe PMD,
> which adapted to Wangxun WX1860 series NICs.

My main concerns for the patch series except style notes is a separation
info patches. Every patch should be testable. I should be able to stop
at any patch in the series, do build and test functionality added by the
patch. It should be no dead code. Split should be feature based and
different features should be added by different patches.

Above requirements are not that strict for base driver. Of course, it
would be useful to follow it, but not strictly required since sometimes
it is very hard to do.

As for the PMD specific code, it should be done this way. Otherwise,
it is almost impossible to review it and understand if something is
lost or missing or inconsistent.

Of course, closely related features with share almost all its code may
be added together.

Initially the driver should be built up to the working state with
absolute minimum feature set. No offloads, no extra configuration
options. It should be able to probe, configure, start, Rx, Tx, stop,
reconfigure, start again etc, close. Subsequent patches should add
features one by one: loopback, deferrred start, various offloads,
ptype etc.