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 7ABD3A04C5; Fri, 15 Nov 2019 17:37:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52EBC2C16; Fri, 15 Nov 2019 17:37:37 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4C6682C08 for ; Fri, 15 Nov 2019 17:37:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2019 08:37:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,308,1569308400"; d="scan'208";a="195438386" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 15 Nov 2019 08:37:33 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 15 Nov 2019 08:37:33 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Nov 2019 08:37:32 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 15 Nov 2019 08:37:32 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.50) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 15 Nov 2019 08:37:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sj9tV9nBIK7IJKB15VVablCP2zCAgoI5UYVH5x/sB5Sn27q3Vsp4uoQqAbCITX7I93z+FaqXIvg0fr/mt2JdBqZNSRZGMzcPXuX9CuimU0bBTkvioHD3RwxHqfnzipkVLMrzyoUxA3PIHlmUt5olZYDDbcAEXjW60XdGTyiUGpEm3kd3plBHVKhq9gmsbiY9KN2WvwnX5lkHOWdzFjV3XcHuqU4X5MZeSQDMCgDX0p1aXr7FlL5zOZRmCXmfSaVIn8+PGsewJeAG1KZimVh9ZPA/hSWSbbZ922wsSRCPlv/xkZ3rUV5L/4MyLtnjI8sqpuTUpIBIEo3tKiLrK7a2Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qA7zsLgVM19FAh88Azv4J3GNHniyLaxUueY8XpxEXyg=; b=M99b4rPEDZPfYnXle6ufZbK04jEIDnY2G/GkNpdMkqNrEZe+kk/TuZFo1ZHhBIUXNm5Wk5HPjcPLnebphGBzW9z8qkEFmUa59A6xB4bU6CDsBvlHSbuaWWLYWggCNQoz2mn46esjWlhYkH/s17w/6gGvCMj4OmDn78dnZIaVbCSpC822F1eF1Sfeq8PAedxSw7XaRVw4zu5zDxo+ryvhIYrpp/OtvhLnJmFw+prgMPvKNZTu1r1y8tUb/fJx3JclIx8tIEyIrSlR774E0tk8jw8t48pch6Adu3mxQwm5YgRhFNfdaYjuNT8e2ku7gZCNdZvV8UDOkRnkPr5W3t8PkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qA7zsLgVM19FAh88Azv4J3GNHniyLaxUueY8XpxEXyg=; b=ojMOWrL0SmqOM5lfwx/lamkYodLywCz8W0N/z8aE/j9lLv6u7nBCpYF5DTfrl9Z53vN3fn0L6sINdWksbg4MPo524jqr7ea1OIEEKYJDd3FidMvshhG1NzJCrO8k9SoRizJ1it/rsDwI6Miom4l9Uznd3X4xVtpbJXXJk7qRh6I= Received: from BN8PR11MB3828.namprd11.prod.outlook.com (20.178.220.87) by BN8PR11MB3827.namprd11.prod.outlook.com (20.178.222.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.27; Fri, 15 Nov 2019 16:37:28 +0000 Received: from BN8PR11MB3828.namprd11.prod.outlook.com ([fe80::7417:db34:276c:2b57]) by BN8PR11MB3828.namprd11.prod.outlook.com ([fe80::7417:db34:276c:2b57%5]) with mapi id 15.20.2451.027; Fri, 15 Nov 2019 16:37:28 +0000 From: "Stillwell Jr, Paul M" To: "Zhang, Qi Z" , "Ye, Xiaolong" CC: "dev@dpdk.org" , "Zhang, Qi Z" Thread-Topic: [dpdk-dev] [PATCH v2] net/ice: add flow mark hint support Thread-Index: AQHVm2ZZ97N6PpB5VUScpCt6Dz3xtqeMbnEQ Date: Fri, 15 Nov 2019 16:37:28 +0000 Message-ID: References: <20191115034152.21429-1-qi.z.zhang@intel.com> In-Reply-To: <20191115034152.21429-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTc2ZTk2ZTMtMTY5Mi00YWYzLWFhMTMtMzYzOTZjYTllNGEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidkVDdWZYOWVTeGhJNTVNTWtcL2NiQlJhZURqeStLMUI0M3BnNUpvUmVOaDFmUXZzT2tGc2RDNzF0MlMydWhYVGQifQ== dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=paul.m.stillwell.jr@intel.com; x-originating-ip: [134.134.136.199] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 20652ab6-c38a-4463-03e5-08d769ea1ab9 x-ms-traffictypediagnostic: BN8PR11MB3827: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 02229A4115 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(39860400002)(346002)(366004)(136003)(396003)(51234002)(189003)(199004)(13464003)(2906002)(486006)(25786009)(66446008)(71190400001)(71200400001)(305945005)(66946007)(66556008)(64756008)(66476007)(54906003)(5660300002)(110136005)(7696005)(4326008)(476003)(6636002)(102836004)(7736002)(52536014)(6506007)(186003)(76116006)(316002)(53546011)(74316002)(66066001)(26005)(76176011)(81156014)(55016002)(8676002)(9686003)(86362001)(6436002)(8936002)(478600001)(33656002)(256004)(14444005)(11346002)(6116002)(107886003)(3846002)(6246003)(229853002)(446003)(14454004)(99286004)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:BN8PR11MB3827; H:BN8PR11MB3828.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nmaiIeoqMKDfhy30EC+zvcgPnIsQVGL8dM6u0Pl1KUhL6nlEK1teMjoqI4t+QzLDBG3uWiQYHWeYjafnb5uJvIe4b2IuE2vMYTLwxsCVqsNguYi0UufQbXozw9vT/FzqyiinKAmOfRMpO6DQYlcQVF6DQn5vBmlEevPF0+YNYWPbNloeR3HLilD2Ur30MBzBbyxCL5XTNOMcfDoFKGgyG7suV+I3PRqycoDDMC2Di6q2rVzlBjVnArei/GjoalxQRn9WmUL1OIagPQDduKEbwfOLgB0p++xKq1I4U03arikYGYy0Xnq9j/uLZG8kHmjc2wQ4+aCvzSgtTkjKoYNXFy7RqroJxy/G7jVc6H2AuBRK7kFvKQw9vil8cyYJWvYM3fH5vjHJvqIAnR89mnw3tDZuWMb+y6W3OAbcM5NfvDvlgr9NSlePWbgdxefNveWd2gplTBiBiSsVfkxLxje54Q== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 20652ab6-c38a-4463-03e5-08d769ea1ab9 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2019 16:37:28.6092 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8Bn4qRz6hepULX0Qty0gmAuoBeqVIPF0C0t595U4GH30xdJJrwOcew9ZxLIVkZfKKUCdOU0uFOqVXtwzOmkBdv7hYHUPazrfuQdVtWWxaK8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3827 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] 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" > -----Original Message----- > From: dev On Behalf Of Qi Zhang > Sent: Thursday, November 14, 2019 7:42 PM > To: Ye, Xiaolong > Cc: dev@dpdk.org; Zhang, Qi Z > Subject: [dpdk-dev] [PATCH v2] 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 I understand the need for this, but this seems problematic. Once a customer= starts using this, then it has to be in the code forever because they are = going to expect it to work forever. Maybe this should be marked with someth= ing that indicates it is temporary? Something like the experimental tagging= that is done in other parts of the code? > Signed-off-by: Qi Zhang > --- >=20 > v2: > - fix typo >=20 > doc/guides/nics/ice.rst | 10 ++++++++++ > 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, 26 insertions(+), 1 deletion(-) >=20 > diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst index > 1a426438d..f7016d338 100644 > --- a/doc/guides/nics/ice.rst > +++ b/doc/guides/nics/ice.rst > @@ -80,6 +80,16 @@ 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. This hint should be removed when any = of > below condition 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