From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] net/i40e: add support for packet template to flow director Date: Mon, 23 Oct 2017 15:11:30 -0700 Message-ID: References: <1508403636-91235-1-git-send-email-kirill.rybalchenko@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: andrey.chilikin@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com To: Kirill Rybalchenko , dev@dpdk.org Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4BFA71B6DE for ; Tue, 24 Oct 2017 00:11:31 +0200 (CEST) In-Reply-To: <1508403636-91235-1-git-send-email-kirill.rybalchenko@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 <...> > 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