DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Min Hu (Connor)" <humin29@huawei.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: Matan Azrad <matan@mellanox.com>,
	"shahafs@nvidia.com" <shahafs@nvidia.com>,
	"viacheslavo@nvidia.com" <viacheslavo@nvidia.com>
Subject: Re: [dpdk-dev] Question about 'rxm->hash.rss' and 'mb->hash.fdir'
Date: Thu, 1 Jul 2021 01:31:25 +0000	[thread overview]
Message-ID: <MN2PR11MB3807E6D367026E1734A6550FF7009@MN2PR11MB3807.namprd11.prod.outlook.com> (raw)
In-Reply-To: <5b0f7327-a089-edd1-163b-7b57cd90b575@huawei.com>



> -----Original Message-----
> From: Min Hu (Connor) <humin29@huawei.com>
> Sent: Wednesday, June 30, 2021 7:22 PM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org; Thomas Monjalon
> <thomas@monjalon.net>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>
> Cc: Xing, Beilei <beilei.xing@intel.com>; Matan Azrad
> <matan@mellanox.com>; 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 写道:
> > 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?
> 
> > .
> >

      parent reply	other threads:[~2021-07-01  1:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30  2:45 Min Hu (Connor)
2021-06-30  9:34 ` Ferruh Yigit
2021-06-30 11:21   ` Min Hu (Connor)
2021-06-30 11:44     ` Slava Ovsiienko
2021-07-01  0:23       ` Min Hu (Connor)
2021-07-01  1:31     ` Xing, Beilei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB3807E6D367026E1734A6550FF7009@MN2PR11MB3807.namprd11.prod.outlook.com \
    --to=beilei.xing@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.com \
    --cc=matan@mellanox.com \
    --cc=shahafs@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).