summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiming Yang <qiming.yang@intel.com>2019-10-17 02:33:53 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-20 15:43:27 +0100
commit86fa880e3849ebdf7ac54e36a73554cfff5027bf (patch)
treec99799d998fde5e9506dbd2948e9c64c2198e808
parentb00839e32f6f553640a0fd2fc3ca4ae5bb76912d (diff)
downloaddpdk-next-net-intel-86fa880e3849ebdf7ac54e36a73554cfff5027bf.zip
dpdk-next-net-intel-86fa880e3849ebdf7ac54e36a73554cfff5027bf.tar.gz
dpdk-next-net-intel-86fa880e3849ebdf7ac54e36a73554cfff5027bf.tar.xz
net/ice: add devargs to control pipeline mode
Added a devarg to control the mode in generic flow API. We use none-pipeline mode by default. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
-rw-r--r--doc/guides/nics/ice.rst19
-rw-r--r--doc/guides/rel_notes/release_19_11.rst2
-rw-r--r--drivers/net/ice/ice_ethdev.c10
-rw-r--r--drivers/net/ice/ice_ethdev.h1
4 files changed, 31 insertions, 1 deletions
diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index 641f348..933f634 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -61,6 +61,25 @@ Runtime Config Options
NOTE: In Safe mode, only very limited features are available, features like RSS,
checksum, fdir, tunneling ... are all disabled.
+- ``Generic Flow Pipeline Mode Support`` (default ``0``)
+
+ In pipeline mode, a flow can be set at one specific stage by setting parameter
+ ``priority``. Currently, we support two stages: priority = 0 or !0. Flows with
+ priority 0 located at the first pipeline stage which typically be used as a firewall
+ to drop the packet on a blacklist(we called it permission stage). At this stage,
+ flow rules are created for the device's exact match engine: switch. Flows with priority
+ !0 located at the second stage, typically packets are classified here and be steered to
+ specific queue or queue group (we called it distribution stage), At this stage, flow
+ rules are created for device's flow director engine.
+ For none-pipeline mode, ``priority`` is ignored, a flow rule can be created as a flow director
+ rule or a switch rule depends on its pattern/action and the resource allocation situation,
+ all flows are virtually at the same pipeline stage.
+ By default, generic flow API is enabled in none-pipeline mode, user can choose to
+ use pipeline mode by setting ``devargs`` parameter ``pipeline-mode-support``,
+ for example::
+
+ -w 80:00.0,pipeline-mode-support=1
+
- ``Protocol extraction for per queue``
Configure the RX queues to do protocol extraction into ``rte_mbuf::udata64``
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 8634a7b..34e149b 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -100,6 +100,8 @@ New Features
* Added support for handling Receive Flex Descriptor.
* Added support for protocol extraction on per Rx queue.
* Added support for the ``RTE_ETH_DEV_CLOSE_REMOVE`` flag.
+ * Generic filter enhancement
+ - Supported pipeline mode.
* **Updated the enic driver.**
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 5567beb..c6bfcdb 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -19,10 +19,12 @@
/* devargs */
#define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support"
+#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support"
#define ICE_PROTO_XTR_ARG "proto_xtr"
static const char * const ice_valid_args[] = {
ICE_SAFE_MODE_SUPPORT_ARG,
+ ICE_PIPELINE_MODE_SUPPORT_ARG,
ICE_PROTO_XTR_ARG,
NULL
};
@@ -1833,6 +1835,11 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
ret = rte_kvargs_process(kvlist, ICE_SAFE_MODE_SUPPORT_ARG,
&parse_bool, &ad->devargs.safe_mode_support);
+ if (ret)
+ goto bail;
+
+ ret = rte_kvargs_process(kvlist, ICE_PIPELINE_MODE_SUPPORT_ARG,
+ &parse_bool, &ad->devargs.pipe_mode_support);
bail:
rte_kvargs_free(kvlist);
@@ -4298,7 +4305,8 @@ RTE_PMD_REGISTER_PCI_TABLE(net_ice, pci_id_ice_map);
RTE_PMD_REGISTER_KMOD_DEP(net_ice, "* igb_uio | uio_pci_generic | vfio-pci");
RTE_PMD_REGISTER_PARAM_STRING(net_ice,
ICE_PROTO_XTR_ARG "=[queue:]<vlan|ipv4|ipv6|ipv6_flow|tcp>"
- ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>");
+ ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>"
+ ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>");
RTE_INIT(ice_init_log)
{
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 2fd9881..6790f64 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -289,6 +289,7 @@ struct ice_pf {
struct ice_devargs {
int safe_mode_support;
uint8_t proto_xtr_dflt;
+ int pipe_mode_support;
uint8_t proto_xtr[ICE_MAX_QUEUE_NUM];
};