DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 45/56] net/sfc: check configured rxmode
Date: Mon, 21 Nov 2016 15:00:59 +0000	[thread overview]
Message-ID: <1479740470-6723-46-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1479740470-6723-1-git-send-email-arybchenko@solarflare.com>

Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/sfc_efx.rst  | 12 +++++++++
 drivers/net/sfc/efx/sfc_rx.c | 61 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index 46c892b..87b217f8 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -60,6 +60,18 @@ The features not yet supported include:
 
 - Loopback
 
+- Configurable RX CRC stripping (always stripped)
+
+- Header split on receive
+
+- VLAN filtering
+
+- VLAN stripping
+
+- Scattered receive
+
+- LRO
+
 
 Supported NICs
 --------------
diff --git a/drivers/net/sfc/efx/sfc_rx.c b/drivers/net/sfc/efx/sfc_rx.c
index 961e6b6..bc43e4e 100644
--- a/drivers/net/sfc/efx/sfc_rx.c
+++ b/drivers/net/sfc/efx/sfc_rx.c
@@ -48,6 +48,61 @@ sfc_rx_qinit_info(struct sfc_adapter *sa, unsigned int sw_index)
 	return 0;
 }
 
+static int
+sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
+{
+	int rc = 0;
+
+	switch (rxmode->mq_mode) {
+	case ETH_MQ_RX_NONE:
+		/* No special checks are required */
+		break;
+	default:
+		sfc_err(sa, "Rx multi-queue mode %u not supported",
+			rxmode->mq_mode);
+		rc = EINVAL;
+	}
+
+	if (rxmode->header_split) {
+		sfc_err(sa, "Header split on Rx not supported");
+		rc = EINVAL;
+	}
+
+	if (rxmode->hw_vlan_filter) {
+		sfc_err(sa, "HW VLAN filtering not supported");
+		rc = EINVAL;
+	}
+
+	if (rxmode->hw_vlan_strip) {
+		sfc_err(sa, "HW VLAN stripping not supported");
+		rc = EINVAL;
+	}
+
+	if (rxmode->hw_vlan_extend) {
+		sfc_err(sa,
+			"Q-in-Q HW VLAN stripping not supported");
+		rc = EINVAL;
+	}
+
+	if (!rxmode->hw_strip_crc) {
+		sfc_warn(sa,
+			 "FCS stripping control not supported - always stripped");
+		rxmode->hw_strip_crc = 1;
+	}
+
+	if (rxmode->enable_scatter) {
+		sfc_err(sa, "Scatter on Rx not supported");
+		rc = EINVAL;
+	}
+
+	if (rxmode->enable_lro) {
+		sfc_err(sa, "LRO not supported");
+		rc = EINVAL;
+	}
+
+	return rc;
+}
+
 /**
  * Initialize Rx subsystem.
  *
@@ -59,9 +114,14 @@ sfc_rx_qinit_info(struct sfc_adapter *sa, unsigned int sw_index)
 int
 sfc_rx_init(struct sfc_adapter *sa)
 {
+	struct rte_eth_conf *dev_conf = &sa->eth_dev->data->dev_conf;
 	unsigned int sw_index;
 	int rc;
 
+	rc = sfc_rx_check_mode(sa, &dev_conf->rxmode);
+	if (rc != 0)
+		goto fail_check_mode;
+
 	sa->rxq_count = sa->eth_dev->data->nb_rx_queues;
 
 	rc = ENOMEM;
@@ -85,6 +145,7 @@ sfc_rx_init(struct sfc_adapter *sa)
 
 fail_rxqs_alloc:
 	sa->rxq_count = 0;
+fail_check_mode:
 	sfc_log_init(sa, "failed %d", rc);
 	return rc;
 }
-- 
2.5.5

  parent reply	other threads:[~2016-11-21 15:01 UTC|newest]

Thread overview: 149+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 15:00 [dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 01/56] net/sfc: libefx-based PMD stub sufficient to build and init Andrew Rybchenko
2016-11-23 15:26   ` Ferruh Yigit
2016-11-24 15:59     ` Andrew Rybchenko
2016-11-25 10:17       ` Ferruh Yigit
2016-11-25 14:22         ` Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 02/56] net/sfc: import libefx base Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 03/56] net/sfc: import libefx register definitions Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 04/56] net/sfc: import libefx filters support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 05/56] net/sfc: import libefx MCDI definition Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 06/56] net/sfc: import libefx MCDI implementation Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 07/56] net/sfc: import libefx MCDI logging support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 08/56] net/sfc: import libefx MCDI proxy authorization support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 09/56] net/sfc: import libefx 5xxx/6xxx family support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 10/56] net/sfc: import libefx SFN7xxx " Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 11/56] net/sfc: import libefx SFN8xxx " Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 12/56] net/sfc: import libefx diagnostics support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 13/56] net/sfc: import libefx built-in selftest support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 14/56] net/sfc: import libefx software per-queue statistics support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 15/56] net/sfc: import libefx PHY flags control support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 16/56] net/sfc: import libefx PHY statistics support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 17/56] net/sfc: import libefx PHY LEDs control support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 18/56] net/sfc: import libefx MAC statistics support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 19/56] net/sfc: import libefx event prefetch support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 20/56] net/sfc: import libefx Rx scatter support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 21/56] net/sfc: import libefx RSS support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 22/56] net/sfc: import libefx loopback control support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 23/56] net/sfc: import libefx monitors statistics support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 24/56] net/sfc: import libefx support to access monitors via MCDI Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 25/56] net/sfc: import libefx support for Rx packed stream mode Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 26/56] net/sfc: import libefx NVRAM support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 27/56] net/sfc: import libefx VPD support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 28/56] net/sfc: import libefx bootrom configuration support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 29/56] net/sfc: import libefx licensing support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 30/56] net/sfc: include libefx in build Andrew Rybchenko
2016-11-23 15:26   ` Ferruh Yigit
2016-11-24 15:44     ` Andrew Rybchenko
2016-11-25 10:24       ` Ferruh Yigit
2016-11-25 15:05         ` Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 31/56] net/sfc: implement dummy callback to get device information Andrew Rybchenko
2016-11-23 15:26   ` Ferruh Yigit
2016-11-24 15:05     ` Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 32/56] net/sfc: implement driver operation to init device on attach Andrew Rybchenko
2016-11-23 15:26   ` Ferruh Yigit
2016-11-24 14:58     ` Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 33/56] net/sfc: add device configure and close stubs Andrew Rybchenko
2016-11-23 15:26   ` Ferruh Yigit
2016-11-24 14:46     ` Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 34/56] net/sfc: add device configuration checks Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 35/56] net/sfc: implement device start and stop operations Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 36/56] net/sfc: make available resources estimation and allocation Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 37/56] net/sfc: interrupts support sufficient for event queue init Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 38/56] net/sfc: implement event queue support Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 39/56] net/sfc: implement EVQ dummy exception handling Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 40/56] net/sfc: maintain management event queue Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 41/56] net/sfc: periodic management EVQ polling using alarm Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 42/56] net/sfc: minimum port control sufficient to receive traffic Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 43/56] net/sfc: implement device operation to retrieve link info Andrew Rybchenko
2016-11-21 15:00 ` [dpdk-dev] [PATCH 44/56] net/sfc: implement Rx subsystem stubs Andrew Rybchenko
2016-11-21 15:00 ` Andrew Rybchenko [this message]
2016-11-21 15:01 ` [dpdk-dev] [PATCH 46/56] net/sfc: implement Rx queue setup release operations Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 47/56] net/sfc: calculate Rx buffer size which may be used Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 48/56] net/sfc: validate Rx queue buffers setup Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 49/56] net/sfc: implement Rx queue start and stop operations Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 50/56] net/sfc: implement device callback to Rx burst of packets Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 51/56] net/sfc: discard scattered packet on Rx correctly Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 52/56] net/sfc: provide basic stubs for Tx subsystem Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 53/56] net/sfc: add function to check configured Tx mode Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 54/56] net/sfc: add callbacks to set up and release Tx queues Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 55/56] net/sfc: implement transmit path start / stop Andrew Rybchenko
2016-11-21 15:01 ` [dpdk-dev] [PATCH 56/56] net/sfc: add callback to send bursts of packets Andrew Rybchenko
2016-11-23  0:02 ` [dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD Ferruh Yigit
2016-11-23  0:10   ` Ferruh Yigit
2016-11-23  7:49   ` Andrew Rybchenko
2016-11-23  9:57     ` Mcnamara, John
2016-11-23 13:34       ` Thomas Monjalon
2016-11-23 19:21     ` Stephen Hemminger
2016-11-24 10:59       ` Andrew Rybchenko
2016-11-25 10:24     ` Ferruh Yigit
2016-11-25 12:02       ` Andrew Rybchenko
2016-11-25 12:43         ` Ferruh Yigit
2016-11-25 13:00           ` Thomas Monjalon
2016-11-25 13:23             ` Andrew Rybchenko
2016-11-25 12:44   ` Andrew Rybchenko
2016-11-23 15:29 ` Ferruh Yigit
2016-11-24 16:15   ` Andrew Rybchenko
2016-11-25 10:25     ` Ferruh Yigit
2016-11-29 16:18 ` [dpdk-dev] [PATCH v2 00/55] " Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 01/55] net/sfc: libefx-based PMD stub sufficient to build and init Andrew Rybchenko
2016-12-02 14:54     ` Ferruh Yigit
2016-12-02 15:03       ` Andrew Rybchenko
2016-12-02 15:08         ` Ferruh Yigit
2016-12-02 15:11           ` Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 02/55] net/sfc: import libefx base Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 03/55] net/sfc: import libefx register definitions Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 04/55] net/sfc: import libefx filters support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 05/55] net/sfc: import libefx MCDI definition Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 06/55] net/sfc: import libefx MCDI implementation Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 07/55] net/sfc: import libefx MCDI logging support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 08/55] net/sfc: import libefx MCDI proxy authorization support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 09/55] net/sfc: import libefx 5xxx/6xxx family support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 10/55] net/sfc: import libefx SFN7xxx " Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 11/55] net/sfc: import libefx SFN8xxx " Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 12/55] net/sfc: import libefx diagnostics support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 13/55] net/sfc: import libefx built-in selftest support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 14/55] net/sfc: import libefx software per-queue statistics support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 15/55] net/sfc: import libefx PHY flags control support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 16/55] net/sfc: import libefx PHY statistics support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 17/55] net/sfc: import libefx PHY LEDs control support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 18/55] net/sfc: import libefx MAC statistics support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 19/55] net/sfc: import libefx event prefetch support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 20/55] net/sfc: import libefx Rx scatter support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 21/55] net/sfc: import libefx RSS support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 22/55] net/sfc: import libefx loopback control support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 23/55] net/sfc: import libefx monitors statistics support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 24/55] net/sfc: import libefx support to access monitors via MCDI Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 25/55] net/sfc: import libefx support for Rx packed stream mode Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 26/55] net/sfc: import libefx NVRAM support Andrew Rybchenko
2016-11-29 16:18   ` [dpdk-dev] [PATCH v2 27/55] net/sfc: import libefx VPD support Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 28/55] net/sfc: import libefx bootrom configuration support Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 29/55] net/sfc: import libefx licensing support Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 30/55] net/sfc: include libefx in build Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 31/55] net/sfc: implement driver operation to init device on attach Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 32/55] net/sfc: add device configure and close stubs Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 33/55] net/sfc: add device configuration checks Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 34/55] net/sfc: implement device start and stop operations Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 35/55] net/sfc: make available resources estimation and allocation Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 36/55] net/sfc: interrupts support sufficient for event queue init Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 37/55] net/sfc: implement event queue support Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 38/55] net/sfc: implement EVQ dummy exception handling Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 39/55] net/sfc: maintain management event queue Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 40/55] net/sfc: periodic management EVQ polling using alarm Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 41/55] net/sfc: minimum port control sufficient to receive traffic Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 42/55] net/sfc: implement device operation to retrieve link info Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 43/55] net/sfc: implement Rx subsystem stubs Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 44/55] net/sfc: check configured rxmode Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 45/55] net/sfc: implement Rx queue setup release operations Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 46/55] net/sfc: calculate Rx buffer size which may be used Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 47/55] net/sfc: validate Rx queue buffers setup Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 48/55] net/sfc: implement Rx queue start and stop operations Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 49/55] net/sfc: implement device callback to Rx burst of packets Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 50/55] net/sfc: discard scattered packet on Rx correctly Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 51/55] net/sfc: provide basic stubs for Tx subsystem Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 52/55] net/sfc: add function to check configured Tx mode Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 53/55] net/sfc: add callbacks to set up and release Tx queues Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 54/55] net/sfc: implement transmit path start / stop Andrew Rybchenko
2016-11-29 16:19   ` [dpdk-dev] [PATCH v2 55/55] net/sfc: add callback to send bursts of packets Andrew Rybchenko
2016-12-02 14:55   ` [dpdk-dev] [PATCH v2 00/55] Solarflare libefx-based PMD Ferruh Yigit
2016-12-05 13:38     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479740470-6723-46-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).