From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 1/3] examples/ip_reassembly: add parse-ptype option Date: Tue, 04 Apr 2017 14:45:56 +0200 Message-ID: <2707753.Svae6e0B9N@xps13> References: <1485156509-4919-1-git-send-email-yong.liu@intel.com> <2819058.cfIqcf5N9Z@xps13> <86228AFD5BCD8E4EBFD2B90117B5E81E62D5E3E2@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "Tan, Jianfeng" , dev@dpdk.org To: "Liu, Yong" Return-path: Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id 97110326B for ; Tue, 4 Apr 2017 14:45:59 +0200 (CEST) Received: by mail-wr0-f174.google.com with SMTP id w43so212744156wrb.0 for ; Tue, 04 Apr 2017 05:45:59 -0700 (PDT) In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D5E3E2@SHSMSX103.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-02-10 09:02, Liu, Yong: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 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 use > > software parsing otherwise will use hardware parsing. > > > > 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 matters in some performance measurement scenarios. > Like l3fwd, we compared performance with software and hardware packet parsers and this option may not have much value in other samples. > I will rework this patch and fallback to software if hardware not support. The ip_fragmentation case has been reworked this way: http://dpdk.org/patch/21769