From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1C193532D for ; Thu, 9 Mar 2017 06:59:58 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 21:59:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,267,1486454400"; d="scan'208";a="65700236" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 08 Mar 2017 21:59:57 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Mar 2017 21:59:57 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Mar 2017 21:59:57 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 9 Mar 2017 13:59:55 +0800 From: "Xing, Beilei" To: "Yigit, Ferruh" , "Wu, Jingjing" CC: "Zhang, Helin" , "dev@dpdk.org" , "Iremonger, Bernard" , "Stroe, Laura" Thread-Topic: [dpdk-dev] [PATCH 1/4] net/i40e: support replace filter type Thread-Index: AQHSlAEw6xjI++oqsUGrwcV+HCC5q6GKmTyAgAFmlEA= Date: Thu, 9 Mar 2017 05:59:55 +0000 Message-ID: <94479800C636CB44BD422CB454846E01315A7CF0@SHSMSX101.ccr.corp.intel.com> References: <1488533497-27682-1-git-send-email-beilei.xing@intel.com> <1488533497-27682-2-git-send-email-beilei.xing@intel.com> In-Reply-To: Accept-Language: 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 1/4] net/i40e: support replace filter type 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: , X-List-Received-Date: Thu, 09 Mar 2017 05:59:59 -0000 > -----Original Message----- > From: Yigit, Ferruh > Sent: Wednesday, March 8, 2017 11:50 PM > To: Xing, Beilei ; Wu, Jingjing > Cc: Zhang, Helin ; dev@dpdk.org; Iremonger, > Bernard ; Stroe, Laura > > Subject: Re: [dpdk-dev] [PATCH 1/4] net/i40e: support replace filter type >=20 > On 3/3/2017 9:31 AM, Beilei Xing wrote: > > Add new admin queue function and extended fields in DCR 288: > > - Add admin queue function for Replace filter > > command (Opcode: 0x025F) > > - Add General fields for Add/Remove Cloud filters > > command > > > > This patch will be removed to base driver in future. > > > > Signed-off-by: Bernard Iremonger > > Signed-off-by: Stroe Laura > > Signed-off-by: Jingjing Wu > > Signed-off-by: Beilei Xing > > --- > > drivers/net/i40e/i40e_ethdev.h | 106 ++++++++++++++++++++++++++++ > > drivers/net/i40e/i40e_flow.c | 152 > +++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 258 insertions(+) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.h > > b/drivers/net/i40e/i40e_ethdev.h index f545850..3a49865 100644 > > --- a/drivers/net/i40e/i40e_ethdev.h > > +++ b/drivers/net/i40e/i40e_ethdev.h > > @@ -729,6 +729,100 @@ struct i40e_valid_pattern { > > parse_filter_t parse_filter; > > }; > > > > +/* Support replace filter */ > > + > > +/* i40e_aqc_add_remove_cloud_filters_element_big_data is used when > > + * I40E_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER flag is set. refer to > > + * DCR288 >=20 > Please do not refer to DCR, unless you can provide a public link for it. OK, got it. >=20 > > + */ > > +struct i40e_aqc_add_remove_cloud_filters_element_big_data { > > + struct i40e_aqc_add_remove_cloud_filters_element_data element; >=20 > What is the difference between > "i40e_aqc_add_remove_cloud_filters_element_big_data" and > "i40e_aqc_add_remove_cloud_filters_element_data", why need big_data > one? As ' Add/Remove Cloud filters -command buffer ' is changed in the DCR288, '= general fields' exists only when big_buffer is set. But we don't want to change the " i40e_aqc_add_remove_cloud_filters_elemen= t_data " as it will cause ABI/API change in kernel driver. >=20 > > + uint16_t general_fields[32]; >=20 > Not very useful variable name. It's the name from DCR. >=20 > <...> >=20 > > +/* Replace filter Command 0x025F > > + * uses the i40e_aqc_replace_cloud_filters, > > + * and the generic indirect completion structure */ struct > > +i40e_filter_data { > > + uint8_t filter_type; > > + uint8_t input[3]; > > +}; > > + > > +struct i40e_aqc_replace_cloud_filters_cmd { >=20 > Is replace does something different than remove old and add new cloud > filter? It's just like remove an old filter and add a new filter. It can replace both l1 filter and cloud filter. >=20 > <...> >=20 > > +enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer(struct > i40e_hw *hw, > > + uint16_t seid, > > + struct i40e_aqc_add_remove_cloud_filters_element_big_data > *filters, > > + uint8_t filter_count); > > +enum i40e_status_code i40e_aq_remove_cloud_filters_big_buffer( > > + struct i40e_hw *hw, uint16_t seid, > > + struct i40e_aqc_add_remove_cloud_filters_element_big_data > *filters, > > + uint8_t filter_count); > > +enum i40e_status_code i40e_aq_replace_cloud_filters(struct i40e_hw > *hw, > > + struct i40e_aqc_replace_cloud_filters_cmd *filters, > > + struct i40e_aqc_replace_cloud_filters_cmd_buf > *cmd_buf); > > + >=20 > Do you need these function declarations? We can remove it if we define them with "static". >=20 > > #define I40E_DEV_TO_PCI(eth_dev) \ > > RTE_DEV_TO_PCI((eth_dev)->device) > > > > diff --git a/drivers/net/i40e/i40e_flow.c > > b/drivers/net/i40e/i40e_flow.c index f163ce5..3c49228 100644 > > --- a/drivers/net/i40e/i40e_flow.c > > +++ b/drivers/net/i40e/i40e_flow.c > > @@ -1874,3 +1874,155 @@ i40e_flow_flush_tunnel_filter(struct i40e_pf > > *pf) > > > > return ret; > > } > > + > > +#define i40e_aqc_opc_replace_cloud_filters 0x025F #define > > +I40E_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER 1 > > +/** > > + * i40e_aq_add_cloud_filters_big_buffer > > + * @hw: pointer to the hardware structure > > + * @seid: VSI seid to add cloud filters from > > + * @filters: Buffer which contains the filters in big buffer to be > > +added > > + * @filter_count: number of filters contained in the buffer > > + * > > + * Set the cloud filters for a given VSI. The contents of the > > + * i40e_aqc_add_remove_cloud_filters_element_big_data are filled > > + * in by the caller of the function. > > + * > > + **/ > > +enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer( >=20 > There are already non big_buffer versions of these functions, like > "i40e_aq_add_cloud_filters()" why big_data version required, what it does > differently? Parameters are different. We add i40e_aq_add_cloud_filters_big_buffer to handle structure " i40e_aqc_= add_remove_cloud_filters_element_data " which includes general_fields. >=20 > And is there a reason that these functions are not static? (For this patc= h they > are not used at all and will cause build error, but my question is after = they > started to be used) No.. same with the patch for Pipeline Personalization Profile, it's designe= d according to base code style. >=20 > <...>