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 B2EB3A0547; Fri, 11 Nov 2022 19:00:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A99C4014F; Fri, 11 Nov 2022 19:00:35 +0100 (CET) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by mails.dpdk.org (Postfix) with ESMTP id BED8B40141 for ; Fri, 11 Nov 2022 19:00:33 +0100 (CET) Received: by mail-ej1-f50.google.com with SMTP id ft34so14185840ejc.12 for ; Fri, 11 Nov 2022 10:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xT70QZ7O6ieCIHevmlEaNCZYy1BA+KeBDfHGcGzRNfY=; b=EjPrbM6UcTBk+AqWN7ZnmTxwmKGBIwToBhNYPVjTIYvqC6r+BPJFsRAlzqiDhkcufE m30ghQ5825X+YvLcxggn8SnM1hEWJZHfegp5hOID7Dgs2pdYruL1zhM3q0bslZkgj1ml o1yp+bAnfJHPwwIlC53P80WLgw0xoo4WIIIloTbY3VZP5C0xk+pfvBvLAkPQY2D0Lzri +ime0YQhLluW29EYCNu9l3tSkE4ITIIYn08pPbHUI08ydHPIii+kL0ihZ2RQgXqIXxR+ 73/MS1MqEGilbxMPMSSxV1DUKHi4VKxQCTY1LhVgc+lkVEMRBBTN8J18OJf6BsrWpvmW x8vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xT70QZ7O6ieCIHevmlEaNCZYy1BA+KeBDfHGcGzRNfY=; b=PI4KbB+Jk6lSJEYlv49xz9greEYFFG0fTFqEr8rT1F7flgArLh2X6hXxANZyBggLA7 +yKKjledS9manNklpuvS0codOVGODo1JWlJgezsHFIXUbjaM05Qqou9OsH9cHC4/cmmP mUDZI4CzIVkGKitwO5x7x8FEUGo+XiOSwWOO+VLWFhNJy5NTUZyyrRUq4dycGqlCif/J x5UPyq1ZUMWXoT06QA5L15BCVqw41l7sYXL/7jYgja2xny2M5JqGzAZ7Ke0Eyf/WJqX/ Gwg5C9FKvajPUynLGQR5V3Utf10q5w5w/aKZkXuFnrW+c8RDonJw/qPoUuRNijW0UWuE d65g== X-Gm-Message-State: ANoB5pkQfQu57gI6lVqGROTpyXM7kxGZ0RxRPJHbYN4e5P52h9u9fxcB c1WRcCLpo9Alkf5PoT6wY3SFqlD4ISvcNZVRdpIj39KyluZz+A== X-Google-Smtp-Source: AA0mqf6ISQ2R0zaOfRI5vXEKmqv9PzEsbyuvpHP3eMNtC919Ks3MCHbxmAshF9lB366f4X8pSFpwoI5gvcdtBDgBR8Q= X-Received: by 2002:a17:907:8d06:b0:78d:b819:e0e7 with SMTP id tc6-20020a1709078d0600b0078db819e0e7mr2864395ejc.83.1668189633331; Fri, 11 Nov 2022 10:00:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bili Dong Date: Fri, 11 Nov 2022 09:59:57 -0800 Message-ID: Subject: Re: Question about naive XOR hash in DPDK To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: dev@dpdk.org, cristian.dumitrescu@intel.com Content-Type: multipart/alternative; boundary="0000000000008348a705ed35aac3" 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 --0000000000008348a705ed35aac3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Mattias, Maybe an example helps explain this. Here is an example where the CRC hash function is registered in the DPDK pipeline: http://git.dpdk.org/dpdk/tree/lib/pipeline/rte_swx_pipeline.c?id=3D203dcc9c= fe4151518bb5a5c59ee22a754e649e35#n10115. We need something similar to this for the XOR hash. This means we need to have the XOR hash function implemented somewhere first before we could register it. Thanks, Bili On Wed, Nov 9, 2022 at 2:08 PM Mattias R=C3=B6nnblom wrote: > On 2022-11-07 19:57, Bili Dong wrote: > > Dear DPDK devs, > > > > We are using DPDK as the backend target of a P4 pipeline > > (https://github.com/p4lang/p4-dpdk-target > > ). A recent issue we are > > trying to solve is to support a naive XOR hash (something like this > > < > https://github.com/p4lang/behavioral-model/blob/b7a5c105e5c21414ac07f7f28= 79b45c000ab2aa4/src/bm_sim/calculations.cpp#L380-L399>) > in this pipeline. This requires an XOR hash implementation in DPDK.I have > the following questions: > > > Why would it *require* an xor hash function in DPDK? > > > > > 1. Is there already an XOR hash implementation in DPDK? I haven't foun= d > > it myself, but I could have missed it. > > 2. If it doesn't exist, I'm willing to contribute one, as the > > implementation is quite straightforward. But I might need your help > > on where to put the code, as I'm not that familiar with the code > > organization. > > > > Any help would be appreciated! > > > > Thanks, > > Bili > > > --0000000000008348a705ed35aac3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Mattias,

Maybe an example helps= explain this. Here is an example where the CRC hash function is registered= in the DPDK pipeline: = http://git.dpdk.org/dpdk/tree/lib/pipeline/rte_swx_pipeline.c?id=3D203dcc9c= fe4151518bb5a5c59ee22a754e649e35#n10115. We need something similar to t= his for the XOR hash. This means we need to have the XOR hash function impl= emented somewhere first before we could register it.

Thanks,
Bili

On Wed, Nov 9, 2022 at 2:08 PM Mattias R=C3= =B6nnblom <hofors@lysator.liu.s= e> wrote:
On 2022-11-07 19:57, Bili Dong wrote:
> Dear DPDK devs,
>
> We are using DPDK as the backend target of a P4 pipeline
> (https://github.com/p4lang/p4-dpdk-target
> <https://github.com/p4lang/p4-dpdk-target>). = A recent issue we are
> trying to solve is to support a naive XOR hash (something like this > <https://github.com/p4lang/behavioral-mod= el/blob/b7a5c105e5c21414ac07f7f2879b45c000ab2aa4/src/bm_sim/calculations.cp= p#L380-L399>) in this pipeline. This requires an XOR hash implementa= tion in DPDK.I have the following questions:


Why would it *require* an xor hash function in DPDK?

>
>=C2=A0 1. Is there already an XOR hash implementation in DPDK? I haven&= #39;t found
>=C2=A0 =C2=A0 =C2=A0it myself, but I could have missed it.
>=C2=A0 2. If it doesn't exist, I'm willing to contribute one, a= s the
>=C2=A0 =C2=A0 =C2=A0implementation is quite straightforward. But I migh= t need your help
>=C2=A0 =C2=A0 =C2=A0on where to put the code, as I'm not that famil= iar=C2=A0with the code
>=C2=A0 =C2=A0 =C2=A0organization.
>
> Any help would be appreciated!
>
> Thanks,
> Bili
>
--0000000000008348a705ed35aac3--