/* define a variable to hold the portal_key, once created.*/
pthread_key_t dpaa_portal_key;
+unsigned int dpaa_svr_family;
+
RTE_DEFINE_PER_LCORE(bool, _dpaa_io);
static inline void
int ret = -1;
struct rte_dpaa_device *dev;
struct rte_dpaa_driver *drv;
+ FILE *svr_file = NULL;
+ unsigned int svr_ver;
BUS_INIT_FUNC_TRACE();
break;
}
}
+
+ svr_file = fopen(DPAA_SOC_ID_FILE, "r");
+ if (svr_file) {
+ if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
+ dpaa_svr_family = svr_ver & SVR_MASK;
+ fclose(svr_file);
+ }
+
return 0;
}
local: *;
};
+
+DPDK_18.02 {
+ global:
+
+ dpaa_svr_family;
+
+ local: *;
+} DPDK_17.11;
#define DEV_TO_DPAA_DEVICE(ptr) \
container_of(ptr, struct rte_dpaa_device, device)
+/* DPAA SoC identifier; If this is not available, it can be concluded
+ * that board is non-DPAA. Single slot is currently supported.
+ */
+#define DPAA_SOC_ID_FILE "/sys/devices/soc0/soc_id"
+
+#define SVR_LS1043A_FAMILY 0x87920000
+#define SVR_LS1046A_FAMILY 0x87070000
+#define SVR_MASK 0xffff0000
+
+extern unsigned int dpaa_svr_family;
+
struct rte_dpaa_device;
struct rte_dpaa_driver;
DPAA_PMD_ERR("Unable to open SoC device");
return -ENOTSUP; /* Not supported on this infra */
}
- if (fscanf(svr_file, "svr:%x", &svr_ver) <= 0)
+ if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
+ dpaa_svr_family = svr_ver & SVR_MASK;
+ else
DPAA_PMD_ERR("Unable to read SoC device");
fclose(svr_file);
#include <of.h>
#include <netcfg.h>
-/* DPAA SoC identifier; If this is not available, it can be concluded
- * that board is non-DPAA. Single slot is currently supported.
- */
-#define DPAA_SOC_ID_FILE "/sys/devices/soc0/soc_id"
-
#define DPAA_MBUF_HW_ANNOTATION 64
#define DPAA_FD_PTA_SIZE 64