qede: add SRIOV support
[dpdk.git] / drivers / net / qede / base / ecore.h
index 32a3de9..2f1a6d1 100644 (file)
@@ -50,6 +50,7 @@ enum ecore_nvm_cmd {
 #ifndef LINUX_REMOVE
 #if !defined(CONFIG_ECORE_L2)
 #define CONFIG_ECORE_L2
+#define CONFIG_ECORE_SRIOV
 #endif
 #endif
 
@@ -79,6 +80,15 @@ static OSAL_INLINE u32 DB_ADDR(u32 cid, u32 DEMS)
        return db_addr;
 }
 
+/* @DPDK: This is a backport from latest ecore for TSS fix */
+static OSAL_INLINE u32 DB_ADDR_VF(u32 cid, u32 DEMS)
+{
+       u32 db_addr = FIELD_VALUE(DB_LEGACY_ADDR_DEMS, DEMS) |
+                     FIELD_VALUE(DB_LEGACY_ADDR_ICID, cid);
+
+       return db_addr;
+}
+
 #define ALIGNED_TYPE_SIZE(type_name, p_hwfn)                             \
        ((sizeof(type_name) + (u32)(1 << (p_hwfn->p_dev->cache_shift)) - 1) & \
         ~((1 << (p_hwfn->p_dev->cache_shift)) - 1))