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 10415A0562; Thu, 2 Apr 2020 04:53:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D7A11BE97; Thu, 2 Apr 2020 04:53:19 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id EA6DE1BE95; Thu, 2 Apr 2020 04:53:16 +0200 (CEST) IronPort-SDR: MAhDUZFfeXUvAFEBpMclHgngcnLGgrdeN3t5yzRafHlevBgdvnuoC3tZUtqHojKGzpxsdVO3Wf MFJ5OyfupRlg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2020 19:53:15 -0700 IronPort-SDR: fJCQuimZX7t/VLMRHEYHp/DhgoKdTgi3i/rW/szvE8jQhzx9DED2iWfZ12gk9qccYWPqKuL+3u F++Ec/81Ytqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,334,1580803200"; d="scan'208";a="249673470" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 01 Apr 2020 19:53:15 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Apr 2020 19:53:14 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) 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; Wed, 1 Apr 2020 19:53:14 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 1 Apr 2020 19:53:14 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.52) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Apr 2020 19:53:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bi1K0mzeKl+/1Ee5LK2O4I+3NEWSdlCERMydct6LU3aDhdK7UdxhQwstJNAyQgSjIzroFm9p3G/3KF78Qc+rysUUDGBECrqIxJWtj1v0MNjCKl3u6dttB1F5+Wjeg+ERcNZFUJMKg3e4QJdFjqG5sPePYRdRkO15PDmPPTpV2B5/r707Rn4g+UlGoT39KqY3pnVc8HGlKpKT1kztFAa5/Jahcu5Dk7e/g6OWtglbSlDYAeQaN7fKU1VsJ6LY4qjf5X1kjvFacybId15/0YKtw8pbo2Y7I0s7IjxZupbuTn0oPEkSoUUB/1phMM8Oi9KKONq7EuVBfLXxZID9D5xySA== 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=YIlK7XZU7iNySvOf4OUfmrppRwHyJc0fO5+nxr2Y0+M=; b=IEGx/oI/Oj+KlND4qckSHdIBjEVhbWRrGSRnTjiDOkyQktWA2YOUmiJm0iCSZYBgo7PWATCkUUtm18qE8yJsPHqX0dlSIK5fwOVm1v78WZLBVK+NVkJDQgMObBEPIQCd5UlCz5ss4TTkLNFQLVY5b2E81FAWbYqbbCDB1k7MSs6oW7i4eFMsPxOJDITQl5sn7phjkSgci+4tvCbEM7zg3Bjc04wnxE4pV1MUL097rz2cmTiNOTZgrwRUY49vNNd3bb3051UhFw8BM6d8Sv33pbmRm8hbVCwG6KuJ+s2OzPsQNkGVxG8vZ/2IOTjSqn5qqVcMandChh1jsp0XeEIJ9g== 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=YIlK7XZU7iNySvOf4OUfmrppRwHyJc0fO5+nxr2Y0+M=; b=D2E2psMy+ziUxvMfieEVwbtDbHQOSo6GIeRdAaNjzHlovfh1jqHU0lKTVZXnCWTcs0Y/0AxrC+wwqKHa8jlOtJPBX9F5iw5cutX8H0cegFc3quA9TkGYKN9Ak57NkuE8es2U1HmE4UqPmvRA4hiKVYZHV4jjgKxYuKgFQDcpfPs= Received: from BYAPR11MB2664.namprd11.prod.outlook.com (2603:10b6:a02:c7::14) by BYAPR11MB3125.namprd11.prod.outlook.com (2603:10b6:a03:8e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20; Thu, 2 Apr 2020 02:53:10 +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.2856.019; Thu, 2 Apr 2020 02:53:10 +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 v4] net/ice: fix RSS advanced rule invalid issue Thread-Index: AQHWCALGNmojSu7cd0KzCAKF3ngKOKhlIJnQ Date: Thu, 2 Apr 2020 02:53:09 +0000 Message-ID: References: <20200319074825.16035-1-junyux.jiang@intel.com> <20200401082635.9982-1-junyux.jiang@intel.com> In-Reply-To: <20200401082635.9982-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTg1ZTEwNjgtYmY2Yy00NmQzLTk1MDUtNTdjN2RlOTFlYzQxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWXQ5c0tMZzMrcER4Q3lWVU1ycmxZOVFXbUhjNUlXd1F3K1huZjB5OXpDUkJzMkFteUdUZXJDXC9aUXNVWGxKb0oifQ== 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.200] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 372e6cee-0dca-4cc5-cd7d-08d7d6b0fa7c x-ms-traffictypediagnostic: BYAPR11MB3125: 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:8273; x-forefront-prvs: 0361212EA8 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)(366004)(376002)(346002)(136003)(396003)(39860400002)(76116006)(66556008)(66946007)(110136005)(64756008)(55016002)(66476007)(66446008)(54906003)(5660300002)(2906002)(52536014)(316002)(186003)(33656002)(8936002)(26005)(71200400001)(4326008)(450100002)(478600001)(81166006)(6506007)(7696005)(8676002)(53546011)(9686003)(81156014)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EGUsVQiNJ+pueJh+dLweGi84Hagj/4/2lJFSVRqzGETvdTfkSa9dMv8Do8g2pjgvckifIJdaN8X11/zboJ+lGdtjF6Y5rE07Fv2Vp85q20okGTktSS0ZhCMZW4V/VuTxcDwdZG9z6aSmuplQg/+iaOGFPoz7hneeKbDvhlUuCdq3Q1/QsiaGO4LEa3gwn7+zTd0ze4y934tCb7P+op8iIQlfyBhXEDxsLzymJhCyJvInHfelBt6xX32FOze5ysIpb2vR6udJJx8bYhtVPB6MdH97+0skXYZ1eVGpnmRWe5m4bLLKYaQIQCwDEPdT/eH1M0kyJZerf1djeQ1nH5yyvOKjk/G+V3i/7hMXQmQNmLc5YfpcW0TlfworLj3rpBoZAw1MifG2GZb9B2pIj8X3ultfrEVN3opSxEpPs6Z1ZoInzqYwRvbKW5CQzwgxvLaD x-ms-exchange-antispam-messagedata: nvAPyRgecabG7cuNpkhpI9z6MIRha8KF2rwFUXe/JWTldlX4+gauMAu8DuqZOJ0D5uPWZu06suassX0WyzS7StxMcccc53yvEVM+BcNumjL+G36EQ5pFyNMqfueulWgWqdF2jAfWXeRxqENn/n9cBg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 372e6cee-0dca-4cc5-cd7d-08d7d6b0fa7c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2020 02:53:09.9316 (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: 9UvmVBhEVsFrWs0cPBB+/jjy9H8csR0IrS6Tln6IAbEwNr9/LU0Ue1NGlR7/CG2OECGORHbgxgqkbggWBK2Qhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3125 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4] 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 v4] net/ice: fix RSS advanced rule invalid issue patch test -by = Zhiwei.he -----Original Message----- From: dev On Behalf Of Junyu Jiang Sent: Wednesday, April 1, 2020 4:27 PM To: dev@dpdk.org Cc: Zhang, Qi Z ; Yang, Qiming ; Jiang, JunyuX ; stable@dpdk.org Subject: [dpdk-dev] [PATCH v4] 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 | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c in= dex 85ef83e92..4cfdbd838 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,30 @@ 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; +} + static void __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect, int base_queue, int nb_queue) @@ -2797,12 +2803,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