net/ice: add flow mark hint support
PATCH v3 1/1 net/ice: add flow mark hint support
Since not all data paths support flow mark, the driver need a hint from application to select the correct data path if flow mark is required. The patch introduce a devarg "flow-mark-support" as a workaround solution, since a standard way is still ongoing.
---
v3:
- add "experimental notification" in ice.rst
v2:
- fix typo
doc/guides/nics/ice.rst | 12 ++++++++++++ drivers/net/ice/ice_ethdev.c | 11 ++++++++++- drivers/net/ice/ice_ethdev.h | 1 + drivers/net/ice/ice_rxtx_vec_common.h | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-)
doc/guides/nics/ice.rst +12 -0
@@ -80,6 +80,18 @@ Runtime Config Options -w 80:00.0,pipeline-mode-support=1 +- ``Flow Mark Support`` (default ``0``) + + This is a hint to the driver to select the data path that support flow mark extraction + by default. + NOTE: This is an experimental devarg, it will be removed when any of below conditions + is ready. + 1) all data path support flow mark (currently vPMD does not) + 2) a new offload like RTE_DEV_RX_OFFLOAD_FLOW_MARK be introduced as a standard way to hint. + Example:: + + -w 80:00.0,flow-mark-support=1 + - ``Protocol extraction for per queue`` Configure the RX queues to do protocol extraction into mbuf for protocol
drivers/net/ice/ice_ethdev.c +10 -1
@@ -23,11 +23,13 @@/* devargs */ #define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support"#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support" +#define ICE_FLOW_MARK_SUPPORT_ARG "flow-mark-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_FLOW_MARK_SUPPORT_ARG ,ICE_PROTO_XTR_ARG ,NULL };
@@ -1987,6 +1989,12 @@ static int ice_parse_devargs(struct rte_eth_dev *dev) ret =rte_kvargs_process (kvlist,ICE_PIPELINE_MODE_SUPPORT_ARG , &parse_bool, &ad->devargs.pipe_mode_support); +if (ret) + goto bail; + + ret =rte_kvargs_process (kvlist,ICE_FLOW_MARK_SUPPORT_ARG , + &parse_bool, &ad->devargs.flow_mark_support); +printf ("flow_mark = %d\n" , ad->devargs.flow_mark_support); bail:rte_kvargs_free (kvlist);
@@ -4571,7 +4579,8 @@ 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_PIPELINE_MODE_SUPPORT_ARG "=<0|1>" ); +ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>" +ICE_FLOW_MARK_SUPPORT_ARG "=<0|1>" );RTE_INIT (ice_init_log) {
drivers/net/ice/ice_ethdev.h +1 -0
@@ -391,6 +391,7 @@ struct ice_devargs {int safe_mode_support;uint8_t proto_xtr_dflt;int pipe_mode_support; +int flow_mark_support;uint8_t proto_xtr[ICE_MAX_QUEUE_NUM ]; };
drivers/net/ice/ice_rxtx_vec_common.h +5 -0
@@ -268,6 +268,11 @@ ice_rx_vec_dev_check_default(struct rte_eth_dev *dev) {int i;struct ice_rx_queue *rxq; +struct ice_adapter *ad = +ICE_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private); + +if (ad->devargs.flow_mark_support) +return -1 ;for (i =0 ; i < dev->data->nb_rx_queues; i++) { rxq = dev->data->rx_queues[i];
Signature · 1 line
2.13.6
Hi,
Quoted 128 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Monday, November 18, 2019 8:43 AM
To: Yang, Qiming <[email protected]>; Cao, Yahui <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH v3] net/ice: add flow mark hint supportSince not all data paths support flow mark, the driver need a hint from application to select the correct data path if flow mark is required. The patch introduce a devarg "flow-mark-support" as a workaround solution, since a standard way is still ongoing.
Signed-off-by Qi Zhang <[email protected]>---
v3:
- add "experimental notification" inice.rstv2:
- fix typodoc/guides/nics/ice.rst | 12 ++++++++++++ drivers/net/ice/ice_ethdev.c | 11 ++++++++++- drivers/net/ice/ice_ethdev.h | 1 + drivers/net/ice/ice_rxtx_vec_common.h | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
1a426438d..d1b80c2fa100644doc/guides/nics/ice.rst +8
-0@@ -80,6 +80,18 @@ Runtime Config Options -w 80:00.0,pipeline-mode-support=1 +- ``Flow Mark Support`` (default ``0``) + + This is a hint to the driver to select the data path that support + flow mark extraction by default. + NOTE: This is an experimental devarg, it will be removed when any of + below conditions is ready. + 1) all data path support flow mark (currently vPMD does not) + 2) a new offload like RTE_DEV_RX_OFFLOAD_FLOW_MARK be introducedas a standard way to hint.
doc/guides/nics/ice.rst +4
-0+ Example:: + + -w 80:00.0,flow-mark-support=1 + - ``Protocol extraction for per queue`` Configure the RX queues to do protocol extraction into mbuf for protocoldrivers/net/ice/ice_ethdev.c index renamed from drivers/net/ice/ice_ethdev.c +0
-0
abf00d404..9f2cb2f40100644drivers/net/ice/ice_ethdev.c +8
-0@@ -23,11 +23,13 @@/* devargs */ #define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support"#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support" +#define ICE_FLOW_MARK_SUPPORT_ARG "flow-mark-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_FLOW_MARK_SUPPORT_ARG ,ICE_PROTO_XTR_ARG ,NULL };@@ -1987,6 +1989,12 @@ static int ice_parse_devargs(struct rte_eth_dev *dev) ret =rte_kvargs_process (kvlist,ICE_PIPELINE_MODE_SUPPORT_ARG , &parse_bool, &ad- >devargs.pipe_mode_support); +if (ret) + goto bail; + + ret =rte_kvargs_process (kvlist,ICE_FLOW_MARK_SUPPORT_ARG , + &parse_bool, &ad- >devargs.flow_mark_support); +printf ("flow_mark = %d\n" , ad->devargs.flow_mark_support);bail:
drivers/net/ice/ice_ethdev.c +0
-0rte_kvargs_free (kvlist);@@ -4571,7 +4579,8 @@ 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>"
drivers/net/ice/ice_ethdev.c +2
-1ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>" - ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>"); +ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>" + ICE_FLOW_MARK_SUPPORT_ARG "=<0|1>");RTE_INIT (ice_init_log) {drivers/net/ice/ice_ethdev.h index renamed from drivers/net/ice/ice_ethdev.h +0
-0
4a0d37b32..4d35339a7100644drivers/net/ice/ice_ethdev.h +1
-0@@ -391,6 +391,7 @@ struct ice_devargs {int safe_mode_support;uint8_t proto_xtr_dflt;int pipe_mode_support; +int flow_mark_support;uint8_t proto_xtr[ICE_MAX_QUEUE_NUM ]; };drivers/net/ice/ice_rxtx_vec_common.h +5
-1@@ -268,6 +268,11 @@ ice_rx_vec_dev_check_default(struct rte_eth_dev *dev) {int i;struct ice_rx_queue *rxq; +struct ice_adapter *ad = +ICE_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private); + +if (ad->devargs.flow_mark_support) +return -1 ;for (i =0 ; i < dev->data->nb_rx_queues; i++) { rxq = dev->data->rx_queues[i]; --
Quoted 1 line
2.13.6
Quoted 1 line · Qi Zhang
Since not all data paths support flow mark, the driver need
s/need/needs
Quoted 2 lines
a hint from application to select the correct data path if flow mark is required. The patch introduce a devarg
s/introduce/introduces
Quoted 23 lines
"flow-mark-support" as a workaround solution, since a standard way is still ongoing.
Signed-off-by Qi Zhang <[email protected]>---
v3:
- add "experimental notification" inice.rstv2:
- fix typodoc/guides/nics/ice.rst | 12 ++++++++++++ drivers/net/ice/ice_ethdev.c | 11 ++++++++++- drivers/net/ice/ice_ethdev.h | 1 + drivers/net/ice/ice_rxtx_vec_common.h | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-)doc/guides/nics/ice.rst +0
-0
doc/guides/nics/ice.rst Runtime Config Options · line 85
Quoted 6 lines
doc/guides/nics/ice.rst +3
-0@@ -80,6 +80,18 @@ Runtime Config Options -w 80:00.0,pipeline-mode-support=1 +- ``Flow Mark Support`` (default ``0``) + + This is a hint to the driver to select the data path that support flow mark extraction
s/support/supports
doc/guides/nics/ice.rst Runtime Config Options · line 89
Quoted 4 lines
doc/guides/nics/ice.rst +4
-0+ by default. + NOTE: This is an experimental devarg, it will be removed when any of below conditions + is ready. + 1) all data path support flow mark (currently vPMD does not)
s/path/paths
Quoted 27 lines
doc/guides/nics/ice.rst +5
-1+ 2) a new offload like RTE_DEV_RX_OFFLOAD_FLOW_MARK be introduced as a standard way to hint. + Example:: + + -w 80:00.0,flow-mark-support=1 + - ``Protocol extraction for per queue`` Configure the RX queues to do protocol extraction into mbuf for protocoldrivers/net/ice/ice_ethdev.c +2
-0@@ -23,11 +23,13 @@/* devargs */ #define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support"#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support" +#define ICE_FLOW_MARK_SUPPORT_ARG "flow-mark-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_FLOW_MARK_SUPPORT_ARG ,ICE_PROTO_XTR_ARG ,NULL };
drivers/net/ice/ice_ethdev.c static int ice_parse_devargs(struct rte_eth_dev *dev) · line 1996
Quoted 8 lines
drivers/net/ice/ice_ethdev.c +5
-0@@ -1987,6 +1989,12 @@ static int ice_parse_devargs(struct rte_eth_dev *dev) ret =rte_kvargs_process (kvlist,ICE_PIPELINE_MODE_SUPPORT_ARG , &parse_bool, &ad->devargs.pipe_mode_support); +if (ret) + goto bail; + + ret =rte_kvargs_process (kvlist,ICE_FLOW_MARK_SUPPORT_ARG , + &parse_bool, &ad->devargs.flow_mark_support);
Do we need error handling here?
drivers/net/ice/ice_ethdev.c static int ice_parse_devargs(struct rte_eth_dev *dev) · line 1997
Quoted 1 line
drivers/net/ice/ice_ethdev.c +1
-0+printf ("flow_mark = %d\n" , ad->devargs.flow_mark_support);
Use PMD_INIT_LOG instead, and in order to provide more informative message, what about we directly say "flow_mark is 0, vector path won't be selected." or something similar according to the value of flow_makr_support.
Quoted 30 lines
bail:
rte_kvargs_free(kvlist);drivers/net/ice/ice_ethdev.c +2
-1@@ -4571,7 +4579,8 @@ 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_PIPELINE_MODE_SUPPORT_ARG "=<0|1>" ); +ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>" +ICE_FLOW_MARK_SUPPORT_ARG "=<0|1>" );RTE_INIT (ice_init_log) {drivers/net/ice/ice_ethdev.h +1
-0@@ -391,6 +391,7 @@ struct ice_devargs {int safe_mode_support;uint8_t proto_xtr_dflt;int pipe_mode_support; +int flow_mark_support;uint8_t proto_xtr[ICE_MAX_QUEUE_NUM ]; };drivers/net/ice/ice_rxtx_vec_common.h +0
-0
drivers/net/ice/ice_rxtx_vec_common.h ice_rx_vec_dev_check_default(struct rte_eth_dev *dev) · line 274
Quoted 7 lines
drivers/net/ice/ice_rxtx_vec_common.h +4
-0@@ -268,6 +268,11 @@ ice_rx_vec_dev_check_default(struct rte_eth_dev *dev) {int i;struct ice_rx_queue *rxq; +struct ice_adapter *ad = +ICE_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private); + +if (ad->devargs.flow_mark_support)
Or we can add hint info here.
Thanks,
Xiaolong
Quoted 7 lines
drivers/net/ice/ice_rxtx_vec_common.h +1
-0+return -1 ;for (i =0 ; i < dev->data->nb_rx_queues; i++) { rxq = dev->data->rx_queues[i];Signature · 1 line
2.13.6
Quoted 100 lines
-----Original Message-----
From: Ye, Xiaolong <[email protected]>
Sent: Tuesday, November 19, 2019 1:53 PM
To: Zhang, Qi Z <[email protected]>
Cc: Yang, Qiming <[email protected]>; Cao, Yahui <[email protected]>; Xing, Beilei <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v3] net/ice: add flow mark hint supportQuoted 1 line · Qi Zhang
Since not all data paths support flow mark, the driver need
s/need/needs
Quoted 2 lines
a hint from application to select the correct data path if flow mark is required. The patch introduce a devarg
s/introduce/introduces
Quoted 23 lines
"flow-mark-support" as a workaround solution, since a standard way is still ongoing.
Signed-off-by Qi Zhang <[email protected]>---
v3:
- add "experimental notification" inice.rstv2:
- fix typodoc/guides/nics/ice.rst | 12 ++++++++++++ drivers/net/ice/ice_ethdev.c | 11 ++++++++++- drivers/net/ice/ice_ethdev.h | 1 + drivers/net/ice/ice_rxtx_vec_common.h | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
1a426438d..d1b80c2fa100644doc/guides/nics/ice.rst Runtime Config Options · line 86
Quoted 7 lines
doc/guides/nics/ice.rst +4
-0@@ -80,6 +80,18 @@ Runtime Config Options -w 80:00.0,pipeline-mode-support=1 +- ``Flow Mark Support`` (default ``0``) + + This is a hint to the driver to select the data path that support + flow mark extractions/support/supports
doc/guides/nics/ice.rst Runtime Config Options · line 89
Quoted 4 lines
doc/guides/nics/ice.rst +4
-0+ by default. + NOTE: This is an experimental devarg, it will be removed when any of + below conditions is ready. + 1) all data path support flow mark (currently vPMD does not)s/path/paths
doc/guides/nics/ice.rst Runtime Config Options · line 91
Quoted 1 line
doc/guides/nics/ice.rst +1
-0+ 2) a new offload like RTE_DEV_RX_OFFLOAD_FLOW_MARK be introducedas a standard way to hint.
Quoted 26 lines
doc/guides/nics/ice.rst +4
-1+ Example:: + + -w 80:00.0,flow-mark-support=1 + - ``Protocol extraction for per queue`` Configure the RX queues to do protocol extraction into mbuf forprotocol diff --git
a/drivers/net/ice/ice_ethdev.cb/drivers/net/ice/ice_ethdev.cindexabf00d404..9f2cb2f40100644drivers/net/ice/ice_ethdev.c +2
-0@@ -23,11 +23,13 @@/* devargs */ #define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support"#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support" +#define ICE_FLOW_MARK_SUPPORT_ARG "flow-mark-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_FLOW_MARK_SUPPORT_ARG ,ICE_PROTO_XTR_ARG ,NULL };drivers/net/ice/ice_ethdev.c static int ice_parse_devargs(struct rte_eth_dev · line 1997
Quoted 9 lines
drivers/net/ice/ice_ethdev.c +5
-0@@ -1987,6 +1989,12 @@ static int ice_parse_devargs(struct rte_eth_dev *dev) ret =rte_kvargs_process (kvlist,ICE_PIPELINE_MODE_SUPPORT_ARG , &parse_bool, &ad->devargs.pipe_mode_support); +if (ret) + goto bail; + + ret =rte_kvargs_process (kvlist,ICE_FLOW_MARK_SUPPORT_ARG , + &parse_bool, &ad->devargs.flow_mark_support);Do we need error handling here?
Quoted 6 lines
drivers/net/ice/ice_ethdev.c static int ice_parse_devargs(struct rte_eth_dev *dev) · line 1997
Quoted 1 line
drivers/net/ice/ice_ethdev.c +1
-0+printf ("flow_mark = %d\n" , ad->devargs.flow_mark_support);Use
PMD_INIT_LOGinstead, and in order to provide more informative message, what about we directly say "flow_markis 0, vector path won't be selected." or something similar according to the value offlow_makr_support.
This is a mistake forgot to remove the debug code.
Thanks
Qi
Quoted 52 lines
drivers/net/ice/ice_ethdev.c RTE_PMD_REGISTER_KMOD_DEP(net_ice, "*
Quoted 4 lines
bail:
rte_kvargs_free(kvlist);drivers/net/ice/ice_ethdev.c +0
-0@@ -4571,7 +4579,8 @@ RTE_PMD_REGISTER_KMOD_DEP(net_ice, "*
igb_uio|drivers/net/ice/ice_ethdev.c RTE_PMD_REGISTER_KMOD_DEP(net_ice, "* · line 4580
Quoted 2 lines
drivers/net/ice/ice_ethdev.c +0
-0uio_pci_generic | vfio-pci"); RTE_PMD_REGISTER_PARAM_STRING(net_ice,ICE_PROTO_XTR_ARG "=[queue:]<vlan|ipv4|ipv6|ipv6_flow|tcp>"
Quoted 24 lines
drivers/net/ice/ice_ethdev.c +2
-1ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>" - ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>"); +ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>" + ICE_FLOW_MARK_SUPPORT_ARG "=<0|1>");RTE_INIT (ice_init_log) {(quoted diff) +0
-0
b/drivers/net/ice/ice_ethdev.hindex4a0d37b32..4d35339a7100644drivers/net/ice/ice_ethdev.h +1
-0@@ -391,6 +391,7 @@ struct ice_devargs {int safe_mode_support;uint8_t proto_xtr_dflt;int pipe_mode_support; +int flow_mark_support;uint8_t proto_xtr[ICE_MAX_QUEUE_NUM ]; };drivers/net/ice/ice_rxtx_vec_common.h +0
-0drivers/net/ice/ice_rxtx_vec_common.h ice_rx_vec_dev_check_default(struct rte_eth_dev · line 274
Quoted 7 lines
drivers/net/ice/ice_rxtx_vec_common.h +4
-0@@ -268,6 +268,11 @@ ice_rx_vec_dev_check_default(struct rte_eth_dev *dev) {int i;struct ice_rx_queue *rxq; +struct ice_adapter *ad = +ICE_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private); + +if (ad->devargs.flow_mark_support)Or we can add hint info here.
Thanks,
XiaolongQuoted 7 lines
drivers/net/ice/ice_rxtx_vec_common.h +1
-1+return -1 ;for (i =0 ; i < dev->data->nb_rx_queues; i++) { rxq = dev->data->rx_queues[i]; --2.13.6
Quoted 100 lines · Qi Z
Quoted 100 lines
-----Original Message-----
From: Ye, Xiaolong <[email protected]>
Sent: Tuesday, November 19, 2019 1:53 PM
To: Zhang, Qi Z <[email protected]>
Cc: Yang, Qiming <[email protected]>; Cao, Yahui <[email protected]>; Xing, Beilei <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v3] net/ice: add flow mark hint supportQuoted 1 line · Qi Zhang
Since not all data paths support flow mark, the driver need
s/need/needs
Quoted 2 lines
a hint from application to select the correct data path if flow mark is required. The patch introduce a devarg
s/introduce/introduces
Quoted 23 lines
"flow-mark-support" as a workaround solution, since a standard way is still ongoing.
Signed-off-by Qi Zhang <[email protected]>---
v3:
- add "experimental notification" inice.rstv2:
- fix typodoc/guides/nics/ice.rst | 12 ++++++++++++ drivers/net/ice/ice_ethdev.c | 11 ++++++++++- drivers/net/ice/ice_ethdev.h | 1 + drivers/net/ice/ice_rxtx_vec_common.h | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
1a426438d..d1b80c2fa100644doc/guides/nics/ice.rst Runtime Config Options · line 86
Quoted 7 lines
doc/guides/nics/ice.rst +4
-0@@ -80,6 +80,18 @@ Runtime Config Options -w 80:00.0,pipeline-mode-support=1 +- ``Flow Mark Support`` (default ``0``) + + This is a hint to the driver to select the data path that support + flow mark extractions/support/supports
doc/guides/nics/ice.rst Runtime Config Options · line 89
Quoted 4 lines
doc/guides/nics/ice.rst +4
-0+ by default. + NOTE: This is an experimental devarg, it will be removed when any of + below conditions is ready. + 1) all data path support flow mark (currently vPMD does not)s/path/paths
doc/guides/nics/ice.rst Runtime Config Options · line 91
Quoted 1 line
doc/guides/nics/ice.rst +1
-0+ 2) a new offload like RTE_DEV_RX_OFFLOAD_FLOW_MARK be introducedas a standard way to hint.
Quoted 26 lines
doc/guides/nics/ice.rst +4
-1+ Example:: + + -w 80:00.0,flow-mark-support=1 + - ``Protocol extraction for per queue`` Configure the RX queues to do protocol extraction into mbuf forprotocol diff --git
a/drivers/net/ice/ice_ethdev.cb/drivers/net/ice/ice_ethdev.cindexabf00d404..9f2cb2f40100644drivers/net/ice/ice_ethdev.c +2
-0@@ -23,11 +23,13 @@/* devargs */ #define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support"#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support" +#define ICE_FLOW_MARK_SUPPORT_ARG "flow-mark-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_FLOW_MARK_SUPPORT_ARG ,ICE_PROTO_XTR_ARG ,NULL };drivers/net/ice/ice_ethdev.c static int ice_parse_devargs(struct rte_eth_dev · line 1997
Quoted 9 lines
drivers/net/ice/ice_ethdev.c +5
-0@@ -1987,6 +1989,12 @@ static int ice_parse_devargs(struct rte_eth_dev *dev) ret =rte_kvargs_process (kvlist,ICE_PIPELINE_MODE_SUPPORT_ARG , &parse_bool, &ad->devargs.pipe_mode_support); +if (ret) + goto bail; + + ret =rte_kvargs_process (kvlist,ICE_FLOW_MARK_SUPPORT_ARG , + &parse_bool, &ad->devargs.flow_mark_support);Do we need error handling here?
Quoted 8 lines
Quoted 6 lines
drivers/net/ice/ice_ethdev.c static int ice_parse_devargs(struct rte_eth_dev *dev) · line 1997
Quoted 1 line
drivers/net/ice/ice_ethdev.c +1
-0+printf ("flow_mark = %d\n" , ad->devargs.flow_mark_support);Use
PMD_INIT_LOGinstead, and in order to provide more informative message, what about we directly say "flow_markis 0, vector path won't be selected." or something similar according to the value offlow_makr_support.This is a mistake forgot to remove the debug code.
Ok, I think it's still meaningful to print some hints in ice_rx_vec_dev_check_default when it return due to flow_mark_support is set.
Thanks,
Xiaolong