From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2B9F2A05D3 for ; Sat, 25 May 2019 00:47:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E641AA69; Sat, 25 May 2019 00:47:24 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 742341D7 for ; Sat, 25 May 2019 00:47:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2019 15:47:22 -0700 X-ExtLoop1: 1 Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga007.jf.intel.com with ESMTP; 24 May 2019 15:47:22 -0700 Received: from orsmsx112.amr.corp.intel.com ([169.254.3.79]) by ORSMSX109.amr.corp.intel.com ([169.254.11.251]) with mapi id 14.03.0415.000; Fri, 24 May 2019 15:47:21 -0700 From: "Ergin, Mesut A" To: "Zhang, Qi Z" , "Xing, Beilei" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/i40e: Fail rte_flow MARK requests if RX func was vectorized Thread-Index: AQHVEZD81mca5EVugU6W20lU5Lo1vqZ6CI6AgADZZ1A= Date: Fri, 24 May 2019 22:47:21 +0000 Message-ID: <3615B82CA151CF42A86EDDD9846A8B38C7A8EA9D@ORSMSX112.amr.corp.intel.com> References: <1558634242-441514-1-git-send-email-mesut.a.ergin@intel.com> <039ED4275CED7440929022BC67E7061153386AB5@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E7061153386AB5@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGY0YWFmZWYtODA3YS00ZmI2LTljZTctODUyOTZmYjgxY2FjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiblhkK2ZlNTFYNFhBNTE4XC9TMjNlZXhURGpnend5eHkxRGR5MVVDTmpEbFVLMU1IZkxOVFoxbmdzZDhpMG4wNnAifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: Fail rte_flow MARK requests if RX func was vectorized 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" Hi Qi, > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, May 23, 2019 7:49 PM > To: Ergin, Mesut A ; Xing, Beilei > > Cc: dev@dpdk.org > Subject: RE: [PATCH] net/i40e: Fail rte_flow MARK requests if RX func was > vectorized >=20 > Hi Mesut: >=20 > > -----Original Message----- > > From: Ergin, Mesut A > > Sent: Friday, May 24, 2019 1:57 AM > > To: Xing, Beilei ; Zhang, Qi Z > > Cc: dev@dpdk.org; Ergin, Mesut A > > Subject: [PATCH] net/i40e: Fail rte_flow MARK requests if RX func was > > vectorized > > > > Runtime requests to install an rte_flow with MARK action should fail if= a vector > > RX function was already chosen for the device during configuration time= . > > > > Currently, i40e rte_flow driver would successfully install the flow wit= h MARK > > action, even when vector RX functions are in use. However, those vector= RX > > functions will fail to retrieve the MARK data from the device descripto= r into > > the mbuf. The original app installing the flow would never know what w= ent > > wrong. The change introduced in this patch must be reverted if/when vec= tor > > RX functions start supporting correct FDIR processing for MARK actions. > > > > Signed-off-by: Mesut Ali Ergin > > --- > > drivers/net/i40e/i40e_flow.c | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.= c index > > 3afd779..9a14a1c 100644 > > --- a/drivers/net/i40e/i40e_flow.c > > +++ b/drivers/net/i40e/i40e_flow.c > > @@ -22,6 +22,7 @@ > > #include "base/i40e_type.h" > > #include "base/i40e_prototype.h" > > #include "i40e_ethdev.h" > > +#include "i40e_rxtx.h" > > > > #define I40E_IPV6_TC_MASK (0xFF << I40E_FDIR_IPv6_TC_OFFSET) > > #define I40E_IPV6_FRAG_HEADER 44 > > @@ -3079,6 +3080,16 @@ i40e_flow_parse_fdir_action(struct rte_eth_dev > > *dev, > > filter->action.behavior =3D I40E_FDIR_PASSTHRU; > > break; > > case RTE_FLOW_ACTION_TYPE_MARK: > > + if (dev->rx_pkt_burst =3D=3D i40e_recv_scattered_pkts_vec || > > + dev->rx_pkt_burst =3D=3D i40e_recv_pkts_vec || > > + dev->rx_pkt_burst =3D=3D i40e_recv_scattered_pkts_vec_avx2 || > > + dev->rx_pkt_burst =3D=3D i40e_recv_pkts_vec_avx2) { > > + /* Vector RX Functions do not support MARK*/ > > + rte_flow_error_set(error, EINVAL, > > + RTE_FLOW_ERROR_TYPE_ACTION, > act, > > + "Action not supported when vector > RX is in use."); > > + return -rte_errno; > > + } >=20 > We may not need to prevent this if the device is already stopped (check d= ev- > >data->dev_started), > since with the fdir flow be created here, vector path will not be selecte= d in > following dev_start. Makes sense, sending a v2 in a bit. >=20 > > filter->action.behavior =3D I40E_FDIR_PASSTHRU; > > mark_spec =3D act->conf; > > filter->action.report_status =3D I40E_FDIR_REPORT_ID; @@ - > 3103,6 > > +3114,16 @@ i40e_flow_parse_fdir_action(struct rte_eth_dev *dev, > > "Invalid action."); > > return -rte_errno; > > } > > + if (dev->rx_pkt_burst =3D=3D i40e_recv_scattered_pkts_vec || > > + dev->rx_pkt_burst =3D=3D i40e_recv_pkts_vec || > > + dev->rx_pkt_burst =3D=3D i40e_recv_scattered_pkts_vec_avx2 || > > + dev->rx_pkt_burst =3D=3D i40e_recv_pkts_vec_avx2) { > > + /* Vector RX Functions do not support MARK*/ > > + rte_flow_error_set(error, EINVAL, > > + RTE_FLOW_ERROR_TYPE_ACTION, > act, > > + "Action not supported when vector > RX is in use."); > > + return -rte_errno; > > + } > > mark_spec =3D act->conf; > > filter->action.report_status =3D I40E_FDIR_REPORT_ID; > > filter->soft_id =3D mark_spec->id; > > -- > > 2.7.4