From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2F6EAA0487 for ; Thu, 4 Jul 2019 15:19:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 06E211BE36; Thu, 4 Jul 2019 15:19:27 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 976221BE32 for ; Thu, 4 Jul 2019 15:19:25 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id n4so6649677wrs.3 for ; Thu, 04 Jul 2019 06:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Vt1t+cNmFP6DnOvCW62dMD6eZ5bT6UoukdkRKrwqNFQ=; b=SppNHvrwwUSA2BZ38R1/SBYC3sA3wKoSS5bTouZQcaVxAccDb8lqcu5ri+J2AIisG9 XIeKD7CmQzBM0XjqW9idyFq756MP15s8xgyNRTstxLfpRI3GllgwKW3aGZ8Q/oBIqbMU cG6k27Sa7/5itE6ceL59Qrw2knVAWSKch4v/X4KlJhUR6iswU6Z5tV16jxr1jocrxXgX 1uoL2V7BWKpAViy5nLYOtWsiobdiosGbSKCcv4Cy95OzxL4Kd2R/oaGQwVMMJ1k5Rueo RKfxJzu2UrVUVUh3G+JtOqurbnI4x5wGLzDVPaXVwkLXurfD1zoB3Kwc8Swv40++GHV4 QmFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Vt1t+cNmFP6DnOvCW62dMD6eZ5bT6UoukdkRKrwqNFQ=; b=MdTtDEwraUSylsGu8tfuCkgKuXO734fcK3L4pYlEk4cFEJsBCCjTilXonkQg/ZmgZW Aa3M1nFvZtOyJoT/xT7TtyaGo7Qh2DohjEaux9zl2P+zZ/MPfKv+2Yw9b2VdOpE8dTKU QDByq1xs3H5UX0rwD794f4MrdeUefO1XQqcPyAB2xUm+vVW36gh9Xy0+sCIz0hbVbdZP os25bdqDDcd8I/j+U+62GDxhvTpEPj8yEWjxwIF8zbPgFKiAFnGDJg60eZM7yg63adsI LhJ8jFKlzayuubjXMxpdXgKS6GMcX+8THq9Y5kHM12/VcsS3fhEaG8gMgOhxuJF1JKiY xIeg== X-Gm-Message-State: APjAAAW+fUj4wbe8r4e8oF+vtPTRRr4estIdjAUNqNoOIQlOvZIChz1G w+GQq0cu1165sFWoTzTjO9eAYw== X-Google-Smtp-Source: APXvYqylMnXilJGvYQJgB4W3bF8NMernJ0XsyEKSaSNDUBeVkJetQJUNGTpIvd3z16rIx8NGVVVAOg== X-Received: by 2002:a5d:6709:: with SMTP id o9mr34287820wru.301.1562246365361; Thu, 04 Jul 2019 06:19:25 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id s188sm5410784wmf.40.2019.07.04.06.19.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2019 06:19:24 -0700 (PDT) Date: Thu, 4 Jul 2019 15:19:22 +0200 From: Adrien Mazarguil To: "Zhang, Qi Z" Cc: "Su, Simei" , "Wu, Jingjing" , "Xing, Beilei" , "Yang, Qiming" , "dev@dpdk.org" , Shahaf Shuler , Yongseok Koh Message-ID: <20190704131922.GN4512@6wind.com> References: <1562215567-75436-1-git-send-email-simei.su@intel.com> <20190704090651.GJ4512@6wind.com> <039ED4275CED7440929022BC67E7061153D5FF60@SHSMSX105.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <039ED4275CED7440929022BC67E7061153D5FF60@SHSMSX105.ccr.corp.intel.com> Subject: Re: [dpdk-dev] [RFC] ethdev: support symmetric hash function 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Jul 04, 2019 at 12:48:25PM +0000, Zhang, Qi Z wrote: > > > > -----Original Message----- > > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > > Sent: Thursday, July 4, 2019 5:07 PM > > To: Su, Simei > > Cc: Zhang, Qi Z ; Wu, Jingjing ; > > Xing, Beilei ; Yang, Qiming ; > > dev@dpdk.org; Shahaf Shuler ; Yongseok Koh > > > > Subject: Re: [dpdk-dev] [RFC] ethdev: support symmetric hash function > > > > On Thu, Jul 04, 2019 at 12:46:07PM +0800, simei wrote: > > > From: Simei Su > > > > > > Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion. > > > To support symmetric hash by rte_flow RSS action, this RFC introduces > > > SYMMETRIC_TOEPLITZ to rte_eth_hash_function. > > > > > > Signed-off-by: Simei Su > > > --- > > > lib/librte_ethdev/rte_flow.h | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/lib/librte_ethdev/rte_flow.h > > > b/lib/librte_ethdev/rte_flow.h index f3a8fb1..e3c4fe5 100644 > > > --- a/lib/librte_ethdev/rte_flow.h > > > +++ b/lib/librte_ethdev/rte_flow.h > > > @@ -1744,6 +1744,7 @@ enum rte_eth_hash_function { > > > RTE_ETH_HASH_FUNCTION_DEFAULT = 0, > > > RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */ > > > RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */ > > > + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, /**< Symmetric > > TOEPLITZ */ > > > > "Symmetric TOEPLITZ" => "Symmetric Toeplitz." > > > > > RTE_ETH_HASH_FUNCTION_MAX, > > > }; > > > > Other than that, no problem with this change (no ABI impact, no need for > > deprecation). Please update testpmd a part of the same patch: > > Is it still ABI break but just with little risk? > RTE_ETH_HASH_FUNCTION_MAX's value is changed anyway. > Should we just remove it, if no one use it? Indeed, it will update RTE_ETH_HASH_FUNCTION_MAX so you're technically right, and the fact it's unused in DPDK is doesn't mean applications are not using it for something. However for this specific case, the intent behind RTE_ETH_HASH_FUNCTION_MAX is clearly to give out the number of enum entries, applications are not supposed to use it for anything other than determining if an arbitrary integer value corresponds to a valid hash function. And this is the reason we could say it's OK ABI-wise to increase it (not ideal but acceptable): a binary application has a fixed idea of RTE_ETH_HASH_FUNCTION_MAX, it doesn't know the entries you're about to add yet. To such an application, those will exceed RTE_ETH_HASH_FUNCTION_MAX and should be rejected accordingly. A more conservative approach would be to mark RTE_ETH_HASH_FUNCTION_MAX as deprecated (in a separate patch) and schedule it for removal while adding new entries after it. Its position in the enum could be recycled once removed. If you want to remove RTE_ETH_HASH_FUNCTION_MAX directly, do it in a separate RFC/patch as it will otherwise block the rest of your submission for something like 2 releases after deprecation. It's up to you. I'm fine with any of these approaches. -- Adrien Mazarguil 6WIND