[dpdk-dev,1/2] ethdev: add support for raw flow type for flow director

Message ID 1503588634-85735-2-git-send-email-kirill.rybalchenko@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Rybalchenko, Kirill Aug. 24, 2017, 3:30 p.m. UTC
  Add new structure rte_eth_raw_flow to the union rte_eth_fdir_flow
to support filter for raw flow type

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 lib/librte_ether/rte_eth_ctrl.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Comments

Radu Nicolau Sept. 4, 2017, 10:35 a.m. UTC | #1
On 8/24/2017 4:30 PM, Kirill Rybalchenko wrote:
> Add new structure rte_eth_raw_flow to the union rte_eth_fdir_flow
> to support filter for raw flow type
>
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> ---
>   lib/librte_ether/rte_eth_ctrl.h | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
> index 8386904..22d9640 100644
> --- a/lib/librte_ether/rte_eth_ctrl.h
> +++ b/lib/librte_ether/rte_eth_ctrl.h
> @@ -525,6 +525,15 @@ struct rte_eth_tunnel_flow {
>   };
>   
>   /**
> + * A structure used to define the input for raw flow
> + */
> +struct rte_eth_raw_flow {
> +	uint16_t flow; /**< flow type. */
> +	void *packet; /**< pre-constructed packet buffer. */
> +	uint16_t length; /**< buffer length. */
> +};
Nitpicking on comments alignment.
> +
> +/**
>    * An union contains the inputs for all types of flow
>    * Items in flows need to be in big endian
>    */
> @@ -540,6 +549,7 @@ union rte_eth_fdir_flow {
>   	struct rte_eth_ipv6_flow   ipv6_flow;
>   	struct rte_eth_mac_vlan_flow mac_vlan_flow;
>   	struct rte_eth_tunnel_flow   tunnel_flow;
> +	struct rte_eth_raw_flow    raw_flow;
>   };
>   
>   /**
  

Patch

diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index 8386904..22d9640 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -525,6 +525,15 @@  struct rte_eth_tunnel_flow {
 };
 
 /**
+ * A structure used to define the input for raw flow
+ */
+struct rte_eth_raw_flow {
+	uint16_t flow; /**< flow type. */
+	void *packet; /**< pre-constructed packet buffer. */
+	uint16_t length; /**< buffer length. */
+};
+
+/**
  * An union contains the inputs for all types of flow
  * Items in flows need to be in big endian
  */
@@ -540,6 +549,7 @@  union rte_eth_fdir_flow {
 	struct rte_eth_ipv6_flow   ipv6_flow;
 	struct rte_eth_mac_vlan_flow mac_vlan_flow;
 	struct rte_eth_tunnel_flow   tunnel_flow;
+	struct rte_eth_raw_flow    raw_flow;
 };
 
 /**