From: Andrew Rybchenko Date: Thu, 19 Apr 2018 11:36:58 +0000 (+0100) Subject: net/sfc: support DPDK firmware variant X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6e899accd24d031a6a1a34046373532095778a98;p=dpdk.git net/sfc: support DPDK firmware variant 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 Reviewed-by: Ivan Malov --- diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst index 66daa1d36a..693aa55855 100644 --- a/doc/guides/nics/sfc_efx.rst +++ b/doc/guides/nics/sfc_efx.rst @@ -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 diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c index 37248bccc8..fd672265ce 100644 --- a/drivers/net/sfc/sfc.c +++ b/drivers/net/sfc/sfc.c @@ -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"; } diff --git a/drivers/net/sfc/sfc_kvargs.h b/drivers/net/sfc/sfc_kvargs.h index 057002e678..9f21cfdbea 100644 --- a/drivers/net/sfc/sfc_kvargs.h +++ b/drivers/net/sfc/sfc_kvargs.h @@ -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;