Re: [dpdk-dev] Question about 'rxm->hash.rss' and 'mb->hash.fdir'
From: Xing, Beilei <hidden>
Date: 2021-07-01 01:31:35
-----Original Message----- From: Min Hu (Connor) <redacted> Sent: Wednesday, June 30, 2021 7:22 PM To: Yigit, Ferruh <redacted>; dev@dpdk.org; Thomas Monjalon [off-list ref]; Andrew Rybchenko [off-list ref] Cc: Xing, Beilei <redacted>; Matan Azrad [off-list ref]; shahafs@nvidia.com; viacheslavo@nvidia.com Subject: Re: Question about 'rxm->hash.rss' and 'mb->hash.fdir' Hi, Beilei, Matan, Shahaf, Viacheslav, how about your opinion?
Agree with Ferruh.
在 2021/6/30 17:34, Ferruh Yigit 写道:quoted
On 6/30/2021 3:45 AM, Min Hu (Connor) wrote:quoted
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-quoted
hash.rss or mb->hash.fdir.hi ? what is the function?quoted
.