From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EE5FDA0548; Sat, 3 Apr 2021 12:18:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C87A40696; Sat, 3 Apr 2021 12:18:42 +0200 (CEST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by mails.dpdk.org (Postfix) with ESMTP id A4CA04067B for ; Sat, 3 Apr 2021 12:18:40 +0200 (CEST) Received: by mail-io1-f49.google.com with SMTP id z3so4778314ioc.8 for ; Sat, 03 Apr 2021 03:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8UnE5hq9tcYXddtcCUuavOoFF5ByQXgxrd4T4OHghF0=; b=oYSuARVl72fs0WUC4ca4gktgXxHfMMlaeOQqJCD9lomhMbG3rRHgsZ+DHdmq1ar0uj qOEZ8ktQjGYlhwDVFyiccBGs50SBDPwjQTOixGAt7J6ThfxWpOpheNZgZX7Omf7bHQvz A0JIf/FbUCYmC70U0i19E/gzuS+e1qOYq1SbQjHJLDh5qMqRbq552tVKVjV/QZLJ1B3i ulta2DWU/zqG5z8Sdf8QBCj7CsbK+zDXDvPfqn1YIvJ/LATsctEkXAYWTP3M+lWhnlPj nHAsd0296JK+y28oe4tFzugT1bE38Z5zua+Cu8Jp4yifCchUFsnu/cgyXBMzlfVYr24U TDGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8UnE5hq9tcYXddtcCUuavOoFF5ByQXgxrd4T4OHghF0=; b=e+ilR42cNf8wAeoB9GCslyJQAyxMZWbTO+QhHNPG3g1hy4izGgvtBSWYqTNtHRCU0m 25m+orM+wPQxo39OItSyqVuI+C4MFzuHp9R/aKLbRo/NcyuKHNjcik2u67TcDfQvrYQX uzSZMKx7qHrt4Yd50xiFehQIA+Al0tiT/ksLeQPatLHE0A0T9GlN2kV4i++hpiX4r8qF 7N2cZ+LD3v1vSgfR0OfyhAaCDWjYhYYIqwnn5aKI4kbIlHjVO1pqhDJKByB3bgBqKA7z 9+65oA3r9gyeH3PKh3IwPnrAt193sY1mnvUo3F1d+4zzcmHM65ohJEmyGvReXxOj6JnW xvgg== X-Gm-Message-State: AOAM533/zvC/Fx/eAvcWijQk9YwF/15JpNRsU/384D7Cp3tCdxybH+ut MULM8cVQjPwjT6jOtA6SDP72lphpSlFdxAg2dbQ= X-Google-Smtp-Source: ABdhPJy0sVVlk+1y1sWcR/NKyPKe1TbyLieaF3LEXA5+J4Mri5grzNt+/BAgISr966rS1bLJm/TaGwpG/e/OgWERcCQ= X-Received: by 2002:a6b:b7cd:: with SMTP id h196mr13590349iof.59.1617445120066; Sat, 03 Apr 2021 03:18:40 -0700 (PDT) MIME-Version: 1.0 References: <20210316221857.2254-2-timothy.mcdaniel@intel.com> <1617132940-24800-1-git-send-email-timothy.mcdaniel@intel.com> <1617132940-24800-3-git-send-email-timothy.mcdaniel@intel.com> In-Reply-To: <1617132940-24800-3-git-send-email-timothy.mcdaniel@intel.com> From: Jerin Jacob Date: Sat, 3 Apr 2021 15:48:23 +0530 Message-ID: To: Timothy McDaniel Cc: dpdk-dev , Erik Gabriel Carrillo , Gage Eads , "Van Haaren, Harry" , Jerin Jacob , Thomas Monjalon Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 02/27] event/dlb2: add v2.5 HW init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Mar 31, 2021 at 1:07 AM Timothy McDaniel wrote: > > This commit adds support for DLB v2.5 probe-time hardware init, > and sets up a framework for incorporating the remaining > changes required to support DLB v2.5. > > DLB v2.0 and DLB v2.5 are similar in many respects, but their > register offsets and definitions are different. As a result of these, > differences, the low level hardware functions must take the device > version into consideration. This requires that the hardware version be > passed to many of the low level functions, so that the PMD can > take the appropriate action based on the device version. > > To ease the transition and keep the individual patches small, three > temporary files are added in this commit. These files have "new" > in their names. The files with "new" contain changes specific to a > consolidated PMD that supports both DLB v2.0 and DLB 2.5. Their sister > files of the same name (minus "new") contain the old DLB v2.0 specific > code. The intent is to remove code from the original files as that code > is ported to the combined DLB 2.0/2.5 PMD model and added to the "new" > files in a series of commits. At end of the patch series, the old files > will be empty and the "new" files will have the logic needed > to implement a single PMD that supports both DLB v2.0 and DLB v2.5. > At that time, the original DLB v2.0 specific files will be deleted, > and the "new" files will be renamed and replace them. > > Signed-off-by: Timothy McDaniel > --- > drivers/event/dlb2/dlb2_priv.h | 5 + > drivers/event/dlb2/meson.build | 1 + > .../event/dlb2/pf/base/dlb2_hw_types_new.h | 362 ++ > drivers/event/dlb2/pf/base/dlb2_osdep.h | 4 + > drivers/event/dlb2/pf/base/dlb2_regs_new.h | 4412 +++++++++++++++++ > drivers/event/dlb2/pf/base/dlb2_resource.c | 180 +- > drivers/event/dlb2/pf/base/dlb2_resource.h | 36 - > .../event/dlb2/pf/base/dlb2_resource_new.c | 259 + > .../event/dlb2/pf/base/dlb2_resource_new.h | 73 + > drivers/event/dlb2/pf/dlb2_main.c | 41 +- > drivers/event/dlb2/pf/dlb2_main.h | 4 + > drivers/event/dlb2/pf/dlb2_pf.c | 6 +- > 12 files changed, 5153 insertions(+), 230 deletions(-) > create mode 100644 drivers/event/dlb2/pf/base/dlb2_hw_types_new.h > create mode 100644 drivers/event/dlb2/pf/base/dlb2_regs_new.h > create mode 100644 drivers/event/dlb2/pf/base/dlb2_resource_new.c > create mode 100644 drivers/event/dlb2/pf/base/dlb2_resource_new.h > > diff --git a/drivers/event/dlb2/dlb2_priv.h b/drivers/event/dlb2/dlb2_priv.h > index 1cd78ad94..f3a9fe0aa 100644 > --- a/drivers/event/dlb2/dlb2_priv.h > +++ b/drivers/event/dlb2/dlb2_priv.h > @@ -114,6 +114,11 @@ > #define EV_TO_DLB2_PRIO(x) ((x) >> 5) > #define DLB2_TO_EV_PRIO(x) ((x) << 5) > > +enum dlb2_hw_ver { > + DLB2_HW_VER_2, > + DLB2_HW_VER_2_5, > +}; > + > enum dlb2_hw_port_types { > DLB2_LDB_PORT, > DLB2_DIR_PORT, > diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build > index f22638b8e..bded07e06 100644 > --- a/drivers/event/dlb2/meson.build > +++ b/drivers/event/dlb2/meson.build > @@ -14,6 +14,7 @@ sources = files('dlb2.c', > 'pf/dlb2_main.c', > 'pf/dlb2_pf.c', > 'pf/base/dlb2_resource.c', > + 'pf/base/dlb2_resource_new.c', > 'rte_pmd_dlb2.c', > 'dlb2_selftest.c' > ) > diff --git a/drivers/event/dlb2/pf/base/dlb2_hw_types_new.h b/drivers/event/dlb2/pf/base/dlb2_hw_types_new.h > new file mode 100644 > index 000000000..d58aa94ad > --- /dev/null > +++ b/drivers/event/dlb2/pf/base/dlb2_hw_types_new.h > @@ -0,0 +1,362 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2016-2020 Intel Corporation > + */ > + > +#ifndef __DLB2_HW_TYPES_NEW_H > +#define __DLB2_HW_TYPES_NEW_H > + > +#include "../../dlb2_priv.h" > +#include "dlb2_user.h" > + > +#include "dlb2_osdep_list.h" > +#include "dlb2_osdep_types.h" > +#include "dlb2_regs_new.h" > + > +#define DLB2_BITS_SET(x, val, mask) (x = ((x) & ~(mask)) \ > + | (((val) << (mask##_LOC)) & (mask))) > +#define DLB2_BITS_CLR(x, mask) (x &= ~(mask)) > +#define DLB2_BIT_SET(x, mask) ((x) |= (mask)) > +#define DLB2_BITS_GET(x, mask) (((x) & (mask)) >> (mask##_LOC)) > + > +#define DLB2_MAX_NUM_VDEVS 16 > +#define DLB2_MAX_NUM_SEQUENCE_NUMBER_GROUPS 2 > +#define DLB2_NUM_ARB_WEIGHTS 8 > +#define DLB2_MAX_NUM_AQED_ENTRIES 2048 > +#define DLB2_MAX_WEIGHT 255 > +#define DLB2_NUM_COS_DOMAINS 4 > +#define DLB2_MAX_NUM_SEQUENCE_NUMBER_GROUPS 2 > +#define DLB2_MAX_NUM_SEQUENCE_NUMBER_MODES 5 > +#define DLB2_MAX_CQ_COMP_CHECK_LOOPS 409600 > +#define DLB2_MAX_QID_EMPTY_CHECK_LOOPS (32 * 64 * 1024 * (800 / 30)) > + > +#define DLB2_FUNC_BAR 0 > +#define DLB2_CSR_BAR 2 > + > +#ifdef FPGA > +#define DLB2_HZ 2000000 > +#else > +#define DLB2_HZ 800000000 > +#endif Removal of compile-time FPGA constant is not addressed. >From here (See below) > + (ver == DLB2_HW_V2 ? \ > + DLB2_V2CHP_CFG_LDB_WD_DISABLE1 : \ > + DLB2_V2_5CHP_CFG_LDB_WD_DISABLE1) > + > +#define DLB2_LSP_CFG_CQ_LDB_WU_LIMIT_LIMIT 0x00007FFF > +#define DLB2_LSP_CFG_CQ_LDB_WU_LIMIT_V 0x00008000 > +#define DLB2_LSP_CFG_CQ_LDB_WU_LIMIT_RSVD0 0xFFFF0000 > +#define DLB2_LSP_CFG_CQ_LDB_WU_LIMIT_LIMIT_LOC 0 > +#define DLB2_LSP_CFG_CQ_LDB_WU_LIMIT_V_LOC 15 > +#define DLB2_LSP_CFG_CQ_LDB_WU_LIMIT_RSVD0_LOC 16 To here(See above). Please move this autogenerated register definition to a separate patch like "event/dlb2: add HW register definition" or so