On 10/19/2017 2:00 AM, Kirill Rybalchenko wrote: > For complex packets use raw flow type with pre-constructed packet buffer > instead of creating a packet internally in PMD. > > Signed-off-by: Kirill Rybalchenko <kirill.rybalche...@intel.com>
<...> > diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h > index 467b415..fd744af 100644 > --- a/drivers/net/i40e/rte_pmd_i40e.h > +++ b/drivers/net/i40e/rte_pmd_i40e.h > @@ -250,6 +250,64 @@ struct rte_pmd_i40e_queue_regions { > region[RTE_PMD_I40E_REGION_MAX_NUM]; > }; > > +/* Behavior will be taken if raw packet template is matched. */ > +enum rte_pmd_i40e_pkt_template_behavior { > + RTE_PMD_I40E_PKT_TEMPLATE_ACCEPT = 0, Assignment is not required, it is zero by default. > + RTE_PMD_I40E_PKT_TEMPLATE_REJECT, > + RTE_PMD_I40E_PKT_TEMPLATE_PASSTHRU, > +}; > + > +/* Flow director report status > + * It defines what will be reported if raw packet template is matched. > + */ > +enum rte_pmd_i40e_pkt_template_status { > + RTE_PMD_I40E_PKT_TEMPLATE_NO_REPORT_STATUS = 0, > + RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID, > + RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID_FLEX_4, > + RTE_PMD_I40E_PKT_TEMPLATE_REPORT_FLEX_8, > +}; > + > +/* A structure used to define an action when raw packet template is matched. > */ > +struct rte_pmd_i40e_pkt_template_action { > + uint16_t rx_queue; > + enum rte_pmd_i40e_pkt_template_behavior behavior; > + enum rte_pmd_i40e_pkt_template_status report_status; > + uint8_t flex_off; > +}; > + > +/* A structure used to define the input for raw packet template. */ > +struct rte_pmd_i40e_pkt_template_input { > + uint16_t pctype; /* pctype used for raw packet template. */ > + void *packet; /* Buffer conatining raw packet template. */ > + uint32_t length; /* Length of buffer with raw packet template. */ > +}; > + > +struct rte_pmd_i40e_pkt_template_conf { > + struct rte_pmd_i40e_pkt_template_input input; > + struct rte_pmd_i40e_pkt_template_action action; > + uint32_t soft_id; > +}; These are in public header now. Can you please document structs and elements of them via doxygen style comments? Thanks, ferruh