net/ntnic: initial commit which adds register defines
Subsystems (2)
PATCH v16 4/8 net/ntnic: adds flow related FPGA functionality
In reply to Mykola KostenokFrom: Christian Koue Muf <[email protected]>
The PMD will control the registers used for flow programming, and this commit adds support for this.
---
v2:
* Fixed compilation with Fedora 38
--- drivers/net/ntnic/meson.build | 21 + .../ntnic/nthw/flow_filter/flow_nthw_cat.c | 1107 ++++++++++++++++ .../ntnic/nthw/flow_filter/flow_nthw_cat.h | 372 ++++++ .../ntnic/nthw/flow_filter/flow_nthw_csu.c | 146 +++ .../ntnic/nthw/flow_filter/flow_nthw_csu.h | 42 + .../ntnic/nthw/flow_filter/flow_nthw_flm.c | 1140 +++++++++++++++++ .../ntnic/nthw/flow_filter/flow_nthw_flm.h | 422 ++++++ .../ntnic/nthw/flow_filter/flow_nthw_hfu.c | 293 +++++ .../ntnic/nthw/flow_filter/flow_nthw_hfu.h | 100 ++ .../ntnic/nthw/flow_filter/flow_nthw_hsh.c | 254 ++++ .../ntnic/nthw/flow_filter/flow_nthw_hsh.h | 81 ++ .../ntnic/nthw/flow_filter/flow_nthw_hst.c | 202 +++ .../ntnic/nthw/flow_filter/flow_nthw_hst.h | 72 ++ .../ntnic/nthw/flow_filter/flow_nthw_ifr.c | 93 ++ .../ntnic/nthw/flow_filter/flow_nthw_ifr.h | 39 + .../ntnic/nthw/flow_filter/flow_nthw_info.c | 341 +++++ .../ntnic/nthw/flow_filter/flow_nthw_info.h | 104 ++ .../ntnic/nthw/flow_filter/flow_nthw_ioa.c | 234 ++++ .../ntnic/nthw/flow_filter/flow_nthw_ioa.h | 80 ++ .../net/ntnic/nthw/flow_filter/flow_nthw_km.c | 685 ++++++++++ .../net/ntnic/nthw/flow_filter/flow_nthw_km.h | 224 ++++ .../ntnic/nthw/flow_filter/flow_nthw_pdb.c | 230 ++++ .../ntnic/nthw/flow_filter/flow_nthw_pdb.h | 84 ++ .../ntnic/nthw/flow_filter/flow_nthw_qsl.c | 355 +++++ .../ntnic/nthw/flow_filter/flow_nthw_qsl.h | 121 ++ .../ntnic/nthw/flow_filter/flow_nthw_rmc.c | 112 ++ .../ntnic/nthw/flow_filter/flow_nthw_rmc.h | 40 + .../ntnic/nthw/flow_filter/flow_nthw_roa.c | 294 +++++ .../ntnic/nthw/flow_filter/flow_nthw_roa.h | 109 ++ .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c | 132 ++ .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h | 53 + .../ntnic/nthw/flow_filter/flow_nthw_slc.c | 109 ++ .../ntnic/nthw/flow_filter/flow_nthw_slc.h | 46 + .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c | 109 ++ .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.h | 46 + .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c | 394 ++++++ .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h | 72 ++ .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c | 96 ++ .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.h | 42 + .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c | 165 +++ .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h | 70 + 41 files changed, 8731 insertions(+) create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
drivers/net/ntnic/meson.build +21 -0
@@ -18,6 +18,7 @@ includes = [ include_directories('nthw'), include_directories('nthw/core'), include_directories('nthw/supported'), + include_directories('nthw/flow_filter'), include_directories('sensors'), include_directories('sensors/avr_sensors'), include_directories('sensors/board_sensors'),
@@ -59,6 +60,26 @@ sources = files( 'nthw/core/nthw_spim.c', 'nthw/core/nthw_spis.c', 'nthw/core/nthw_tsm.c', + 'nthw/flow_filter/flow_nthw_cat.c', + 'nthw/flow_filter/flow_nthw_csu.c', + 'nthw/flow_filter/flow_nthw_flm.c', + 'nthw/flow_filter/flow_nthw_hfu.c', + 'nthw/flow_filter/flow_nthw_hsh.c', + 'nthw/flow_filter/flow_nthw_hst.c', + 'nthw/flow_filter/flow_nthw_ifr.c', + 'nthw/flow_filter/flow_nthw_info.c', + 'nthw/flow_filter/flow_nthw_ioa.c', + 'nthw/flow_filter/flow_nthw_km.c', + 'nthw/flow_filter/flow_nthw_pdb.c', + 'nthw/flow_filter/flow_nthw_qsl.c', + 'nthw/flow_filter/flow_nthw_rmc.c', + 'nthw/flow_filter/flow_nthw_roa.c', + 'nthw/flow_filter/flow_nthw_rpp_lr.c', + 'nthw/flow_filter/flow_nthw_slc.c', + 'nthw/flow_filter/flow_nthw_slc_lr.c', + 'nthw/flow_filter/flow_nthw_tx_cpy.c', + 'nthw/flow_filter/flow_nthw_tx_ins.c', + 'nthw/flow_filter/flow_nthw_tx_rpl.c', 'nthw/nthw_fpga_model.c', 'nthw/nthw_dbs.c', 'nthw/nthw_epp.c',
drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c new file +1107 -0
1,107 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h new file +372 -0
372 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c new file +146 -0
146 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h new file +42 -0
42 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c new file +1140 -0
1,140 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h new file +422 -0
160 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c new file +293 -0
293 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h new file +100 -0
100 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c new file +254 -0
254 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h new file +81 -0
81 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c new file +202 -0
202 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h new file +72 -0
72 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c new file +93 -0
93 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h new file +39 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c new file +341 -0
341 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h new file +104 -0
104 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c new file +234 -0
234 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h new file +80 -0
80 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c new file +685 -0
685 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h new file +224 -0
224 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c new file +230 -0
230 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h new file +84 -0
84 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c new file +355 -0
355 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h new file +121 -0
121 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c new file +112 -0
112 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h new file +40 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c new file +294 -0
294 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h new file +109 -0
109 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c new file +132 -0
132 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h new file +53 -0
53 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c new file +109 -0
109 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h new file +46 -0
46 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c new file +109 -0
109 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h new file +46 -0
46 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c new file +394 -0
394 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h new file +72 -0
72 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c new file +96 -0
96 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h new file +42 -0
42 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c new file +165 -0
165 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h new file +70 -0
70 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.39.3
Part of the diff is not shown here. View the raw message.
PATCH v16 5/8 net/ntnic: adds FPGA abstraction layer
In reply to Mykola KostenokFrom: Christian Koue Muf <[email protected]>
The FPGA abstraction layer limits the need to rewrite flow logic when new FPGA modules are created.
---
v2:
* Fixed compilation with Fedora 38
* Fixed WARNING:TYPO_SPELLING
v11:
* Fix dereferencing type-punned pointer in macro
v13:
* Fix typo spelling warnings
--- drivers/net/ntnic/meson.build | 21 + .../ntnic/nthw/flow_api/flow_api_actions.c | 205 ++ .../ntnic/nthw/flow_api/flow_api_actions.h | 284 +++ .../ntnic/nthw/flow_api/flow_api_backend.c | 182 ++ .../ntnic/nthw/flow_api/flow_api_backend.h | 1818 +++++++++++++++++ .../net/ntnic/nthw/flow_api/flow_api_engine.h | 475 +++++ .../ntnic/nthw/flow_api/flow_api_nic_setup.h | 32 + .../nthw/flow_api/flow_engine/flow_group.c | 125 ++ .../nthw/flow_api/flow_engine/flow_hasher.c | 213 ++ .../nthw/flow_api/flow_engine/flow_hasher.h | 20 + .../nthw/flow_api/flow_engine/flow_kcc.c | 434 ++++ .../ntnic/nthw/flow_api/flow_engine/flow_km.c | 1434 +++++++++++++ .../nthw/flow_api/flow_engine/flow_tunnel.c | 787 +++++++ .../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c | 1789 ++++++++++++++++ .../nthw/flow_api/hw_mod/hw_mod_cat_v18.h | 138 ++ .../nthw/flow_api/hw_mod/hw_mod_cat_v21.h | 88 + .../nthw/flow_api/hw_mod/hw_mod_cat_v22.h | 83 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c | 1099 ++++++++++ .../nthw/flow_api/hw_mod/hw_mod_flm_v17.h | 265 +++ .../nthw/flow_api/hw_mod/hw_mod_flm_v20.h | 102 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c | 195 ++ .../nthw/flow_api/hw_mod/hw_mod_hsh_v5.h | 36 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c | 178 ++ .../nthw/flow_api/hw_mod/hw_mod_hst_v2.h | 32 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c | 271 +++ .../nthw/flow_api/hw_mod/hw_mod_ioa_v4.h | 36 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c | 629 ++++++ .../ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h | 93 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c | 219 ++ .../nthw/flow_api/hw_mod/hw_mod_pdb_v9.h | 39 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c | 348 ++++ .../nthw/flow_api/hw_mod/hw_mod_qsl_v7.h | 45 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c | 112 + .../nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h | 20 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c | 358 ++++ .../nthw/flow_api/hw_mod/hw_mod_roa_v6.h | 49 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c | 132 ++ .../nthw/flow_api/hw_mod/hw_mod_slc_lr.c | 132 ++ .../nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h | 19 + .../nthw/flow_api/hw_mod/hw_mod_slc_v1.h | 19 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c | 983 +++++++++ .../nthw/flow_api/hw_mod/hw_mod_tpe_v1.h | 103 + .../nthw/flow_api/hw_mod/hw_mod_tpe_v2.h | 37 + .../nthw/flow_api/stream_binary_flow_api.h | 697 +++++++ 44 files changed, 14376 insertions(+) create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.h create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.h create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_engine.h create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h create mode 100644 drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h
drivers/net/ntnic/meson.build +21 -0
@@ -18,6 +18,7 @@ includes = [ include_directories('nthw'), include_directories('nthw/core'), include_directories('nthw/supported'), + include_directories('nthw/flow_api'), include_directories('nthw/flow_filter'), include_directories('sensors'), include_directories('sensors/avr_sensors'),
@@ -60,6 +61,26 @@ sources = files( 'nthw/core/nthw_spim.c', 'nthw/core/nthw_spis.c', 'nthw/core/nthw_tsm.c', + 'nthw/flow_api/flow_api_actions.c', + 'nthw/flow_api/flow_api_backend.c', + 'nthw/flow_api/flow_engine/flow_group.c', + 'nthw/flow_api/flow_engine/flow_hasher.c', + 'nthw/flow_api/flow_engine/flow_kcc.c', + 'nthw/flow_api/flow_engine/flow_km.c', + 'nthw/flow_api/flow_engine/flow_tunnel.c', + 'nthw/flow_api/hw_mod/hw_mod_cat.c', + 'nthw/flow_api/hw_mod/hw_mod_flm.c', + 'nthw/flow_api/hw_mod/hw_mod_hsh.c', + 'nthw/flow_api/hw_mod/hw_mod_hst.c', + 'nthw/flow_api/hw_mod/hw_mod_ioa.c', + 'nthw/flow_api/hw_mod/hw_mod_km.c', + 'nthw/flow_api/hw_mod/hw_mod_pdb.c', + 'nthw/flow_api/hw_mod/hw_mod_qsl.c', + 'nthw/flow_api/hw_mod/hw_mod_rmc.c', + 'nthw/flow_api/hw_mod/hw_mod_roa.c', + 'nthw/flow_api/hw_mod/hw_mod_slc.c', + 'nthw/flow_api/hw_mod/hw_mod_slc_lr.c', + 'nthw/flow_api/hw_mod/hw_mod_tpe.c', 'nthw/flow_filter/flow_nthw_cat.c', 'nthw/flow_filter/flow_nthw_csu.c', 'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api_actions.c new file +205 -0
205 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api_actions.h new file +284 -0
284 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api_backend.c new file +182 -0
182 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api_backend.h new file +1818 -0
1,818 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api_engine.h new file +475 -0
475 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h new file +32 -0
@@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2023 Napatech A/S +*/
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c new file +125 -0
125 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c new file +213 -0
213 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h new file +20 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c new file +434 -0
434 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c new file +1434 -0
1,434 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c new file +787 -0
787 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c new file +1789 -0
1,789 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h new file +138 -0
138 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h new file +88 -0
88 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h new file +83 -0
83 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c new file +1099 -0
1,099 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h new file +265 -0
265 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h new file +102 -0
102 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c new file +195 -0
195 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h new file +36 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c new file +178 -0
178 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h new file +32 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c new file +271 -0
271 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h new file +36 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c new file +629 -0
629 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h new file +93 -0
93 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c new file +219 -0
219 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h new file +39 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c new file +348 -0
348 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h new file +45 -0
45 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c new file +112 -0
112 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h new file +20 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c new file +358 -0
358 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h new file +49 -0
49 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c new file +132 -0
132 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c new file +132 -0
132 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h new file +19 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h new file +19 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c new file +983 -0
983 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h new file +103 -0
103 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h new file +37 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h new file +697 -0
697 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.39.3
Part of the diff is not shown here. View the raw message.
PATCH v16 6/8 net/ntnic: adds flow logic
In reply to Mykola KostenokFrom: Christian Koue Muf <[email protected]>
This logic layer takes rte_flow style patterns and actions as input, and programs the FPGA accordingly.
---
v2:
* Fixed WARNING:TYPO_SPELLING
v11:
* Replace stdatomic by compiler build-in atomic
* Fix dereferencing type-punned pointer in macro
* Inner offset must exclude VLAN bytes
v12:
* Fix error=array-bounds
v14:
* Fixed code checking for TPE resource reuse
--- drivers/net/ntnic/adapter/nt4ga_adapter.c | 13 + drivers/net/ntnic/adapter/nt4ga_stat.c | 20 +- drivers/net/ntnic/meson.build | 4 + drivers/net/ntnic/nthw/flow_api/flow_api.c | 1307 +++++ drivers/net/ntnic/nthw/flow_api/flow_api.h | 291 + .../nthw/flow_api/flow_api_profile_inline.c | 5130 +++++++++++++++++ .../nthw/flow_api/flow_api_profile_inline.h | 56 + .../net/ntnic/nthw/flow_filter/flow_backend.c | 3205 ++++++++++ .../net/ntnic/nthw/flow_filter/flow_backend.h | 15 + .../net/ntnic/nthw/flow_filter/flow_filter.c | 39 + .../net/ntnic/nthw/flow_filter/flow_filter.h | 16 + 11 files changed, 10091 insertions(+), 5 deletions(-) create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.h create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.h
drivers/net/ntnic/adapter/nt4ga_adapter.c +13 -0
@@ -10,6 +10,8 @@#include "nt4ga_pci_ta_tg.h" #include "nt4ga_link_100g.h" +#include "flow_filter.h" +/* Sensors includes */ #include "board_sensors.h" #include "avr_sensors.h"
@@ -306,6 +308,17 @@ int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info) n_nim_ports = fpga_info->n_nims;assert (n_nim_ports >=1 ); +/* Nt4ga Init Filter */ +nt4ga_filter_t *p_filter = &p_adapter_info->nt4ga_filter; + + res =flow_filter_init (p_fpga, &p_filter->mp_flow_device, + p_adapter_info->adapter_no); +if (res !=0 ) { +NT_LOG (ERR ,ETHDEV ,"%s: Cannot initialize filter\n" , + p_adapter_id_str); +return res; + } +/* * HIF/PCI TA/TG */
drivers/net/ntnic/adapter/nt4ga_stat.c +15 -5
@@ -7,6 +7,7 @@#include "nthw_drv.h" #include "nthw_fpga.h" #include "nt4ga_adapter.h" +#include "flow_filter.h" #define NO_FLAGS 0
@@ -16,12 +17,13 @@ static inline uint64_t timestamp2ns(uint64_t ts)return ((ts >>32 ) *1000000000 ) + (ts &0xffffffff ); } -static int nt4ga_stat_collect_cap_v1_stats (nt4ga_stat_t *p_nt4ga_stat, +static int nt4ga_stat_collect_cap_v1_stats (struct adapter_info_s *p_adapter_info, +nt4ga_stat_t *p_nt4ga_stat,uint32_t *p_stat_dma_virtual);static int nt4ga_stat_collect_virt_v1_stats (nt4ga_stat_t *p_nt4ga_stat,uint32_t *p_stat_dma_virtual); -int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused, +int nt4ga_stat_collect (struct adapter_info_s *p_adapter_info,nt4ga_stat_t *p_nt4ga_stat) {nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
@@ -39,7 +41,7 @@ int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused, }else { p_nt4ga_stat->last_timestamp =timestamp2ns (*p_nthw_stat->mp_timestamp); -nt4ga_stat_collect_cap_v1_stats (p_nt4ga_stat, +nt4ga_stat_collect_cap_v1_stats (p_adapter_info, p_nt4ga_stat, p_nt4ga_stat->p_stat_dma_virtual); }return 0 ;
@@ -198,7 +200,9 @@ int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)return -1 ; } - p_nt4ga_stat->flm_stat_ver =0 ; +struct flow_nic_dev *ndev = + p_adapter_info->nt4ga_filter.mp_flow_device; + p_nt4ga_stat->flm_stat_ver = ndev->be.flm.ver; p_nt4ga_stat->mp_stat_structs_flm =calloc (1 ,sizeof (struct flm_counters_v1 ));
@@ -394,10 +398,12 @@ static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat, }/* Called with stat mutex locked */ -static int nt4ga_stat_collect_cap_v1_stats (nt4ga_stat_t *p_nt4ga_stat, +static int nt4ga_stat_collect_cap_v1_stats (struct adapter_info_s *p_adapter_info, +nt4ga_stat_t *p_nt4ga_stat,uint32_t *p_stat_dma_virtual) {nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat; +struct flow_nic_dev *ndev = p_adapter_info->nt4ga_filter.mp_flow_device;const int n_rx_ports = p_nt4ga_stat->mn_rx_ports;const int n_tx_ports = p_nt4ga_stat->mn_tx_ports;
@@ -701,5 +707,9 @@ static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat, p_nt4ga_stat->a_port_tx_drops_total[p] += new_drop_events_sum; } +/* _update and get FLM stats */ +flow_get_flm_stats (ndev, (uint64_t *)p_nt4ga_stat->mp_stat_structs_flm, +sizeof (struct flm_counters_v1 ) /sizeof (uint64_t )); +return 0 ; }
drivers/net/ntnic/meson.build +4 -0
@@ -61,8 +61,10 @@ sources = files( 'nthw/core/nthw_spim.c', 'nthw/core/nthw_spis.c', 'nthw/core/nthw_tsm.c', + 'nthw/flow_api/flow_api.c', 'nthw/flow_api/flow_api_actions.c', 'nthw/flow_api/flow_api_backend.c', + 'nthw/flow_api/flow_api_profile_inline.c', 'nthw/flow_api/flow_engine/flow_group.c', 'nthw/flow_api/flow_engine/flow_hasher.c', 'nthw/flow_api/flow_engine/flow_kcc.c',
@@ -81,6 +83,8 @@ sources = files( 'nthw/flow_api/hw_mod/hw_mod_slc.c', 'nthw/flow_api/hw_mod/hw_mod_slc_lr.c', 'nthw/flow_api/hw_mod/hw_mod_tpe.c', + 'nthw/flow_filter/flow_backend.c', + 'nthw/flow_filter/flow_filter.c', 'nthw/flow_filter/flow_nthw_cat.c', 'nthw/flow_filter/flow_nthw_csu.c', 'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api.c new file +1307 -0
1,307 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api.h new file +291 -0
291 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c new file +5130 -0
1,297 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h new file +56 -0
56 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_backend.c new file +3205 -0
3,205 lines not on this page · raw message
drivers/net/ntnic/nthw/flow_filter/flow_backend.h new file +15 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_filter/flow_filter.c new file +39 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/nthw/flow_filter/flow_filter.h new file +16 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.39.3
Part of the diff is not shown here. View the raw message.
PATCH v16 7/8 net/ntnic: adds ethdev and makes PMD available
In reply to Mykola KostenokFrom: Christian Koue Muf <[email protected]>
Hooks into the DPDK API, and make the PMD available to use. Also adds documentation as .rst and .ini files.
---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix supported platform list
v3:
* Fix Fedora 38 compilation issues
v5:
* Add ntnic.rst to index file
v10:
* Fix wrong queue id range.
v11:
* Repace stdatomic by compiler build-in atomic.
v13:
* Fix typo spelling warnings
--- .mailmap | 2 + MAINTAINERS | 7 + doc/guides/nics/features/ntnic.ini | 50 + doc/guides/nics/index.rst | 1 + doc/guides/nics/ntnic.rst | 235 + drivers/net/ntnic/include/ntdrv_4ga.h | 23 + drivers/net/ntnic/include/ntos_system.h | 23 + drivers/net/ntnic/meson.build | 13 + drivers/net/ntnic/ntnic_dbsconfig.c | 1670 +++++++ drivers/net/ntnic/ntnic_dbsconfig.h | 251 + drivers/net/ntnic/ntnic_ethdev.c | 4256 +++++++++++++++++ drivers/net/ntnic/ntnic_ethdev.h | 355 ++ .../net/ntnic/ntnic_filter/create_elements.h | 1190 +++++ drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 656 +++ drivers/net/ntnic/ntnic_filter/ntnic_filter.h | 14 + drivers/net/ntnic/ntnic_hshconfig.c | 102 + drivers/net/ntnic/ntnic_hshconfig.h | 9 + drivers/net/ntnic/ntnic_meter.c | 811 ++++ drivers/net/ntnic/ntnic_meter.h | 10 + drivers/net/ntnic/ntnic_vdpa.c | 365 ++ drivers/net/ntnic/ntnic_vdpa.h | 21 + drivers/net/ntnic/ntnic_vf.c | 83 + drivers/net/ntnic/ntnic_vf.h | 17 + drivers/net/ntnic/ntnic_vf_vdpa.c | 1235 +++++ drivers/net/ntnic/ntnic_vf_vdpa.h | 25 + drivers/net/ntnic/ntnic_vfio.c | 321 ++ drivers/net/ntnic/ntnic_vfio.h | 31 + drivers/net/ntnic/ntnic_xstats.c | 703 +++ drivers/net/ntnic/ntnic_xstats.h | 22 + 29 files changed, 12501 insertions(+) create mode 100644 doc/guides/nics/features/ntnic.ini create mode 100644 doc/guides/nics/ntnic.rst create mode 100644 drivers/net/ntnic/include/ntdrv_4ga.h create mode 100644 drivers/net/ntnic/include/ntos_system.h create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.c create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.h create mode 100644 drivers/net/ntnic/ntnic_ethdev.c create mode 100644 drivers/net/ntnic/ntnic_ethdev.h create mode 100644 drivers/net/ntnic/ntnic_filter/create_elements.h create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.c create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.h create mode 100644 drivers/net/ntnic/ntnic_hshconfig.c create mode 100644 drivers/net/ntnic/ntnic_hshconfig.h create mode 100644 drivers/net/ntnic/ntnic_meter.c create mode 100644 drivers/net/ntnic/ntnic_meter.h create mode 100644 drivers/net/ntnic/ntnic_vdpa.c create mode 100644 drivers/net/ntnic/ntnic_vdpa.h create mode 100644 drivers/net/ntnic/ntnic_vf.c create mode 100644 drivers/net/ntnic/ntnic_vf.h create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.c create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.h create mode 100644 drivers/net/ntnic/ntnic_vfio.c create mode 100644 drivers/net/ntnic/ntnic_vfio.h create mode 100644 drivers/net/ntnic/ntnic_xstats.c create mode 100644 drivers/net/ntnic/ntnic_xstats.h
.mailmap +2 -0
@@ -227,6 +227,7 @@ Chintu Hetam <[email protected]> Choonho Son <[email protected]> Chris Metcalf <[email protected]> Christian Ehrhardt <[email protected]> +Christian Koue Muf <[email protected]> Christian Maciocco <[email protected]> Christophe Fontaine <[email protected]> Christophe Grosse <[email protected]>
@@ -967,6 +968,7 @@ Mukesh Dua <[email protected]> Murphy Yang <[email protected]> Murthy NSSR <[email protected]> Muthurajan Jayakumar <[email protected]> +Mykola Kostenok <[email protected]> Nachiketa Prachanda <[email protected]> <[email protected]> Nagadheeraj Rottela <[email protected]> Naga Harish K S V <[email protected]>
MAINTAINERS +7 -0
@@ -1053,6 +1053,13 @@ F: drivers/net/memif/ F: doc/guides/nics/memif.rst F: doc/guides/nics/features/memif.ini +NTNIC PMD +M: Mykola Kostenok <[email protected]> +M: Christiam Muf <[email protected]> +F: drivers/net/ntnic/ +F: doc/guides/nics/ntnic.rst +F: doc/guides/nics/features/ntnic.ini + Crypto Drivers --------------
doc/guides/nics/features/ntnic.ini new file +50 -0
50 lines not on this page · raw message
doc/guides/nics/index.rst +1 -0
@@ -53,6 +53,7 @@ Network Interface Controller Drivers nfb nfp ngbe + ntnic null octeon_ep octeontx
doc/guides/nics/ntnic.rst new file +235 -0
235 lines not on this page · raw message
drivers/net/ntnic/include/ntdrv_4ga.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2023 Napatech A/S +*/ + +#ifndef __NTDRV_4GA_H__ +#define __NTDRV_4GA_H__ + +#include "nthw_drv.h" +#include "nt4ga_adapter.h" +#include "nthw_platform_drv.h" + +typedef struct ntdrv_4ga_s { +uint32_t pciident; +struct adapter_info_s adapter_info; +char *p_drv_name; + +volatile bool b_shutdown; +pthread_mutex_t stat_lck; +pthread_t stat_thread; +pthread_t flm_thread; +}ntdrv_4ga_t ; + +#endif /* __NTDRV_4GA_H__ */
drivers/net/ntnic/include/ntos_system.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2023 Napatech A/S +*/ + +#ifndef __NTOS_SYSTEM_H__ +#define __NTOS_SYSTEM_H__ + +#include "include/ntdrv_4ga.h" + +/* +* struct drv_s for DPDK (clone of kernel struct) +* keep it as close as possible to original kernel struct +*/ +struct drv_s { +int adapter_no; +struct rte_pci_device *p_dev; +struct ntdrv_4ga_s ntdrv; + +int n_eth_dev_init_count; +int probe_finished; +}; + +#endif /* __NTOS_SYSTEM_H__ */
drivers/net/ntnic/meson.build +13 -0
@@ -27,6 +27,9 @@ includes = [ include_directories('sensors/ntavr'), ] +# deps +deps += 'vhost' + # all sources sources = files( 'adapter/nt4ga_adapter.c',
@@ -113,6 +116,16 @@ sources = files( 'nthw/nthw_stat.c', 'nthw/supported/nthw_fpga_9563_055_024_0000.c', 'ntlog/ntlog.c', + 'ntnic_dbsconfig.c', + 'ntnic_ethdev.c', + 'ntnic_filter/ntnic_filter.c', + 'ntnic_hshconfig.c', + 'ntnic_meter.c', + 'ntnic_vdpa.c', + 'ntnic_vf.c', + 'ntnic_vfio.c', + 'ntnic_vf_vdpa.c', + 'ntnic_xstats.c', 'ntutil/nt_util.c', 'sensors/avr_sensors/avr_sensors.c', 'sensors/board_sensors/board_sensors.c',
drivers/net/ntnic/ntnic_dbsconfig.c new file +1670 -0
1,670 lines not on this page · raw message
drivers/net/ntnic/ntnic_dbsconfig.h new file +251 -0
251 lines not on this page · raw message
drivers/net/ntnic/ntnic_ethdev.c new file +4256 -0
689 lines not on this page · raw message
drivers/net/ntnic/ntnic_ethdev.h new file +355 -0
355 lines not on this page · raw message
drivers/net/ntnic/ntnic_filter/create_elements.h new file +1190 -0
1,190 lines not on this page · raw message
drivers/net/ntnic/ntnic_filter/ntnic_filter.c new file +656 -0
656 lines not on this page · raw message
drivers/net/ntnic/ntnic_filter/ntnic_filter.h new file +14 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/ntnic_hshconfig.c new file +102 -0
102 lines not on this page · raw message
drivers/net/ntnic/ntnic_hshconfig.h new file +9 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/ntnic_meter.c new file +811 -0
811 lines not on this page · raw message
drivers/net/ntnic/ntnic_meter.h new file +10 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/ntnic_vdpa.c new file +365 -0
365 lines not on this page · raw message
drivers/net/ntnic/ntnic_vdpa.h new file +21 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/ntnic_vf.c new file +83 -0
83 lines not on this page · raw message
drivers/net/ntnic/ntnic_vf_vdpa.c new file +1235 -0
1,235 lines not on this page · raw message
drivers/net/ntnic/ntnic_vf_vdpa.h new file +25 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/ntnic_vfio.c new file +321 -0
321 lines not on this page · raw message
drivers/net/ntnic/ntnic_vfio.h new file +31 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/ntnic_xstats.c new file +703 -0
703 lines not on this page · raw message
drivers/net/ntnic/ntnic_xstats.h new file +22 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.39.3
Part of the diff is not shown here. View the raw message.
PATCH v16 8/8 net/ntnic: adds socket connection to PMD
In reply to Mykola KostenokFrom: Christian Koue Muf <[email protected]>
The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.
---
v2:
* Fixed WARNING:TYPO_SPELLING
v4:
* Fixed Alpine build
v8:
* Fixed token parser constant length.
v10:
* Fix uninitialized variables and build warnings.
--- drivers/net/ntnic/meson.build | 24 + .../ntconnect/include/ntconn_mod_helper.h | 97 ++ .../net/ntnic/ntconnect/include/ntconnect.h | 96 ++ .../ntnic/ntconnect/include/ntconnect_api.h | 87 ++ .../ntconnect/include/ntconnect_api_adapter.h | 221 +++ .../ntconnect/include/ntconnect_api_flow.h | 168 +++ .../ntconnect/include/ntconnect_api_meter.h | 89 ++ .../include/ntconnect_api_statistic.h | 173 +++ .../ntconnect/include/ntconnect_api_test.h | 18 + drivers/net/ntnic/ntconnect/ntconn_server.c | 97 ++ drivers/net/ntnic/ntconnect/ntconnect.c | 641 ++++++++ .../ntnic/ntconnect_modules/ntconn_adapter.c | 775 ++++++++++ .../net/ntnic/ntconnect_modules/ntconn_flow.c | 1312 +++++++++++++++++ .../ntnic/ntconnect_modules/ntconn_meter.c | 517 +++++++ .../ntnic/ntconnect_modules/ntconn_modules.h | 19 + .../net/ntnic/ntconnect_modules/ntconn_stat.c | 877 +++++++++++ .../net/ntnic/ntconnect_modules/ntconn_test.c | 146 ++ 17 files changed, 5357 insertions(+) create mode 100644 drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect.h create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api.h create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h create mode 100644 drivers/net/ntnic/ntconnect/ntconn_server.c create mode 100644 drivers/net/ntnic/ntconnect/ntconnect.c create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_flow.c create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_meter.c create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_modules.h create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_stat.c create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_test.c
drivers/net/ntnic/meson.build +24 -0
@@ -7,6 +7,22 @@ if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64') subdir_done() endif +# config object +ntnic_conf = configuration_data() + +# transfer options into config object +ntnic_conf.set('NT_TOOLS', true) + +# check option 'debug' (boolean flag derived from meson buildtype) +if get_option('debug') + cflags += '-DDEBUG' +endif + +# check nt_tools build option +if ntnic_conf.get('NT_TOOLS') + cflags += '-DNT_TOOLS' +endif + # includes includes = [ include_directories('.'),
@@ -20,6 +36,7 @@ includes = [ include_directories('nthw/supported'), include_directories('nthw/flow_api'), include_directories('nthw/flow_filter'), + include_directories('ntconnect/include'), include_directories('sensors'), include_directories('sensors/avr_sensors'), include_directories('sensors/board_sensors'),
@@ -41,6 +58,13 @@ sources = files( 'nim/nt_link_speed.c', 'nim/qsfp_sensors.c', 'nim/sfp_sensors.c', + 'ntconnect/ntconn_server.c', + 'ntconnect/ntconnect.c', + 'ntconnect_modules/ntconn_adapter.c', + 'ntconnect_modules/ntconn_flow.c', + 'ntconnect_modules/ntconn_meter.c', + 'ntconnect_modules/ntconn_stat.c', + 'ntconnect_modules/ntconn_test.c', 'nthw/core/nthw_clock_profiles.c', 'nthw/core/nthw_fpga.c', 'nthw/core/nthw_fpga_nt200a0x.c',
drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h new file +97 -0
97 lines not on this page · raw message
drivers/net/ntnic/ntconnect/include/ntconnect.h new file +96 -0
96 lines not on this page · raw message
drivers/net/ntnic/ntconnect/include/ntconnect_api.h new file +87 -0
87 lines not on this page · raw message
drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h new file +221 -0
221 lines not on this page · raw message
drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h new file +168 -0
168 lines not on this page · raw message
drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h new file +89 -0
89 lines not on this page · raw message
drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h new file +173 -0
173 lines not on this page · raw message
drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2023 Napatech A/S +*/ + +#ifndef _NTCONNECT_TEST_FILTER_H_ +#define _NTCONNECT_TEST_FILTER_H_ + +/* +* Create structures allocating the space to carry through ntconnect interface +*/ + +struct test_s { +int number; +int status; +uint64_t test[]; +}; + +#endif /* _NTCONNECT_TEST_FILTER_H_ */
drivers/net/ntnic/ntconnect/ntconn_server.c new file +97 -0
97 lines not on this page · raw message
drivers/net/ntnic/ntconnect/ntconnect.c new file +641 -0
641 lines not on this page · raw message
drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c new file +775 -0
775 lines not on this page · raw message
drivers/net/ntnic/ntconnect_modules/ntconn_flow.c new file +1312 -0
496 lines not on this page · raw message
drivers/net/ntnic/ntconnect_modules/ntconn_meter.c new file +517 -0
517 lines not on this page · raw message
drivers/net/ntnic/ntconnect_modules/ntconn_modules.h new file +19 -0
Lines of this file are not shown. View the raw message.
drivers/net/ntnic/ntconnect_modules/ntconn_stat.c new file +877 -0
877 lines not on this page · raw message
drivers/net/ntnic/ntconnect_modules/ntconn_test.c new file +146 -0
146 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.39.3
Part of the diff is not shown here. View the raw message.
Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>
Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"
I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release.
Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Thanks,
ferruh
Quoted 34 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release.
Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
Quoted 7 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
Quoted 4 lines
Thanks,
ferruh
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
Quoted 40 lines · Morten Brørup
Quoted 34 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release.
Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to dpdk.org, but upstreaming has many benefits.
One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code. Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.
If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
Quoted 2 lines
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Quoted 8 lines
Quoted 7 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 4 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing a socket interface.)
But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only. And overall this reduces portability of the DPDK application, each application becomes unique to a device (This is a bad thing, but I also need some feedback how bad it is in real life.)
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
Quoted 11 lines
Quoted 4 lines
Thanks,
ferruhThank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
Quoted 75 lines · Ferruh Yigit
Quoted 40 lines · Morten Brørup
Quoted 34 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release.
Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLlnhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1,
but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
Quoted 8 lines
Quoted 2 lines
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
In regards to splitting the code, I don't see this a good option. While I of cause agree it would be easier to review and understand, the code should also result in a meaningful product. Of the 87k lines of code, 53k lines is needed to start-up the FPGA to a state the it is ready to receive traffic. But at this point all packets would simply be discarded, and to be honest, there are better and cheaper options out there, if nothing more than basic functionality is needed. 34k lines are used to setup filters based on rte_flow. The thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product would not be functional. Of cause some of the top level logic could be split out, but at this point we are talking about splitting 87k lines into 80k and 7k, which I don't think is worth it.
Quoted 23 lines
Quoted 8 lines
Quoted 7 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing a socket interface.)
But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only.
And overall this reduces portability of the DPDK application, each application becomes unique to a device (This is a bad thing, but I also need some feedback how bad it is in real life.)
Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their rte_flow to a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to their existing solutions.
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
Quoted 5 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
Christian
Quoted 12 lines
Quoted 12 lines
Quoted 5 lines
Thanks,
ferruhThank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
Quoted 87 lines · Christian Koue Muf
Quoted 75 lines · Ferruh Yigit
Quoted 40 lines · Morten Brørup
Quoted 34 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release.
Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLlnhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1,
but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
Quoted 8 lines
Quoted 2 lines
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
Quoted 8 lines
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Deleting PMD is easy, maintaining it when company is not around is a challenge.
Quoted 6 lines
In regards to splitting the code, I don't see this a good option. While I of cause agree it would be easier to review and understand, the code should also result in a meaningful product. Of the 87k lines of code, 53k lines is needed to start-up the FPGA to a state the it is ready to receive traffic. But at this point all packets would simply be discarded, and to be honest, there are better and cheaper options out there,
Quoted 9 lines
if nothing more than basic functionality is needed. 34k lines are used to setup filters based on
rte_flow. The thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product would not be functional. Of cause some of the top level logic could be split out, but at this point we are talking about splitting 87k lines into 80k and 7k, which I don't think is worth it.
We had similar code base in DPDK before, heavy and multi-platform supported HAL layer approach is not unique to this drier, we can figure out details and can find a sweat spot for the case.
Quoted 41 lines
Quoted 23 lines
Quoted 8 lines
Quoted 7 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing a socket interface.)
But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only.
And overall this reduces portability of the DPDK application, each application becomes unique to a device (This is a bad thing, but I also need some feedback how bad it is in real life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their
rte_flowto a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to their existing solutions.
Quoted 6 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
This is about individual drivers have custom interface for the specific application needs, or they use common interfaces.
And how much custom interfaces hurts in long run. A wider discussion.
Like if you want to use your device and VFs by OvS, how you will do it with this specific interface?
And specific to this driver,
if it is about primary/secondary process communication, as you mentioned there is already a socket interface for it.
Or did you investigate VF representors, does it work for this case?
Another common approach is VF-PF mailbox communication that VF passes requests to the PF in device, of course this requires device/FW support.
Quoted 24 lines
Quoted 5 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruhQuoted 6 lines
Quoted 6 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
Disclaimer: This email and any files transmitted with it may contain confidential information intended for the addressee(s) only. The information is not to be surrendered or copied to unauthorized persons. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release.
Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the basic initialization and what is linked to a specific offload or configuration feature.
As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 21 lines
Quoted 21 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLlnhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1,
but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a release, a user can apply the missing patches from the mailing list to get the features.
Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible,
but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option. While I of cause agree it would be easier to review and understand, the code should also result in a meaningful product. Of the 87k lines of code, 53k lines is needed to start-up the FPGA to a state the it is ready to receive traffic. But at this point all packets would simply be discarded, and to be honest, there are better and cheaper options out there, if nothing more than basic functionality is needed. 34k lines are used to setup filters based on
rte_flow. The thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product would not be functional. Of cause some of the top level logic could be split out, but at this point we are talking about splitting 87k lines into 80k and 7k, which I don't think is worth it.
Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.
Quoted 31 lines
Quoted 21 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing a socket interface.)
But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only.
And overall this reduces portability of the DPDK application, each application becomes unique to a device (This is a bad thing, but I also need some feedback how bad it is in real life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their
rte_flowto a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to their existing solutions.
I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.
Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.
Quoted 21 lines
Quoted 4 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 11 lines
Quoted 11 lines
Quoted 5 lines
Thanks,
ferruhThank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Quoted 215 lines · Thomas Monjalon
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release.
Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the basic initialization and what is linked to a specific offload or configuration feature.
As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 21 lines
Quoted 21 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLlnhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1,
but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a release, a user can apply the missing patches from the mailing list to get the features.
Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible,
but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option. While I of cause agree it would be easier to review and understand, the code should also result in a meaningful product. Of the 87k lines of code, 53k lines is needed to start-up the FPGA to a state the it is ready to receive traffic. But at this point all packets would simply be discarded, and to be honest, there are better and cheaper options out there, if nothing more than basic functionality is needed. 34k lines are used to setup filters based on
rte_flow. The thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product would not be functional. Of cause some of the top level logic could be split out, but at this point we are talking about splitting 87k lines into 80k and 7k, which I don't think is worth it.Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 31 lines
Quoted 21 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing a socket interface.)
But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only.
And overall this reduces portability of the DPDK application, each application becomes unique to a device (This is a bad thing, but I also need some feedback how bad it is in real life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their
rte_flowto a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to their existing solutions.I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.Quoted 16 lines
Quoted 4 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruh
Quoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history, there is no "fits all, fixed guidelines", but they can serve as samples:
Marvell cnxk:
https://patchwork.dpdk.org/project/dpdk/list/?series=17449&state=%2A&archive=both
Solarflare sfc (before patchwork series support):
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
to
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
Intel ice:
https://patchwork.dpdk.org/project/dpdk/list/?series=2842&state=%2A&archive=both
Quoted 245 lines · Ferruh Yigit
Quoted 225 lines · Thomas Monjalon
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release. Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the basic initialization and what is linked to a specific offload or configuration feature.
As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 26 lines
Quoted 26 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLlnhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1, but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a release, a user can apply the missing patches from the mailing list to get the features.
Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible, but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option.
While I of cause agree it would be easier to review and understand,
the code should also result in a meaningful product. Of the 87k lines
of code, 53k lines is needed to start-up the FPGA to a state the it
is ready to receive traffic. But at this point all packets would
simply be discarded, and to be honest, there are better and cheaper options out there, if nothing more than basic functionality is
needed. 34k lines are used to setup filters based onrte_flow. The
thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product would
not be functional. Of cause some of the top level logic could be
split out, but at this point we are talking about splitting 87k lines
into 80k and 7k, which I don't think is worth it.Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 34 lines
Quoted 24 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing
a socket interface.)But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only. And overall this reduces portability of the DPDK application, each
application becomes unique to a device (This is a bad thing, but I
also need some feedback how bad it is in real life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their
rte_flowto a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to their existing solutions.I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.Quoted 18 lines
Quoted 6 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruhQuoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history, there is no "fits all, fixed guidelines", but they can serve as samples:
Quoted 9 lines
Solarflare sfc (before patchwork series support):
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-2-git-send-email-arybchenko%40solarflare.com%2f&c=E,1,E9oUT_1WuNC2JA8x7an3rC_Pm5g1L5cxJKQ6pTwSbCWSJpiLH2GnmgfFkUqViOOwkpS2df8kgBvHjmulKaWhyr4BBizUT-sL5LJv21Hx4RtHtK3vjhcKpg,,&typo=1
to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-56-git-send-email-arybchenko%40solarflare.com%2f&c=E,1,GByF_TiC_q11iVPpiPgpCMlSge-J0XfT0zHkriK0rde1Qt1RG7uf6mETQkTSQ-1V86Z7EtRcxlvSsed1sqn8RWfN8KFSbd7NaAkfbDiehn_vSRzja45rQgv53Q,,&typo=1
Thank you for the links, they have been very helpful.
After a lot of internal discussion, Napatech has decided to implement some architectural changes to our PMD that will allow us to easier split up the code into smaller features. The work will require some time, which means that we will not be ready for the 23.11 release. The current goal is to attempt to upstream a quite basic PMD in time for 24.7, and a fully featured PMD for 24.11.
Best regards
Christian Muf
Quoted 252 lines · Christian Koue Muf
Quoted 251 lines · Ferruh Yigit
Quoted 225 lines · Thomas Monjalon
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release. Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the basic initialization and what is linked to a specific offload or configuration feature.
As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 26 lines
Quoted 26 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLlnhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1, but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a release, a user can apply the missing patches from the mailing list to get the features.
Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible, but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option.
While I of cause agree it would be easier to review and understand,
the code should also result in a meaningful product. Of the 87k lines
of code, 53k lines is needed to start-up the FPGA to a state the it
is ready to receive traffic. But at this point all packets would
simply be discarded, and to be honest, there are better and cheaper options out there, if nothing more than basic functionality is
needed. 34k lines are used to setup filters based onrte_flow. The
thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product would
not be functional. Of cause some of the top level logic could be
split out, but at this point we are talking about splitting 87k lines
into 80k and 7k, which I don't think is worth it.Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 34 lines
Quoted 24 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing
a socket interface.)But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only. And overall this reduces portability of the DPDK application, each
application becomes unique to a device (This is a bad thing, but I
also need some feedback how bad it is in real life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their
rte_flowto a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to their existing solutions.I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.Quoted 18 lines
Quoted 6 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruhQuoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history, there is no "fits all, fixed guidelines", but they can serve as samples:
Solarflare sfc (before patchwork series support):
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-2-git-send-email-arybchenko%40solarflare.com%2f&c=E,1,E9oUT_1WuNC2JA8x7an3rC_Pm5g1L5cxJKQ6pTwSbCWSJpiLH2GnmgfFkUqViOOwkpS2df8kgBvHjmulKaWhyr4BBizUT-sL5LJv21Hx4RtHtK3vjhcKpg,,&typo=1
to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-56-git-send-email-arybchenko%40solarflare.com%2f&c=E,1,GByF_TiC_q11iVPpiPgpCMlSge-J0XfT0zHkriK0rde1Qt1RG7uf6mETQkTSQ-1V86Z7EtRcxlvSsed1sqn8RWfN8KFSbd7NaAkfbDiehn_vSRzja45rQgv53Q,,&typo=1
Quoted 9 lines
Thank you for the links, they have been very helpful.
After a lot of internal discussion, Napatech has decided to implement some architectural changes to our PMD that will allow us to easier split up the code into smaller features. The work will require some time, which means that we will not be ready for the 23.11 release. The current goal is to attempt to upstream a quite basic PMD in time for 24.7, and a fully featured PMD for 24.11.
Hi Christiam,
Good to see there is a solid plan for upstreaming but also not that good that it is postponed,
I am aware it is all tied to your internal planning/resourcing etc, but since the effort already started, can it be possible to squeeze very basic driver in this release, which just does link up and most basic Rx/Tx? It gives opportunity to experiment on device to users.
We can accept it up to -rc3, which is end of October, so there is still some time?
This is just a suggestion though, no pressure intended.
29/09/2023 11:46, Ferruh Yigit:
Quoted 273 lines · Christian Koue Muf
Quoted 252 lines · Ferruh Yigit
Quoted 251 lines · Thomas Monjalon
Quoted 225 lines
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release. Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the basic initialization and what is linked to a specific offload or configuration feature.
As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 26 lines
Quoted 26 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLlnhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1, but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a release, a user can apply the missing patches from the mailing list to get the features.
Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible, but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option.
While I of cause agree it would be easier to review and understand,
the code should also result in a meaningful product. Of the 87k lines
of code, 53k lines is needed to start-up the FPGA to a state the it
is ready to receive traffic. But at this point all packets would
simply be discarded, and to be honest, there are better and cheaper options out there, if nothing more than basic functionality is
needed. 34k lines are used to setup filters based onrte_flow. The
thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product would
not be functional. Of cause some of the top level logic could be
split out, but at this point we are talking about splitting 87k lines
into 80k and 7k, which I don't think is worth it.Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 34 lines
Quoted 24 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD exposing
a socket interface.)But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only. And overall this reduces portability of the DPDK application, each
application becomes unique to a device (This is a bad thing, but I
also need some feedback how bad it is in real life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their
rte_flowto a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to their existing solutions.I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.Quoted 18 lines
Quoted 6 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruhQuoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history, there is no "fits all, fixed guidelines", but they can serve as samples:
Solarflare sfc (before patchwork series support):
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-2-git-send-email-arybchenko%40solarflare.com%2f&c=E,1,E9oUT_1WuNC2JA8x7an3rC_Pm5g1L5cxJKQ6pTwSbCWSJpiLH2GnmgfFkUqViOOwkpS2df8kgBvHjmulKaWhyr4BBizUT-sL5LJv21Hx4RtHtK3vjhcKpg,,&typo=1
to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-56-git-send-email-arybchenko%40solarflare.com%2f&c=E,1,GByF_TiC_q11iVPpiPgpCMlSge-J0XfT0zHkriK0rde1Qt1RG7uf6mETQkTSQ-1V86Z7EtRcxlvSsed1sqn8RWfN8KFSbd7NaAkfbDiehn_vSRzja45rQgv53Q,,&typo=1Quoted 9 lines
Thank you for the links, they have been very helpful.
After a lot of internal discussion, Napatech has decided to implement some architectural changes to our PMD that will allow us to easier split up the code into smaller features. The work will require some time, which means that we will not be ready for the 23.11 release. The current goal is to attempt to upstream a quite basic PMD in time for 24.7, and a fully featured PMD for 24.11.
Hi Christiam,
Good to see there is a solid plan for upstreaming but also not that good that it is postponed,
I am aware it is all tied to your internal planning/resourcing etc, but since the effort already started, can it be possible to squeeze very basic driver in this release, which just does link up and most basic Rx/Tx? It gives opportunity to experiment on device to users.
Quoted 4 lines
We can accept it up to -rc3, which is end of October, so there is still some time?
This is just a suggestion though, no pressure intended.
I agree with Ferruh, better to start early and small. It shouldn't be too hard to introduce the skeleton of the driver.
Quoted 291 lines · Thomas Monjalon
29/09/2023 11:46, Ferruh Yigit:
Quoted 290 lines · Christian Koue Muf
Quoted 273 lines · Ferruh Yigit
Quoted 265 lines · Thomas Monjalon
Quoted 227 lines
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release. Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the
basic initialization and what is linked to a specific offload or configuration feature.As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 27 lines
Quoted 27 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E
,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLl nhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1, but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a
release, a user can apply the missing patches from the mailing list to get the features.Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible, but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option.
While I of cause agree it would be easier to review and
understand, the code should also result in a meaningful product.
Of the 87k lines of code, 53k lines is needed to start-up the
FPGA to a state the it is ready to receive traffic. But at this
point all packets would simply be discarded, and to be honest,
there are better and cheaper options out there, if nothing more
than basic functionality is needed. 34k lines are used to setup
filters based onrte_flow. The thing is, that you need to
initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product
would not be functional. Of cause some of the top level logic
could be split out, but at this point we are talking about
splitting 87k lines into 80k and 7k, which I don't think is worth it.Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 35 lines
Quoted 25 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD
exposing a socket interface.)But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only. And overall this reduces portability of the DPDK application,
each application becomes unique to a device (This is a bad
thing, but I also need some feedback how bad it is in real
life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide
additional functionality. We have customers with use-cases that
require multiple processes. Since Napatech adapters do not
support configuration through VFs, then secondary applications
must send theirrte_flowto a main application, which will then
setup the flow through it's PF. This control channel "hides"
these details, and make the product easier for users to adapt to their existing solutions.I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.Quoted 18 lines
Quoted 6 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruhQuoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history, there is no "fits all, fixed guidelines", but they can serve as samples:
Marvell cnxk:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2flist%2f%3fseries%3d17449%26state%3d%252A%26a rchive%3dboth&c=E,1,DmXU0iHwXoSaZ4bKn-yhX9J8XmFBispd2ut7pxLNBkK3Q4L VpG_zmOf1jnWSS-Y0Fx-TNbPnQDHyBZkDj23Gu7zjPZ5nsA7pid5CsE2vxNk,&typo= 1Solarflare sfc (before patchwork series support):
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-2-git-send-email-ar ybchenko%40solarflare.com%2f&c=E,1,E9oUT_1WuNC2JA8x7an3rC_Pm5g1L5cx JKQ6pTwSbCWSJpiLH2GnmgfFkUqViOOwkpS2df8kgBvHjmulKaWhyr4BBizUT-sL5LJ v21Hx4RtHtK3vjhcKpg,,&typo=1
to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-56-git-send-email-a rybchenko%40solarflare.com%2f&c=E,1,GByF_TiC_q11iVPpiPgpCMlSge-J0Xf T0zHkriK0rde1Qt1RG7uf6mETQkTSQ-1V86Z7EtRcxlvSsed1sqn8RWfN8KFSbd7NaA kfbDiehn_vSRzja45rQgv53Q,,&typo=1Quoted 6 lines
Intel ice:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2flist%2f%3fseries%3d2842%26state%3d%252A%26ar chive%3dboth&c=E,1,zQwvAIR3ToLIhT09bVxm_HEF-dp8eyTqhsKB3eOYgIJdd2WS _0ZlTbQKfr9KLyTA3A2A2HzBbjIlz21D_hWVgS_INmmC5eew1J0QBH-PoRNd&typo=1Quoted 5 lines
Thank you for the links, they have been very helpful.
After a lot of internal discussion, Napatech has decided to implement some architectural changes to our PMD that will allow us to easier split up the code into smaller features. The work will require some time, which means that we will not be ready for the 23.11 release. The current goal is to attempt to upstream a quite basic PMD in time for 24.7, and a fully featured PMD for 24.11.
Hi Christiam,
Good to see there is a solid plan for upstreaming but also not that good that it is postponed,
I am aware it is all tied to your internal planning/resourcing etc, but since the effort already started, can it be possible to squeeze very basic driver in this release, which just does link up and most basic Rx/Tx? It gives opportunity to experiment on device to users.
Quoted 7 lines
Quoted 4 lines
We can accept it up to -rc3, which is end of October, so there is still some time?
This is just a suggestion though, no pressure intended.
I agree with Ferruh, better to start early and small. It shouldn't be too hard to introduce the skeleton of the driver.
Hi Ferruh and Thomas,
My apologies for the late response, I have been sick the last week.
We can try to create a small PMD in time. The reason I'm cautious is because Napatech plan to make quite large changes to the PMD, to achieve a more stable and modular code-base. This means that future updates will have quite large diffs, until these changes are in place.
Quoted 297 lines · Christian Koue Muf
Quoted 296 lines · Thomas Monjalon
29/09/2023 11:46, Ferruh Yigit:
Quoted 294 lines · Christian Koue Muf
Quoted 273 lines · Ferruh Yigit
Quoted 265 lines · Thomas Monjalon
Quoted 227 lines
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release. Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the
basic initialization and what is linked to a specific offload or configuration feature.As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 27 lines
Quoted 27 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E
,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLl nhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1, but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a
release, a user can apply the missing patches from the mailing list to get the features.Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible, but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option.
While I of cause agree it would be easier to review and
understand, the code should also result in a meaningful product.
Of the 87k lines of code, 53k lines is needed to start-up the
FPGA to a state the it is ready to receive traffic. But at this
point all packets would simply be discarded, and to be honest,
there are better and cheaper options out there, if nothing more
than basic functionality is needed. 34k lines are used to setup
filters based onrte_flow. The thing is, that you need to
initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product
would not be functional. Of cause some of the top level logic
could be split out, but at this point we are talking about
splitting 87k lines into 80k and 7k, which I don't think is worth it.Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 35 lines
Quoted 25 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD
exposing a socket interface.)But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only. And overall this reduces portability of the DPDK application,
each application becomes unique to a device (This is a bad
thing, but I also need some feedback how bad it is in real
life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide
additional functionality. We have customers with use-cases that
require multiple processes. Since Napatech adapters do not
support configuration through VFs, then secondary applications
must send theirrte_flowto a main application, which will then
setup the flow through it's PF. This control channel "hides"
these details, and make the product easier for users to adapt to their existing solutions.I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.Quoted 18 lines
Quoted 6 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruhQuoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history, there is no "fits all, fixed guidelines", but they can serve as samples:
Marvell cnxk:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2flist%2f%3fseries%3d17449%26state%3d%252A%26a rchive%3dboth&c=E,1,DmXU0iHwXoSaZ4bKn-yhX9J8XmFBispd2ut7pxLNBkK3Q4L VpG_zmOf1jnWSS-Y0Fx-TNbPnQDHyBZkDj23Gu7zjPZ5nsA7pid5CsE2vxNk,&typo= 1Solarflare sfc (before patchwork series support):
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-2-git-send-email-ar ybchenko%40solarflare.com%2f&c=E,1,E9oUT_1WuNC2JA8x7an3rC_Pm5g1L5cx JKQ6pTwSbCWSJpiLH2GnmgfFkUqViOOwkpS2df8kgBvHjmulKaWhyr4BBizUT-sL5LJ v21Hx4RtHtK3vjhcKpg,,&typo=1
to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-56-git-send-email-a rybchenko%40solarflare.com%2f&c=E,1,GByF_TiC_q11iVPpiPgpCMlSge-J0Xf T0zHkriK0rde1Qt1RG7uf6mETQkTSQ-1V86Z7EtRcxlvSsed1sqn8RWfN8KFSbd7NaA kfbDiehn_vSRzja45rQgv53Q,,&typo=1Quoted 6 lines
Intel ice:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2flist%2f%3fseries%3d2842%26state%3d%252A%26ar chive%3dboth&c=E,1,zQwvAIR3ToLIhT09bVxm_HEF-dp8eyTqhsKB3eOYgIJdd2WS _0ZlTbQKfr9KLyTA3A2A2HzBbjIlz21D_hWVgS_INmmC5eew1J0QBH-PoRNd&typo=1Quoted 5 lines
Thank you for the links, they have been very helpful.
After a lot of internal discussion, Napatech has decided to implement some architectural changes to our PMD that will allow us to easier split up the code into smaller features. The work will require some time, which means that we will not be ready for the 23.11 release. The current goal is to attempt to upstream a quite basic PMD in time for 24.7, and a fully featured PMD for 24.11.
Hi Christiam,
Good to see there is a solid plan for upstreaming but also not that good that it is postponed,
I am aware it is all tied to your internal planning/resourcing etc, but since the effort already started, can it be possible to squeeze very basic driver in this release, which just does link up and most basic Rx/Tx? It gives opportunity to experiment on device to users.
We can accept it up to -rc3, which is end of October, so there is still some time?
This is just a suggestion though, no pressure intended.
Quoted 9 lines
Quoted 2 lines
I agree with Ferruh, better to start early and small. It shouldn't be too hard to introduce the skeleton of the driver.
Hi Ferruh and Thomas,
My apologies for the late response, I have been sick the last week.
We can try to create a small PMD in time. The reason I'm cautious is because Napatech plan to make quite large changes to the PMD, to achieve a more stable and modular code-base. This means that future updates will have quite large diffs, until these changes are in place.
I think upstreaming in this release makes more sense if it is the first step of the gradually improving/growing the driver process.
If you will need to scratch what exists in this release and replace it with something completely new, I agree these is less value to upstream in this release.
Quoted 297 lines · Christian Koue Muf
Quoted 296 lines · Thomas Monjalon
29/09/2023 11:46, Ferruh Yigit:
Quoted 294 lines · Christian Koue Muf
Quoted 273 lines · Ferruh Yigit
Quoted 265 lines · Thomas Monjalon
Quoted 227 lines
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release. Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the
basic initialization and what is linked to a specific offload or configuration feature.As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something was added.
Quoted 27 lines
Quoted 27 lines
Quoted 6 lines
Jumping in here with an opinion about welcoming new NIC vendors to the community:
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
If the vendor provides one big patch series, which may be difficult to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Hi Morten,
I was thinking same before making my above comment, what happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=E
,1,NpoJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10J9bOLl nhoR6fFAzWtCzOhRCzVruYj520zZORv6-MjJeSC5TrGnIFL&typo=1, but upstreaming has many benefits.One of those benefits is upstreaming provides a quality assurance for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand-holding).
If driver is one big patch series, it is practically not possible to review it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 8 lines
Quoted 8 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details, reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
If a customer would like to add a feature themselves, or fix something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.If driver is split into more patches, it makes patch easier to understand which makes code practically more accessible to other developers that are not expert in driver.
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
In the meantime, if some features are not yet upstreamed in a
release, a user can apply the missing patches from the mailing list to get the features.Quoted 1 line
Quoted 1 line
Quoted 1 line
We, the community, should not make it too difficult for vendors trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
You're right Morten, we try to be as welcoming as possible, but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 3 lines
Quoted 3 lines
Agree to not make upstreaming difficult for new vendors, and indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Distributing upstreaming effort to a year was just a suggestion, it can go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Driver features can be added until -rc2 (in one month).
Quoted 12 lines
Quoted 1 line
As I am from a vendor too, I can understand the product/customer pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we understand that.
Quoted 14 lines
In regards to splitting the code, I don't see this a good option.
While I of cause agree it would be easier to review and
understand, the code should also result in a meaningful product.
Of the 87k lines of code, 53k lines is needed to start-up the
FPGA to a state the it is ready to receive traffic. But at this
point all packets would simply be discarded, and to be honest,
there are better and cheaper options out there, if nothing more
than basic functionality is needed. 34k lines are used to setup
filters based onrte_flow. The thing is, that you need to
initialize all modules in the FPGA TX- and RX-pipelines with valid data, even if you don't need the features those modules provide. As a result, if you split up the 34k lines, then the product
would not be functional. Of cause some of the top level logic
could be split out, but at this point we are talking about
splitting 87k lines into 80k and 7k, which I don't think is worth it.Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 35 lines
Quoted 25 lines
Quoted 6 lines
Quoted 5 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this interface. I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
Quoted 6 lines
That would be great.
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and this can make users life easy, so this is a practical thing to do. (Indeed there are already some ways to do this, without PMD
exposing a socket interface.)But this also reduces effort developers putting on DPDK layer solution, because it is always easier to add more support to the driver only. And overall this reduces portability of the DPDK application,
each application becomes unique to a device (This is a bad
thing, but I also need some feedback how bad it is in real
life.)Quoted 9 lines
To balance this, we said if a feature is too specific to a device, it can add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
But creating a socket interface directly from the driver is more than PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Overall it makes more sense to me to have a unified/common interface from drivers to DPDK applications, which is through the ethdev layer. And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch, but I would like to get more feedback from @techboard.
Quoted 7 lines
The reason we have the addition control channel is not provide
additional functionality. We have customers with use-cases that
require multiple processes. Since Napatech adapters do not
support configuration through VFs, then secondary applications
must send theirrte_flowto a main application, which will then
setup the flow through it's PF. This control channel "hides"
these details, and make the product easier for users to adapt to their existing solutions.I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
I'm not sure your need is about secondary process.
Let's discuss this need in a meeting if needed.
Anyway, the message is that we want to be part of such design decision.Quoted 18 lines
Quoted 6 lines
And related to not being too hard on the newcomers, unrelated to being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 6 lines
Quoted 6 lines
Quoted 5 lines
Thanks,
ferruhQuoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Thank you, Ferruh, for taking good care of the community by providing constructive feedback like this to new NIC vendors!
Please note that my feedback is entirely process related. I didn’t review the driver, so I have no technical comments to the patch series.
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history, there is no "fits all, fixed guidelines", but they can serve as samples:
Marvell cnxk:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2flist%2f%3fseries%3d17449%26state%3d%252A%26a rchive%3dboth&c=E,1,DmXU0iHwXoSaZ4bKn-yhX9J8XmFBispd2ut7pxLNBkK3Q4L VpG_zmOf1jnWSS-Y0Fx-TNbPnQDHyBZkDj23Gu7zjPZ5nsA7pid5CsE2vxNk,&typo= 1Solarflare sfc (before patchwork series support):
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-2-git-send-email-ar ybchenko%40solarflare.com%2f&c=E,1,E9oUT_1WuNC2JA8x7an3rC_Pm5g1L5cx JKQ6pTwSbCWSJpiLH2GnmgfFkUqViOOwkpS2df8kgBvHjmulKaWhyr4BBizUT-sL5LJ v21Hx4RtHtK3vjhcKpg,,&typo=1
to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-56-git-send-email-a rybchenko%40solarflare.com%2f&c=E,1,GByF_TiC_q11iVPpiPgpCMlSge-J0Xf T0zHkriK0rde1Qt1RG7uf6mETQkTSQ-1V86Z7EtRcxlvSsed1sqn8RWfN8KFSbd7NaA kfbDiehn_vSRzja45rQgv53Q,,&typo=1Quoted 6 lines
Intel ice:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
org%2fproject%2fdpdk%2flist%2f%3fseries%3d2842%26state%3d%252A%26ar chive%3dboth&c=E,1,zQwvAIR3ToLIhT09bVxm_HEF-dp8eyTqhsKB3eOYgIJdd2WS _0ZlTbQKfr9KLyTA3A2A2HzBbjIlz21D_hWVgS_INmmC5eew1J0QBH-PoRNd&typo=1Quoted 5 lines
Thank you for the links, they have been very helpful.
After a lot of internal discussion, Napatech has decided to implement some architectural changes to our PMD that will allow us to easier split up the code into smaller features. The work will require some time, which means that we will not be ready for the 23.11 release. The current goal is to attempt to upstream a quite basic PMD in time for 24.7, and a fully featured PMD for 24.11.
Hi Christiam,
Good to see there is a solid plan for upstreaming but also not that good that it is postponed,
I am aware it is all tied to your internal planning/resourcing etc, but since the effort already started, can it be possible to squeeze very basic driver in this release, which just does link up and most basic Rx/Tx? It gives opportunity to experiment on device to users.
We can accept it up to -rc3, which is end of October, so there is still some time?
This is just a suggestion though, no pressure intended.
Quoted 10 lines
Quoted 2 lines
I agree with Ferruh, better to start early and small. It shouldn't be too hard to introduce the skeleton of the driver.
Hi Ferruh and Thomas,
My apologies for the late response, I have been sick the last week.
We can try to create a small PMD in time. The reason I'm cautious is because Napatech plan to make quite large changes to the PMD, to achieve a more stable and modular code-base. This means that future updates will have quite large diffs, until these changes are in place.
Hi Christian, Mykola,
What is the status of the 'ntnic'?
Will there be some upstreaming effort for v24.07?
Hi, Ferruh.
Yes, we plan to send new 'ntnic' patch series into v24.07
Right now, we are doing refactoring of 'ntnic' code to make it modular. So, we will send it split into smaller patches.
Best regards,
Mykola Kostenok.
Quoted 433 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Friday, March 29, 2024 1:25 PM
To: Christian Koue Muf <[email protected]>; Thomas Monjalon <[email protected]>; Morten Brørup <[email protected]>; Mykola Kostenok <[email protected]>
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v16 1/8] net/ntnic: initial commit which adds register definesQuoted 50 lines · Christian Koue Muf
Quoted 49 lines · Thomas Monjalon
29/09/2023 11:46, Ferruh Yigit:
Quoted 48 lines · Christian Koue Muf
Quoted 47 lines · Ferruh Yigit
Quoted 46 lines · Thomas Monjalon
Quoted 45 lines
Hello,
19/09/2023 11:06, Christian Koue Muf:
Quoted 29 lines · Ferruh Yigit
Quoted 28 lines · Morten Brørup
Quoted 27 lines
Quoted 27 lines
From: Ferruh Yigit [mailto:[email protected]]
Sent: Friday, 15 September 2023 17.55Quoted 9 lines · Mykola Kostenok
From: Christian Koue Muf <[email protected]>
The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.
Signed-off-by Christian Koue Muf <[email protected]>Reviewed-by Mykola Kostenok <[email protected]>Hi Mykola, Christiam,
This PMD scares me, overall it is a big drop:
"249 files changed, 87128 insertions(+)"I think it is not possible to review all in one release cycle, and it is not even possible to say if all code used or not.
I can see code is already developed, and it is difficult to restructure developed code, but restructure it into small pieces really helps for reviews.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver supports good list of features, can it be possible to distribute upstream effort into multiple release. Starting from basic functionality and add features gradually. Target for this release can be providing datapath, and add more if we have time in the release, what do you think?
I was expecting to get only Rx/Tx in this release, not really more.
I agree it may be interesting to discuss some design and check whether we need more features in ethdev as part of the driver upstreaming process.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Also there are large amount of base code (HAL / FPGA code), instead of adding them as a bulk, relevant ones with a feature can be added with the feature patch, this eliminates dead code in the base code layer, also helps user/review to understand the link between driver code and base code.
Yes it would be interesting to see what is really needed for the basic initialization and what is linked to a specific offload or
configuration feature.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
As a maintainer, I have to do some changes across all drivers sometimes, and I use git blame a lot to understand why something
was added.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jumping in here with an opinion about welcoming new NIC
vendors to the community:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Generally, if a NIC vendor supplies a PMD for their NIC, I expect the
vendor to take responsibility for the quality of the PMD, including providing a maintainer and support backporting of fixes to the PMD in LTS releases. This should align with the vendor's business case for upstreaming their driver.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If the vendor provides one big patch series, which may be difficult
to understand/review, the fallout mainly hits the vendor's customers (and thus the vendor's support organization), not the community as a whole.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Hi Morten,
I was thinking same before making my above comment, what
happens if vendors submit as one big patch and when a problem occurs we can ask owner to fix. Probably this makes vendor happy and makes my life (or any other maintainer's life) easier, it is always easier to say yes.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
But I come up with two main reasons to ask for a rework:
1- Technically any vendor can deliver their software to their customers via a public git repository, they don't have to upstream to
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fdpdk.org&c=
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
E
,1,N
poJejuuvPdOPfcFJYtsmkQF6PVrDjGsZ8x_gi5xDrTyZokK_nM11u4ZpzHgM10JQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
9 bOLl nhoR6fFAzWtCzOhRCzVruYj520zZORv6-
MjJeSC5TrGnIFL&typo=1,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
but upstreaming has many benefits.
One of those benefits is upstreaming provides a quality assurance
for vendor's customers (that is why customer can be asking for this, as we are having in many cases), and this quality assurance comes from additional eyes reviewing the code and guiding vendors for the DPDK quality standards (some vendors already doing pretty good, but new ones sometimes requires hand- holding).
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If driver is one big patch series, it is practically not possible to review
it, I can catch a few bits here or there, you may some others, but practically it will be merged without review, and we will fail on our quality assurance task.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
2- Make code more accessible to the rest of the world.
When it is a big patch, code can be functional but lots of details,
reasoning, relation between components gets lost, which makes it even harder for an external developer, like me, to understand it (I am a mere guinea pig here :).
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If a customer would like to add a feature themselves, or fix
something, even after vendor no more working on that product anymore, customer needs to understand the code or some reasoning in the code.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Or if someone wants to backport the driver to rust, or a DPDK
developer wants to do a rework that requires updating all drivers, or a tester would like to analyze the code to figure out behavior difference of the devices. I think I have witness all above cases in real life.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If driver is split into more patches, it makes patch easier to
understand which makes code practically more accessible to other developers that are not expert in driver.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
I fully agree about the 2 reasons for upstreaming piece by piece.
Quoted 1 line
Quoted 1 line
Overall, yes splitting patch takes time and effort, and yes this is an
overhead for a code that is already developed, but I think benefit is big so it worth doing the task.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
In the meantime, if some features are not yet upstreamed in a release, a user can apply the missing patches from the mailing list to
get the features.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
We, the community, should not make it too difficult for vendors
trying to upstream their drivers. I certainly consider it unreasonable to ask a vendor to postpone the release of some existing features by effectively an entire year (considering that only LTS releases are relevant for most of us) because we want the vendor to refactor the patch series to match our preferences within an unrealistic timeframe.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
You're right Morten, we try to be as welcoming as possible, but as Ferruh said, we want to be able to understand how a driver is built, even if not understanding all details.
In Open Source, I think not only the code should be available, we must also take care of explanations and documentation.
Quoted 1 line
Quoted 1 line
Agree to not make upstreaming difficult for new vendors, and
indeed we are encouraging more vendors to be upstream their code, this is in best interest of both sides.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Distributing upstreaming effort to a year was just a suggestion, it can
go in earlier as it is becomes ready but I can see it will take time to split driver into features and upstream them.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Driver features can be added until -rc2 (in one month).
Quoted 1 line
Quoted 1 line
As I am from a vendor too, I can understand the product/customer
pressure, but I hope this approach can encourage vendors start upstreaming early or even better upstream as they develop the code.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Hi Ferruh,
First of all, thank you for starting the work to review our code.
As Morten said Napatech plans to take all responsibility for the quality of the PMD source code. We expect to provide all fixes needed in the future. If for some reason Napatech stops maintaining the code, then we have been informed that the DPDK community might delete the PMD from the repository, and we
understand that.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
In regards to splitting the code, I don't see this a good option. While I of cause agree it would be easier to review and understand, the code should also result in a meaningful product. Of the 87k lines of code, 53k lines is needed to start-up the FPGA to a state the it is ready to receive traffic. But at this point all packets would simply be discarded, and to be honest, there are better and cheaper options out there, if nothing more than basic functionality is needed. 34k lines are used to setup filters based on
rte_flow. The thing is, that you need to initialize all modules in the FPGA TX- and RX-pipelines with valid data,even if you don't need the features those modules provide.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
As a result, if you split up the 34k lines, then the product would not be functional. Of cause some of the top level logic could be split out, but at this point we are talking about splitting 87k lines into 80k and 7k, which I don't think is worth it.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Actually I think it is worth.
There is a benefit in isolating the small basic init part from the more complex features.Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
As far as I understand last patch opens a socket interface and an external application can sent control commands via this
interface.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
I am not sure about this side control channel, what is missing in the DPDK API? Can we try to address them in the DPDK layer instead of a driver specific solution?
That would be great.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
AFAIK, other vendors also has a bunch of out-of-band communication, e.g. magical EAL parameters to the MLX drivers. So let's not be too hard on the newcomers. ;-)
I did some thinking for this one too,
As we are in userspace, it is easy to have side control channel, and
this can make users life easy, so this is a practical thing to do.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
(Indeed there are already some ways to do this, without PMD exposing a socket interface.)
But this also reduces effort developers putting on DPDK layer
solution, because it is always easier to add more support to the driver only.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
And overall this reduces portability of the DPDK application, each application becomes unique to a device (This is a bad thing, but I also need some feedback how bad it is in real life.)
To balance this, we said if a feature is too specific to a device, it can
add device specific API and this is better than device specific features pollute the common, most used code. And push back to introduce more new PMD specific APIs unless it is really needed.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But creating a socket interface directly from the driver is more than
PMD specific API. Technically application control interface can rely completely to this. Even we assume this is not for control, but just for debug, I can see it can be useful for debug and again practical thing to do, I am still not sure how much it hurts if each driver has a custom socket interface for their debug needs.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Overall it makes more sense to me to have a unified/common
interface from drivers to DPDK applications, which is through the ethdev layer.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
And improve and extend the ethdev layer to satisfy driver needs.
In this specific example, I am for rejecting the socket interface patch,
but I would like to get more feedback from @techboard.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
The reason we have the addition control channel is not provide additional functionality. We have customers with use-cases that require multiple processes. Since Napatech adapters do not support configuration through VFs, then secondary applications must send their
rte_flowto a main application, which will then setup the flow through it's PF. This control channel "hides" these details, and make the product easier for users to adapt to theirexisting solutions.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
I think you need to explore VF representors.
This is what is done with other drivers, and it make them compatible.Quoted 5 lines
If you stand firm on rejecting the control channel, then we have to go back to the drawing board on this issue. We did look at DPDK's multi-process support, and actually had some support for this, but we determined that for our use-case it was better to have a communication channel, and no shared memory.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
I'm not sure your need is about secondary process. Let's discuss this need in a meeting if needed. Anyway, the message is that we want to be part of such design
decision.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
And related to not being too hard on the newcomers, unrelated to
being a newcomer or not, if a process/feature/approach approved once, some others will point to it and will ask to do the same which is fair in their perspective. I had multiple instance of this in the past.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 5 lines
Of course we are being easy to newcomers but not in a way to allow code that we believe is not good thing to do, but going easy on process may be :)
We are grateful for any leniency you may show us ;-)
Thanks again,
ChristianQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
ferruhThank you, Ferruh, for taking good care of the community by
providing constructive feedback like this to new NIC vendors!
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Please note that my feedback is entirely process related. I didn’t
review the driver, so I have no technical comments to the patch series.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
-Morten
We are going to discuss the process in the technical board today.
Hi Mykola, Christiam,
As discussed, following are a few good examples from the DPDK history,
there is no "fits all, fixed guidelines", but they can serve as samples:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Marvell cnxk:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
org%2fproject%2fdpdk%2flist%2f%3fseries%3d17449%26state%3d%252A% 26
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
a
rchive%3dboth&c=E,1,DmXU0iHwXoSaZ4bKn-yhX9J8XmFBispd2ut7pxLNBkK3Q4
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
L
VpG_zmOf1jnWSS-Y0Fx-TNbPnQDHyBZkDj23Gu7zjPZ5nsA7pid5CsE2vxNk,&typo
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
=
1Solarflare sfc (before patchwork series support):
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-2-git-send-
email-a
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
r
ybchenko%40solarflare.com%2f&c=E,1,E9oUT_1WuNC2JA8x7an3rC_Pm5g1 L5c
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
x
JKQ6pTwSbCWSJpiLH2GnmgfFkUqViOOwkpS2df8kgBvHjmulKaWhyr4BBizUT -sL5L
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
J
v21Hx4RtHtK3vjhcKpg,,&typo=1
tohttps://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
org%2fproject%2fdpdk%2fpatch%2f1480436367-20749-56-git-send-
email-
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
a
rybchenko%40solarflare.com%2f&c=E,1,GByF_TiC_q11iVPpiPgpCMlSge-J0X
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
f
T0zHkriK0rde1Qt1RG7uf6mETQkTSQ-1V86Z7EtRcxlvSsed1sqn8RWfN8KFSbd7Na
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
A
kfbDiehn_vSRzja45rQgv53Q,,&typo=1Intel ice:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpatchwork.dpdk.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
org%2fproject%2fdpdk%2flist%2f%3fseries%3d2842%26state%3d%252A%2 6a
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
r
chive%3dboth&c=E,1,zQwvAIR3ToLIhT09bVxm_HEF-dp8eyTqhsKB3eOYgIJdd2W
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
S _0ZlTbQKfr9KLyTA3A2A2HzBbjIlz21D_hWVgS_INmmC5eew1J0QBH-
PoRNd&typo=
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
1
Thank you for the links, they have been very helpful.
After a lot of internal discussion, Napatech has decided to implement
some architectural changes to our PMD that will allow us to easier split up the code into smaller features. The work will require some time, which means that we will not be ready for the 23.11 release. The current goal is to attempt to upstream a quite basic PMD in time for 24.7, and a fully featured PMD for 24.11.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Hi Christiam,
Good to see there is a solid plan for upstreaming but also not that good that it is postponed,
I am aware it is all tied to your internal planning/resourcing etc, but since the effort already started, can it be possible to squeeze very basic driver in this release, which just does link up and most basic
Rx/Tx?
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
It gives opportunity to experiment on device to users.
We can accept it up to -rc3, which is end of October, so there is still some time?
This is just a suggestion though, no pressure intended.
Quoted 8 lines
Quoted 2 lines
I agree with Ferruh, better to start early and small. It shouldn't be too hard to introduce the skeleton of the driver.
Hi Ferruh and Thomas,
My apologies for the late response, I have been sick the last week.
We can try to create a small PMD in time. The reason I'm cautious is because
Napatech plan to make quite large changes to the PMD, to achieve a more stable and modular code-base. This means that future updates will have quite large diffs, until these changes are in place.
Quoted 2 lines
Hi Christian, Mykola,
What is the status of the 'ntnic'?
Will there be some upstreaming effort for v24.07?
On 4/3/2024 11:55 AM, Mykola Kostenok wrote:
<...>
Quoted 11 lines
Quoted 5 lines
Hi Christian, Mykola,
What is the status of the 'ntnic'?
Will there be some upstreaming effort for v24.07?Hi, Ferruh.
Yes, we plan to send new 'ntnic' patch series into v24.07
Right now, we are doing refactoring of 'ntnic' code to make it modular. So, we will send it split into smaller patches.
Great, thanks for the update.
Just a reminder that you can start small, no need to wait all features to be ready.