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 0BEF8A0613 for ; Wed, 25 Sep 2019 11:16:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 39A492C36; Wed, 25 Sep 2019 11:16:35 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AD6642C30; Wed, 25 Sep 2019 11:16:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 02:16:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,547,1559545200"; d="scan'208";a="389158585" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 25 Sep 2019 02:16:32 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Sep 2019 02:16:32 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Sep 2019 02:16:31 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.140]) with mapi id 14.03.0439.000; Wed, 25 Sep 2019 17:16:29 +0800 From: "Xing, Beilei" To: "Zhang, AlvinX" , "Zhang, Qi Z" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix conflict with multi-driver Thread-Index: AQHVb1iyV8x6/7qec0avqRogkQGmbKc8IYTg Date: Wed, 25 Sep 2019 09:16:29 +0000 Message-ID: <94479800C636CB44BD422CB454846E013CE48658@SHSMSX101.ccr.corp.intel.com> References: <20190920105722.48921-1-alvinx.zhang@intel.com> In-Reply-To: <20190920105722.48921-1-alvinx.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjg3ODViYjEtOGQ4My00MWZhLWIzYzgtYTkwZWIxYTQzMmIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWGUwSFJYUCtjZEpWQVpsRzlYZjVZWkdPajM0WGp1WkdGeXk3aEg4VklIXC9JS09nN0NTa056NkRyd0dNbnBtOWoifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action 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] net/i40e: fix conflict with multi-driver 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: Zhang, AlvinX > Sent: Friday, September 20, 2019 6:57 PM > To: Zhang, Qi Z ; Xing, Beilei > Cc: dev@dpdk.org; Zhang, AlvinX ; > stable@dpdk.org > Subject: [PATCH] net/i40e: fix conflict with multi-driver >=20 > From: Alvin Zhang >=20 > If support-multi-driver option been set, we suppose the DPDK will not mod= ify > the value of global register GLQF_FD_MSK. Current situation is if we crea= te a > new flow with 'flow creat ...' command, the register value may be changed= . Thanks for the fix, the patch looks OK for me, but the commit log should be= amended. How about=20 "If support-multi-driver is enabled, the global registers should not be con= figured. But with the correct code base, if creating a flow with rte_flow API, the g= lobal register GLQF_FD_MSK may be changed." ? Beilei >=20 > Fixes: cfdfca493cae ("net/i40e: fix multiple driver support") > Cc: stable@dpdk.org >=20 > Signed-off-by: Alvin Zhang > --- > drivers/net/i40e/i40e_flow.c | 34 +++++++++++++++++++++++++++------- > 1 file changed, 27 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c > index e902a35..8c54394 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -2349,6 +2349,33 @@ static int i40e_flow_destroy_tunnel_filter(struct > i40e_pf *pf, > if (num < 0) > return -EINVAL; >=20 > + if (pf->support_multi_driver) { > + for (i =3D 0; i < num; i++) > + if (i40e_read_rx_ctl(hw, > + I40E_GLQF_FD_MSK(i, pctype)) !=3D > + mask_reg[i]) { > + PMD_DRV_LOG(ERR, "Input set setting is not" > + " supported."); > + return -1; > + } > + for (i =3D num; i < I40E_INSET_MASK_NUM_REG; i++) > + if (i40e_read_rx_ctl(hw, > + I40E_GLQF_FD_MSK(i, pctype)) !=3D 0) { > + PMD_DRV_LOG(ERR, "Input set setting is not" > + " supported."); > + return -1; > + } > + > + } else { > + for (i =3D 0; i < num; i++) > + i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), > + mask_reg[i]); > + /*clear unused mask registers of the pctype */ > + for (i =3D num; i < I40E_INSET_MASK_NUM_REG; i++) > + i40e_check_write_reg(hw, > + I40E_GLQF_FD_MSK(i, pctype), 0); > + } > + > inset_reg |=3D i40e_translate_input_set_reg(hw->mac.type, input_set); >=20 > i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0), @@ > -2357,13 +2384,6 @@ static int i40e_flow_destroy_tunnel_filter(struct > i40e_pf *pf, > (uint32_t)((inset_reg >> > I40E_32_BIT_WIDTH) & UINT32_MAX)); >=20 > - for (i =3D 0; i < num; i++) > - i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), > - mask_reg[i]); > - > - /*clear unused mask registers of the pctype */ > - for (i =3D num; i < I40E_INSET_MASK_NUM_REG; i++) > - i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), 0); > I40E_WRITE_FLUSH(hw); >=20 > pf->fdir.input_set[pctype] =3D input_set; > -- > 1.8.3.1