[dpdk-dev] ethernet api: Document rte_eth_vmdq_rx_conf

Message ID 20170511082800.17608-1-tom.barbette@ulg.ac.be (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Tom Barbette May 11, 2017, 8:28 a.m. UTC
  From documentation it is very unclear how VMDq configuration can be
tweaked, and online search offer very poor results.

This patch will ultimately spawn an online documentation page
for the rte_eth_vmdq_rx_conf struct which will eventually add a bit of
documentation about the rx_mode tag and how to allow e.g. VMDq pools
to receive packets without VLAN tags.
---
 lib/librte_ether/rte_ethdev.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
  

Comments

Thomas Monjalon June 8, 2017, 8:48 p.m. UTC | #1
11/05/2017 10:28, Tom Barbette:
> From documentation it is very unclear how VMDq configuration can be
> tweaked, and online search offer very poor results.
> 
> This patch will ultimately spawn an online documentation page
> for the rte_eth_vmdq_rx_conf struct which will eventually add a bit of
> documentation about the rx_mode tag and how to allow e.g. VMDq pools
> to receive packets without VLAN tags.
> ---

I'm not an expert of VMDq.
Please help reviewing this doc addition.

[..]
> +/**
> + * A structure used to configure the VMDQ feature of an Ethernet port when
> + * not combined with the DCB feature.
> + *
> + * Using this feature, packets are routed to a pool of queues. By default, the
> + * pool selection is based on the MAC address, the vlan id in the vlan tag as
> + * specified in the pool_map array.
> + * Passing the ETH_VMDQ_ACCEPT_UNTAGGED in the rx_mode field allows pool
> + * selection using only the MAC address. MAC address to pool mapping is done
> + * using the rte_eth_dev_mac_addr_add function, with the pool parameter
> + * corresponding to the pool id.
> + *
> + * Queue selection within the selected pool will be done using RSS when
> + * it is enabled or revert to the first queue of the pool if not.
> + *
> + * A default pool may be used, if desired, to route all traffic which
> + * does not match the vlan filter rules or any pool MAC address.
> + */
>  struct rte_eth_vmdq_rx_conf {
  
John McNamara June 30, 2017, 2:42 p.m. UTC | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tom Barbette
> Sent: Thursday, May 11, 2017 9:28 AM
> To: thomas@monjalon.net
> Cc: dev@dpdk.org; Tom Barbette <tom.barbette@ulg.ac.be>
> Subject: [dpdk-dev] [PATCH] ethernet api: Document rte_eth_vmdq_rx_conf
> 
> From documentation it is very unclear how VMDq configuration can be
> tweaked, and online search offer very poor results.
> 
> This patch will ultimately spawn an online documentation page for the
> rte_eth_vmdq_rx_conf struct which will eventually add a bit of
> documentation about the rx_mode tag and how to allow e.g. VMDq pools to
> receive packets without VLAN tags.

Hi Tom,

Thanks for the. The doc looks good but you need to add a signoff to the
message body:

http://dpdk.org/doc/guides/contributing/patches.html#commit-messages-body

John
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 0f38b45..b4b3c79 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -629,6 +629,24 @@  struct rte_eth_vmdq_dcb_conf {
 	/**< Selects a queue in a pool */
 };
 
+/**
+ * A structure used to configure the VMDQ feature of an Ethernet port when
+ * not combined with the DCB feature.
+ *
+ * Using this feature, packets are routed to a pool of queues. By default, the
+ * pool selection is based on the MAC address, the vlan id in the vlan tag as
+ * specified in the pool_map array.
+ * Passing the ETH_VMDQ_ACCEPT_UNTAGGED in the rx_mode field allows pool
+ * selection using only the MAC address. MAC address to pool mapping is done
+ * using the rte_eth_dev_mac_addr_add function, with the pool parameter
+ * corresponding to the pool id.
+ *
+ * Queue selection within the selected pool will be done using RSS when
+ * it is enabled or revert to the first queue of the pool if not.
+ *
+ * A default pool may be used, if desired, to route all traffic which
+ * does not match the vlan filter rules or any pool MAC address.
+ */
 struct rte_eth_vmdq_rx_conf {
 	enum rte_eth_nb_pools nb_queue_pools; /**< VMDq only mode, 8 or 64 pools */
 	uint8_t enable_default_pool; /**< If non-zero, use a default pool */