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 BC2F545B04; Thu, 10 Oct 2024 17:04:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B6F3402F1; Thu, 10 Oct 2024 17:04:19 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 4558E402E8 for ; Thu, 10 Oct 2024 17:04:18 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-71df67c6881so917841b3a.3 for ; Thu, 10 Oct 2024 08:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728572657; x=1729177457; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=O7dnnrkYryDTi/vlRx2tpvTOXbwlm9n/67/aKzDccZ8=; b=dR5U+1pkDw1dPuTE/aoCMkaLIjImjzCHgMZS7TDT/VPfjKraMyq09ptL+iLt+m4jep ZentCSOfFf/b8odtNPHjg8RPhrk7+3WayAqaAJpUZpA5AyGco1eJHkIRk6bRFVK0P3s3 ULfUCLaIGCI/ry+eNjlNA/pO02IA8Z4HqRhrNt+ovtHsmXaJItRsKxXAjF2rqQZUXPPA 2AfXJrQK4piomIoD17TGyJ99X6aH+mY1p28xQ4c/EbYPcEdS8XTgye0OrJXhSXLTLjbj caHhdLNEyeaS1MrdcjSGwS/8fJaq7vQdRXCe5mD8D2vD6yzJU/L3khRL/5vg+LQbyZta qaWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728572657; x=1729177457; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O7dnnrkYryDTi/vlRx2tpvTOXbwlm9n/67/aKzDccZ8=; b=ii5FYCXP1oS/VtYHShJEs+L23GFXfmpFA74dZjt0g57gbfLHrQKBhw7pjhi/dUgR/b 0YLycYXkZGwEjuJVt/wx6Yj2S1L8W9PPLFWJ7uXABlx5Aycf3wFPAsqCus+iIN0In8QQ edQ3JzbQvKUvIiMoNxyPPfnz5N/uLqYw6RXWws3hUdf1R1pWjUlIi18NdhEytoONKQcZ 2ZxP6bCO/GUzlI9fpvXPOCXNSDmaEhA7TvJqHL3rT50mQISUvK6eiqZPzIZBCdJE0i47 6B3XHo5lSR64zQMwlCWsb8GOzGs7QHFuCUrajUiElolRe/zGYhY3gU8g313bNSYqOIaC 1cJg== X-Gm-Message-State: AOJu0YzO5D33jntQAFe99cJBYIKEoEis4CJfWVPWi0zO+d+XPthFB+IT ouphF+BrcK1D+jMi64agqPoEoMnA1Q3tJDiiEH3w1c2ItVD68GBlToqJQwvuXMs= X-Google-Smtp-Source: AGHT+IFdRewcCYQLnaM1SHyXC9M1BH3wqq/DASSZkyKdSAoQFJYGICEv6aUs1wmqI24Q+D5JEC6eyQ== X-Received: by 2002:a05:6a00:4614:b0:71e:10ed:6f3 with SMTP id d2e1a72fcca58-71e1dab3e86mr11671416b3a.0.1728572657391; Thu, 10 Oct 2024 08:04:17 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e2a9f5271sm1118474b3a.56.2024.10.10.08.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 08:04:17 -0700 (PDT) Date: Thu, 10 Oct 2024 08:04:15 -0700 From: Stephen Hemminger To: Vladimir Medvedkin Cc: dev@dpdk.org, Yipeng Wang , Sameh Gobriel , Bruce Richardson Subject: Re: [PATCH v2 1/4] thash: add RSS hash key generation API Message-ID: <20241010080415.481f3f30@hermes.local> In-Reply-To: <20241010123331.749004-2-vladimir.medvedkin@intel.com> References: <20241010123331.749004-1-vladimir.medvedkin@intel.com> <20241010123331.749004-2-vladimir.medvedkin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 10 Oct 2024 12:33:28 +0000 Vladimir Medvedkin wrote: > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice > + * > + * Modify RSS hash key such that subtuple bits corresponding to `entropy_sz` > + * bits starting from `entropy_start` will have the most even distribution with > + * this key with a given ReTa size. > + * > + * @param key pointer to the RSS hash key > + * @param key_len length of the key > + * @param reta_sz_log log2 of the size of RSS redirection table. i.e. number of > + * bits of the rss hash value used to identify RSS ReTa entry > + * @param entropy_start bit offset from the beginning of the tuple where user > + * expects best distribution of the subtuple values. > + * @param entropy_sz size in bits of the part of subtuple > + * > + * @return > + * 0 on success negative otherwise > + */ > +__rte_experimental > +int > +rte_thash_gen_key(uint8_t *key, int key_len, int reta_sz_log, > + int entropy_start, int entropy_sz); Avoid use of int wherever possible. Unless you want to allow negative offsets. Maybe something like? int rte_thash_gen_key(uint8_t *key, size_t key_len, size_t reta_sz_bits, uint32_t entropy_start, size_t entropy_sz)