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 9CF02432B9; Mon, 6 Nov 2023 11:57:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86BE8402AE; Mon, 6 Nov 2023 11:57:29 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 5E248402AA for ; Mon, 6 Nov 2023 11:57:28 +0100 (CET) Received: from [192.168.1.38] (unknown [188.170.78.242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 69F9E5E; Mon, 6 Nov 2023 13:57:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 69F9E5E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1699268247; bh=Z3QzU842bs4URsoOpJ2cLxZmxrzjMBU+2iQkYiGLUpU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=xetSHBZO08VpJYXv1RiOOzG3NYrT5cZES72zCAHEzhI0Sm08SAZ88oio+byuhuVgd dWC+Th+tB8oxkr3Sv3ABK70OP6jIIzAj74w5b47pTe02hIc/QhYOo7Guk/L8F0clo9 XRMOmBFeqE95Y4JlqXZZAxJQuYHfp7T6ZJHlShBg= Message-ID: <964859a1-9ccf-4cb5-8c3f-34e26f0f5ebe@oktetlabs.ru> Date: Mon, 6 Nov 2023 13:57:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 1/9] ethdev: overwrite some comment related to RSS Content-Language: en-US To: Jie Hai , dev@dpdk.org, Thomas Monjalon , Ferruh Yigit , Ori Kam Cc: lihuisong@huawei.com, fengchengwen@huawei.com, liudongdong3@huawei.com References: <20230315110033.30143-1-liudongdong3@huawei.com> <20231102082020.2588392-1-haijie1@huawei.com> <20231102082020.2588392-2-haijie1@huawei.com> From: Andrew Rybchenko In-Reply-To: <20231102082020.2588392-2-haijie1@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 11/2/23 11:20, Jie Hai wrote: > In rte_eth_dev_rss_hash_conf_get(), the "rss_key_len" should be > greater than or equal to the "hash_key_size" which get from > rte_eth_dev_info_get() API. And the "rss_key" should contain at > least "hash_key_size" bytes. If these requirements are not met, > the query unreliable. > > In rte_eth_dev_rss_hash_update() or rte_eth_dev_configure(), the > "rss_key_len" indicates the length of the "rss_key" in bytes of > the array pointed by "rss_key", it should be equal to the > "hash_key_size" if "rss_key" is not NULL. > > This patch overwrites the comments of fields of "rte_eth_rss_conf" > and "RTE_ETH_HASH_FUNCTION_DEFAULT", checks "rss_key_len" in > ethdev level, and documents these changes. > > Signed-off-by: Jie Hai > Acked-by: Huisong Li > Acked-by: Chengwen Feng > @@ -4712,6 +4730,7 @@ int > rte_eth_dev_rss_hash_conf_get(uint16_t port_id, > struct rte_eth_rss_conf *rss_conf) > { > + struct rte_eth_dev_info dev_info = { 0 }; There is no poiint to init dev_info here. Get functoin does it anyway.