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 B352AA0A0F; Wed, 30 Jun 2021 04:46:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 375C740E01; Wed, 30 Jun 2021 04:46:02 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 0B3ED40DF6 for ; Wed, 30 Jun 2021 04:45:59 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GF5Fy5lr4z73gT; Wed, 30 Jun 2021 10:41:42 +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 10:45:56 +0800 To: "dev@dpdk.org" , Ferruh Yigit , Thomas Monjalon From: "Min Hu (Connor)" Message-ID: <6ac31917-8ae6-b61f-c0c1-07d907066752@huawei.com> Date: Wed, 30 Jun 2021 10:45:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit 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: [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, 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.