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 825D8A0577; Tue, 7 Apr 2020 04:18:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 90DB71BEE0; Tue, 7 Apr 2020 04:18:43 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 50A412BE2; Tue, 7 Apr 2020 04:18:41 +0200 (CEST) IronPort-SDR: 7R38KRM74qmQ6ADyRA+0TkyDPkxDCweO+1IeyT9a+/XKiUA7l0Ceci9C8Yt82BN9JINZsGudQt OF2bzZ0JUNkw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 19:18:39 -0700 IronPort-SDR: S/LuQjxoBT2eZhcQvVa1fgPQKUO1wSjoD7FQWjBHOW7+edPB1GFF8uoX1P7kMaXEscQHrwLzHD WHq55S/p8N+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,353,1580803200"; d="scan'208";a="330045620" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga001.jf.intel.com with ESMTP; 06 Apr 2020 19:18:39 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 19:18:39 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 6 Apr 2020 19:18:38 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 6 Apr 2020 19:18:38 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 19:18:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N7sVqfrtY4enF3dVAM/Slv+pO4809pa08Coxk4IvoQ/SA6zSG3mjECl4o/BDdOVf9CNVLm0A9CVoskoPqOgYiLUd5r0Hs687kcAMgbBtYYhM2qimY4u/7G+LfWS23YT3PxKtBIDzgZLqVRlh1PW3OtX6TXHViQJM8C/KjHdXKHQc4eCSvZpvQP4TbBVk69sds6gVO8vkGwe8glzYJYqUeGg3pMjWPW5htJNzrBrQ8L/fpNklR9TpU/VFiPm0DsZHcssryUJHk1qu/jvX5dDqXbOF5Rag7gaHHN0vsFhh7uHoeJGk0C6FFJl+gpUoHU/2W83ikymJbi23VuOEGr3oyQ== 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=BSN5eBe/V3fakYLg+l/2umSyT7uawxYQ8yd5PE8PisQ=; b=Br/EcWUVpQfCul6cjPZJVsA2OoFYG0f3U4UKPhBpTMKCvx8Y4GALTlVLERneGv5aMePue9E2VftXgzFKrko/wNI3daakihEBJ9aC7SkNOIrFyX0UBQcY6r/VSi9XMe+JfWO6dyznouB3G7RDQj9WPfh5M2WSHgz8iD3VhjO2TzcPakpPY/CF8ffy8yQmFlfHvfNvHyUCLB7S5Yl8N6Z/xuA+Y+XLdsoRWIL6pNtBssfcG2HMtd6Br2Vyfu8TZ6DL7vqP1ZL/1gSErjTW3VL5fgXA+ovnkRwuwhtgAQvRNOcTGVBFCl7jf959PcZororBjRZGJ+9kh6R+Vx8Ntt4cmw== 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=BSN5eBe/V3fakYLg+l/2umSyT7uawxYQ8yd5PE8PisQ=; b=MeCwAFid0XTCc6MYYoklCr39ZkZYFXQRt8oo33YToeFOXaaEkYTIG1BaQ8W4V7pl4+AsZ9i77FpnelqlcE0HGgA4s+goRpftJ4QOhwZOS1aayc8eEdis1SyXcV8FzHYq77yRjToY+oIjnHxE1nXUZC9c0Z0hQ1xPzPe4CgWeIJ4= Received: from BYAPR11MB2664.namprd11.prod.outlook.com (2603:10b6:a02:c7::14) by BYAPR11MB3064.namprd11.prod.outlook.com (2603:10b6:a03:8c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Tue, 7 Apr 2020 02:18:28 +0000 Received: from BYAPR11MB2664.namprd11.prod.outlook.com ([fe80::112f:d1b5:31b4:1abc]) by BYAPR11MB2664.namprd11.prod.outlook.com ([fe80::112f:d1b5:31b4:1abc%5]) with mapi id 15.20.2878.018; Tue, 7 Apr 2020 02:18:28 +0000 From: "He, Zhiwei" To: "Jiang, JunyuX" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Yang, Qiming" , "Jiang, JunyuX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5] net/ice: fix RSS advanced rule invalid issue Thread-Index: AQHWDIFhMwahrgG8UE+wYeOZeluiKqhs7Gbg Date: Tue, 7 Apr 2020 02:18:28 +0000 Message-ID: References: <20200319074825.16035-1-junyux.jiang@intel.com> <20200407014817.25163-1-junyux.jiang@intel.com> In-Reply-To: <20200407014817.25163-1-junyux.jiang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjY5NzY4ZGMtNmU3OS00Y2NkLTk5NjMtMjNiNjE5NDM3NmU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib1QwRXB1TXhPbU1TNTJHcXVPQ2dLZXRyOEI3VHdpbzFhcFN0OERLMG0xSDBZdWlseDFQMFJMcDYrbTVLSmZpTCJ9 dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiwei.he@intel.com; x-originating-ip: [192.55.52.214] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5ea8c07b-82df-4d3e-e874-08d7da99f5a5 x-ms-traffictypediagnostic: BYAPR11MB3064: 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:3631; x-forefront-prvs: 036614DD9C x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2664.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(376002)(396003)(136003)(39850400004)(366004)(346002)(66446008)(186003)(33656002)(4326008)(110136005)(2906002)(26005)(53546011)(54906003)(7696005)(6506007)(316002)(86362001)(71200400001)(55016002)(8676002)(5660300002)(9686003)(81166006)(81156014)(76116006)(8936002)(450100002)(66946007)(478600001)(52536014)(66476007)(64756008)(66556008); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KIYebIAsnraZECf5qzyXsr5Bkg+2ZVUPUby5/DNXZYKHbntxINBZ9GVacablpCah7rsvPOLjlhDEf8FRNTScKyZIPtRAXh+by3QwrOJUHEC8wEIkT7NjJTKLwo0uM2z1keBALBQL75x2BbXwncJ/fx+qkTBVE4ojdmLZd8EnvwznP2miTPz+TKuXxoeIYSQZgzSxbge0cPV+8KsQANcHwvO8wFyNx91dLB4OiaURFsEM4+hFPOLWgxcq2wnczOALwu3qZTTfqsiINwTqT6wpXUaZtSJCqiuroLuW+GjlndEa1tEGWdFmA/RbBOYP/978eqlXZISYUzP1S1piOv+3ydrNJXMowC6R42BQXzi5HuQoLnZAOpRxgFWtGL7nHWBrnUVtnaekpWAHPx8ML0BuQEJgqryo8x8h4nEYhlC1upOVtcU/8ccr0ArW6DLAXXvb x-ms-exchange-antispam-messagedata: kEPLymkpfnPQMvDn/EEGlmYDv3xkTjkPk2AmOiXn91Ez+vSa26WBC0t9eNYKMnYcobN92jw3qFEOzDfFVaZQeDNeSVbEpfp6rNq8vRMr4VrjTSajJl28/MxDP2++0M+JSiKGmUhqmK/Xerp9WEFyLg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5ea8c07b-82df-4d3e-e874-08d7da99f5a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2020 02:18:28.0927 (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: Bqm7s3irFjnhqD3leCZzIW6Grg5mVWFYYmUC6DpOD5j3C1erbrJQFZuATbu/pb8wUz2IRZRO56v9G6e15RdfMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3064 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5] 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" The patch V5 has test-by Zhiwei -----Original Message----- From: dev On Behalf Of Junyu Jiang Sent: Tuesday, April 7, 2020 9:48 AM To: dev@dpdk.org Cc: Zhang, Qi Z ; Yang, Qiming ; Jiang, JunyuX ; stable@dpdk.org Subject: [dpdk-dev] [PATCH v5] net/ice: fix RSS advanced rule invalid issue This patch moved the RSS initialization from dev start to dev configure to = fix RSS advanced rule invalid after running port stop and port start. Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") Cc: stable@dpdk.org Signed-off-by: Junyu Jiang --- drivers/net/ice/ice_ethdev.c | 50 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c in= dex 85ef83e92..90a91c9c1 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2446,24 +2446,6 @@ ice_dev_uninit(struct rte_eth_dev *dev) return 0; } =20 -static int -ice_dev_configure(struct rte_eth_dev *dev) -{ - struct ice_adapter *ad =3D - ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); - - /* Initialize to TRUE. If any of Rx queues doesn't meet the - * bulk allocation or vector Rx preconditions we will reset it. - */ - ad->rx_bulk_alloc_allowed =3D true; - ad->tx_simple_allowed =3D true; - - if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) - dev->data->dev_conf.rxmode.offloads |=3D DEV_RX_OFFLOAD_RSS_HASH; - - return 0; -} - static int ice_init_rss(struct ice_pf *pf) { struct ice_hw *hw =3D ICE_PF_TO_HW(pf); @@ -2594,6 +2576,32 @@ static int ice_init_rss(struct ice_pf *pf) return 0; } =20 +static int +ice_dev_configure(struct rte_eth_dev *dev) { + struct ice_adapter *ad =3D + ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); + int ret; + + /* Initialize to TRUE. If any of Rx queues doesn't meet the + * bulk allocation or vector Rx preconditions we will reset it. + */ + ad->rx_bulk_alloc_allowed =3D true; + ad->tx_simple_allowed =3D true; + + if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) + dev->data->dev_conf.rxmode.offloads |=3D DEV_RX_OFFLOAD_RSS_HASH; + + ret =3D ice_init_rss(pf); + if (ret) { + PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); + return ret; + } + + return 0; +} + static void __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect, int base_queue, int nb_queue) @@ -2797,12 +2805,6 @@ ice_dev_start(struct rte_eth_dev *dev) } } =20 - ret =3D ice_init_rss(pf); - if (ret) { - PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); - goto rx_err; - } - ice_set_rx_function(dev); ice_set_tx_function(dev); =20 -- 2.17.1