From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 6BB3A12009 for ; Tue, 16 Jan 2018 11:39:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0DA3720D6B; Tue, 16 Jan 2018 05:39:27 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 16 Jan 2018 05:39:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=9JbBV8qal2GTBvWgJE9Zl6+28b fet1rdDd3ZhBLa2sY=; b=BDDRY0p+H9/KIVIBkdHECe0mn/xceoZODFtmWBVa7x bjVXhRZaY3k5GZ1R72UAqA8PYj3vXEQ7V2eCIfOMMuxWcOFTRRGLwz57O/VgAWGo ttdtmspn8OcVBBTk0tbR/6OR/VbdGJBXwecoWfWST6oilNmuWgqETKCCdrUdrDPg 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=9JbBV8 qal2GTBvWgJE9Zl6+28bfet1rdDd3ZhBLa2sY=; b=l+bWXIUZzCCAJcqTAcTuBr CYmqAbnZ6DeNccMiAIpaNIo24YLR7NoXQg1sFSxxSMMp8hStOfuNzJ7rtJWhZ4g+ t/x28yooy0a8UPCYQ5EXfM08/FhD6Gxy8YmB4uSeVqatQf4i5jYQMWaU7YAFUDJB o1Gx36xHxhR6sFRZJFADnV4PrmhPcfXhrmOhCsF4vkAPehViMXgiuJP7nEgi3SXj g6I2JEhtk+QyGCfNQI8ym89EWZVb/cUJhSrtIiQqW/5e++rzt94+jsIOqg2K4ove H/U+h0mhhez6o+PL8BfWjT2wZK55Hs9dQyG5nvoVnTnz0R8+63SRIy4pE+zDWSbw == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A9FF17E125; Tue, 16 Jan 2018 05:39:26 -0500 (EST) From: Thomas Monjalon To: "Rybalchenko, Kirill" Cc: dev@dpdk.org, "Chilikin, Andrey" , "Yigit, Ferruh" Date: Tue, 16 Jan 2018 11:38:55 +0100 Message-ID: <1709252.ZhdtfbMa1e@xps> In-Reply-To: <696B43C21188DF4F9C9091AAE4789B824E2B886C@IRSMSX108.ger.corp.intel.com> References: <1516035500-6010-1-git-send-email-kirill.rybalchenko@intel.com> <10699556.vRynAbPGuX@xps> <696B43C21188DF4F9C9091AAE4789B824E2B886C@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] ethdev: increase flow type limit from 32 to 64 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: Tue, 16 Jan 2018 10:39:27 -0000 16/01/2018 11:31, Rybalchenko, Kirill: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 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. > If application binary was compiled with previous version of DPDK it makes > no difference if these structures were used internally there - it still will work. > If application binary was recompiled with new version of DPDK - again, > It will work. > The only issue is if application binary was compiled with old version of DPDK > library, but used with new version of DPDK shared library and uses those > structures to call functions from this DPDK library. But it can be done > only by rte_eth_dev_filter_ctrl() function, which handles this case properly. OK got it. Thanks for your patience :) > > > 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? > > Yes, actually, I did run testpmd from 17.08 with patched DPDK shared library. > It works fine, as described. > > Thanks, > Kirill.