From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Added logic to add flows to wildcard tcam if flows fail to be added to
exact match table.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
drivers/net/bnxt/tf_core/tf_em_hash_internal.c | 4 ++--
drivers/net/bnxt/tf_core/tf_msg.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -65,7 +65,7 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
PMD_DRV_LOG_LINE(ERR,
"%s, EM entry index allocation failed",
tf_dir_2_str(parms->dir));
- return -1;
+ return -ENOMEM; /* no more space to add entries */
}
if (dev->ops->tf_dev_cfa_key_hash == NULL)
@@ -87,7 +87,7 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
if (rc) {
/* Free the allocated index before returning */
dpool_free(pool, index);
- return -1;
+ return rc;
}
TF_SET_GFID(gfid,
@@ -925,7 +925,7 @@ tf_msg_hash_insert_em_internal_entry(struct tf *tfp,
if (msg_record_size > TF_MSG_EM_INSERT_RECORD_SIZE) {
rc = -EINVAL;
TFP_DRV_LOG(ERR,
- "%s: Record size to large, rc:%s\n",
+ "%s: Record size too large, rc:%s\n",
tf_dir_2_str(em_parms->dir),
strerror(-rc));
return rc;