net/sfc: support DPDK firmware variant
authorAndrew Rybchenko <arybchenko@solarflare.com>
Thu, 19 Apr 2018 11:36:58 +0000 (12:36 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 17:00:59 +0000 (18:00 +0100)
DPDK firmware variant supports equal stride super-buffer Rx mode which
provides higher packet rate and packet marks but requires dedicated
mempool manager with contiguous object block allocation (e.g. bucket).

Also the firmware supports subvariant without checksumming on Tx which
allows to reach higher packet rates on transmit if checksumming is not
required.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
doc/guides/nics/sfc_efx.rst
drivers/net/sfc/sfc.c
drivers/net/sfc/sfc_kvargs.h

index 66daa1d..693aa55 100644 (file)
@@ -354,7 +354,7 @@ boolean parameters value.
   value will select a fixed update period of **1000** milliseconds
 
 - ``fw_variant`` [dont-care|full-feature|ultra-low-latency|
-  capture-packed-stream] (default **dont-care**)
+  capture-packed-stream|dpdk] (default **dont-care**)
 
   Choose the preferred firmware variant to use. In order for the selected
   option to have an effect, the **sfboot** utility must be configured with the
@@ -367,6 +367,10 @@ boolean parameters value.
   **ultra-low-latency** chooses firmware with fewer features but lower latency.
   **capture-packed-stream** chooses firmware for SolarCapture packed stream
   mode.
+  **dpdk** chooses DPDK firmware with equal stride super-buffer Rx mode
+  for higher Rx packet rate and packet marks support and firmware subvariant
+  without checksumming on transmit for higher Tx packet rate if
+  checksumming is not required.
 
 
 Dynamic Logging Parameters
index 37248bc..fd67226 100644 (file)
@@ -829,6 +829,8 @@ sfc_kvarg_fv_variant_handler(__rte_unused const char *key,
                *value = EFX_FW_VARIANT_LOW_LATENCY;
        else if (strcasecmp(value_str, SFC_KVARG_FW_VARIANT_PACKED_STREAM) == 0)
                *value = EFX_FW_VARIANT_PACKED_STREAM;
+       else if (strcasecmp(value_str, SFC_KVARG_FW_VARIANT_DPDK) == 0)
+               *value = EFX_FW_VARIANT_DPDK;
        else
                return -EINVAL;
 
@@ -864,6 +866,10 @@ sfc_get_fw_variant(struct sfc_adapter *sa, efx_fw_variant_t *efv)
                *efv = EFX_FW_VARIANT_PACKED_STREAM;
                break;
 
+       case EFX_RXDP_DPDK_FW_ID:
+               *efv = EFX_FW_VARIANT_DPDK;
+               break;
+
        default:
                /*
                 * Other firmware variants are not considered, since they are
@@ -886,6 +892,8 @@ sfc_fw_variant2str(efx_fw_variant_t efv)
                return SFC_KVARG_FW_VARIANT_LOW_LATENCY;
        case EFX_RXDP_PACKED_STREAM_FW_ID:
                return SFC_KVARG_FW_VARIANT_PACKED_STREAM;
+       case EFX_RXDP_DPDK_FW_ID:
+               return SFC_KVARG_FW_VARIANT_DPDK;
        default:
                return "unknown";
        }
index 057002e..9f21cfd 100644 (file)
@@ -53,11 +53,13 @@ extern "C" {
 #define SFC_KVARG_FW_VARIANT_FULL_FEATURED     "full-feature"
 #define SFC_KVARG_FW_VARIANT_LOW_LATENCY       "ultra-low-latency"
 #define SFC_KVARG_FW_VARIANT_PACKED_STREAM     "capture-packed-stream"
+#define SFC_KVARG_FW_VARIANT_DPDK              "dpdk"
 #define SFC_KVARG_VALUES_FW_VARIANT \
        "[" SFC_KVARG_FW_VARIANT_DONT_CARE "|" \
            SFC_KVARG_FW_VARIANT_FULL_FEATURED "|" \
            SFC_KVARG_FW_VARIANT_LOW_LATENCY "|" \
-           SFC_KVARG_FW_VARIANT_PACKED_STREAM "]"
+           SFC_KVARG_FW_VARIANT_PACKED_STREAM "|" \
+           SFC_KVARG_FW_VARIANT_DPDK "]"
 
 struct sfc_adapter;