From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Liu, Yong" Subject: Re: [PATCH v3 1/3] examples/ip_reassembly: add parse-ptype option Date: Fri, 10 Feb 2017 09:02:35 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D5E3E2@SHSMSX103.ccr.corp.intel.com> References: <1485156509-4919-1-git-send-email-yong.liu@intel.com> <4997476.25NJoPJnWZ@xps13> <86228AFD5BCD8E4EBFD2B90117B5E81E62D5E2F6@SHSMSX103.ccr.corp.intel.com> <2819058.cfIqcf5N9Z@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Tan, Jianfeng" , "dev@dpdk.org" To: Thomas Monjalon Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 89EEF5A3E for ; Fri, 10 Feb 2017 10:02:40 +0100 (CET) In-Reply-To: <2819058.cfIqcf5N9Z@xps13> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, February 10, 2017 4:36 PM > To: Liu, Yong > Cc: Tan, Jianfeng ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3 1/3] examples/ip_reassembly: add parse- > ptype option >=20 > 2017-02-10 07:53, Liu, Yong: > > From: Thomas Monjalon > > > 2017-02-09 22:25, Marvin Liu: > > > > Add new option parse-ptype in this sample in case of pmd driver > > > > not provide packet type info. If this option enabled, packet type > > > > will be analyzed in Rx callback function. > > > [...] > > > > + if (parse_ptype) { > > > > + if (add_cb_parse_ptype(portid, queueid) < 0) > > > > + rte_exit(EXIT_FAILURE, > > > > + "Fail to add ptype cb\n"); > > > > + } else if (!check_ptype(portid)) > > > > + rte_exit(EXIT_FAILURE, > > > > + "PMD can not provide needed ptypes\n"); > > > > > > Instead of adding a new option, why not adding the callback > automatically > > > if the packet type is not supported by the hardware? > > > > Thomas, > > We want to let user choice which kind of method for packet type parsing= . > > If start application with parse-type option, is meaning user want to us= e > software parsing otherwise will use hardware parsing. >=20 > I do not understand why this user choice matters. > If it is available, hardware ptype is better, isn't it? > It it is not available, we need to be aware of this specific issue, > otherwise we have the error "PMD can not provide needed ptypes" > (without suggesting to use the option). Yes, hardware always has better performance than software. I think it matte= rs in some performance measurement scenarios.=20 Like l3fwd, we compared performance with software and hardware packet parse= rs and this option may not have much value in other samples. I will rework this patch and fallback to software if hardware not support.= =09 BRs, Marvin