From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: [dpdk-test-report] |WARNING| pw95431 [PATCH] [v3] net/bnxt: add action SRAM translation
Date: Tue, 6 Jul 2021 19:28:49 -0400 (EDT) [thread overview]
Message-ID: <20210706232849.8E20488E71@noxus.dpdklab.iol.unh.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 24101 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/95431
_apply patch failure_
Submitter: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tuesday, July 06 2021 22:37:09
Applied on: CommitID:175af25734f295874e31b33ccd0879e69fd152a9
Apply patch set 95431 failed:
Checking patch drivers/net/bnxt/bnxt_util.h...
Checking patch drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h...
error: drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h: does not exist in index
Checking patch drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h...
error: drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h: does not exist in index
Checking patch drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h...
Checking patch drivers/net/bnxt/tf_core/meson.build...
error: drivers/net/bnxt/tf_core/meson.build: does not exist in index
Checking patch drivers/net/bnxt/tf_core/tf_core.h...
Checking patch drivers/net/bnxt/tf_core/tf_device.c...
error: while searching for:
#include "tf_device_p58.h"
#include "tfp.h"
#include "tf_em.h"
struct tf;
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:8
error: while searching for:
/**
* Resource Reservation Check function
*
* [in] tfp
* Pointer to TF handle
*
* [in] cfg
* Pointer to rm element config
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:18
error: while searching for:
* Pointer to resource reservation array
*
* Returns
* - (n) number of tables that have non-zero reservation count.
*/
static int
tf_dev_reservation_check(struct tf *tfp __rte_unused,
uint16_t count,
struct tf_rm_element_cfg *cfg,
uint16_t *reservations)
{
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:28
error: while searching for:
/* Initialize the modules */
rsv_cnt = tf_dev_reservation_check(tfp,
TF_IDENT_TYPE_MAX,
tf_ident_p4,
(uint16_t *)resources->ident_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:94
error: while searching for:
no_rsv_flag = false;
}
rsv_cnt = tf_dev_reservation_check(tfp,
TF_TBL_TYPE_MAX,
tf_tbl_p4,
(uint16_t *)resources->tbl_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:113
error: while searching for:
no_rsv_flag = false;
}
rsv_cnt = tf_dev_reservation_check(tfp,
TF_TCAM_TBL_TYPE_MAX,
tf_tcam_p4,
(uint16_t *)resources->tcam_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:132
error: while searching for:
*/
em_cfg.cfg = tf_em_ext_p4;
rsv_cnt = tf_dev_reservation_check(tfp,
TF_EM_TBL_TYPE_MAX,
em_cfg.cfg,
(uint16_t *)resources->em_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:155
error: while searching for:
/*
* EM
*/
rsv_cnt = tf_dev_reservation_check(tfp,
TF_EM_TBL_TYPE_MAX,
tf_em_int_p4,
(uint16_t *)resources->em_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:175
error: while searching for:
/* Initial function initialization */
dev_handle->ops = &tf_dev_ops_p58_init;
/* Initialize the modules */
rsv_cnt = tf_dev_reservation_check(tfp,
TF_IDENT_TYPE_MAX,
tf_ident_p58,
(uint16_t *)resources->ident_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:360
error: while searching for:
no_rsv_flag = false;
}
rsv_cnt = tf_dev_reservation_check(tfp,
TF_TBL_TYPE_MAX,
tf_tbl_p58,
(uint16_t *)resources->tbl_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:380
error: while searching for:
no_rsv_flag = false;
}
rsv_cnt = tf_dev_reservation_check(tfp,
TF_TCAM_TBL_TYPE_MAX,
tf_tcam_p58,
(uint16_t *)resources->tcam_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:398
error: while searching for:
/*
* EM
*/
rsv_cnt = tf_dev_reservation_check(tfp,
TF_EM_TBL_TYPE_MAX,
tf_em_int_p58,
(uint16_t *)resources->em_cnt);
if (rsv_cnt) {
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:419
error: while searching for:
switch (type) {
case TF_DEVICE_TYPE_WH:
case TF_DEVICE_TYPE_SR:
dev_handle->ops = &tf_dev_ops_p4;
break;
case TF_DEVICE_TYPE_THOR:
dev_handle->ops = &tf_dev_ops_p58;
break;
default:
TFP_DRV_LOG(ERR,
error: patch failed: drivers/net/bnxt/tf_core/tf_device.c:593
Checking patch drivers/net/bnxt/tf_core/tf_device.h...
Checking patch drivers/net/bnxt/tf_core/tf_device_p4.c...
Hunk #1 succeeded at 35 (offset -39 lines).
Checking patch drivers/net/bnxt/tf_core/tf_device_p58.c...
error: drivers/net/bnxt/tf_core/tf_device_p58.c: does not exist in index
Checking patch drivers/net/bnxt/tf_core/tf_device_p58.h...
error: drivers/net/bnxt/tf_core/tf_device_p58.h: does not exist in index
Checking patch drivers/net/bnxt/tf_core/tf_em_common.c...
Checking patch drivers/net/bnxt/tf_core/tf_em_host.c...
Checking patch drivers/net/bnxt/tf_core/tf_em_internal.c...
Hunk #1 succeeded at 252 (offset 1 line).
Hunk #2 succeeded at 295 (offset 1 line).
Checking patch drivers/net/bnxt/tf_core/tf_identifier.c...
Checking patch drivers/net/bnxt/tf_core/tf_if_tbl.c...
Checking patch drivers/net/bnxt/tf_core/tf_rm.c...
Hunk #1 succeeded at 41 (offset -1 lines).
Hunk #2 succeeded at 74 (offset -1 lines).
Hunk #3 succeeded at 107 (offset -1 lines).
Hunk #4 succeeded at 117 (offset -1 lines).
Hunk #5 succeeded at 126 (offset -1 lines).
Hunk #6 succeeded at 162 (offset -1 lines).
Hunk #7 succeeded at 180 (offset -1 lines).
Hunk #8 succeeded at 209 (offset -1 lines).
Hunk #9 succeeded at 222 (offset -1 lines).
Hunk #10 succeeded at 236 (offset -1 lines).
Hunk #11 succeeded at 303 (offset -1 lines).
Hunk #12 succeeded at 337 (offset -1 lines).
Hunk #13 succeeded at 357 (offset -1 lines).
Hunk #14 succeeded at 375 (offset -1 lines).
Hunk #15 succeeded at 470 (offset -1 lines).
Hunk #16 succeeded at 485 (offset -1 lines).
Hunk #17 succeeded at 506 (offset -2 lines).
Hunk #18 succeeded at 535 (offset -2 lines).
error: while searching for:
/* Build the request */
for (i = 0, j = 0; i < parms->num_elements; i++) {
/* Skip any non HCAPI cfg elements */
if (parms->cfg[i].cfg_type == TF_RM_ELEM_CFG_HCAPI ||
parms->cfg[i].cfg_type == TF_RM_ELEM_CFG_HCAPI_BA) {
/* Only perform reservation for entries that
* has been requested
*/
if (parms->alloc_cnt[i] == 0)
continue;
/* Verify that we can get the full amount
* allocated per the qcaps availability.
*/
if (parms->alloc_cnt[i] <=
query[parms->cfg[i].hcapi_type].max) {
req[j].type = parms->cfg[i].hcapi_type;
req[j].min = parms->alloc_cnt[i];
req[j].max = parms->alloc_cnt[i];
j++;
} else {
const char *type_str;
uint16_t hcapi_type = parms->cfg[i].hcapi_type;
dev->ops->tf_dev_get_resource_str(tfp,
hcapi_type,
&type_str);
TFP_DRV_LOG(ERR,
"%s: Resource failure, type:%d:%s\n",
tf_dir_2_str(parms->dir),
hcapi_type, type_str);
TFP_DRV_LOG(ERR,
"req:%d, avail:%d\n",
parms->alloc_cnt[i],
query[hcapi_type].max);
return -EINVAL;
}
}
}
rc = tf_msg_session_resc_alloc(tfp,
dev,
parms->dir,
error: patch failed: drivers/net/bnxt/tf_core/tf_rm.c:467
Hunk #20 succeeded at 626 (offset -10 lines).
Hunk #21 succeeded at 685 (offset -10 lines).
Hunk #22 succeeded at 695 (offset -10 lines).
error: while searching for:
* all elements, not any less.
*/
TFP_DRV_LOG(ERR,
"%s: Alloc failed, type:%d\n",
tf_dir_2_str(parms->dir),
db[i].cfg_type);
TFP_DRV_LOG(ERR,
"req:%d, alloc:%d\n",
parms->alloc_cnt[i],
resv[j].stride);
goto fail;
}
}
rm_db->num_entries = parms->num_elements;
rm_db->dir = parms->dir;
rm_db->type = parms->type;
*parms->rm_db = (void *)rm_db;
tfp_free((void *)req);
tfp_free((void *)resv);
return 0;
fail:
error: patch failed: drivers/net/bnxt/tf_core/tf_rm.c:589
Hunk #24 succeeded at 741 (offset 1 line).
Hunk #25 succeeded at 808 (offset 1 line).
Hunk #26 succeeded at 821 (offset 1 line).
Hunk #27 succeeded at 878 (offset 1 line).
Hunk #28 succeeded at 917 (offset 1 line).
Hunk #29 succeeded at 942 (offset 1 line).
Hunk #30 succeeded at 985 (offset 1 line).
Hunk #31 succeeded at 1016 (offset 1 line).
Hunk #32 succeeded at 1028 (offset 1 line).
Hunk #33 succeeded at 1051 (offset 1 line).
Hunk #34 succeeded at 1073 (offset 1 line).
Hunk #35 succeeded at 1106 (offset 1 line).
Checking patch drivers/net/bnxt/tf_core/tf_rm.h...
Checking patch drivers/net/bnxt/tf_core/tf_shadow_tbl.c...
error: while searching for:
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2019-2021 Broadcom
* All rights reserved.
*/
#include "tf_common.h"
#include "tf_util.h"
#include "tfp.h"
#include "tf_core.h"
#include "tf_shadow_tbl.h"
#include "tf_hash.h"
/**
* The implementation includes 3 tables per table table type.
* - hash table
* - sized so that a minimum of 4 slots per shadow entry are available to
* minimize the likelihood of collisions.
* - shadow key table
* - sized to the number of entries requested and is directly indexed
* - the index is zero based and is the table index - the base address
* - the data associated with the entry is stored in the key table.
* - The stored key is actually the data associated with the entry.
* - shadow result table
* - the result table is stored separately since it only needs to be accessed
* when the key matches.
* - the result has a back pointer to the hash table via the hb handle. The
* hb handle is a 32 bit represention of the hash with a valid bit, bucket
* element index, and the hash index. It is necessary to store the hb handle
* with the result since subsequent removes only provide the table index.
*
* - Max entries is limited in the current implementation since bit 15 is the
* valid bit in the hash table.
* - A 16bit hash is calculated and masked based on the number of entries
* - 64b wide bucket is used and broken into 4x16bit elements.
* This decision is based on quicker bucket scanning to determine if any
* elements are in use.
* - bit 15 of each bucket element is the valid, this is done to prevent having
* to read the larger key/result data for determining VALID. It also aids
* in the more efficient scanning of the bucket for slot usage.
*/
/*
* The maximum number of shadow entries supported. The value also doubles as
* the maximum number of hash buckets. There are only 15 bits of data per
* bucket to point to the shadow tables.
*/
#define TF_SHADOW_ENTRIES_MAX (1 << 15)
/* The number of elements(BE) per hash bucket (HB) */
#define TF_SHADOW_HB_NUM_ELEM (4)
#define TF_SHADOW_BE_VALID (1 << 15)
#define TF_SHADOW_BE_IS_VALID(be) (((be) & TF_SHADOW_BE_VALID) != 0)
/**
* The hash bucket handle is 32b
* - bit 31, the Valid bit
* - bit 29-30, the element
* - bits 0-15, the hash idx (is masked based on the allocated size)
*/
#define TF_SHADOW_HB_HANDLE_IS_VALID(hndl) (((hndl) & (1 << 31)) != 0)
#define TF_SHADOW_HB_HANDLE_CREATE(idx, be) ((1 << 31) | \
((be) << 29) | (idx))
#define TF_SHADOW_HB_HANDLE_BE_GET(hdl) (((hdl) >> 29) & \
(TF_SHADOW_HB_NUM_ELEM - 1))
#define TF_SHADOW_HB_HANDLE_HASH_GET(ctxt, hdl)((hdl) & \
(ctxt)->hash_ctxt.hid_mask)
/**
* The idx provided by the caller is within a region, so currently the base is
* either added or subtracted from the idx to ensure it can be used as a
* compressed index
*/
/* Convert the table index to a shadow index */
#define TF_SHADOW_IDX_TO_SHIDX(ctxt, idx) ((idx) - \
(ctxt)->shadow_ctxt.base_addr)
/* Convert the shadow index to a tbl index */
#define TF_SHADOW_SHIDX_TO_IDX(ctxt, idx) ((idx) + \
(ctxt)->shadow_ctxt.base_addr)
/* Simple helper masks for clearing en element from the bucket */
#define TF_SHADOW_BE0_MASK_CLEAR(hb) ((hb) & 0xffffffffffff0000ull)
#define TF_SHADOW_BE1_MASK_CLEAR(hb) ((hb) & 0xffffffff0000ffffull)
#define TF_SHADOW_BE2_MASK_CLEAR(hb) ((hb) & 0xffff0000ffffffffull)
#define TF_SHADOW_BE3_MASK_CLEAR(hb) ((hb) & 0x0000ffffffffffffull)
/**
* This should be coming from external, but for now it is assumed that no key
* is greater than 512 bits (64B). This makes allocation of the key table
* easier without having to allocate on the fly.
*/
#define TF_SHADOW_MAX_KEY_SZ 64
/*
* Local only defines for the internal data.
*/
/**
* tf_shadow_tbl_shadow_key_entry is the key entry of the key table.
* The key stored in the table is the result data of the index table.
*/
struct tf_shadow_tbl_shadow_key_entry {
uint8_t key[TF_SHADOW_MAX_KEY_SZ];
};
/**
* tf_shadow_tbl_shadow_
error: patch failed: drivers/net/bnxt/tf_core/tf_shadow_tbl.c:1
error: removal patch leaves file contents
error: drivers/net/bnxt/tf_core/tf_shadow_tbl.c: patch does not apply
Checking patch drivers/net/bnxt/tf_core/tf_shadow_tbl.h...
Checking patch drivers/net/bnxt/tf_core/tf_tbl.c...
Checking patch drivers/net/bnxt/tf_core/tf_tcam.c...
error: while searching for:
memset(&aparms, 0, sizeof(aparms));
aparms.rm_db = tcam_db[parms->dir];
aparms.db_index = parms->type;
aparms.index = parms->idx / num_slice_per_row;
aparms.allocated = &allocated;
rc = tf_rm_is_allocated(&aparms);
error: patch failed: drivers/net/bnxt/tf_core/tf_tcam.c:736
error: while searching for:
memset(&hparms, 0, sizeof(hparms));
hparms.rm_db = tcam_db[parms->dir];
hparms.db_index = parms->type;
hparms.hcapi_type = &parms->hcapi_type;
rc = tf_rm_get_hcapi_type(&hparms);
error: patch failed: drivers/net/bnxt/tf_core/tf_tcam.c:756
Checking patch drivers/net/bnxt/tf_core/tf_util.c...
Hunk #1 succeeded at 143 (offset 6 lines).
Checking patch drivers/net/bnxt/tf_core/tf_util.h...
Applied patch drivers/net/bnxt/bnxt_util.h cleanly.
Applied patch drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_core.h cleanly.
Applying patch drivers/net/bnxt/tf_core/tf_device.c with 13 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Rejected hunk #11.
Rejected hunk #12.
Rejected hunk #13.
Applied patch drivers/net/bnxt/tf_core/tf_device.h cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_device_p4.c cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_em_common.c cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_em_host.c cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_em_internal.c cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_identifier.c cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_if_tbl.c cleanly.
Applying patch drivers/net/bnxt/tf_core/tf_rm.c with 2 rejects...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Hunk #7 applied cleanly.
Hunk #8 applied cleanly.
Hunk #9 applied cleanly.
Hunk #10 applied cleanly.
Hunk #11 applied cleanly.
Hunk #12 applied cleanly.
Hunk #13 applied cleanly.
Hunk #14 applied cleanly.
Hunk #15 applied cleanly.
Hunk #16 applied cleanly.
Hunk #17 applied cleanly.
Hunk #18 applied cleanly.
Rejected hunk #19.
Hunk #20 applied cleanly.
Hunk #21 applied cleanly.
Hunk #22 applied cleanly.
Rejected hunk #23.
Hunk #24 applied cleanly.
Hunk #25 applied cleanly.
Hunk #26 applied cleanly.
Hunk #27 applied cleanly.
Hunk #28 applied cleanly.
Hunk #29 applied cleanly.
Hunk #30 applied cleanly.
Hunk #31 applied cleanly.
Hunk #32 applied cleanly.
Hunk #33 applied cleanly.
Hunk #34 applied cleanly.
Hunk #35 applied cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_rm.h cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_shadow_tbl.h cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_tbl.c cleanly.
Applying patch drivers/net/bnxt/tf_core/tf_tcam.c with 2 rejects...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Hunk #7 applied cleanly.
Hunk #8 applied cleanly.
Rejected hunk #9.
Rejected hunk #10.
Applied patch drivers/net/bnxt/tf_core/tf_util.c cleanly.
Applied patch drivers/net/bnxt/tf_core/tf_util.h cleanly.
diff a/drivers/net/bnxt/tf_core/tf_device.c b/drivers/net/bnxt/tf_core/tf_device.c (rejected hunks)
@@ -8,6 +8,7 @@
#include "tf_device_p58.h"
#include "tfp.h"
#include "tf_em.h"
+#include "tf_rm.h"
struct tf;
@@ -18,8 +19,8 @@ static int tf_dev_unbind_p58(struct tf *tfp);
/**
* Resource Reservation Check function
*
- * [in] tfp
- * Pointer to TF handle
+ * [in] count
+ * Number of module subtypes
*
* [in] cfg
* Pointer to rm element config
@@ -28,11 +29,10 @@ static int tf_dev_unbind_p58(struct tf *tfp);
* Pointer to resource reservation array
*
* Returns
- * - (n) number of tables that have non-zero reservation count.
+ * - (n) number of tables in module that have non-zero reservation count.
*/
static int
-tf_dev_reservation_check(struct tf *tfp __rte_unused,
- uint16_t count,
+tf_dev_reservation_check(uint16_t count,
struct tf_rm_element_cfg *cfg,
uint16_t *reservations)
{
@@ -94,8 +94,7 @@ tf_dev_bind_p4(struct tf *tfp,
/* Initialize the modules */
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_IDENT_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_IDENT_TYPE_MAX,
tf_ident_p4,
(uint16_t *)resources->ident_cnt);
if (rsv_cnt) {
@@ -113,8 +112,7 @@ tf_dev_bind_p4(struct tf *tfp,
no_rsv_flag = false;
}
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_TBL_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_TBL_TYPE_MAX,
tf_tbl_p4,
(uint16_t *)resources->tbl_cnt);
if (rsv_cnt) {
@@ -132,8 +130,7 @@ tf_dev_bind_p4(struct tf *tfp,
no_rsv_flag = false;
}
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_TCAM_TBL_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_TCAM_TBL_TYPE_MAX,
tf_tcam_p4,
(uint16_t *)resources->tcam_cnt);
if (rsv_cnt) {
@@ -155,8 +152,7 @@ tf_dev_bind_p4(struct tf *tfp,
*/
em_cfg.cfg = tf_em_ext_p4;
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_EM_TBL_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_EM_TBL_TYPE_MAX,
em_cfg.cfg,
(uint16_t *)resources->em_cnt);
if (rsv_cnt) {
@@ -175,8 +171,7 @@ tf_dev_bind_p4(struct tf *tfp,
/*
* EM
*/
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_EM_TBL_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_EM_TBL_TYPE_MAX,
tf_em_int_p4,
(uint16_t *)resources->em_cnt);
if (rsv_cnt) {
@@ -360,10 +355,7 @@ tf_dev_bind_p58(struct tf *tfp,
/* Initial function initialization */
dev_handle->ops = &tf_dev_ops_p58_init;
- /* Initialize the modules */
-
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_IDENT_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_IDENT_TYPE_MAX,
tf_ident_p58,
(uint16_t *)resources->ident_cnt);
if (rsv_cnt) {
@@ -380,8 +372,7 @@ tf_dev_bind_p58(struct tf *tfp,
no_rsv_flag = false;
}
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_TBL_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_TBL_TYPE_MAX,
tf_tbl_p58,
(uint16_t *)resources->tbl_cnt);
if (rsv_cnt) {
@@ -398,8 +389,7 @@ tf_dev_bind_p58(struct tf *tfp,
no_rsv_flag = false;
}
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_TCAM_TBL_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_TCAM_TBL_TYPE_MAX,
tf_tcam_p58,
(uint16_t *)resources->tcam_cnt);
if (rsv_cnt) {
@@ -419,8 +409,7 @@ tf_dev_bind_p58(struct tf *tfp,
/*
* EM
*/
- rsv_cnt = tf_dev_reservation_check(tfp,
- TF_EM_TBL_TYPE_MAX,
+ rsv_cnt = tf_dev_reservation_check(TF_EM_TBL_TYPE_MAX,
tf_em_int_p58,
(uint16_t *)resources->em_cnt);
if (rsv_cnt) {
@@ -593,10 +582,10 @@ tf_dev_bind_ops(enum tf_device_type type,
switch (type) {
case TF_DEVICE_TYPE_WH:
case TF_DEVICE_TYPE_SR:
- dev_handle->ops = &tf_dev_ops_p4;
+ dev_handle->ops = &tf_dev_ops_p4_init;
break;
case TF_DEVICE_TYPE_THOR:
- dev_handle->ops = &tf_dev_ops_p58;
+ dev_handle->ops = &tf_dev_ops_p58_init;
break;
default:
TFP_DRV_LOG(ERR,
diff a/drivers/net/bnxt/tf_core/tf_rm.c b/drivers/net/bnxt/tf_core/tf_rm.c (rejected hunks)
@@ -467,44 +570,45 @@ tf_rm_create_db(struct tf *tfp,
/* Build the request */
for (i = 0, j = 0; i < parms->num_elements; i++) {
- /* Skip any non HCAPI cfg elements */
- if (parms->cfg[i].cfg_type == TF_RM_ELEM_CFG_HCAPI ||
- parms->cfg[i].cfg_type == TF_RM_ELEM_CFG_HCAPI_BA) {
- /* Only perform reservation for entries that
- * has been requested
- */
- if (parms->alloc_cnt[i] == 0)
- continue;
+ struct tf_rm_element_cfg *cfg = &parms->cfg[i];
+ uint16_t hcapi_type = cfg->hcapi_type;
+
+ /* Only perform reservation for requested entries
+ */
+ if (req_cnt[i] == 0)
+ continue;
+
+ /* Skip any children in the request */
+ if (cfg->cfg_type == TF_RM_ELEM_CFG_HCAPI ||
+ cfg->cfg_type == TF_RM_ELEM_CFG_HCAPI_BA ||
+ cfg->cfg_type == TF_RM_ELEM_CFG_HCAPI_BA_PARENT) {
- /* Verify that we can get the full amount
- * allocated per the qcaps availability.
+ /* Verify that we can get the full amount per qcaps.
*/
- if (parms->alloc_cnt[i] <=
- query[parms->cfg[i].hcapi_type].max) {
- req[j].type = parms->cfg[i].hcapi_type;
- req[j].min = parms->alloc_cnt[i];
- req[j].max = parms->alloc_cnt[i];
+ if (req_cnt[i] <= query[hcapi_type].max) {
+ req[j].type = hcapi_type;
+ req[j].min = req_cnt[i];
+ req[j].max = req_cnt[i];
j++;
} else {
const char *type_str;
- uint16_t hcapi_type = parms->cfg[i].hcapi_type;
dev->ops->tf_dev_get_resource_str(tfp,
- hcapi_type,
- &type_str);
+ hcapi_type,
+ &type_str);
TFP_DRV_LOG(ERR,
- "%s: Resource failure, type:%d:%s\n",
- tf_dir_2_str(parms->dir),
- hcapi_type, type_str);
- TFP_DRV_LOG(ERR,
- "req:%d, avail:%d\n",
- parms->alloc_cnt[i],
- query[hcapi_type].max);
+ "Failure, %s:%d:%s req:%d avail:%d\n",
+ tf_dir_2_str(parms->dir),
+ hcapi_type, type_str,
+ req_cnt[i],
+ query[hcapi_type].max);
return -EINVAL;
}
}
}
+ /* Allocate all resources for the module type
+ */
rc = tf_msg_session_resc_alloc(tfp,
dev,
parms->dir,
@@ -589,25 +717,21 @@ tf_rm_create_db(struct tf *tfp,
* all elements, not any less.
*/
TFP_DRV_LOG(ERR,
- "%s: Alloc failed, type:%d\n",
- tf_dir_2_str(parms->dir),
- db[i].cfg_type);
- TFP_DRV_LOG(ERR,
- "req:%d, alloc:%d\n",
- parms->alloc_cnt[i],
- resv[j].stride);
+ "%s: Alloc failed %d:%s req:%d, alloc:%d\n",
+ tf_dir_2_str(parms->dir), cfg->hcapi_type,
+ type_str, req_cnt[i], resv[j].stride);
goto fail;
}
}
rm_db->num_entries = parms->num_elements;
rm_db->dir = parms->dir;
- rm_db->type = parms->type;
+ rm_db->module = parms->module;
*parms->rm_db = (void *)rm_db;
tfp_free((void *)req);
tfp_free((void *)resv);
-
+ tfp_free((void *)req_cnt);
return 0;
fail:
diff a/drivers/net/bnxt/tf_core/tf_tcam.c b/drivers/net/bnxt/tf_core/tf_tcam.c (rejected hunks)
@@ -736,7 +736,7 @@ tf_tcam_get(struct tf *tfp __rte_unused,
memset(&aparms, 0, sizeof(aparms));
aparms.rm_db = tcam_db[parms->dir];
- aparms.db_index = parms->type;
+ aparms.subtype = parms->type;
aparms.index = parms->idx / num_slice_per_row;
aparms.allocated = &allocated;
rc = tf_rm_is_allocated(&aparms);
@@ -756,7 +756,7 @@ tf_tcam_get(struct tf *tfp __rte_unused,
memset(&hparms, 0, sizeof(hparms));
hparms.rm_db = tcam_db[parms->dir];
- hparms.db_index = parms->type;
+ hparms.subtype = parms->type;
hparms.hcapi_type = &parms->hcapi_type;
rc = tf_rm_get_hcapi_type(&hparms);
https://lab.dpdk.org/results/dashboard/patchsets/17688/
UNH-IOL DPDK Community Lab
reply other threads:[~2021-07-06 23:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210706232849.8E20488E71@noxus.dpdklab.iol.unh.edu \
--to=dpdklab@iol.unh.edu \
--cc=dpdk-test-reports@iol.unh.edu \
--cc=test-report@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).