From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2AF8C7E18 for ; Wed, 19 Nov 2014 10:52:50 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 18 Nov 2014 23:54:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="418528591" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by FMSMGA003.fm.intel.com with ESMTP; 18 Nov 2014 23:44:47 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 19 Nov 2014 15:53:30 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.182]) with mapi id 14.03.0195.001; Wed, 19 Nov 2014 15:53:29 +0800 From: "Cao, Min" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [PATCH v5 02/21] i40e: tear down flow director Thread-Index: AQHP9BLuJbZnkCbgOk25k6d8L9fjsZxnsxPg Date: Wed, 19 Nov 2014 07:53:29 +0000 Message-ID: References: <1413939687-11177-1-git-send-email-jingjing.wu@intel.com> <1414654006-7472-1-git-send-email-jingjing.wu@intel.com> <1414654006-7472-3-git-send-email-jingjing.wu@intel.com> In-Reply-To: <1414654006-7472-3-git-send-email-jingjing.wu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 02/21] i40e: tear down flow director X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 09:52:50 -0000 Tested-by: Min Cao Patch name: [PATCH v5 00/21] Support flow director programming on Fortvil= le Test Flag: Tested-by Tester name: min.cao@intel.com Result summary: total 3 cases, 3 passed, 0 failed Test Case 1: =09 Name: Fortville flow director with no flexible playload(IPv4/IPv6) Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 gcc (GCC) 4.8.2 CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz NIC: Fortville eagle/spirit=20 Test result: PASSED Test Case 2: =09 Name: Fortville flow director with flexible playload(IPv4/IPv6) Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 gcc (GCC) 4.8.2 CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz NIC: Fortville eagle/spirit=20 Test result: PASSED Test Case 3: =09 Name: Fortville flow director flush Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 gcc (GCC) 4.8.2 CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz NIC: Fortville eagle/spirit=20 Test result: PASSED Test Case 4: =09 Name: Fortville flow director performance Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 gcc (GCC) 4.8.2 CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz NIC: Fortville eagle/spirit=20 Test result: PASSED -----Original Message----- From: Wu, Jingjing=20 Sent: Thursday, October 30, 2014 3:26 PM To: dev@dpdk.org Cc: Wu, Jingjing; Cao, Min Subject: [PATCH v5 02/21] i40e: tear down flow director To support flow director tear down, this patch includes - queue 0 pair release - release vsi Signed-off-by: Jingjing Wu --- lib/librte_pmd_i40e/i40e_ethdev.c | 4 +++- lib/librte_pmd_i40e/i40e_ethdev.h | 1 + lib/librte_pmd_i40e/i40e_fdir.c | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_e= thdev.c index cea7725..812c91d 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -514,7 +514,8 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_d= rv, return 0; =20 err_setup_pf_switch: - rte_free(pf->main_vsi); + i40e_fdir_teardown(pf); + i40e_vsi_release(pf->main_vsi); err_get_mac_addr: err_configure_lan_hmc: (void)i40e_shutdown_lan_hmc(hw); @@ -849,6 +850,7 @@ i40e_dev_close(struct rte_eth_dev *dev) i40e_shutdown_lan_hmc(hw); =20 /* release all the existing VSIs and VEBs */ + i40e_fdir_teardown(pf); i40e_vsi_release(pf->main_vsi); =20 /* shutdown the adminq */ diff --git a/lib/librte_pmd_i40e/i40e_ethdev.h b/lib/librte_pmd_i40e/i40e_e= thdev.h index 6d30f75..35fcc46 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.h +++ b/lib/librte_pmd_i40e/i40e_ethdev.h @@ -379,6 +379,7 @@ 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, unsigned int socket_id); int i40e_fdir_setup(struct i40e_pf *pf); +void i40e_fdir_teardown(struct i40e_pf *pf); =20 /* I40E_DEV_PRIVATE_TO */ #define I40E_DEV_PRIVATE_TO_PF(adapter) \ diff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_fdi= r.c index a44bb73..bb474d2 100644 --- a/lib/librte_pmd_i40e/i40e_fdir.c +++ b/lib/librte_pmd_i40e/i40e_fdir.c @@ -219,4 +219,23 @@ fail_setup_tx: i40e_vsi_release(vsi); pf->fdir.fdir_vsi =3D NULL; return err; +} + +/* + * i40e_fdir_teardown - release the Flow Director resources + * @pf: board private structure + */ +void +i40e_fdir_teardown(struct i40e_pf *pf) +{ + struct i40e_vsi *vsi; + + vsi =3D pf->fdir.fdir_vsi; + i40e_dev_rx_queue_release(pf->fdir.rxq); + pf->fdir.rxq =3D NULL; + i40e_dev_tx_queue_release(pf->fdir.txq); + pf->fdir.txq =3D NULL; + i40e_vsi_release(vsi); + pf->fdir.fdir_vsi =3D NULL; + return; } \ No newline at end of file --=20 1.8.1.4