From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54])
 by dpdk.org (Postfix) with ESMTP id CC4F7FAE1
 for <dev@dpdk.org>; Thu,  9 Feb 2017 22:27:05 +0100 (CET)
Received: by mail-wm0-f54.google.com with SMTP id c85so243672400wmi.1
 for <dev@dpdk.org>; Thu, 09 Feb 2017 13:27:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=from:to:cc:subject:date:message-id:user-agent:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=96fIJi6dv6k+Al114tMkNHB07GoyEPcjUPj8JGkUDdQ=;
 b=aQ8AwX1hS8GjjiCt6EGlOvCYdSBfDUcllNs52y74So1icbOj8BBRsNbbUuqspPtZQQ
 rb10u7AaXdutgUYYzHPNflODXNEC2HrIh/M/NoRaSNlzY6Lk+XYVr8XJ/yHYwJoRofW4
 dAQh7f4Nw0FnZbNtGgt7SMesm2o13dHrlCpQS5R0SVlUfXo60LRLhyD5byokwphfXQDN
 61udPZobCS+h8F/XeHJ8kiuS/BxSFaf/BRJCq8+3fV6T1POvjg4DB325I1Y3jr95maKv
 jOnsTQ++yBK1xPa3osGPM4NgmHFvwWlWy0+aiyeZUAdzDT/qwQjNJhjPxGPcbtlJXKGh
 PnHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent
 :in-reply-to:references:mime-version:content-transfer-encoding;
 bh=96fIJi6dv6k+Al114tMkNHB07GoyEPcjUPj8JGkUDdQ=;
 b=OyrmLdKr5Ov19fJsv+txAKRjFWDcXsgxUxCbAGaoCozYk8pFShGiMuZBGjLN5HlL7x
 hDFipVaP9AwG8javTDPzg5+RlJqSGywIO+28vzzLitsi0hTiM+yeJ7uddDLLHl4qKewp
 cQ1qLItM/OidiLcASVPEfXwpkfdBJXbAj9THOAl1kUfgR2Gab10c8B43AkDJPGHfNDh6
 ri0O+YFs58am66hyvtN7nGVlv2xoUnxyB782WZpLkDXTs1tJUpQh8951ALvgDWw3hSzB
 m/nMCuI9ExM3zzzMbwJdqYI4C0+3qVialoQiiAAffY6dfFZsghEz66zFc33WC6lrSwTs
 E19g==
X-Gm-Message-State: AMke39lRTXFKKpXGWjmR0wazpWzGKHT7BKRHqu7bNEKS5iZ4rRhBYVr6Zo3l/6JV6oHcwahr
X-Received: by 10.28.232.90 with SMTP id f87mr22982373wmh.35.1486675625421;
 Thu, 09 Feb 2017 13:27:05 -0800 (PST)
Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184])
 by smtp.gmail.com with ESMTPSA id k195sm438886wmd.7.2017.02.09.13.27.04
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 09 Feb 2017 13:27:04 -0800 (PST)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Marvin Liu <yong.liu@intel.com>, Jianfeng Tan <jianfeng.tan@intel.com>
Cc: dev@dpdk.org
Date: Thu, 09 Feb 2017 22:27:03 +0100
Message-ID: <4997476.25NJoPJnWZ@xps13>
User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; )
In-Reply-To: <1486650334-34300-1-git-send-email-yong.liu@intel.com>
References: <1485156509-4919-1-git-send-email-yong.liu@intel.com>
 <1486650334-34300-1-git-send-email-yong.liu@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
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: Thu, 09 Feb 2017 21:27:05 -0000

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?