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 28EF642CC0; Thu, 15 Jun 2023 06:58:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F21AB40E0F; Thu, 15 Jun 2023 06:58:26 +0200 (CEST) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) by mails.dpdk.org (Postfix) with ESMTP id D9D8C40DDA; Thu, 15 Jun 2023 06:58:25 +0200 (CEST) Received: by mail-vs1-f49.google.com with SMTP id ada2fe7eead31-43dc7a78a37so1235426137.0; Wed, 14 Jun 2023 21:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686805105; x=1689397105; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tkXfqFLAaTN0yoR1ZuNabgf2oRn/bGBPlRbPdad1hv0=; b=FRGiDw7P4meTq+A6uj4Co+lgx0LeS52ovJBvn01Q7XR/l12cX38rXa89V2NRgHHvbR HaBCSQBDAKj1p8TrrMeMLkOT1C7KUzQZIZKhR8QGiO8P0b34YuGN8YEEalEwKSpdAa7y DHXCpONvVPx93UnRVB9eqLD4fvRJYVWj5z8sbnEuz5A6wz+5F9bMozKsb7rcaqt10+WX qdBQhMI900ex0vJeZ3tCreYvSIGHOrYmNNKm8NnbOornqBIKuENkaRoJlRsIgszQtlVW o/WfkHVqQsLo7y8LLvhkFQPFixNs8FA16V/b2tHgcBdHVB3x481n01URf8RQWiK2SyzY D/IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686805105; x=1689397105; h=content-transfer-encoding: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=tkXfqFLAaTN0yoR1ZuNabgf2oRn/bGBPlRbPdad1hv0=; b=IbLe1zuAPPjDWyKgVqaRxpAS4JUXJNsr1Hx0E3aU0t1ePkCQctbUOPZjQ29Lbb88KM 9FXyO0jse89VvUP0B4BzEa705k8oShkkNC6TYAr6HxwwOMJcon/5kw9Vr05tkkV+5Xu4 halhJjyqNoWH/Sbcr7TMMwK40yL0Bmwp456XShzendMziozug9Nwdf7vmItDKFkmfAj9 gPy8DH8vbkChyZ2cdsiBVDPxhTZESprDZZgRjNMvPxn5zNLyY9cmeu75FkGpfX4rAK11 ylHqBhSp/SkDcjNuXY2Mbg64DXcNZ3x8rqyhwGESfgKJeNToCkBc/3eVuU9d7MeQkUF8 ac6g== X-Gm-Message-State: AC+VfDzalvl26dQxZ35pI84njWuT2KINlkrMHoyIPjG3ZU+MD8TQbtIz wgvXKh+T8++RlMLBINKeFWxWtdfKRP2li2qqK28= X-Google-Smtp-Source: ACHHUZ7wnA9hSuGBB7JxiOu+9LZPnOG0NM3yQCheXuMQTkwlW8rOYwh/Zjzn9ACIGOs4+plkzkWw4OPTOQomJKyCkPk= X-Received: by 2002:a05:6102:444:b0:42f:46d1:ffad with SMTP id e4-20020a056102044400b0042f46d1ffadmr9291877vsq.22.1686805105182; Wed, 14 Jun 2023 21:58:25 -0700 (PDT) MIME-Version: 1.0 References: <20230612111539.462084-1-qi.z.zhang@intel.com> In-Reply-To: From: Jerin Jacob Date: Thu, 15 Jun 2023 10:27:58 +0530 Message-ID: Subject: Re: [RFC] lib/ethdev: introduce table driven APIs To: "Zhang, Qi Z" Cc: Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "david.marchand@redhat.com" , "Richardson, Bruce" , "jerinj@marvell.com" , "ferruh.yigit@amd.com" , "Mcnamara, John" , "Zhang, Helin" , "techboard@dpdk.org" , "dev@dpdk.org" , Ivan Malov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Thu, Jun 15, 2023 at 7:55=E2=80=AFAM Zhang, Qi Z = wrote: > > Hi Ori: > > Thank you for your review! > Comment inline. > Please let me know if anything I missed. > > Thanks > Qi > > > -----Original Message----- > > From: Ori Kam > > Sent: Thursday, June 15, 2023 2:31 AM > > To: Zhang, Qi Z ; NBU-Contact-Thomas Monjalon > > (EXTERNAL) ; david.marchand@redhat.com; > > Richardson, Bruce ; jerinj@marvell.com; > > ferruh.yigit@amd.com > > Cc: Mcnamara, John ; Zhang, Helin > > ; techboard@dpdk.org; dev@dpdk.org > > Subject: RE: [RFC] lib/ethdev: > > > > Hi Qi, > > > > > > 1. it may be useful to get some general calling flow what comes from th= e > > application, what comes from the compiler. > > Simple example will be good. > > An example of decap VXLAN TCP flow is explained in problem statement (htt= p://mails.dpdk.org/archives/dev/2023-May/267719.html) > covering the following information. > > 1. the p4 source code, the definition of the table and actions > 2. the table / action hints generated by the compiler, details to each fi= elds. > 3. How the Control Plane Application utilizes the P4 Runtime API to progr= am the rule with the respective table and action IDs > > The DPDK PMD is responsible for loading the hints generated by the compil= er. > This enables the PMD to accept requests from the P4 Runtime and reject an= y incompatible request. I see two different types of device/system category 1) HW + SW/FW combination that really understands p4 structures and job of the driver to is to give work to HW/SW as p4 structure generated from vendor specific compiler and runtime gRPC message 2) Existing HW and SW drivers implements rte-flow driver. For item (1), if end user application is using P4 program and P4 runtime and this is _API contract_ to application, Not sure why end user care it is DPDK PMD or not? If driver writer care about using DPDK for driver framework for EAL services, simply using vdev etc would be enough. Right? For item (2), I think, interest is how to offload p4 workload to rte_flow. So that _existing_ drivers implements rte_flow can support p4 naturally in addition to existing rte_flow API. If that is direction, then we need to the following. a)Improve p4-dpdk compiler backend or add new compiler DPDK backend to understand the rte_flow and have helper library in DPDK to understand the compiler spec file to translate to rte_flow objects b)Similar case for runtime API. i.e Have helper functions to translate p4 MatchField name etc to appropriate rte_flow objects. c)Enhance base rte_flow specification if there are any fundamental gaps to express the new pattern or actions (which is not specific to p4 and applicable for any flow matching use case) If we introduce compiler in the pipeline, a lot of translation will get in the slowpath. And for runtime API, the translation primarily will be name to rte_flow object lookup (which is not that costly) and using rte_flow_template etc. to amortize the cost by making it burst. Just my 2c.