mbox series

[00/25] Add Support for DLB v2.5

Message ID 20210316221857.2254-1-timothy.mcdaniel@intel.com (mailing list archive)
Headers
Series Add Support for DLB v2.5 |

Message

Timothy McDaniel March 16, 2021, 10:18 p.m. UTC
  This patch series adds support for DLB v2.5 to
the current DLB V2.0 PMD. The resulting PMD supports
both hardware versions.

The main differences between the DLB v2.5 and v2.0 hardware
are:
- Number of queues/ports
- DLB v2.5 uses a combined credit pool, whereas DLB v2.0
  splits credits into 2 pools, a directed credit pool and a
  load balanced credit pool.
- Different register maps, with different bit names and offsets

In order to support both hardware versions with the same PMD,
and avoid code duplication, the file dlb2_resource.c required a
complete rewrite. This required some creative staging of the changes
in order to keep the individual patches relatively small, while
also meeting the requirement that all individual patches in the set
compile cleanly.

To accomplish this, a few temporary files are used:

dlb2_hw_types_new.h
dlb2_resources_new.h
dlb2_resources_new.c

As dlb2_resources_new.c is populated with the new combined v2.0/v2.5
low level logic, the corresponding old code is removed from
dlb2_resource.c, thus allowing both the original and new code to
continue to compile and link cleanly. Once all of the code has been
migrated to the new model, the old versions of the files are removed,
and the new versions are renamed, effectively replacing the old original
files.

As you review the code, you can ignore the code deletions from
dlb2_resource.c, as that file continues to shrink as the new
corresponding logic is added to dlb2_resource_new.c.

Timothy McDaniel (25):
  event/dlb2: add dlb v2.5 probe
  event/dlb2: add DLB v2.5 probe-time hardware init
  event/dlb2: add DLB v2.5 support to get_resources
  event/dlb2: add DLB v2.5 support to create sched domain
  event/dlb2: add DLB v2.5 support to domain reset
  event/dlb2: add DLB V2.5 support to create ldb queue
  event/dlb2: add DLB v2.5 support to create ldb port
  event/dlb2: add DLB v2.5 support to create dir port
  event/dlb2: add DLB v2.5 support to create dir queue
  event/dlb2: add DLB v2.5 support to map qid
  event/dlb2: add DLB v2.5 support to unmap queue
  event/dlb2: add DLB v2.5 support to start domain
  event/dlb2: add DLB v2.5 credit scheme
  event/dlb2: Add DLB v2.5 support to get queue depth functions
  event/dlb2: add DLB v2.5 finish map/unmap interfaces
  event/dlb2: add DLB v2.5 sparse cq mode
  event/dlb2: add DLB v2.5 support to sequence number management
  event/dlb2: consolidate dlb resource header files into one file
  event/dlb2: delete old dlb2_resource.c file
  event/dlb2: move dlb_resource_new.c to dlb_resource.c
  event/dlb2: remove temporary file, dlb_hw_types.h
  event/dlb2: move dlb2_hw_type_new.h to dlb2_hw_types.h
  event/dlb2: delete old register map file, dlb2_regs.h
  event/dlb2: rename dlb2_regs_new.h to dlb2_regs.h
  event/dlb2: update xstats for DLB v2.5

 drivers/event/dlb2/dlb2.c                  |  430 +-
 drivers/event/dlb2/dlb2_priv.h             |  158 +-
 drivers/event/dlb2/dlb2_user.h             |   27 +-
 drivers/event/dlb2/dlb2_xstats.c           |   70 +-
 drivers/event/dlb2/pf/base/dlb2_hw_types.h |  102 +-
 drivers/event/dlb2/pf/base/dlb2_mbox.h     |    1 -
 drivers/event/dlb2/pf/base/dlb2_osdep.h    |    3 +
 drivers/event/dlb2/pf/base/dlb2_regs.h     | 6063 +++++++++++++-------
 drivers/event/dlb2/pf/base/dlb2_resource.c | 3277 ++++++-----
 drivers/event/dlb2/pf/base/dlb2_resource.h |   28 +-
 drivers/event/dlb2/pf/dlb2_main.c          |   37 +-
 drivers/event/dlb2/pf/dlb2_pf.c            |   62 +-
 12 files changed, 6366 insertions(+), 3892 deletions(-)
  

Comments

Jerin Jacob March 21, 2021, 10:50 a.m. UTC | #1
On Wed, Mar 17, 2021 at 3:49 AM Timothy McDaniel
<timothy.mcdaniel@intel.com> wrote:
>
> This patch series adds support for DLB v2.5 to
> the current DLB V2.0 PMD. The resulting PMD supports
> both hardware versions.
>
> The main differences between the DLB v2.5 and v2.0 hardware
> are:
> - Number of queues/ports
> - DLB v2.5 uses a combined credit pool, whereas DLB v2.0
>   splits credits into 2 pools, a directed credit pool and a
>   load balanced credit pool.
> - Different register maps, with different bit names and offsets
>
> In order to support both hardware versions with the same PMD,
> and avoid code duplication, the file dlb2_resource.c required a
> complete rewrite. This required some creative staging of the changes
> in order to keep the individual patches relatively small, while
> also meeting the requirement that all individual patches in the set
> compile cleanly.
>
> To accomplish this, a few temporary files are used:
>
> dlb2_hw_types_new.h
> dlb2_resources_new.h
> dlb2_resources_new.c
>
> As dlb2_resources_new.c is populated with the new combined v2.0/v2.5
> low level logic, the corresponding old code is removed from
> dlb2_resource.c, thus allowing both the original and new code to
> continue to compile and link cleanly. Once all of the code has been
> migrated to the new model, the old versions of the files are removed,
> and the new versions are renamed, effectively replacing the old original
> files.


# Please make sure each patch compiles. It fails on the second
patch[1] now with clang.
# Please check each patch with ./devtools/test-meson-builds.sh.
# Also, update the release notes for 2.5 HW support.

[1]
FAILED: drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_base_dlb2_resource_new.c.o
ccache clang -Idrivers/libtmp_rte_event_dlb2.a.p -Idrivers
-I../drivers -Idrivers/event/dlb2 -I../drivers/event/dlb2
-Ilib/librte_eventdev -I../lib/librte_eventdev -I. -I.. -Iconfig
-I../config -Ilib/librte_eal/include -I../lib/librte_eal/i
nclude -Ilib/librte_eal/linux/include
-I../lib/librte_eal/linux/include -Ilib/librte_eal/x86/include
-I../lib/librte_eal/x86/include -Ilib/librte_eal/common
-I../lib/librte_eal/common -Ilib/librte_eal -I../lib/librte_eal
-Ilib/librte_kvargs
 -I../lib/librte_kvargs -Ilib/librte_metrics -I../lib/librte_metrics
-Ilib/librte_telemetry -I../lib/librte_telemetry -Ilib/librte_ring
-I../lib/librte_ring -Ilib/librte_ethdev -I../lib/librte_ethdev
-Ilib/librte_net -I../lib/librte_net -Il
ib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool
-I../lib/librte_mempool -Ilib/librte_meter -I../lib/librte_meter
-Ilib/librte_hash -I../lib/librte_hash -Ilib/librte_rcu
-I../lib/librte_rcu -Ilib/librte_timer -I../lib/librte_timer -
Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_pci
-I../lib/librte_pci -Idrivers/bus/pci -I../drivers/bus/pci
-I../drivers/bus/pci/linux -Xclang -fcolor-diagnostics -pipe
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2
-g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat
-Wformat-nonliteral -Wformat-security -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wold-style-definition
-Wpointer-arith -Wsign-compare -Wstrict-prototypes
-Wundef -Wwrite-strings -Wno-address-of-packed-member
-Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native
-DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -MD -MQ
drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_base_dlb2_resource
_new.c.o -MF drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_base_dlb2_resource_new.c.o.d
-o drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_base_dlb2_resource_new.c.o
-c ../drivers/event/dlb2/pf/base/dlb2_resource_new.c
../drivers/event/dlb2/pf/base/dlb2_resource_new.c:44:20: error: unused
function 'dlb2_flush_csr' [-Werror,-Wunused-function]
static inline void dlb2_flush_csr(struct dlb2_hw *hw)
                   ^
1 error generated.
[1976/2578] Compiling C ob


>
> As you review the code, you can ignore the code deletions from
> dlb2_resource.c, as that file continues to shrink as the new
> corresponding logic is added to dlb2_resource_new.c.
>
> Timothy McDaniel (25):
>   event/dlb2: add dlb v2.5 probe
>   event/dlb2: add DLB v2.5 probe-time hardware init
>   event/dlb2: add DLB v2.5 support to get_resources
>   event/dlb2: add DLB v2.5 support to create sched domain
>   event/dlb2: add DLB v2.5 support to domain reset
>   event/dlb2: add DLB V2.5 support to create ldb queue
>   event/dlb2: add DLB v2.5 support to create ldb port
>   event/dlb2: add DLB v2.5 support to create dir port
>   event/dlb2: add DLB v2.5 support to create dir queue
>   event/dlb2: add DLB v2.5 support to map qid
>   event/dlb2: add DLB v2.5 support to unmap queue
>   event/dlb2: add DLB v2.5 support to start domain
>   event/dlb2: add DLB v2.5 credit scheme
>   event/dlb2: Add DLB v2.5 support to get queue depth functions
>   event/dlb2: add DLB v2.5 finish map/unmap interfaces
>   event/dlb2: add DLB v2.5 sparse cq mode
>   event/dlb2: add DLB v2.5 support to sequence number management
>   event/dlb2: consolidate dlb resource header files into one file
>   event/dlb2: delete old dlb2_resource.c file
>   event/dlb2: move dlb_resource_new.c to dlb_resource.c
>   event/dlb2: remove temporary file, dlb_hw_types.h
>   event/dlb2: move dlb2_hw_type_new.h to dlb2_hw_types.h
>   event/dlb2: delete old register map file, dlb2_regs.h
>   event/dlb2: rename dlb2_regs_new.h to dlb2_regs.h
>   event/dlb2: update xstats for DLB v2.5
>
>  drivers/event/dlb2/dlb2.c                  |  430 +-
>  drivers/event/dlb2/dlb2_priv.h             |  158 +-
>  drivers/event/dlb2/dlb2_user.h             |   27 +-
>  drivers/event/dlb2/dlb2_xstats.c           |   70 +-
>  drivers/event/dlb2/pf/base/dlb2_hw_types.h |  102 +-
>  drivers/event/dlb2/pf/base/dlb2_mbox.h     |    1 -
>  drivers/event/dlb2/pf/base/dlb2_osdep.h    |    3 +
>  drivers/event/dlb2/pf/base/dlb2_regs.h     | 6063 +++++++++++++-------
>  drivers/event/dlb2/pf/base/dlb2_resource.c | 3277 ++++++-----
>  drivers/event/dlb2/pf/base/dlb2_resource.h |   28 +-
>  drivers/event/dlb2/pf/dlb2_main.c          |   37 +-
>  drivers/event/dlb2/pf/dlb2_pf.c            |   62 +-
>  12 files changed, 6366 insertions(+), 3892 deletions(-)
>
> --
> 2.23.0
>