From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yong.liu@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id 89EEF5A3E
 for <dev@dpdk.org>; Fri, 10 Feb 2017 10:02:40 +0100 (CET)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga101.fm.intel.com with ESMTP; 10 Feb 2017 01:02:39 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.35,140,1484035200"; d="scan'208";a="1093102967"
Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202])
 by orsmga001.jf.intel.com with ESMTP; 10 Feb 2017 01:02:38 -0800
Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by
 fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Fri, 10 Feb 2017 01:02:38 -0800
Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by
 fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Fri, 10 Feb 2017 01:02:37 -0800
Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by
 SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002;
 Fri, 10 Feb 2017 17:02:36 +0800
From: "Liu, Yong" <yong.liu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Tan, Jianfeng" <jianfeng.tan@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH v3 1/3] examples/ip_reassembly: add
 parse-ptype option
Thread-Index: AQHSg3i18GbxdxwALUSgMvQ9d5HcTqFh8BWA
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>
In-Reply-To: <2819058.cfIqcf5N9Z@xps13>
Accept-Language: zh-CN, 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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2017 09:02:41 -0000



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Friday, February 10, 2017 4:36 PM
> To: Liu, Yong <yong.liu@intel.com>
> Cc: Tan, Jianfeng <jianfeng.tan@intel.com>; 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