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 A4932A0A0F; Wed, 30 Jun 2021 13:21:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93A9740141; Wed, 30 Jun 2021 13:21:47 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id CB5BC40040 for ; Wed, 30 Jun 2021 13:21:46 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GFJk62pvFz76Cn; Wed, 30 Jun 2021 19:18:22 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 30 Jun 2021 19:21:43 +0800 To: Ferruh Yigit , "dev@dpdk.org" , Thomas Monjalon , Andrew Rybchenko CC: Beilei Xing , Matan Azrad , , References: <6ac31917-8ae6-b61f-c0c1-07d907066752@huawei.com> <50258962-ee1b-e045-aba2-9ef7912a304e@intel.com> From: "Min Hu (Connor)" Message-ID: <5b0f7327-a089-edd1-163b-7b57cd90b575@huawei.com> Date: Wed, 30 Jun 2021 19:21:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <50258962-ee1b-e045-aba2-9ef7912a304e@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] Question about 'rxm->hash.rss' and 'mb->hash.fdir' 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" Hi, Beilei, Matan, Shahaf, Viacheslav, how about your opinion? 在 2021/6/30 17:34, Ferruh Yigit 写道: > On 6/30/2021 3:45 AM, Min Hu (Connor) wrote: >> Hi, all >>     one question about 'rxm->hash.rss' and 'mb->hash.fdir'. >> >>     In Rx recv packets function, >>     'rxm->hash.rss' will report rss hash result from Rx desc. >>     'rxm->hash.fdir' will report filter identifier from Rx desc. >> >>     But function implementation differs from some PMDs. for example: >>     i40e, MLX5 report the two at the same time if pkt_flags is set,like: >> ****************************************** >>         if (pkt_flags & PKT_RX_RSS_HASH) { >>             rxm->hash.rss = >> rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss); >>         } >>         if (pkt_flags & PKT_RX_FDIR) { >>             mb->hash.fdir.hi = >>         rte_le_to_cpu_32(rxdp->wb.qword3.hi_dword.fd_id); >>         } >> ******************************************** >> >>     While, ixgbe only report one of the two. like: >> ****************************************** >>         if (likely(pkt_flags & PKT_RX_RSS_HASH)) >>             mb->hash.rss = rte_le_to_cpu_32( >>                 rxdp[j].wb.lower.hi_dword.rss); >>         else if (pkt_flags & PKT_RX_FDIR) { >>             mb->hash.fdir.hash = rte_le_to_cpu_16( >>                 rxdp[j].wb.lower.hi_dword.csum_ip.csum) & >>                 IXGBE_ATR_HASH_MASK; >>             mb->hash.fdir.id = rte_le_to_cpu_16( >>                 rxdp[j].wb.lower.hi_dword.csum_ip.ip_id); >>         } >> ******************************************** >>     So, what is application scenario for 'rxm->hash.rss' and 'mb->hash.fdir', >> that is, why the two should be reported? How about reporting the two at the same >> time? >>     Thanks for  your reply. > > > Hi Connor, > > mbuf->hash is union, so it is not possible to set both 'hash.rss' & 'hash.fdir'. > > I assume for i40e & mlx5 case 'pkt_flags' indicate which one is valid and only > one is set in practice. Cc'ed driver mainteriners for more comment. Thanks Ferruh, another question, why does user need this information: rxm->hash.rss or mb->hash.fdir.hi ? what is the function? > . >