DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xueming(Steven) Li" <xuemingl@nvidia.com>
To: fengchengwen <fengchengwen@huawei.com>,
	Ivan Malov <ivan.malov@arknetworks.am>
Cc: Ori Kam <orika@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH] ethdev: add new symmetric hash function
Date: Wed, 9 Aug 2023 12:00:38 +0000	[thread overview]
Message-ID: <DM4PR12MB53734CCC563D2C331C8453FAA112A@DM4PR12MB5373.namprd12.prod.outlook.com> (raw)
In-Reply-To: <da63ab9b-c0c7-d5d8-a40f-849caed59819@huawei.com>



> -----Original Message-----
> From: fengchengwen <fengchengwen@huawei.com>
> Sent: 8/8/2023 9:43
> To: Ivan Malov <ivan.malov@arknetworks.am>; Xueming(Steven) Li
> <xuemingl@nvidia.com>
> Cc: Ori Kam <orika@nvidia.com>; dev@dpdk.org
> Subject: Re: [PATCH] ethdev: add new symmetric hash function
> 
> On 2023/8/8 6:32, Ivan Malov wrote:
> > Hi,
> >
> > Please see my notes below.
> >
> > On Mon, 7 Aug 2023, Xueming Li wrote:
> >
> >> The new symmetric hash function swap src/dst L3 address and
> >> L4 ports automatically by sorting.
> >>
> >> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> >> ---
> >> lib/ethdev/rte_flow.h | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index
> >> 86ed98c562..ec6dd170b5 100644
> >> --- a/lib/ethdev/rte_flow.h
> >> +++ b/lib/ethdev/rte_flow.h
> >> @@ -3204,6 +3204,11 @@ enum rte_eth_hash_function {
> >>      * src or dst address will xor with zero pair.
> >>      */
> >>     RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ,
> >> +    /**
> >> +     * Symmetric Toeplitz: src, dst will be swapped
> >> +     * automatically by sorting.
> >
> > This is very vague. Consider:
> >
> > For symmetric Toeplitz, four inputs are prepared as follows:
> > - src_addr | dst_addr
> > - src_addr ^ dst_addr
> > - src_port | dst_port
> > - src_port ^ dst_port
> > and then passed to the regular Toeplitz function.
> >
> > It is important to be as specific as possible so that readers don't
> > have to guess.
> 
> +1 for this, I try to understand and google it, but can't find useful info.
> 
> Also, how this new algo with src/dst only ?
> 

Thanks for taking care of this. 
When set the L3 and the L4 fields are sorted prior to the hash function.
  If src_ip > dst_ip, swap src_ip and dst_ip.
  If src_port > dst_port, swap src_port and dst_port.

> >
> > Thank you.
> >
> >> +     */
> >> +    RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT,
> >>     RTE_ETH_HASH_FUNCTION_MAX,
> 
> The new value will break the definition of MAX (maybe ABI compatible).
> but I found only hns3 drivers use RTE_ETH_HASH_FUNCTION_MAX, not sure
> the application will use it.
> 
> >> };
> >>
> >> --
> >> 2.25.1
> >>
> >>
> >
> > .

  reply	other threads:[~2023-08-09 12:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 11:38 [PATCH] doc: deprecation notice to add new " Xueming Li
2023-05-24 12:50 ` Ori Kam
2023-05-24 14:49 ` Stephen Hemminger
2023-07-28 15:10   ` Thomas Monjalon
2023-08-07 11:54 ` [PATCH] ethdev: add new symmetric " Xueming Li
2023-08-07 12:33   ` Ori Kam
2023-08-07 22:32   ` Ivan Malov
2023-08-08  1:43     ` fengchengwen
2023-08-09 12:00       ` Xueming(Steven) Li [this message]
2023-08-27  8:17   ` [PATCH v2 1/2] " Xueming Li
2023-08-30  6:55     ` Ori Kam
2023-09-21 15:49       ` Ferruh Yigit
2023-09-22  6:57         ` Xueming(Steven) Li
2023-08-30  7:50     ` lihuisong (C)
2023-08-30  8:38       ` Xueming(Steven) Li
2023-08-30 12:42         ` lihuisong (C)
2023-08-30 13:09           ` Xueming(Steven) Li
2023-08-31  1:23             ` lihuisong (C)
2023-08-31  6:25               ` Xueming(Steven) Li
2023-08-31 11:29                 ` lihuisong (C)
2023-08-27  8:17   ` [PATCH v2 2/2] net/mlx5: support new RSS " Xueming Li
2023-10-29 15:53     ` Ori Kam
2023-10-30 17:08     ` Raslan Darawsheh

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=DM4PR12MB53734CCC563D2C331C8453FAA112A@DM4PR12MB5373.namprd12.prod.outlook.com \
    --to=xuemingl@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ivan.malov@arknetworks.am \
    --cc=orika@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).