From: Ferruh Yigit Subject: Re: [PATCH v2 3/5] app/testpmd: add command for writing personalization profile Date: Wed, 8 Mar 2017 12:10:34 +0000 Message-ID: <7ac246ff-1d2c-4733-da21-4320cd5e1603@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-4-git-send-email-beilei.xing@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: helin.zhang@intel.com, dev@dpdk.org To: Beilei Xing , jingjing.wu@intel.com Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6BBCF108A for ; Wed, 8 Mar 2017 13:10:39 +0100 (CET) In-Reply-To: <1488526784-16621-4-git-send-email-beilei.xing@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/3/2017 7:39 AM, Beilei Xing wrote: > This patch is to add testpmd CLI for writing personalization > profile. > > Signed-off-by: Beilei Xing <...> > +static void > +cmd_write_ppp_parsed( > + void *parsed_result, > + __attribute__((unused)) struct cmdline *cl, > + __attribute__((unused)) void *data) > +{ > + struct cmd_write_ppp_result *res = parsed_result; > + uint8_t *buff; > + int ret = -ENOTSUP; > + > + if (res->port_id > nb_ports) { > + printf("Invalid port, range is [0, %d]\n", nb_ports - 1); > + return; > + } > + > + if (!all_ports_stopped()) { > + printf("Please stop all ports first\n"); > + return; > + } > + > + buff = open_package_file(res->filename); Can you please update function name to indicate package is ppp package > + if (!buff) > + return; > + > + ret = i40e_process_package(res->port_id, buff); What if i40e support not compiled into library? > + if (ret < 0) > + printf("Failed to write profile.\n"); > + > + close_package_file(buff); > +} > + <...>