DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: Re: [dpdk-dev] [PATCH v2 8/9] examples/l3fwd: add parse-ptype option
Date: Tue, 3 Jan 2017 14:59:39 +0800	[thread overview]
Message-ID: <20170103065939.GN21789@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E3651102F09@SHSMSX103.ccr.corp.intel.com>

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

  reply	other threads:[~2017-01-03  6:57 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-04  0:18 [dpdk-dev] [PATCH 0/5] Interrupt mode for virtio PMD Jianfeng Tan
2016-12-04  0:18 ` [dpdk-dev] [PATCH 1/5] net/virtio: add Rx descriptor check Jianfeng Tan
2016-12-04  0:18 ` [dpdk-dev] [PATCH 2/5] net/virtio: setup Rx fastpath interrupts Jianfeng Tan
2016-12-04  0:18 ` [dpdk-dev] [PATCH 3/5] net/virtio: remove Rx queue interrupts when stopping Jianfeng Tan
2016-12-04  0:18 ` [dpdk-dev] [PATCH 4/5] net/virtio: add Rx queue intr enable/disable functions Jianfeng Tan
2016-12-04  0:18 ` [dpdk-dev] [PATCH 5/5] examples/l3fwd: add parse-ptype option Jianfeng Tan
2016-12-08  6:59   ` Yuanhan Liu
2016-12-08  7:40     ` Tan, Jianfeng
2016-12-29  7:30 ` [dpdk-dev] [PATCH v2 0/9] rxq interrupt mode for virtio PMD Jianfeng Tan
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 1/9] net/virtio: fix rewriting LSC flag Jianfeng Tan
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 2/9] net/virtio: add Rx descriptor check Jianfeng Tan
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 3/9] net/virtio: add PCI ops for queue/irq binding Jianfeng Tan
2016-12-30  5:46     ` Yuanhan Liu
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 4/9] net/virtio: add Rx queue intr enable/disable functions Jianfeng Tan
2016-12-30  5:59     ` Yuanhan Liu
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 5/9] net/virtio: setup rxq interrupts Jianfeng Tan
2016-12-30  6:27     ` Yuanhan Liu
2017-01-04  6:56       ` Tan, Jianfeng
2017-01-04  7:22         ` Yuanhan Liu
2017-01-04  7:30           ` Tan, Jianfeng
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 6/9] net/virtio: unbind intr/eventfd when stop device Jianfeng Tan
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 7/9] net/virtio: unmapping queue/irq when close device Jianfeng Tan
2016-12-30  6:30     ` Yuanhan Liu
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 8/9] examples/l3fwd: add parse-ptype option Jianfeng Tan
2016-12-30  6:39     ` Yuanhan Liu
2016-12-30  7:30       ` Tan, Jianfeng
2017-01-03  6:59         ` Yuanhan Liu [this message]
2016-12-29  7:30   ` [dpdk-dev] [PATCH v2 9/9] examples/l3fwd-power: fix not stop and close device Jianfeng Tan
2016-12-30  6:44     ` Yuanhan Liu
2016-12-30  6:56       ` Tan, Jianfeng
2016-12-29  7:42   ` [dpdk-dev] [PATCH v2 0/9] rxq interrupt mode for virtio PMD Tan, Jianfeng
2016-12-30  5:41     ` Yuanhan Liu
2016-12-30  6:57   ` Yuanhan Liu
2017-01-16 14:46 ` [dpdk-dev] [PATCH v3 00/10] " Jianfeng Tan
2017-01-16 14:46   ` [dpdk-dev] [PATCH v3 01/10] net/virtio: fix rewriting LSC flag Jianfeng Tan
2017-01-16 14:46   ` [dpdk-dev] [PATCH v3 02/10] net/virtio: clean up wrapper of set_config_irq Jianfeng Tan
2017-01-16 14:46   ` [dpdk-dev] [PATCH v3 03/10] net/virtio: add Rx descriptor check Jianfeng Tan
2017-01-16 19:16     ` Stephen Hemminger
2017-01-17  4:09       ` Yuanhan Liu
2017-01-16 14:46   ` [dpdk-dev] [PATCH v3 04/10] net/virtio: add PCI ops for queue/irq binding Jianfeng Tan
2017-01-16 14:46   ` [dpdk-dev] [PATCH v3 05/10] net/virtio: add Rx queue intr enable/disable functions Jianfeng Tan
2017-01-17  2:30     ` Jason Wang
2017-01-16 14:46   ` [dpdk-dev] [PATCH v3 06/10] net/virtio: setup rxq interrupts Jianfeng Tan
2017-01-16 14:46   ` [dpdk-dev] [PATCH v3 07/10] net/virtio: unbind intr/eventfd when stop device Jianfeng Tan
2017-01-16 14:47   ` [dpdk-dev] [PATCH v3 08/10] net/virtio: unmapping queue/irq when close device Jianfeng Tan
2017-01-16 14:47   ` [dpdk-dev] [PATCH v3 09/10] examples/l3fwd-power: add parse-ptype option Jianfeng Tan
2017-01-17  5:16     ` Yuanhan Liu
2017-01-17  5:23       ` Tan, Jianfeng
2017-01-16 14:47   ` [dpdk-dev] [PATCH v3 10/10] examples/l3fwd-power: fix not stop and close device Jianfeng Tan
2017-01-17  2:14   ` [dpdk-dev] [PATCH v3 00/10] rxq interrupt mode for virtio PMD Yao, Lei A
2017-01-17  7:10 ` [dpdk-dev] [PATCH v4 " Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 01/10] net/virtio: fix rewriting LSC flag Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 02/10] net/virtio: clean up wrapper of set_config_irq Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 03/10] net/virtio: add Rx descriptor check Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 04/10] net/virtio: add PCI ops for queue/irq binding Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 05/10] net/virtio: add Rx queue intr enable/disable functions Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 06/10] net/virtio: setup rxq interrupts Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 07/10] net/virtio: unbind intr/eventfd when stop device Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 08/10] net/virtio: unmapping queue/irq when close device Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 09/10] examples/l3fwd-power: add parse-ptype option Jianfeng Tan
2017-01-17  7:10   ` [dpdk-dev] [PATCH v4 10/10] examples/l3fwd-power: fix not stop and close device Jianfeng Tan
2017-01-17  8:28   ` [dpdk-dev] [PATCH v4 00/10] rxq interrupt mode for virtio PMD Yuanhan Liu
2017-01-17  8:00 ` [dpdk-dev] [PATCH v5 06/10] net/virtio: setup rxq interrupts Jianfeng Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170103065939.GN21789@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).