From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6C215201 for ; Tue, 3 Jan 2017 07:57:54 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP; 02 Jan 2017 22:57:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,451,1477983600"; d="scan'208";a="45249877" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 02 Jan 2017 22:57:52 -0800 Date: Tue, 3 Jan 2017 14:59:39 +0800 From: Yuanhan Liu To: "Tan, Jianfeng" Cc: "dev@dpdk.org" , "stephen@networkplumber.org" , Thomas Monjalon Message-ID: <20170103065939.GN21789@yliu-dev.sh.intel.com> References: <1482996643-113253-1-git-send-email-jianfeng.tan@intel.com> <1482996643-113253-9-git-send-email-jianfeng.tan@intel.com> <20161230063953.GK21789@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 8/9] examples/l3fwd: 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: Tue, 03 Jan 2017 06:57:54 -0000 On Fri, Dec 30, 2016 at 07:30:19AM +0000, Tan, Jianfeng wrote: > Hi, > > > -----Original Message----- > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > > Sent: Friday, December 30, 2016 2:40 PM > > To: Tan, Jianfeng > > Cc: dev@dpdk.org; stephen@networkplumber.org > > Subject: Re: [PATCH v2 8/9] examples/l3fwd: add parse-ptype option > > > > On Thu, Dec 29, 2016 at 07:30:42AM +0000, Jianfeng Tan wrote: > > > To support those devices that do not provide packet type info when > > > receiving packets, add a new option, --parse-ptype, to analyze > > > packet type in the Rx callback. > > > > I think this would be needed for all PMD drivers don't have the PTYPE > > support. For these, --parse-ptype looks like a mandatory option in > > the l3fwd example. I didn't find such option given in your test guide > > though, which is weird. Mistake? > > Oops, my fault, it should be used with this option. As I just cared about if packets are received, instead of what types of packets are received, so I missed that. I'll fix it. > > > > > Besides that, is there a way to query whether a PMD supports PTYPE > > or not? > > Yes, we have API rte_eth_dev_get_supported_ptypes() to do that. This patch is to emulate the commit 71a7e2424e07 ("examples/l3fwd: fix using packet type blindly"). > > As we talked offline, I'll leverage this API to query if device support needed ptypes, if not, register callback to analysis ptypes. This avoids to use another option. ... > But for record, this also leads to un-consistent behavior with l3fwd. Yes, and I think we should keep it consistent to l3fwd and all its variants. Just think it this way: those variants don't do that will not work with virtio PMD (and others don't have the PTYPE support). That said, you could split this patch set to two sets: one for adding the support of virtio interrupt, another one for fixing the l3fwd (and its variants) for some PMDs don't have PTYPE support. OTOH, that's the typical issue we will meet when we make same code multiple copies, one for demonstrating one specific feature (or something like that): it's a bit painful if we need change something common in all copies. --yliu