From: Andrew Rybchenko Date: Mon, 20 Mar 2017 10:15:11 +0000 (+0000) Subject: net/sfc: make Rx scatter a datapath-dependent feature X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=99a4949ff73622c659bf7083a731b0345aa982cc;p=dpdk.git net/sfc: make Rx scatter a datapath-dependent feature Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index 7e56d1412c..b3c6a6c58b 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -139,6 +139,8 @@ typedef unsigned int (sfc_dp_rx_qdesc_npending_t)(struct sfc_dp_rxq *dp_rxq); struct sfc_dp_rx { struct sfc_dp dp; + unsigned int features; +#define SFC_DP_RX_FEAT_SCATTER 0x1 sfc_dp_rx_qcreate_t *qcreate; sfc_dp_rx_qdestroy_t *qdestroy; sfc_dp_rx_qstart_t *qstart; diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index 7845bd8feb..56e48ab04c 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -487,6 +487,7 @@ struct sfc_dp_rx sfc_efx_rx = { .type = SFC_DP_RX, .hw_fw_caps = 0, }, + .features = SFC_DP_RX_FEAT_SCATTER, .qcreate = sfc_efx_rx_qcreate, .qdestroy = sfc_efx_rx_qdestroy, .qstart = sfc_efx_rx_qstart, @@ -1181,6 +1182,13 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode) rxmode->hw_strip_crc = 1; } + if (rxmode->enable_scatter && + (~sa->dp_rx->features & SFC_DP_RX_FEAT_SCATTER)) { + sfc_err(sa, "Rx scatter not supported by %s datapath", + sa->dp_rx->dp.name); + rc = EINVAL; + } + if (rxmode->enable_lro) { sfc_err(sa, "LRO not supported"); rc = EINVAL;