From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@epfl.ch>
Cc: dev@dpdk.org, users@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-users] Why packet_type is zero?
Date: Tue, 10 Nov 2015 15:55:06 +0100 [thread overview]
Message-ID: <2072134.jEP6IvT7ZX@xps13> (raw)
In-Reply-To: <5642034D.8070406@epfl.ch>
Thanks for reporting.
2015-11-10 15:46, Arseniy Zaostrovnykh:
> Is the pcap driver obsolete?
No
> L3fwd example(http://dpdk.org/doc/guides/sample_app_ug/l3_forward.html)
> check the mbuf field packet_type, and in the zero case (which is a
> default value, as far as I know) it does nothing. At the same time, only
> few drivers even mention this field:
>
> dpdk-2.1.0 $ grep packet_type drivers -Rl
> drivers/net/enic/enic_main.c
> drivers/net/e1000/igb_rxtx.c
> drivers/net/ixgbe/ixgbe_rxtx.c
> drivers/net/mlx4/mlx4.c
> drivers/net/i40e/i40e_rxtx.c
> drivers/net/mpipe/mpipe_tilegx.c
> drivers/net/vmxnet3/vmxnet3_rxtx.c
> drivers/net/fm10k/fm10k_rxtx.c
> drivers/net/cxgbe/sge.c
>
> And a PCap driver (drivers/net/pcap/rte_eth_pcap.c) specifically, does
> not alter the field, so L3fwd application drops all packets.
The zero value is acceptable.
#define RTE_PTYPE_UNKNOWN 0x00000000
Maybe a fix is required in the l3fwd example?
Or maybe it should be explicit that it works with only few drivers.
More generally, the packet type is not mandatory for drivers.
At a time we were talking about implementing a generic callback to
fill it. Or it can be filled in an application fallback with parsing.
parent reply other threads:[~2015-11-10 14:56 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <5642034D.8070406@epfl.ch>]
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=2072134.jEP6IvT7ZX@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=arseniy.zaostrovnykh@epfl.ch \
--cc=dev@dpdk.org \
--cc=users@dpdk.org \
/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).