From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3E65F5597 for ; Wed, 8 Mar 2017 13:07:13 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 04:07:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,262,1486454400"; d="scan'208";a="233673779" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.254.176.34]) ([10.254.176.34]) by fmsmga004.fm.intel.com with ESMTP; 08 Mar 2017 04:07:09 -0800 To: Beilei Xing , jingjing.wu@intel.com References: <1488525977-15321-7-git-send-email-beilei.xing@intel.com> <1488526784-16621-1-git-send-email-beilei.xing@intel.com> <1488526784-16621-2-git-send-email-beilei.xing@intel.com> Cc: helin.zhang@intel.com, dev@dpdk.org From: Ferruh Yigit Message-ID: <51f0202e-844b-a8be-ced9-a253b2fc8717@intel.com> Date: Wed, 8 Mar 2017 12:07:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1488526784-16621-2-git-send-email-beilei.xing@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 1/5] net/i40e: support pipeline personalization profile 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: Wed, 08 Mar 2017 12:07:13 -0000 On 3/3/2017 7:39 AM, Beilei Xing wrote: > Add admin queue functions for Pipeline Personalization > Profile AQ commands defined in DCR 287: You can drop DCR reference here. > - Write Recipe Command buffer (Opcode: 0x0270) > - Get Applied Profiles list (Opcode: 0x0271) > This patch will be moved to base driver in future. > > Signed-off-by: Beilei Xing <...> > + > +/** > + * i40e_aq_write_ppp - Write pipeline personalization profile (ppp) > + * @hw: pointer to the hw struct > + * @buff: command buffer (size in bytes = buff_size) > + * @buff_size: buffer size in bytes > + * @track_id: package tracking id > + * @error_offset: returns error offset > + * @error_info: returns error information > + * @cmd_details: pointer to command details structure or NULL > + **/ > +enum > +i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff, > + uint16_t buff_size, uint32_t track_id, > + uint32_t *error_offset, uint32_t *error_info, > + struct i40e_asq_cmd_details *cmd_details) Is there a reason to not make these functions "static" ? What do you think making function calls more consistent, below is "i40e_aq_get_ppp_list", so thi can be "i40e_aq_ppp_write" And since this is NIC driver, ppp cane be confused with "Point-to-Point Protocol", is there any possible abbreviation or capitalization to prevent confusion? <...> > +/** > + * i40e_find_segment_in_package > + * @segment_type: the segment type to search for (i.e., SEGMENT_TYPE_I40E) > + * @pkg_hdr: pointer to the package header to be searched > + * > + * This function searches a package file for a particular segment type. On > + * success it returns a pointer to the segment header, otherwise it will > + * return NULL. > + */ > +struct i40e_generic_seg_header * > +i40e_find_segment_in_package(uint32_t segment_type, > + struct i40e_package_header *pkg_hdr) This function name is also generic, what segment, what package. if this is related to the ppp, please use relevant function name. <...> > + > +/** > + * i40e_write_profile > + * @hw: pointer to the hardware structure > + * @profile: pointer to the profile segment of the package to be downloaded > + * @track_id: package tracking id > + * > + * Handles the download of a complete package. > + */ > +enum i40e_status_code > +i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile, > + uint32_t track_id) What about having "ppp" in API, like i40e_ppp_write()? <...> > +struct i40e_profile_section_header { > + uint16_t tbl_size; > + uint16_t data_end; > + struct { > +#define SECTION_TYPE_INFO 0x0000010 > +#define SECTION_TYPE_MMIO 0x0000800 > +#define SECTION_TYPE_AQ 0x0000801 unaligned > +#define SECTION_TYPE_NOTE 0x80000000 > +#define SECTION_TYPE_NAME 0x80000001 > + uint32_t type; > + uint32_t offset; > + uint32_t size; > + } section; > +}; > + <...> > @@ -805,6 +915,23 @@ int i40e_dev_tunnel_filter_set(struct i40e_pf *pf, > struct rte_eth_tunnel_filter_conf *tunnel_filter, > uint8_t add); > int i40e_fdir_flush(struct rte_eth_dev *dev); > +enum i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff, > + uint16_t buff_size, uint32_t track_id, > + uint32_t *error_offset, uint32_t *error_info, > + struct i40e_asq_cmd_details *cmd_details); > +enum i40e_status_code i40e_aq_get_ppp_list(struct i40e_hw *hw, void *buff, > + uint16_t buff_size, uint8_t flags, > + struct i40e_asq_cmd_details *cmd_details); > +struct i40e_generic_seg_header * > +i40e_find_segment_in_package(uint32_t segment_type, > + struct i40e_package_header *pkg_header); > +enum i40e_status_code > +i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *i40e_seg, > + uint32_t track_id); > +enum i40e_status_code > +i40e_add_pinfo_to_list(struct i40e_hw *hw, > + struct i40e_profile_segment *profile, > + uint8_t *profile_info_sec, uint32_t track_id); These declarations can go away if you make functions static. > > #define I40E_DEV_TO_PCI(eth_dev) \ > RTE_DEV_TO_PCI((eth_dev)->device) >