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 CDFA9A00C5; Thu, 30 Apr 2020 08:26:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA2F31D937; Thu, 30 Apr 2020 08:26:17 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7C3691D92F for ; Thu, 30 Apr 2020 08:26:16 +0200 (CEST) IronPort-SDR: 44q1S7lZTYzhhJVJYM9uN05JSVnXkCbXjo74IeiWEwnJsTl5MFTVWu/UaenON/+UnZwE7GxoIq 9JluBM7PkH2w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 23:26:15 -0700 IronPort-SDR: TX+TVIb42TQt8sFtYmS4SkwEPnlws6NeksQSLVJVWz+dvZF64sUATcv6qbuGWiB7pq3wHd1IY6 4dkrhu0r3oLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,334,1583222400"; d="scan'208";a="368040298" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga001.fm.intel.com with ESMTP; 29 Apr 2020 23:26:15 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 23:26:15 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 29 Apr 2020 23:26:14 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx608.amr.corp.intel.com (10.22.229.21) 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, 29 Apr 2020 23:26:14 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 23:25:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ocw36eXw0HYGjHDPM1CviQnirJPkiLq4ACveymL5xzFbMcXeTIIB6dYAYCIsjSwF7SOmeH4jHUKcgZuxp+aw9obwgMcaXv2LOT3Xg7hqsJThhvVo/TLuq5BkOUxM2H6elqlGJE6bLp1J2ecjSZnvgOOW1JG4XPtNxbi3PdvjxpZowcQ+G/A3STIrbBk85casBuDqDRQNAvRCBAC3xV3zBYxvXjMWeDkOdz5/3WrjkrqfYTpsl5YSe/FWMb0gyqnzMamFD7niRdVJOQeSzQq5eck9TUSafffaQ1L0Ke1Jw3MWYbBKo6f5mz4QeYT4rO1WZLeR5uXEeth5IxWdqWSJIQ== 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=MY4msjxpO+Tq0FxCmUbSZtToeThDjXifI0m5O/3LWCo=; b=Vqmt8M8LFl6wtZmub8ILsgAmIvr3skQO1glxisHcZeVm9Du9FS9g1JxB8vrZse2WJCt668I3rwCvauYNKHqQapuhIVGcIzWuDNSxd1gfkKmskEqc6NdunZDf4dqaMArAsofcOD7SL1o7MXhdSY6MxeoGwfeE0a115aPw3TTQIxTkGxtDmIBGOB4Xa/y+BfD0IEGxh1wvRdOpdDNqvvOti1mEe4r0pAF+L3+m5OpyCFFikmXvxan3hfXa2SSMpi0KcWDXOpfa47KCWmpNzid9KF3FrQDQ+iR/HbiC+ScXYR9GeLxjsTfR+fB1VXmf7MuhT/actg+ZzzxZdap1d5GrOA== 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=MY4msjxpO+Tq0FxCmUbSZtToeThDjXifI0m5O/3LWCo=; b=hFgpji7WOimBqqDlsCBmbpo+rlPgaDRUmY2r8k9f5/HA5ECMUc8+KbrmiA2/XpgpLv1zHv4rbF49sYEeD04wVb23LKOSpXAeciB0XWyJiprf4FuXUIG1CkUZ51ajWlzL+ciRooa6Xl5vd6fw2rzv+H9dsgl4grrGJ6qGcStriSw= Received: from BY5PR11MB3893.namprd11.prod.outlook.com (2603:10b6:a03:183::26) by BY5PR11MB3877.namprd11.prod.outlook.com (2603:10b6:a03:186::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Thu, 30 Apr 2020 06:25:39 +0000 Received: from BY5PR11MB3893.namprd11.prod.outlook.com ([fe80::65ec:b3c9:7f24:d067]) by BY5PR11MB3893.namprd11.prod.outlook.com ([fe80::65ec:b3c9:7f24:d067%6]) with mapi id 15.20.2937.028; Thu, 30 Apr 2020 06:25:39 +0000 From: "Peng, Yuan" To: "Su, Simei" , "Zhang, Qi Z" , "Ye, Xiaolong" , "Wu, Jingjing" CC: "dev@dpdk.org" , "Cao, Yahui" , "Su, Simei" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule Thread-Index: AQHWHSFWnuxbFboZi0iyg1t01oefc6iRNfGA Date: Thu, 30 Apr 2020 06:25:38 +0000 Message-ID: References: <1588052959-296702-1-git-send-email-simei.su@intel.com> In-Reply-To: <1588052959-296702-1-git-send-email-simei.su@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action 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.55.52.220] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f9393f3d-a038-4617-fc0a-08d7eccf4cfa x-ms-traffictypediagnostic: BY5PR11MB3877: 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:989; x-forefront-prvs: 0389EDA07F x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB3893.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(376002)(366004)(39860400002)(396003)(346002)(76116006)(478600001)(66556008)(64756008)(26005)(66446008)(66476007)(316002)(6506007)(54906003)(33656002)(71200400001)(4326008)(53546011)(107886003)(66946007)(86362001)(110136005)(2906002)(8676002)(6636002)(9686003)(8936002)(5660300002)(52536014)(186003)(55016002)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qOV+V6LmjtChnkJfDCsDfhr6oipVXxgYaJjAsyswiTH7r0ebCoqrER4Zm/fOpSda3ddrzuOo908U5Wf7adxUt0DBJV4FDgC83RrKM7Su3nnoULq9DlaQ0H9757VdSWRVAfsnbzjcykeaG+7Ik4EG4O3E5gaF55W0Miv3xugLgwSQb66SGV/k3i84p6wHapWob035QEqQ/+uSaypRFWfISNGc+qx6Yzph2ysQhZ4HumyIZo361MOE4yTzp0T2sSTUOENvp/DmUxGg2qs6OWnQenROA4U9z/4zzXVyHIxQLTNx8/6lIehYOS7+YyJJysi7EVsiyeloUEQFe94LqxHrIJcD1gc4IeFp1YLX11w47BFRTSIpJ2u61qlZ1/qmfl1pCr+fmCEXdTF8QEDlpCD4ACF/TNfn5UMmQPKj6mKuYEpHffYZJYR/fg8ytBaNBOnB x-ms-exchange-antispam-messagedata: cKVKjyToJ4pqOLiL3GA8JcqzD3rUs2i8/fHb5mdMefTTCvKF66Npy+RUMN6MLzgE97IwYL26553gQ1R6Rfj4asLDebtCj3xn4FZH2ukBJgetAfassSWaxbTm2VfUVfhheXgYlMpIuB95IWMkJ8u2mA7wcfb0xqaIAEDZ0m8jjn9mOdh7LY7Nfjn3sNgdWIDfv3uXVpH8YBQ+LNs039ghrmIlduSlvUiyCu73fmjr4GN0uU+npA5KnHFEN0WyDjdJ2ZDOXiupGr/Zi0sk+D8zJUH+QBBVHsNqfnc55ZxktR4SNXrNSl0GIIxl01YionSxLTu0D7kusk/PaF7D9GrGIst6I4mE1zpp5icYty3+JugfEWMbNo4z/gfeTgzJOt5CgpRMj15CVhiikjhw8FnqaCD2sg447DbmQ3iWhZK+YOkDEgUdauA66LFqo2HygsPQiqdQzEY9FeovMT52h7bl9VdXZ723gGL9v8pEcOUHoL7nWuEaTjN/fQk6sKAmKhz9wyvrISvIXlRZMZ9FNBh3F7FLL3LTu2FvsmfhaDVyGwdouBVCPQHtJ5FE+bo+3aZkww76CdnIoXt3gzCZpde9bjdOxX5jYcJRc6a0h96YdU9BvaHrKs9oVySjIRHhOTj7eY+GFvSsjHB68PAKBbItYzW14vnm4dduHDjsETJIknHrtvQjqRyWcPQxZTCGJhsuvawjcD9+QZO6g/8jp9W3AvcIxiDDQyCVP1WxQHfHT18wwIJOonuBDc9yFR90WgQkAR5b9UUtJ5NdX3u1E6hPjQvWDMNbIXShjqIRc9j9wBE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f9393f3d-a038-4617-fc0a-08d7eccf4cfa X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 06:25:38.8517 (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: BaM3ZXiuNMLIDo/TK7Sef18k7wQcRrxQDEdDPAMoih/IsVNedYjBlSRAoRZZoEOz6NivbeONr9SOOp1oi4SENw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB3877 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule 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" Test-by Peng, Yuan -----Original Message----- From: dev On Behalf Of Simei Su Sent: Tuesday, April 28, 2020 1:49 PM To: Zhang, Qi Z ; Ye, Xiaolong ; Wu, Jingjing Cc: dev@dpdk.org; Cao, Yahui ; Su, Simei Subject: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule After VF reset, FDIR rule still takes effect. To solve the issue, this patc= h adds to flush all flows before flow uninit. VIRTCHNL sends message to PF = by Admin Queue, so flow flush should be implemented before Admin Queue shut= down. Fixes: c6ea8bd9f11f ("net/iavf: support generic flow") Signed-off-by: Simei Su --- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_generic_flow.c | 4 +--- drivers/net/iavf/iavf_gener= ic_flow.h | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.= c index 117fbc5..e09efff 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1431,6 +1431,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_= dev *dev, IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); =20 iavf_dev_stop(dev); + iavf_flow_flush(dev, NULL); iavf_shutdown_adminq(hw); /* disable uio intr before callback unregister */ rte_intr_disable(intr_handle); diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_g= eneric_flow.c index bca1ffe..8c66ac8 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -34,8 +34,6 @@ static struct rte_flow *iavf_flow_create(struct rte_eth_d= ev *dev, static int iavf_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, struct rte_flow_error *error); -static int iavf_flow_flush(struct rte_eth_dev *dev, - struct rte_flow_error *error); static int iavf_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow, const struct rte_flow_action *actions, @@ -966,7 +964,7 @@ struct iavf_p= attern_match_item * return ret; } =20 -static int +int iavf_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error) { diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_g= eneric_flow.h index c41ca1b..978d071 100644 --- a/drivers/net/iavf/iavf_generic_flow.h +++ b/drivers/net/iavf/iavf_generic_flow.h @@ -306,6 +306,8 @@ struct iavf_flow_parser_node { void iavf_register_flow= _engine(struct iavf_flow_engine *engine); int iavf_flow_init(struct iavf_a= dapter *ad); void iavf_flow_uninit(struct iavf_adapter *ad); +int iavf_flow_flush(struct rte_eth_dev *dev, + struct rte_flow_error *error); int iavf_register_parser(struct iavf_flow_parser *parser, struct iavf_adapter *ad); void iavf_unregister_parser(struct iavf_flow_parser *parser, -- 1.8.3.1