From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 69CB3201 for ; Fri, 10 Feb 2017 10:00:34 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 10 Feb 2017 01:00:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,140,1484035200"; d="scan'208";a="223629365" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 10 Feb 2017 01:00:32 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 10 Feb 2017 01:00:32 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Fri, 10 Feb 2017 17:00:29 +0800 From: "Tan, Jianfeng" To: Thomas Monjalon , "Liu, Yong" CC: "dev@dpdk.org" , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH v3 1/3] examples/ip_reassembly: add parse-ptype option Thread-Index: AQHSg3ivSXGNMZwJFk2A44dbeBEMQKFh7w4w Date: Fri, 10 Feb 2017 09:00:28 +0000 Message-ID: References: <1485156509-4919-1-git-send-email-yong.liu@intel.com> <4997476.25NJoPJnWZ@xps13> <86228AFD5BCD8E4EBFD2B90117B5E81E62D5E2F6@SHSMSX103.ccr.corp.intel.com> <2819058.cfIqcf5N9Z@xps13> In-Reply-To: <2819058.cfIqcf5N9Z@xps13> 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 v3 1/3] examples/ip_reassembly: add parse-ptype option 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: Fri, 10 Feb 2017 09:00:35 -0000 Hi Thomas, > -----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 automatic= ally > > > 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). Actually, Konstantin is suggesting this way, I quote here: 1. if '--parse-ptype' present always use SW parsing; 2. else check does HW support ptype recognition: - if yes, then use HW offload - else use SW By this way, most case, user does not need to specify this option, except t= he case that, user wants to compare the performance of HW and SW ptype vers= ion when the NIC actually supports HW ptypes. I agree with this way. How do you think? Thanks, Jianfeng