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 805A4A0540; Thu, 16 Jul 2020 10:27:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 704261BEE4; Thu, 16 Jul 2020 10:25:40 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A35871BED9 for ; Thu, 16 Jul 2020 10:25:38 +0200 (CEST) IronPort-SDR: yzhmatyuFz3tNDqKEGvyswBFF3JV3FuSU/XUzk53fHG3AUr7y5FlZoJR9F7CXlkx0BKmguTb2c DKkJ7BvhSWcw== X-IronPort-AV: E=McAfee;i="6000,8403,9683"; a="148490645" X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="148490645" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 01:25:37 -0700 IronPort-SDR: ABQgCVZjUCXlutQ1ztPgvSFmS0sQnl32XPYZ+fYUkS4tY4xVOn7djuzRH8lx09ud7JS0NU7Die 3+UoPmmdXj2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="326451503" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 16 Jul 2020 01:25:37 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:25:37 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:25:36 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:25:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dDMKblKcrwJagoge7VmeYBHtBmjRpNZu9BqSmJp4S891NVkWn3IgDVYdoALwVJEKniAF8aIaZH0z5Ym32ULQZFJUje1tDKE2z/ulEpcJ7j5XTFxR1AFb7fcWG0avqOZzuXmdGt4CS8P+6roZc+17i9T3bBqmCG8Fsu5EImWxF4sZl8z3ry1GILiWQgTJBh0hEPPpsuqCWBP7NavBeb3PmkfhDFDxfHuqAvZ3DgjsRyJ/0fVsrviapv8lry5/6dNEyuNf7Smc8cj8EtWunL1XgqXpEzYNxUaF4a/oZz3XvwhaZJ9pKo5mTbqqq52KzMt9UyXWvIoz4SGTi9iKizKPBQ== 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=mgQh2h9XQeuIJqUu5YPxAS8bRhtXZtXylShz58MvlGY=; b=F5C96sJLTdbbtXe469Qty/NmUx+R5Uqy+Uqtt9SO7+P2yjD4WYD/RSwcHLcVKYQrmjCy+nE+hvXXc0dL4xLyDW3M7hGH6CjYLb72gjmFGempeCDkszfjuUzwBiSHHmo/ac3BmdLw1MdTzqGDbbf/khgczAEExA8RmLpyCPWiGoqrNBiG/tbUs6p64JLJmBb9Jtgf+9YvINrYGNaKMzJAeCQHOSRTYmYgLoaTBiz7sdHRN0BAN3w7fQNJKaIJ1knm3sETIk9ZIG1ZwjC3em6O1raWD7YhE4KmBtllnIE5qpqUYb9MlTRyOA9v0LYYnEfmfYdVSv1G1Gfa7T2EeKQgFQ== 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=mgQh2h9XQeuIJqUu5YPxAS8bRhtXZtXylShz58MvlGY=; b=sfhncwdRilSPPKoVhrnq/ZbWZeLeYmDfEQQ9XJbghf5QcazrI4breSXDtamf0X2JCGmyqaAM7qg8ja7a1X26jXVAjEzojU1s1vcr/258TJbzRWaHLGUcgTnX8tnqbUc2sjxnwMq/KFUrknwsQS5OF5fHtqTN4h9QL4H3DMbK/VM= Received: from MN2PR11MB3807.namprd11.prod.outlook.com (2603:10b6:208:f0::24) by MN2PR11MB3581.namprd11.prod.outlook.com (2603:10b6:208:f0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Thu, 16 Jul 2020 08:25:34 +0000 Received: from MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::401c:b4b:31c4:98b8]) by MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::401c:b4b:31c4:98b8%3]) with mapi id 15.20.3174.026; Thu, 16 Jul 2020 08:25:34 +0000 From: "Xing, Beilei" To: "Sun, Chenmin" , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH V2] net/i40e: fix fdir cannot receive rx writeback issue Thread-Index: AQHWWrFNe0vbuTD12kqI84jQirjYeKkJ1QJQ Date: Thu, 16 Jul 2020 08:25:34 +0000 Message-ID: References: <20200715224850.31764-1-chenmin.sun@intel.com> <20200715230358.32562-1-chenmin.sun@intel.com> In-Reply-To: <20200715230358.32562-1-chenmin.sun@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: 3a79fc0b-9e0d-4dc1-20b8-08d82961cfd5 x-ms-traffictypediagnostic: MN2PR11MB3581: 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:83; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vGkg88c4ftfTgwywDbn2VtiQXV5xLCUP/X6iqSRAQK0LbuGwfV+bkc9xWvgcw1h3laXmWZCGBet+g/DlkEfnJFvO7I4dHQ3hUIPmkE8tOsB83K3wYOQf2lTKdVLbPfhpJauRg6tXKY5A/947nBJtkf68hV15p22hFbuKc447KYs6p0EZMqGm5z2VhOwUC8okHcB1bpwUiurEMZfd3QkqD4sRDTtQF7GviTI/lt3olVPoDrpGQMRvZLg76JzzyQJstdb9rnvG+02IbVkOdVHQCCxP8ak8LlIt9FiTs9S9Q+3TKk5z1evbjFw9K5tVKmC2 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3807.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(376002)(346002)(366004)(396003)(26005)(71200400001)(8936002)(6636002)(4326008)(66476007)(8676002)(76116006)(66446008)(52536014)(33656002)(66556008)(64756008)(5660300002)(316002)(66946007)(478600001)(7696005)(83380400001)(186003)(53546011)(110136005)(86362001)(2906002)(55016002)(9686003)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: hhCSv/J2ep3IpH72pHFGge4hvMDwTbEzAXmAYn3/PXy4nxnWodh/HxeTdudzJaypEQaFY71Mck0vtexrm/3SaH+73gx2+xXm8fneIDCRTrulziu7Bwutxh7oIu8Ar958Vkv4hkuwhi5R73/gAaRYLZ/zXRAi2S6zDfPJcbX2cJITHv02bJUGZ9bOE9j83C5lXp9ReOeUSHz9pjn2G4cxeY9R2DxVbUr5olTCzHgUpxfI76CeAoDrozkOqW16iL3kMtAspzJ0CM+V9GZLj4CuX+IYSIy8FACAVyazClQqSntJO76XbD9HTEJ4O7BFPk7v2r3ROoqE9qcvxs0k7cPpe4EVhRn1D3GkC6BOp5ssPPfCu2Xz3sqMqTAycrYYJ1XMAypvRWgndN5Llpdoldkpuvdm87deuCXpeh5iZFjW2aGSPOHFI3/IPosE3oGfoVwo3FQ06giB8CwN+UOadNXlZpyr8whhaIDTVBCkpuyqGxL830W1aNaqJV6I8q5P9fIJ 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: MN2PR11MB3807.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a79fc0b-9e0d-4dc1-20b8-08d82961cfd5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2020 08:25:34.5934 (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: nbc+eEKKVAXJiN6Q0XdmRkauRpm3z3vIsvX7UIQ+pZg+xg+ryw2DC2eGkwYMUm3Ppwe6bONYgbm8X44m1+joqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3581 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH V2] net/i40e: fix fdir cannot receive rx writeback 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" > -----Original Message----- > From: Sun, Chenmin > Sent: Thursday, July 16, 2020 7:04 AM > To: Zhang, Qi Z ; Xing, Beilei > Cc: dev@dpdk.org; Sun, Chenmin > Subject: [PATCH V2] net/i40e: fix fdir cannot receive rx writeback issue >=20 > From: Chenmin Sun >=20 > This patch fixes the fdir cannot receive rx writeback packet issue, by se= tting the > fdir_vsi->nb_used_qps to 1. Better to describe what's the root cause but not how to set the detailed va= lue. The root cause should be FDIR interrupt is not enabled successfully. > Besides this, to make sure fdir programming works fine when the port is > stopped, move the fdir interrupt configure from start/stop to setup/teard= own. >=20 > Fixes: cfd662d22e ("net/i40e: fix interrupt throttling setting in PF") >=20 > Signed-off-by: Chenmin Sun > --- >=20 > v2: > * Fix commit message typo > --- > drivers/net/i40e/i40e_ethdev.c | 15 ++------------- > drivers/net/i40e/i40e_ethdev.h | 2 ++ > drivers/net/i40e/i40e_fdir.c | 11 +++++++++++ > 3 files changed, 15 insertions(+), 13 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 393b5320f..8933a39f2 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2068,7 +2068,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, > uint16_t itr_idx) > } > } >=20 > -static void > +void > i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi) { > struct rte_eth_dev *dev =3D vsi->adapter->eth_dev; @@ -2095,7 +2095,7 > @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi) > I40E_WRITE_FLUSH(hw); > } >=20 > -static void > +void > i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi) { > struct rte_eth_dev *dev =3D vsi->adapter->eth_dev; @@ -2317,13 > +2317,6 @@ i40e_dev_start(struct rte_eth_dev *dev) > i40e_vsi_enable_queues_intr(pf->vmdq[i].vsi); > } >=20 > - /* enable FDIR MSIX interrupt */ > - if (pf->fdir.fdir_vsi) { > - i40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi, > - I40E_ITR_INDEX_NONE); > - i40e_vsi_enable_queues_intr(pf->fdir.fdir_vsi); > - } > - > /* Enable all queues which have been configured */ > for (nb_rxq =3D 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) { > ret =3D i40e_dev_rx_queue_start(dev, nb_rxq); @@ -2459,10 > +2452,6 @@ i40e_dev_stop(struct rte_eth_dev *dev) > i40e_vsi_queues_unbind_intr(pf->vmdq[i].vsi); > } >=20 > - if (pf->fdir.fdir_vsi) { > - i40e_vsi_queues_unbind_intr(pf->fdir.fdir_vsi); > - i40e_vsi_disable_queues_intr(pf->fdir.fdir_vsi); > - } > /* Clear all queues and release memory */ > i40e_dev_clear_queues(dev); >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethde= v.h > index 31ca05de9..886c98b15 100644 > --- a/drivers/net/i40e/i40e_ethdev.h > +++ b/drivers/net/i40e/i40e_ethdev.h > @@ -1268,6 +1268,7 @@ void i40e_pf_enable_irq0(struct i40e_hw *hw); int > i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete); voi= d > i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx); void > i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi); > +void i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi); > int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi, > struct i40e_vsi_vlan_pvid_info *info); int > i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on); @@ -1277,6 > +1278,7 @@ uint64_t i40e_parse_hena(const struct i40e_adapter *adapter, > uint64_t flags); enum i40e_status_code i40e_fdir_setup_tx_resources(stru= ct > i40e_pf *pf); enum i40e_status_code i40e_fdir_setup_rx_resources(struct > i40e_pf *pf); int i40e_fdir_setup(struct i40e_pf *pf); > +void i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi); > const struct rte_memzone *i40e_memzone_reserve(const char *name, > uint32_t len, > int socket_id); > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c = index > 71eb31fb8..60eeccc1a 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -228,6 +228,11 @@ i40e_fdir_setup(struct i40e_pf *pf) > goto fail_mem; > } >=20 > + /* enable FDIR MSIX interrupt */ > + vsi->nb_used_qps =3D 1; > + i40e_vsi_queues_bind_intr(vsi, I40E_ITR_INDEX_NONE); > + i40e_vsi_enable_queues_intr(vsi); > + > /* reserve memory for the fdir programming packet */ > snprintf(z_name, sizeof(z_name), "%s_%s_%d", > eth_dev->device->driver->name, > @@ -274,12 +279,18 @@ i40e_fdir_teardown(struct i40e_pf *pf) > vsi =3D pf->fdir.fdir_vsi; > if (!vsi) > return; > + > + /* disable FDIR MSIX interrupt */ > + i40e_vsi_queues_unbind_intr(vsi); > + i40e_vsi_disable_queues_intr(vsi); > + > int err =3D i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); > if (err) > PMD_DRV_LOG(DEBUG, "Failed to do FDIR TX switch off"); > err =3D i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); > if (err) > PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off"); > + > i40e_dev_rx_queue_release(pf->fdir.rxq); > rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id); > pf->fdir.rxq =3D NULL; > -- > 2.17.1