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 6A689A057C; Thu, 26 Mar 2020 09:57:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE3A01C038; Thu, 26 Mar 2020 09:57:32 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 973E03B5; Thu, 26 Mar 2020 09:57:30 +0100 (CET) IronPort-SDR: zcHqtbrBzCyXyCPwY44absA+jePmjkd/UNvjVTe9+6FemOIOWpQdCGUFD9maQ25qG2sVsznyXf DOf/VX5dNGNA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2020 01:57:29 -0700 IronPort-SDR: 97T4DxDxGx+prye/E1Y0E8ZphyXGCfeYOOYHwMcgA7SJSHfC6ikYwM2GLtvzfabQXt8SOq/wPs QjT+b1lT7kRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,307,1580803200"; d="scan'208";a="448557660" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga006.fm.intel.com with ESMTP; 26 Mar 2020 01:57:29 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Mar 2020 01:57:28 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 26 Mar 2020 01:57:28 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 26 Mar 2020 01:57:28 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Mar 2020 01:57:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VztRft1nJqWFftEsPl+hTZN7OuOy3h7trEBtCvAA8gcCDGNF2pRT3DG+cg/hARhwHUJpWz3yMURiK+moKoOgjIxIvwtbBtO3gzABVTGWHhUaYn4Iz8uW2QK7wOk+Azg/8pS+3J6aENnBCAtlQqktW9ruEYWwj/0BjVONfvE/v00d7jfDuU1f0va2JqqW1ncL33XdxyFu7FAqymSoJP+ECm+8kbcC3VGAbYAaH8V1mwCWdorZVQ4glAnm/a80QWTShlYxXdClVFeiOYbkA2c84yCxNIbd8A9k1urBuslbuBBzYj1J3sqC8/VoixSD4SG+oWQrgIj0waFmaKjkhPEesQ== 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=pQ0dW5uzFJcvU3xFd/xTGBXk8JVyo9lmsJInK30kY3w=; b=h3Q5R6NS/xrF0xVQyf/BOJwf1xK3l9pZcbln6M682IESGycjBbgH8NmeNybPCKyQ/yV2+j0Awb0zdE21GJ3YLf/nQjGcbcsq+6k4VCcI+6KR5R/0i4QLlx0Wcmrg1o9ZX06/dVL5jgVOOKrgBgDYUUV3AKGQClUqZazCBDFUVLGsgWLh1KPG4MggMt7RAN3jgXnv2hMe+7c3iQBAckvUUaCtHB9NyvevmeQ50KZ0XNNjFyGUpoQrkMER66j3Lvu1EEBy96OQykKBsK2KxV/YULZj6u3SbQKbFZE9PyoNGKEhyBGXFJ/IMNfKGsn5MKKULfUS9D69z20kQAA1oPkV/A== 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=pQ0dW5uzFJcvU3xFd/xTGBXk8JVyo9lmsJInK30kY3w=; b=snnnCIYwTQWeDqpsVVx8XoyMu9+3O2f5IV+Gn0OoMU75vtEGOEG6K543S3b3I/RlrIKDjN3xiV3gbHTFKdPmKrgw4g49Qi8KpPXqUttLwkU8xWJ7NUqpirUMCWY7aMpAh3wKm1/oeP0N25HBtZgMgfVXJdc4ac6hqTOHmARvTb8= Received: from MN2PR11MB3582.namprd11.prod.outlook.com (2603:10b6:208:ec::28) by MN2PR11MB4709.namprd11.prod.outlook.com (2603:10b6:208:267::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Thu, 26 Mar 2020 08:57:24 +0000 Received: from MN2PR11MB3582.namprd11.prod.outlook.com ([fe80::f091:55f5:2e58:8b26]) by MN2PR11MB3582.namprd11.prod.outlook.com ([fe80::f091:55f5:2e58:8b26%6]) with mapi id 15.20.2835.021; Thu, 26 Mar 2020 08:57:24 +0000 From: "Yang, Qiming" To: "Jiang, JunyuX" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "stable@dpdk.org" Thread-Topic: [PATCH v2] net/ice: fix RSS advanced rule invalid issue Thread-Index: AQHWAz8E4Aq6Xs7Wnk2KnoTyk4gPaqhakbkw Date: Thu, 26 Mar 2020 08:57:24 +0000 Message-ID: References: <20200319074825.16035-1-junyux.jiang@intel.com> <20200326065725.21533-1-junyux.jiang@intel.com> In-Reply-To: <20200326065725.21533-1-junyux.jiang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=qiming.yang@intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d1132843-c069-4911-da36-08d7d163b419 x-ms-traffictypediagnostic: MN2PR11MB4709: 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:1284; x-forefront-prvs: 0354B4BED2 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(366004)(39850400004)(396003)(136003)(346002)(71200400001)(9686003)(2906002)(316002)(110136005)(450100002)(53546011)(86362001)(6506007)(186003)(4326008)(64756008)(52536014)(55016002)(26005)(8936002)(54906003)(66446008)(5660300002)(66476007)(33656002)(478600001)(81166006)(76116006)(7696005)(81156014)(66556008)(8676002)(66946007); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR11MB4709; H:MN2PR11MB3582.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NQsKwWWgoEIo4vvqMSYSKVjHnYRmoc9lZIfROg+dvd4botWHa76DAFQ+6yx55vtta5KU7HU5typbUj2ZlB/4ON9bL6JKPMcgWKKuwQv1pU/DRnVyl3cEj/mzAKw/D1aHvgiINHHcAavr8/OvrGd38IIV2h+hRxoQ/wppb4JOfziirVVQOyfqXi1/mh1oYvd8315SkO32nuvl/+BqPoMbef0dRz1YUE4evbuHbEKgig/E8DQc2JVVRWW51b5rsjCweMNc4S9I9Td2QpXfNJg42p8KK9eDgTc4nAXBLiHN8BImRUs/kxBumQMTtrb2t+4+4E1cc/+oF+oXqpiD/e0/wXbVuJ0tzFX4lBdqEDBFtPFgKNkzSBzh5I19+H05jLbZnaj0z9UhTui1WC1JdyXWti0m0+qljLBVHNb85SD9BqABWRLX/qT6MpKaXdbGci9w x-ms-exchange-antispam-messagedata: cImbDKTqyFEgX+xPGvxneHiAdRYdo2R9gYmTVuPT1yPBPf+B/5w4w0F0+e+dn4QgsFw+LT3RvLjTsWlDcfgSwMvUIEYH7m34jFxDMEN4XDCYP7WJQvSv1SA5HasYM+HFKYNKgMXnhAwDWyjg+YEdew== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d1132843-c069-4911-da36-08d7d163b419 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2020 08:57:24.7306 (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: kMo3DRhCv8n4kBxob6GdOsCm4eBseSMVVwXvorLYMdcfERpUYX1WthDysjkGGDgkH0Un+erQOjqa68K3A+YAJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4709 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix RSS advanced rule invalid issue 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, Junyu NACKed. I still keep my point of view, I think no need to enable a restore function= . Beside, 'ptr' =3D rss rule? I don't get your point, please don't define a v= arious with a no meaning name. Hi, Qi What do you think about move the 'ice_rss_init' into 'ice_dev_init' ? Qiming > -----Original Message----- > From: Jiang, JunyuX > Sent: Thursday, March 26, 2020 14:57 > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Yang, Qiming > ; Jiang, JunyuX ; > stable@dpdk.org > Subject: [PATCH v2] net/ice: fix RSS advanced rule invalid issue >=20 > This patch added a restore function for RSS advanced rule to fix the rule > invalid after running port stop and port start. >=20 > Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") > Cc: stable@dpdk.org >=20 > Signed-off-by: Junyu Jiang > --- > drivers/net/ice/ice_ethdev.c | 47 > ++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) >=20 > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c > index 85ef83e92..c2ee37c59 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -47,6 +47,11 @@ struct proto_xtr_ol_flag { > bool required; > }; >=20 > +struct ice_hash_flow_cfg { > + bool simple_xor; > + struct ice_rss_cfg rss_cfg; > +}; > + > static struct proto_xtr_ol_flag ice_proto_xtr_ol_flag_params[] =3D { > [PROTO_XTR_VLAN] =3D { > .param =3D { .name =3D "ice_dynflag_proto_xtr_vlan" }, @@ - > 2464,6 +2469,45 @@ ice_dev_configure(struct rte_eth_dev *dev) > return 0; > } >=20 > +static int > +ice_rss_restore(struct rte_eth_dev *dev) { > + struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data- > >dev_private); > + struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > + struct ice_vsi *vsi =3D pf->main_vsi; > + struct rte_flow *p_flow; > + struct ice_hash_flow_cfg *filter_ptr; > + struct ice_flow_engine *engine; > + uint32_t reg; > + int ret; > + > + TAILQ_FOREACH(p_flow, &pf->flow_list, node) { > + engine =3D p_flow->engine; > + if (engine->type =3D=3D ICE_FLOW_ENGINE_HASH) { > + filter_ptr =3D (struct ice_hash_flow_cfg *)p_flow->rule; > + /* Enable registers for simple_xor hash function. */ > + if (filter_ptr->simple_xor =3D=3D 1) { > + reg =3D ICE_READ_REG(hw, > + VSIQF_HASH_CTL(vsi->vsi_id)); > + reg =3D (reg & > (~VSIQF_HASH_CTL_HASH_SCHEME_M)) | > + (2 << > VSIQF_HASH_CTL_HASH_SCHEME_S); > + ICE_WRITE_REG(hw, > + VSIQF_HASH_CTL(vsi->vsi_id), reg); > + } else { > + ret =3D ice_add_rss_cfg(hw, vsi->idx, > + filter_ptr->rss_cfg.hashed_flds, > + filter_ptr->rss_cfg.packet_hdr, > + filter_ptr->rss_cfg.symm); > + if (ret) > + PMD_DRV_LOG(ERR, > + "%s restore rss fail %d", > + __func__, ret); > + } > + } > + } > + return 0; > +} > + > static int ice_init_rss(struct ice_pf *pf) { > struct ice_hw *hw =3D ICE_PF_TO_HW(pf); > @@ -2591,6 +2635,9 @@ static int ice_init_rss(struct ice_pf *pf) > PMD_DRV_LOG(ERR, "%s PPPoE/PPPoD_SessionID rss flow > fail %d", > __func__, ret); >=20 > + /* restore RSS configuration */ > + ice_rss_restore(dev); > + > return 0; > } >=20 > -- > 2.17.1