net/sfc: support choice of FW subvariant without Tx checksum
[dpdk.git] / drivers / net / sfc / efsys.h
index ecbd14f..7eb2c3f 100644 (file)
@@ -26,6 +26,7 @@
 #include <rte_io.h>
 
 #include "sfc_debug.h"
+#include "sfc_log.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -150,6 +151,8 @@ prefetch_read_once(const volatile void *addr)
 #define EFSYS_OPT_HUNTINGTON 1
 /* Enable SFN8xxx support */
 #define EFSYS_OPT_MEDFORD 1
+/* Enable SFN2xxx support */
+#define EFSYS_OPT_MEDFORD2 1
 #ifdef RTE_LIBRTE_SFC_EFX_DEBUG
 #define EFSYS_OPT_CHECK_REG 1
 #else
@@ -176,6 +179,7 @@ prefetch_read_once(const volatile void *addr)
 #define EFSYS_OPT_VPD 0
 #define EFSYS_OPT_NVRAM 0
 #define EFSYS_OPT_BOOTCFG 0
+#define EFSYS_OPT_IMAGE_LAYOUT 0
 
 #define EFSYS_OPT_DIAG 0
 #define EFSYS_OPT_RX_SCALE 1
@@ -196,6 +200,8 @@ prefetch_read_once(const volatile void *addr)
 
 #define EFSYS_OPT_TUNNEL 1
 
+#define EFSYS_OPT_FW_SUBVARIANT_AWARE 1
+
 /* ID */
 
 typedef struct __efsys_identifier_s efsys_identifier_t;
@@ -372,6 +378,9 @@ typedef struct efsys_mem_s {
        } while (B_FALSE)
 
 
+#define        EFSYS_MEM_SIZE(_esmp)                                           \
+       ((_esmp)->esm_mz->len)
+
 #define EFSYS_MEM_ADDR(_esmp)                                          \
        ((_esmp)->esm_addr)
 
@@ -723,7 +732,7 @@ typedef uint64_t    efsys_stat_t;
 #define EFSYS_ERR(_esip, _code, _dword0, _dword1)                      \
        do {                                                            \
                (void)(_esip);                                          \
-               RTE_LOG(ERR, PMD, "FATAL ERROR #%u (0x%08x%08x)\n",     \
+               SFC_GENERIC_LOG(ERR, "FATAL ERROR #%u (0x%08x%08x)",    \
                        (_code), (_dword0), (_dword1));                 \
                _NOTE(CONSTANTCONDITION);                               \
        } while (B_FALSE)