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 3033EA0523; Wed, 1 Jul 2020 04:10:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 834542C2B; Wed, 1 Jul 2020 04:10:21 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BB17A2B9C; Wed, 1 Jul 2020 04:10:18 +0200 (CEST) IronPort-SDR: Z/J4NftBAM12XM9YIYVLPNu+/ZQkHlshV7xYozWqYIKRvneSZzGFc11fq4IeYxHttjiOdNitDl GsqfXZXYGptw== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="145518860" X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="145518860" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 19:10:17 -0700 IronPort-SDR: v+OA91ft/pyS0WAdGc0bjbRgtk+D+FGNVq7Zr2gZn594h31d0oH0FDP/zj4p5Rsejiyhrj/4+r FO/sHharbK/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="481134205" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 30 Jun 2020 19:10:17 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 19:10:16 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 19:10:16 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.108) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 19:10:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lspA3nTR5cRB+0vn8NP5g5DEVeZt/nLwvKNxjtI/EONAySvgTa9OhecptQ3yWO2TESRUGab3QvKCq462LKPIvfG5dz1ZBfDhlFtz7mbST6BO5beVcEiRamwN3zka3OvnIT0T2hzPPadxZwxFuuW/jRM+0rGQbfYRu5732txfE+laSx3b2d1w0YSN2tkom9mtrlxWOvDKGURGvYUQgzhd3ad7wWoyIGwasxLjWCV5ps39peze6Rl3szrc1g3boqOIzK6J7IlFF1nGBg/1U6PiTd2mItf2bXizP1wQmGnQ7rX2fYVNgqmfbezKr8jg7bMbFMDl3rXHir60MdkhioNXvw== 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=b4GsXQVi6BCfrlolUo8sQbXym03wJzzwwuRwlrLIVU8=; b=WD0MU1FXoz2hsFBKyrxg3bxumP2ziPKg5WrusR0tberAMysIrkfmzQwfcPmLYw7OrHhVj8eL2KfvsGuW6DrugK3Tj5m/Wa+Cuo0hIYJmeeeaav6ckFGmnyfTYHGAzc3daH/gPwp0rl2JRbxjktteOREMv8sJZ2VOmJ2tRJ6hxfnBYUINt0hUtxy2YlTN+R1Ba3JHIxqWdeTMvyn8DsUv/Q9fC4lK14Tzem16Mzb9f/EfC06BnuynIvC2Tx1DcwatyGMEsHvwLtm4ZUP/2ch6p/QPpsri+wYOfb5IQLuqCzqbb8upHlUvani/a2rQkI6fB+CKlacezgq7edXSX2EcBQ== 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=b4GsXQVi6BCfrlolUo8sQbXym03wJzzwwuRwlrLIVU8=; b=RDKS9FYNnf/CW6AdlaM+sE1tBaGvBKZqmEvOjV9nFEH1FeXcco4GWXJkm4ty27XCVYoIcC2OGwyXaYQ9y9Q7ak1vQd6fEnuF9VH1fV5KXNZQ+9HhUb+HAtrxtDiOrZbpTtzvYHmwpy5HcBToD0/+dG6PbxpidGdpoGDNrvbGsWA= Received: from BN6PR11MB0017.namprd11.prod.outlook.com (2603:10b6:405:6c::34) by BN6PR11MB1393.namprd11.prod.outlook.com (2603:10b6:404:3c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.25; Wed, 1 Jul 2020 02:10:14 +0000 Received: from BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120]) by BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120%6]) with mapi id 15.20.3131.028; Wed, 1 Jul 2020 02:10:14 +0000 From: "Yang, Qiming" To: "Jiang, JunyuX" , "dev@dpdk.org" CC: "Wu, Jingjing" , "Xing, Beilei" , "stable@dpdk.org" Thread-Topic: [PATCH] net/iavf: fix RSS RETA settings invalid Thread-Index: AQHWRhB04HN4RZuBG0qqgAjLfW/Dc6jyDTpQ Date: Wed, 1 Jul 2020 02:10:14 +0000 Message-ID: References: <20200619074402.5663-1-junyux.jiang@intel.com> In-Reply-To: <20200619074402.5663-1-junyux.jiang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.38] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fd7e8cb9-51bc-4b00-3d1f-08d81d63e488 x-ms-traffictypediagnostic: BN6PR11MB1393: 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:6430; x-forefront-prvs: 04519BA941 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8S7MpzyOA4EdbHzklBFrbNLeHMTZHbMm6+evafZ1WrDaNi1Kssw3f+a8Z4nj8434t7Qnuda4yO/Qle14oBzY4Ry701uTQE+C314WEdCWwF1VgjQn8MA87EO/RLd121FXdy7x/Ala9pd2mOi9capWEEeXvLMxLBgSL8ITeW7LGKgAsek1iEly1MqTLpN6dfVNBxpLSd6px/hlmPcKc8EmVE34B4kVgUie0cEZCGrUCvqjib9c+FVXZYacfAurdlD8OOiIEzzknDveOQtG69UDorGy4vb9EmsDuqKReA9uo3XjqXGc88cUQFg4r4dRifcD x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0017.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39860400002)(8936002)(83380400001)(8676002)(66446008)(4326008)(450100002)(478600001)(66556008)(64756008)(54906003)(110136005)(316002)(66476007)(76116006)(66946007)(2906002)(9686003)(86362001)(53546011)(55016002)(33656002)(52536014)(7696005)(186003)(6506007)(26005)(71200400001)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: wmoPFFTF9LexgnpbhyGu40U2ryq1LIcugKYli+37mX5xzzakqfs59pCNJEs9YPzZOXuOUFLqs3la0KA1sCd8UKOHU9RKD3fQneNKgQGn2rVUrU4EyMnxBQe4NEM+s6kHZIHZ0AZMVSK9aNEnfu5IAzFAVXx1enhaf1dBnXbeTDCs8T29083ruWmHoYYIWVhnvX4HZT/PgwtGAlfIJO6tVR7aUjil6yn1AslJNZ0V6wYXUS6E/6L/kxtEu0bkqfVcoM7AoMgseVdW4d54U/yOJXm1okSZ9OqFkrziMK4Cs50TRHJebx3dKKE4dnrS/CNKIEUs08gGEnKEiUPiJf/6RvZkGtWnVre88q927D5EVAPwKjqM9a7rgU/dADUWd0pmfF7jdb9VW8uvDelkPemZx/pX+r1eAEWKrrAs4fl9hFYqwcZ9ImB9zScygLacNlBeKSTmlhSyPlwUg9cTBD3w3xxp/7PJU6gx0I2JaMWfXsHYt3VqEeJAWo73qZDQEOwl Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB0017.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd7e8cb9-51bc-4b00-3d1f-08d81d63e488 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2020 02:10:14.3897 (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: zy646QjrMJ5rhmG3mO4f2vlGyJ3+xU4m06aeum/8ZLd55SYCApVkCuTNsAa1/xHqfaUPlJ2+ggI4Ub3lgPd2+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1393 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix RSS RETA settings invalid 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: Jiang, JunyuX > Sent: Friday, June 19, 2020 15:44 > To: dev@dpdk.org > Cc: Wu, Jingjing ; Xing, Beilei > ; Yang, Qiming ; Jiang, > JunyuX ; stable@dpdk.org > Subject: [PATCH] net/iavf: fix RSS RETA settings invalid >=20 > This patch moved the RSS initialization from dev start to dev configure, = to fix > the issue that RSS redirection table can not be kept after restarting por= t. >=20 > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") > Cc: stable@dpdk.org >=20 > Signed-off-by: Junyu Jiang > --- > drivers/net/iavf/iavf_ethdev.c | 71 +++++++++++++++++----------------- > 1 file changed, 35 insertions(+), 36 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde= v.c > index 2b1066b0a..5e79a2d03 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -136,34 +136,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops =3D > { > .filter_ctrl =3D iavf_dev_filter_ctrl, > }; >=20 > -static int > -iavf_dev_configure(struct rte_eth_dev *dev) -{ > - struct iavf_adapter *ad =3D > - IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > - struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(ad); > - struct rte_eth_conf *dev_conf =3D &dev->data->dev_conf; > - > - ad->rx_bulk_alloc_allowed =3D true; > - /* Initialize to TRUE. If any of Rx queues doesn't meet the > - * vector Rx/Tx preconditions, it will be reset. > - */ > - ad->rx_vec_allowed =3D true; > - ad->tx_vec_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; > - > - /* Vlan stripping setting */ > - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) { > - if (dev_conf->rxmode.offloads & > DEV_RX_OFFLOAD_VLAN_STRIP) > - iavf_enable_vlan_strip(ad); > - else > - iavf_disable_vlan_strip(ad); > - } > - return 0; > -} > - > static int > iavf_init_rss(struct iavf_adapter *adapter) { @@ -220,6 +192,41 @@ > iavf_init_rss(struct iavf_adapter *adapter) > return 0; > } >=20 > +static int > +iavf_dev_configure(struct rte_eth_dev *dev) { > + struct iavf_adapter *ad =3D > + IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > + struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(ad); > + struct rte_eth_conf *dev_conf =3D &dev->data->dev_conf; > + > + ad->rx_bulk_alloc_allowed =3D true; > + /* Initialize to TRUE. If any of Rx queues doesn't meet the > + * vector Rx/Tx preconditions, it will be reset. > + */ > + ad->rx_vec_allowed =3D true; > + ad->tx_vec_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; > + > + /* Vlan stripping setting */ > + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) { > + if (dev_conf->rxmode.offloads & > DEV_RX_OFFLOAD_VLAN_STRIP) > + iavf_enable_vlan_strip(ad); > + else > + iavf_disable_vlan_strip(ad); > + } > + > + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { > + if (iavf_init_rss(ad) !=3D 0) { > + PMD_DRV_LOG(ERR, "configure rss failed"); > + return -1; > + } > + } > + return 0; > +} > + > static int > iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq) { @@ = - > 440,13 +447,6 @@ iavf_dev_start(struct rte_eth_dev *dev) > return -1; > } >=20 > - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { > - if (iavf_init_rss(adapter) !=3D 0) { > - PMD_DRV_LOG(ERR, "configure rss failed"); > - goto err_rss; > - } > - } > - > if (iavf_configure_queues(adapter) !=3D 0) { > PMD_DRV_LOG(ERR, "configure queues failed"); > goto err_queue; > @@ -475,7 +475,6 @@ iavf_dev_start(struct rte_eth_dev *dev) > err_mac: > iavf_add_del_all_mac_addr(adapter, false); > err_queue: > -err_rss: > return -1; > } >=20 > -- > 2.17.1 Acked-by: Qiming Yang