From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E7D2A0352; Mon, 18 Nov 2019 06:57:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A158DA69; Mon, 18 Nov 2019 06:57:56 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 286A09E4 for ; Mon, 18 Nov 2019 06:57:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Nov 2019 21:57:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,319,1569308400"; d="scan'208";a="208747716" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 17 Nov 2019 21:57:52 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 17 Nov 2019 21:57:49 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 17 Nov 2019 21:57:48 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 17 Nov 2019 21:57:48 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.2]) with mapi id 14.03.0439.000; Mon, 18 Nov 2019 13:57:47 +0800 From: "Yang, Qiming" To: "Zhang, Qi Z" , "Cao, Yahui" , "Xing, Beilei" CC: "dev@dpdk.org" Thread-Topic: [PATCH v3] net/ice: add flow mark hint support Thread-Index: AQHVnajF0o2ZWjT4iEiKOsK9ijtmdKeQbpxw Date: Mon, 18 Nov 2019 05:57:47 +0000 Message-ID: References: <20191118004325.29601-1-qi.z.zhang@intel.com> In-Reply-To: <20191118004325.29601-1-qi.z.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWE0ZDMzMTAtMmJiNi00N2QzLTk3YTAtOTQ5YTAwZGM1OWI0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRkVVR1Nvb3hQdFBrZVFQbkxkM1dxRWRadCtRNlNMbWl0VXNrRVNaYWVNVmg0Tk9wYVZPYkVxVXc1dHJtb1FXZyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] net/ice: add flow mark hint support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi,=20 > -----Original Message----- > From: Zhang, Qi Z > Sent: Monday, November 18, 2019 8:43 AM > To: Yang, Qiming ; Cao, Yahui > ; Xing, Beilei > Cc: dev@dpdk.org; Zhang, Qi Z > Subject: [PATCH v3] net/ice: add flow mark hint support >=20 > 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. >=20 > Signed-off-by: Qi Zhang > --- >=20 > v3: > - add "experimental notification" in ice.rst >=20 > v2: > - fix typo >=20 > 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(-) >=20 > diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst index > 1a426438d..d1b80c2fa 100644 > --- a/doc/guides/nics/ice.rst > +++ b/doc/guides/nics/ice.rst > @@ -80,6 +80,18 @@ Runtime Config Options >=20 > -w 80:00.0,pipeline-mode-support=3D1 >=20 > +- ``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=3D1 > + > - ``Protocol extraction for per queue`` >=20 > Configure the RX queues to do protocol extraction into mbuf for protoc= ol > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c = index > abf00d404..9f2cb2f40 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -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" >=20 > static const char * const ice_valid_args[] =3D { > 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) >=20 > ret =3D rte_kvargs_process(kvlist, ICE_PIPELINE_MODE_SUPPORT_ARG, > &parse_bool, &ad- > >devargs.pipe_mode_support); > + if (ret) > + goto bail; > + > + ret =3D rte_kvargs_process(kvlist, ICE_FLOW_MARK_SUPPORT_ARG, > + &parse_bool, &ad- > >devargs.flow_mark_support); > + printf("flow_mark =3D %d\n", ad->devargs.flow_mark_support); >=20 > 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 > "=3D[queue:]" > ICE_SAFE_MODE_SUPPORT_ARG "=3D<0|1>" > - ICE_PIPELINE_MODE_SUPPORT_ARG "=3D<0|1>"); > + ICE_PIPELINE_MODE_SUPPORT_ARG "=3D<0|1>" > + ICE_FLOW_MARK_SUPPORT_ARG "=3D<0|1>"); >=20 > RTE_INIT(ice_init_log) > { > diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h = index > 4a0d37b32..4d35339a7 100644 > --- a/drivers/net/ice/ice_ethdev.h > +++ b/drivers/net/ice/ice_ethdev.h > @@ -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]; > }; >=20 > diff --git a/drivers/net/ice/ice_rxtx_vec_common.h > b/drivers/net/ice/ice_rxtx_vec_common.h > index 080ca4175..086428898 100644 > --- a/drivers/net/ice/ice_rxtx_vec_common.h > +++ b/drivers/net/ice/ice_rxtx_vec_common.h > @@ -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 =3D > + ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > + > + if (ad->devargs.flow_mark_support) > + return -1; >=20 > for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > rxq =3D dev->data->rx_queues[i]; > -- > 2.13.6 Acked-by: Qiming Yang