From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 23 Oct 2017 15:11:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,424,1503385200"; d="scan'208";a="1234321579" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.136]) ([10.241.225.136]) by fmsmga002.fm.intel.com with ESMTP; 23 Oct 2017 15:11:30 -0700 To: Kirill Rybalchenko , dev@dpdk.org Cc: andrey.chilikin@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com References: <1508403636-91235-1-git-send-email-kirill.rybalchenko@intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 23 Oct 2017 15:11:30 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1508403636-91235-1-git-send-email-kirill.rybalchenko@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/i40e: add support for packet template to flow director X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Oct 2017 22:11:32 -0000 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