event/dlb2: add v2.5 sequence number management
[dpdk.git] / drivers / net / bnxt / tf_ulp / bnxt_ulp.c
index d753b5a..5c805ee 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2020 Broadcom
+ * Copyright(c) 2019-2021 Broadcom
  * All rights reserved.
  */
 
@@ -52,7 +52,7 @@ static int32_t
 bnxt_ulp_devid_get(struct bnxt *bp,
                   enum bnxt_ulp_device_id  *ulp_dev_id)
 {
-       if (BNXT_CHIP_THOR(bp))
+       if (BNXT_CHIP_P5(bp))
                return -EINVAL;
        /* Assuming Whitney */
        *ulp_dev_id = BNXT_ULP_DEVICE_ID_WH_PLUS;
@@ -1321,6 +1321,16 @@ bnxt_ulp_cntxt_ptr2_flow_db_get(struct bnxt_ulp_context  *ulp_ctx)
        return ulp_ctx->cfg_data->flow_db;
 }
 
+/* Function to get the tunnel cache table info from the ulp context. */
+struct bnxt_tun_cache_entry *
+bnxt_ulp_cntxt_ptr2_tun_tbl_get(struct bnxt_ulp_context *ulp_ctx)
+{
+       if (!ulp_ctx || !ulp_ctx->cfg_data)
+               return NULL;
+
+       return ulp_ctx->cfg_data->tun_tbl;
+}
+
 /* Function to get the ulp context from eth device. */
 struct bnxt_ulp_context        *
 bnxt_ulp_eth_dev_ptr2_cntxt_get(struct rte_eth_dev     *dev)