src/dpdk/drivers/common/octeontx2/otx2_common.c
struct otx2_idev_cfg *
otx2_intra_dev_get_cfg(void)
{
	const char name[] = "octeontx2_intra_device_conf";
	const struct rte_memzone *mz;
	struct otx2_idev_cfg *idev;

	mz = rte_memzone_lookup(name);
	if (mz != NULL)
		return mz->addr;

	/* Request for the first time */
	mz = rte_memzone_reserve_aligned(name, sizeof(struct otx2_idev_cfg),
					 SOCKET_ID_ANY, 0, OTX2_ALIGN);
	if (mz != NULL) {
		idev = mz->addr;
		idev->sso_pf_func = 0;
		idev->npa_lf = NULL;
		otx2_npa_set_defaults(idev);
		return idev;
	}
	return NULL;
}
/**
 * @internal
 * Get intra device config structure.
 */
@internal
Get intra device config structure.
@internal Get intra device config structure .
struct otx2_idev_cfg *
otx2_intra_dev_get_cfg(void)
{
	const char name[] = "octeontx2_intra_device_conf";
	const struct rte_memzone *mz;
	struct otx2_idev_cfg *idev;
	mz = rte_memzone_lookup(name);
	if (mz != NULL)
		return mz->addr;
	mz = rte_memzone_reserve_aligned(name, sizeof(struct otx2_idev_cfg),
					 SOCKET_ID_ANY, 0, OTX2_ALIGN);
	if (mz != NULL) {
		idev = mz->addr;
		idev->sso_pf_func = 0;
		idev->npa_lf = NULL;
		otx2_npa_set_defaults(idev);
		return idev;
	}
	return NULL;
}
struct otx2_idev_cfg * otx2_intra_dev_get_cfg ( void ) { const char name [ ] = " " ; const struct rte_memzone * mz ; struct otx2_idev_cfg * idev ; mz = rte_memzone_lookup ( name ) ; if ( mz != NULL ) return mz -> addr ; mz = rte_memzone_reserve_aligned ( name , sizeof ( struct otx2_idev_cfg ) , SOCKET_ID_ANY , 0 , OTX2_ALIGN ) ; if ( mz != NULL ) { idev = mz -> addr ; idev -> sso_pf_func = 0 ; idev -> npa_lf = NULL ; otx2_npa_set_defaults ( idev ) ; return idev ; } return NULL ; }
@internal
 Get intra device config structure.
@internal Get intra device config structure .
/* Request for the first time */