From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 04:10:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,262,1486454400"; d="scan'208";a="233675009" 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:10:36 -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-4-git-send-email-beilei.xing@intel.com> Cc: helin.zhang@intel.com, dev@dpdk.org From: Ferruh Yigit Message-ID: <7ac246ff-1d2c-4733-da21-4320cd5e1603@intel.com> Date: Wed, 8 Mar 2017 12:10:34 +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-4-git-send-email-beilei.xing@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 3/5] app/testpmd: add command for writing 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:10:39 -0000 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); > +} > + <...>