net/sfc: add capabilities for Rx/Tx support in libefx
authorAndrew Rybchenko <arybchenko@solarflare.com>
Tue, 13 Oct 2020 13:45:26 +0000 (14:45 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:17 +0000 (19:48 +0200)
libefx usage may be limited to control path only and its
implementation of datapath may not support NIC family or
PMD efx Rx/Tx datapaths implementation may be not yet ported
to updated libefx.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc_dp.h
drivers/net/sfc/sfc_ethdev.c
drivers/net/sfc/sfc_rx.c
drivers/net/sfc/sfc_tx.c

index a161b0b..0c11cb0 100644 (file)
@@ -81,6 +81,8 @@ struct sfc_dp {
        unsigned int                    hw_fw_caps;
 #define SFC_DP_HW_FW_CAP_EF10                          0x1
 #define SFC_DP_HW_FW_CAP_RX_ES_SUPER_BUFFER            0x2
+#define SFC_DP_HW_FW_CAP_RX_EFX                                0x4
+#define SFC_DP_HW_FW_CAP_TX_EFX                                0x8
 };
 
 /** List of datapath variants */
index ca1b99a..2140ac5 100644 (file)
@@ -1924,6 +1924,8 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
        case EFX_FAMILY_MEDFORD:
        case EFX_FAMILY_MEDFORD2:
                avail_caps |= SFC_DP_HW_FW_CAP_EF10;
+               avail_caps |= SFC_DP_HW_FW_CAP_RX_EFX;
+               avail_caps |= SFC_DP_HW_FW_CAP_TX_EFX;
                break;
        default:
                break;
index 7c50fe5..a9217ad 100644 (file)
@@ -624,7 +624,7 @@ struct sfc_dp_rx sfc_efx_rx = {
        .dp = {
                .name           = SFC_KVARG_DATAPATH_EFX,
                .type           = SFC_DP_RX,
-               .hw_fw_caps     = 0,
+               .hw_fw_caps     = SFC_DP_HW_FW_CAP_RX_EFX,
        },
        .features               = SFC_DP_RX_FEAT_INTR,
        .dev_offload_capa       = DEV_RX_OFFLOAD_CHECKSUM |
index 05a2cf0..4ea6148 100644 (file)
@@ -1138,7 +1138,7 @@ struct sfc_dp_tx sfc_efx_tx = {
        .dp = {
                .name           = SFC_KVARG_DATAPATH_EFX,
                .type           = SFC_DP_TX,
-               .hw_fw_caps     = 0,
+               .hw_fw_caps     = SFC_DP_HW_FW_CAP_TX_EFX,
        },
        .features               = 0,
        .dev_offload_capa       = DEV_TX_OFFLOAD_VLAN_INSERT |