MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_ulp_init

Function bnxt_ulp_init

dpdk/drivers/net/bnxt/tf_ulp/bnxt_ulp.c:1606–1727  ·  view source on GitHub ↗

* When a port is initialized by dpdk. This functions is called * and this function initializes the ULP context and rest of the * infrastructure associated with it. */

Source from the content-addressed store, hash-verified

1604 * infrastructure associated with it.
1605 */
1606static int32_t
1607bnxt_ulp_init(struct bnxt *bp,
1608 struct bnxt_ulp_session_state *session)
1609{
1610 int rc;
1611 uint32_t ulp_dev_id = BNXT_ULP_DEVICE_ID_LAST;
1612
1613 /* Allocate and Initialize the ulp context. */
1614 rc = ulp_ctx_init(bp, session);
1615 if (rc) {
1616 BNXT_TF_DBG(ERR, "Failed to create the ulp context\n");
1617 goto jump_to_error;
1618 }
1619
1620 rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
1621 if (rc) {
1622 BNXT_TF_DBG(ERR, "Unable to initialize flow db lock\n");
1623 goto jump_to_error;
1624 }
1625
1626 /* Initialize ulp dparms with values devargs passed */
1627 rc = ulp_dparms_init(bp, bp->ulp_ctx);
1628 if (rc) {
1629 BNXT_TF_DBG(ERR, "Failed to initialize the dparms\n");
1630 goto jump_to_error;
1631 }
1632
1633 /* create the port database */
1634 rc = ulp_port_db_init(bp->ulp_ctx, bp->port_cnt);
1635 if (rc) {
1636 BNXT_TF_DBG(ERR, "Failed to create the port database\n");
1637 goto jump_to_error;
1638 }
1639
1640 /* Create the Mark database. */
1641 rc = ulp_mark_db_init(bp->ulp_ctx);
1642 if (rc) {
1643 BNXT_TF_DBG(ERR, "Failed to create the mark database\n");
1644 goto jump_to_error;
1645 }
1646
1647 /* Create the flow database. */
1648 rc = ulp_flow_db_init(bp->ulp_ctx);
1649 if (rc) {
1650 BNXT_TF_DBG(ERR, "Failed to create the flow database\n");
1651 goto jump_to_error;
1652 }
1653
1654 /* Create the eem table scope. */
1655 rc = ulp_eem_tbl_scope_init(bp);
1656 if (rc) {
1657 BNXT_TF_DBG(ERR, "Failed to create the eem scope table\n");
1658 goto jump_to_error;
1659 }
1660
1661 rc = ulp_mapper_init(bp->ulp_ctx);
1662 if (rc) {
1663 BNXT_TF_DBG(ERR, "Failed to initialize ulp mapper\n");

Callers 1

bnxt_ulp_port_initFunction · 0.85

Calls 15

ulp_ctx_initFunction · 0.85
pthread_mutex_initFunction · 0.85
ulp_dparms_initFunction · 0.85
ulp_port_db_initFunction · 0.85
ulp_mark_db_initFunction · 0.85
ulp_flow_db_initFunction · 0.85
ulp_eem_tbl_scope_initFunction · 0.85
ulp_mapper_initFunction · 0.85
ulp_fc_mgr_initFunction · 0.85
ulp_ha_mgr_initFunction · 0.85

Tested by

no test coverage detected