From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57902A0C43; Fri, 15 Oct 2021 18:58:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E68840041; Fri, 15 Oct 2021 18:58:40 +0200 (CEST) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id 355754003C for ; Fri, 15 Oct 2021 18:58:39 +0200 (CEST) Received: by mail-pg1-f174.google.com with SMTP id r2so9105565pgl.10 for ; Fri, 15 Oct 2021 09:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/KWfWYNa/dILL9oQt80dZuA0LbVTfwh03EIG++oz52s=; b=k/iXM2RWb5DQfP2mIQUbTak7x7jk5xrzFsLt5b4E6MX/f97jxlrRQVPDifUa0rT/+a MIEDLhDO8AE70S6aOhJispg3R9Ox0TF3+noKf7F+2HpjJ5WSCymV1nzfl8ZErL/k4vRH RTb/RaEvjZWG8rMVfVlZAGcMBT9iR5kQm/hS15XxiPKLPptykpZns1GpIrk8ZrttThnk 7/Unq6IkuMwuzUoL8HAr6g3l2vVsXMxFXTnfMoFWgJ0UXouI4NdrsKE4dnJGxnReF7m0 Ujbgk6c2E9rnBEoGFsVAcms1X9oqodnx7oUBnoQe7Yhjr7GTG7PFjeD8rgXGGukBmOMt b/jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/KWfWYNa/dILL9oQt80dZuA0LbVTfwh03EIG++oz52s=; b=jXyypcMkJtSxCo4r/roLkRmx88UAwi3Dl16wl8iUFeMqpOyAb9rHOmefnO6mwnKY9G ny3h1rKg7YwWM96mNsM21vmMBwhrcg5dLKfcoIFnTVvelUh2R5YNOcNVShSk3tHgZjmH rdnRoIbba7zNmeeqTCwIjmXhiPEJtRQWUDI8k1rXkJSZp7KfcrEw6zq9ApjJPVgDE8bO m10V96qL6yfc/ZU+qEMJG8xVKRZgtKd2lxjCfq9uRi0BhgGkofxTjA10N4wh/0zHkKKJ KQVTjvzSb2MEfWnnSXeh0bmS3SjgjdaXWEBlqd0Me9N9SPgfM/giM9l/5dQsP3spOtkS ttxg== X-Gm-Message-State: AOAM5312WmZy8Dp4Ikqg+8CSCeFT7XI67Xqs0HwmFzBtbkmOE0UbeYWa S5mlS2sznfaQ2W4tYf1VP7YEFA== X-Google-Smtp-Source: ABdhPJwd9VqyVyvy7iq4FR1Jv+L0PM+DMqd1libmldChCP4c+OoxXO4DAHmbu/Go4OU0ve/s6N4gNw== X-Received: by 2002:aa7:90d2:0:b0:44c:e078:d6fb with SMTP id k18-20020aa790d2000000b0044ce078d6fbmr12663087pfk.7.1634317118104; Fri, 15 Oct 2021 09:58:38 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id 12sm5384485pfz.133.2021.10.15.09.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 09:58:37 -0700 (PDT) Date: Fri, 15 Oct 2021 09:58:34 -0700 From: Stephen Hemminger To: Vladimir Medvedkin Cc: dev@dpdk.org, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com Message-ID: <20211015095834.469a4efd@hermes.local> In-Reply-To: <1634290206-251913-2-git-send-email-vladimir.medvedkin@intel.com> References: <1634290206-251913-1-git-send-email-vladimir.medvedkin@intel.com> <1634290206-251913-2-git-send-email-vladimir.medvedkin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/5] hash: add new toeplitz hash implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Fri, 15 Oct 2021 10:30:02 +0100 Vladimir Medvedkin wrote: > + m[i * 8 + j] = (rss_key[i] << j)| > + (uint8_t)((uint16_t)(rss_key[i + 1]) >> > + (8 - j)); > + } This ends up being harder than necessary to read. Maybe split into multiple statements and/or use temporary variable. > +RTE_INIT(rte_thash_gfni_init) > +{ > + rte_thash_gfni_supported = 0; Not necessary in C globals are initialized to zero by default. By removing that the constructor can be totally behind #ifdef > +__rte_internal > +static inline __m512i > +__rte_thash_gfni(const uint64_t *mtrx, const uint8_t *tuple, > + const uint8_t *secondary_tuple, int len) > +{ > + __m512i permute_idx = _mm512_set_epi8(7, 6, 5, 4, 7, 6, 5, 4, > + 6, 5, 4, 3, 6, 5, 4, 3, > + 5, 4, 3, 2, 5, 4, 3, 2, > + 4, 3, 2, 1, 4, 3, 2, 1, > + 3, 2, 1, 0, 3, 2, 1, 0, > + 2, 1, 0, -1, 2, 1, 0, -1, > + 1, 0, -1, -2, 1, 0, -1, -2, > + 0, -1, -2, -3, 0, -1, -2, -3); NAK Please don't put the implementation in an inline. This makes it harder to support (API/ABI) and blocks other architectures from implementing same thing with different instructions.