From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3] ethdev: increase flow type limit from 32 to 64 Date: Tue, 16 Jan 2018 10:47:38 +0100 Message-ID: <10699556.vRynAbPGuX@xps> References: <1516035500-6010-1-git-send-email-kirill.rybalchenko@intel.com> <1777513.sriIylAOkO@xps> <696B43C21188DF4F9C9091AAE4789B824E2B8810@IRSMSX108.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Chilikin, Andrey" , "Yigit, Ferruh" To: "Rybalchenko, Kirill" Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 4724B12009 for ; Tue, 16 Jan 2018 10:48:10 +0100 (CET) In-Reply-To: <696B43C21188DF4F9C9091AAE4789B824E2B8810@IRSMSX108.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 16/01/2018 10:44, Rybalchenko, Kirill: > Hi Thomas, > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 15/01/2018 18:33, Kirill Rybalchenko: > > > --- a/lib/librte_ether/rte_eth_ctrl.h > > > +++ b/lib/librte_ether/rte_eth_ctrl.h > > > @@ -662,9 +662,9 @@ enum rte_fdir_mode { > > > RTE_FDIR_MODE_PERFECT_TUNNEL, /**< Enable FDIR filter mode - > > tunnel. */ > > > }; > > > > > > -#define UINT32_BIT (CHAR_BIT * sizeof(uint32_t)) > > > +#define UINT64_BIT (CHAR_BIT * sizeof(uint64_t)) > > > #define RTE_FLOW_MASK_ARRAY_SIZE \ > > > - (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT32_BIT)/UINT32_BIT) > > > + (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT64_BIT)/UINT64_BIT) > > > > > > /** > > > * A structure used to get the information of flow director filter. > > > @@ -681,7 +681,7 @@ struct rte_eth_fdir_info { > > > uint32_t guarant_spc; /**< Guaranteed spaces.*/ > > > uint32_t best_spc; /**< Best effort spaces.*/ > > > /** Bit mask for every supported flow type. */ > > > - uint32_t flow_types_mask[RTE_FLOW_MASK_ARRAY_SIZE]; > > > + uint64_t flow_types_mask[RTE_FLOW_MASK_ARRAY_SIZE]; > > > uint32_t max_flexpayload; /**< Total flex payload in bytes. */ > > > /** Flexible payload unit in bytes. Size and alignments of all flex > > > payload segments should be multiplies of this value. */ @@ > > > -774,7 +774,7 @@ enum rte_eth_hash_function { }; > > > > > > #define RTE_SYM_HASH_MASK_ARRAY_SIZE \ > > > - (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT32_BIT)/UINT32_BIT) > > > + (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT64_BIT)/UINT64_BIT) > > > /** > > > * A structure used to set or get global hash function configurations which > > > * include symmetric hash enable per flow type and hash function type. > > > @@ -787,9 +787,9 @@ enum rte_eth_hash_function { struct > > > rte_eth_hash_global_conf { > > > enum rte_eth_hash_function hash_func; /**< Hash function type */ > > > /** Bit mask for symmetric hash enable per flow type */ > > > - uint32_t > > sym_hash_enable_mask[RTE_SYM_HASH_MASK_ARRAY_SIZE]; > > > + uint64_t > > sym_hash_enable_mask[RTE_SYM_HASH_MASK_ARRAY_SIZE]; > > > /** Bit mask indicates if the corresponding bit is valid */ > > > - uint32_t valid_bit_mask[RTE_SYM_HASH_MASK_ARRAY_SIZE]; > > > + uint64_t valid_bit_mask[RTE_SYM_HASH_MASK_ARRAY_SIZE]; > > > }; > > > > This is still changing the ABI. > > Am I missing something? > > > We change size of structures rte_eth_fdir_info and rte_eth_hash_filter_info. Yes, and these structures are allocated and read by the application? So it is an ABI break. > Application can use these structures for DPDK library API call only in > rte_eth_dev_filter_ctrl() function call. In the patch this function is > modified in the way that it will be compatible with user binary applications > compiled with previous versions of DPDK library. Have you tried to use a patched DPDK with a binary compiled with DPDK 17.11?