DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: enhance api doc for getting supported packet types
@ 2016-07-01  8:43 Olivier Matz
  2016-07-01 14:18 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Olivier Matz @ 2016-07-01  8:43 UTC (permalink / raw)
  To: dev, thomas.monjalon; +Cc: konstantin.ananyev

As discussed in http://dpdk.org/ml/archives/dev/2016-June/042229.html,
clarify the behavior of rte_eth_dev_get_supported_ptypes().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_ether/rte_ethdev.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index ad2f264..bb3dc7a 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -2408,6 +2408,21 @@ void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
 /**
  * Retrieve the supported packet types of an Ethernet device.
  *
+ * When a packet type is announced as supported, it *must* be recognized by
+ * the PMD. For instance, if RTE_PTYPE_L2_ETHER, RTE_PTYPE_L2_ETHER_VLAN
+ * and RTE_PTYPE_L3_IPV4 are announced, the PMD must return the following
+ * packet types for these packets:
+ * - Ether/IPv4              -> RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4
+ * - Ether/Vlan/IPv4         -> RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4
+ * - Ether/<anything else>   -> RTE_PTYPE_L2_ETHER
+ * - Ether/Vlan/<anything else> -> RTE_PTYPE_L2_ETHER_VLAN
+ *
+ * When a packet is received by a PMD, the most precise type must be
+ * returned among the ones supported. However a PMD is allowed to set
+ * packet type that is not in the supported list, at the condition that it
+ * is more precise. Therefore, a PMD announcing no supported packet types
+ * can still set a matching packet type in a received packet.
+ *
  * @note
  *   Better to invoke this API after the device is already started or rx burst
  *   function is decided, to obtain correct supported ptypes.
-- 
2.8.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: enhance api doc for getting supported packet types
  2016-07-01  8:43 [dpdk-dev] [PATCH] ethdev: enhance api doc for getting supported packet types Olivier Matz
@ 2016-07-01 14:18 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-07-01 14:18 UTC (permalink / raw)
  To: Olivier Matz, konstantin.ananyev; +Cc: dev

2016-07-01 10:43, Olivier Matz:
> As discussed in http://dpdk.org/ml/archives/dev/2016-June/042229.html,
> clarify the behavior of rte_eth_dev_get_supported_ptypes().
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Konstantin had already reviewed this text in the above thread.
Applied, thanks

Are we sure every drivers are satisfying this new constraint?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-01 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01  8:43 [dpdk-dev] [PATCH] ethdev: enhance api doc for getting supported packet types Olivier Matz
2016-07-01 14:18 ` Thomas Monjalon

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).