From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 16/21] ethdev: define structures for configuring flexible payload Date: Tue, 28 Oct 2014 15:14:33 +0100 Message-ID: <5358622.rv8SXXlaQB@xps13> References: <1411711418-12881-1-git-send-email-jingjing.wu@intel.com> <1413939687-11177-1-git-send-email-jingjing.wu@intel.com> <1413939687-11177-17-git-send-email-jingjing.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Jingjing Wu Return-path: In-Reply-To: <1413939687-11177-17-git-send-email-jingjing.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-10-22 09:01, Jingjing Wu: > +/** > + * A structure defined a field vector to specify each field. > + */ > +struct rte_eth_field_vector { > + uint8_t offset; /**< Source word offset */ > + uint8_t size; /**< Field Size defined in word units */ > +}; I'm sorry but I don't understand this patch at all. I think the reason is that I need more information about flex filter. > + > +/** > + * payload type > + */ > +enum rte_eth_payload_type { > + RTE_ETH_PAYLOAD_UNKNOWN = 0, > + RTE_ETH_L2_PAYLOAD, > + RTE_ETH_L3_PAYLOAD, > + RTE_ETH_L4_PAYLOAD, > +}; > + > /** > * flow type > */ > @@ -92,6 +111,30 @@ enum rte_eth_flow_type { > }; > > /** > + * A structure used to select fields extracted from the protocol layers to > + * the Field Vector as flexible payload for filter > + */ > +struct rte_eth_flex_payload_cfg { > + enum rte_eth_payload_type type; /**< payload type */ > + uint8_t nb_field; /**< the number of following fields */ > + struct rte_eth_field_vector field[0]; > +}; > + > +#define RTE_ETH_FDIR_CFG_FLX 0x0001 > +/** > + * A structure used to config FDIR filter global set > + * to support RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_SET operation. > + */ > +struct rte_eth_fdir_cfg { > + uint16_t cmd; /**< sub command */ > + /** > + * A pointer to structure for the configuration e.g. > + * struct rte_eth_flex_payload_cfg for FDIR_CFG_FLX > + */ > + void *cfg; > +};