From 849c2d919dae233c7b76c44f80ef18e780651abc Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Tue, 13 Oct 2020 14:45:26 +0100 Subject: [PATCH] net/sfc: add capabilities for Rx/Tx support in libefx 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 --- drivers/net/sfc/sfc_dp.h | 2 ++ drivers/net/sfc/sfc_ethdev.c | 2 ++ drivers/net/sfc/sfc_rx.c | 2 +- drivers/net/sfc/sfc_tx.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/sfc_dp.h b/drivers/net/sfc/sfc_dp.h index a161b0b07c..0c11cb09d0 100644 --- a/drivers/net/sfc/sfc_dp.h +++ b/drivers/net/sfc/sfc_dp.h @@ -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 */ diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index ca1b99a00f..2140ac5d98 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -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; diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index 7c50fe58b8..a9217ada9d 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -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 | diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c index 05a2cf009e..4ea614816a 100644 --- a/drivers/net/sfc/sfc_tx.c +++ b/drivers/net/sfc/sfc_tx.c @@ -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 | -- 2.20.1