get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/113587/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 113587,
    "url": "http://patches.dpdk.org/api/patches/113587/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1656642017-8992-6-git-send-email-chaoyong.he@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1656642017-8992-6-git-send-email-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1656642017-8992-6-git-send-email-chaoyong.he@corigine.com",
    "date": "2022-07-01T02:20:10",
    "name": "[v4,05/12] net/nfp: add flower PF setup and mempool init logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c3b49eb471a7ab676156a9a21939f09536e7f19d",
    "submitter": {
        "id": 2554,
        "url": "http://patches.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1656642017-8992-6-git-send-email-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 23850,
            "url": "http://patches.dpdk.org/api/series/23850/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23850",
            "date": "2022-07-01T02:20:05",
            "name": "preparation for the rte_flow offload of nfp PMD",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/23850/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/113587/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/113587/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9D649A0093;\n\tFri,  1 Jul 2022 04:21:40 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0183D42B79;\n\tFri,  1 Jul 2022 04:21:18 +0200 (CEST)",
            "from NAM11-BN8-obe.outbound.protection.outlook.com\n (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41])\n by mails.dpdk.org (Postfix) with ESMTP id 4189A42825\n for <dev@dpdk.org>; Fri,  1 Jul 2022 04:21:16 +0200 (CEST)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by CH2PR13MB4459.namprd13.prod.outlook.com (2603:10b6:610:35::16)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.11; Fri, 1 Jul\n 2022 02:21:14 +0000",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::5d9e:9ce5:51d1:2021]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::5d9e:9ce5:51d1:2021%9]) with mapi id 15.20.5395.014; Fri, 1 Jul 2022\n 02:21:14 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=UPyvX38gR4T4hgKIu58FkIW7zUlPnV5GHMazltoF/eXzzQR9fbAFC/gHDgIBrexx/Ah3OMjY9BmeYCG3rqy6t/bLR2nhZYX7uN9wCUFwzDbcRGhM02QbhIRjl1UGaN5t7zfSixY5vGc3hFg/Rz0UpYTQ4OjGxb6XNtqy2T0JSF4idbZv+st0jRVsK1TiEhUUvKq982Xd8Ky4mpncfER4bn6AKW7qbtu55lO/0OySjTMiGodEjTSg+ho/Yytjw8QHFbPOqhunZGZdZblQOnxrdwcvI24w14Pd9quWjDlzrC7Zb/HoPmJ0k36F6USWmDJJYRn8sMYyvJZdAhvwdNQJrw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=8/LDvTEIVtGY+8JvE9ABc2mFO2nBLncvvKE/JMAtxCo=;\n b=Fvo06hqNrWM3eqRBkwdcNvCKmtJw2zF4eQr7OndQOd38s05yQsvlcuNpUOFFRTB4trUdoscJmic1M/GzETWO6tfI5xUI8ZCw3+56nOYW7m6lWrNg/OKVnFhQvFHrFQCJQJrS38ZjJ/+9W/q/EsR0Lxpyb9mHKOcGieEk6vydqlB7LnPjhyKDs78T5GqpEU+jef/32KJTOMGHaezIJwIruHtPQFmJkMJ2/CVR2T+cg8jeiNSMlUA0mq3DxSyVlZ8YmPQU2UzUDKX9SH2VFwgC2iUrjrKmQy8BQk6pmntqnr7b5efxntF5Cvvb+pPUxjAA8MXHDyKZcjuuvPszVwkWCA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com;\n dkim=pass header.d=corigine.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=8/LDvTEIVtGY+8JvE9ABc2mFO2nBLncvvKE/JMAtxCo=;\n b=QE4veccJiJpnJOX+Onnicnc1K+bzvgOTZCDfhs6ydi6xACY7YPxqj0aZPVuxsfFn7LRdPiXFcpVIopXREJn1Xr5p/Awu9+fillXuJnwn8E9imXW6AhTsubOY81wd7SF8ZAGvSpG2IVNvD0AB/jNyDAU8WuVOu+ShQ7zMALGUXn8=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Chaoyong He <chaoyong.he@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "niklas.soderlund@corigine.com,\n\tChaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH v4 05/12] net/nfp: add flower PF setup and mempool init logic",
        "Date": "Fri,  1 Jul 2022 10:20:10 +0800",
        "Message-Id": "<1656642017-8992-6-git-send-email-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1656642017-8992-1-git-send-email-chaoyong.he@corigine.com>",
        "References": "<1656642017-8992-1-git-send-email-chaoyong.he@corigine.com>",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "SG2PR02CA0079.apcprd02.prod.outlook.com\n (2603:1096:4:90::19) To SJ0PR13MB5545.namprd13.prod.outlook.com\n (2603:10b6:a03:424::5)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "919edd3a-1542-4f32-d003-08da5b085f4d",
        "X-MS-TrafficTypeDiagnostic": "CH2PR13MB4459:EE_",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n rO+nsafQ1HanGHsyAgnx042icWlPqv3PsOlewz47OnWq0dehwJ6ehdtYF1TYt9RlIxPxWqES5AOwSsAchTPEvyWoZydMrM49t7fxTDgpRk2F753my+d3/XpJYtm3V/gPr1OGAiAQHnGRsDvDg4r4UyKacIzRpLClQ6gxNxRQVFZrozDnI3MaPmdBnLlhb8tfwgOi40TwvxRYe26dZcj54yn5H5MX+SbUlTagMoTCXR7ikUVM2mowsXGfTw7XzXaG6uqQXV21WWoS6XRzoVTIy/Q3TvMyWK+w0iNO99kdrvalzVFM2Y/s3qd5Gp1u1l1nSzI9/K0EGZF81klknmGqmKvfepS9qP1nzQXZO8hXuE83bswF5XIsbyQ+0DTdZlMqfinZ8Shlsbck1k0Sfe2K/pGjkkQXXOP10KsSWtcxUCK6EFgv9qHQQffWP6r2ub1NQ3zAllY+qBCdow1IMUFYoOlITRmTB/qYpwnr0jPp2pDRUNLbPPLyAAJoVZxzxAY2IJYNd9hTPbrzmX8wQWWKNm12KLB704XETs01Rx2dGO4Kyvi8O9Jvb6exFvqfE4FGtxnFZIJQyP4CqTxX7Y5KOgTMn+G2rt5cd2J8pU5/iGVsEAvXQDlGoDKdRKLbsoaG9zHPZYXQFo+N8dgkS2oz8tDh8sYgGmFnEMILhQ8nNJrYffH3rBS4hW2qwgsMyEqK8tOmuQLbF04z8r73nMK1eWspnv2/1SzE1ndwRWRXpDOcirqnSxtJUS7PrMD9G/6uTJPRbZ7mDV6U6NjV7//7qRxM/a44KCtbfcuIZRQxhEWizKAia5C0TjZebWo98quRDidUyCFNnc01qrRNtjwj9Nzh26U8RAvAfjCDWi5X1sE=",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230016)(4636009)(39840400004)(346002)(376002)(366004)(396003)(136003)(6486002)(4326008)(186003)(36756003)(26005)(66476007)(66556008)(2616005)(8676002)(83380400001)(6512007)(107886003)(6666004)(38350700002)(5660300002)(66946007)(8936002)(38100700002)(2906002)(478600001)(30864003)(44832011)(6916009)(6506007)(316002)(52116002)(41300700001)(66574015)(86362001);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "=?utf-8?q?1bs0HrgKXDrD9dxWffHw6LNcXBtc?=\n\t=?utf-8?q?4ppGa3DpX22vfajR+ko7ZqwZMHLq9ZuTcBcvJKmm5rZgjOSepwohlRxf8ODzTamf2?=\n\t=?utf-8?q?0kp9Wa7QsJGiLhBOVrJvmD6w95l/CqovrtzCG7SeRoDzE391P80SFvUeWZ0XMORPS?=\n\t=?utf-8?q?Qr5Qrh5A0WjULkaxxvOCHFT2xgZ0+abPYcU/fiNRL2l9wMT8I6/zTntyiOCtqQt6x?=\n\t=?utf-8?q?y2ueWK7xe7L/U7t0Ouy2EDIZS8rmvViUq72pYay93gymJned6JLZKiloKuQ6xfxWE?=\n\t=?utf-8?q?Iwbb3yvEnrrlU/YOcOyku3mX5mRPx6UadJQ+It0QL+v08WOmoAEnXki3H/UhX6JT3?=\n\t=?utf-8?q?HkyR6vECKw4kZTmq9cQ3BJsfwcz8HKesOHWJSbypubT7YVTfa1hWKt2z3jnBYnLAC?=\n\t=?utf-8?q?yN4LINqZ8qn7smL9cZaN0pxbUWf8MBe4dE3zLVC9ZUZbnJW2wlr6LuTJzvMEmcwBG?=\n\t=?utf-8?q?2vl3a9SNeA3SrN+/eKOQSEZv/9jH7mfS37yV0mogFOcjF4tTY1ypbn0+NkfU6kKvK?=\n\t=?utf-8?q?PSSxxe5FaaYBZjuA4OsimoDp8kcps6gvx+2cNrg93Dm5eBCVJ9HpJ7xtqxbUwGosH?=\n\t=?utf-8?q?iNn0LNH2sobkTr2CcKogpYpHJtC0mJ+RiBJtsDWTM6rlQhcxGaqIjDC5Jl8JvvDvm?=\n\t=?utf-8?q?JKPpFtCAI8iE6yVGOyBlpoSG+oc+0u1GDJ0vbSarDLCh3+LWpUVOO710ZlBcWh6pU?=\n\t=?utf-8?q?cSqJ7uQVkV1IRINoN7Rc+vQkB0C/rhIEFBgodw9t5VPuV15BlMAhoQ/fWohp/wbXz?=\n\t=?utf-8?q?9yZPaWqUb5K6Ms9FDfU4tnRlzKC2z3n2TKiVvWxtweT56TaNfGj9MMZ4QoXsHXUHM?=\n\t=?utf-8?q?w014RSKUq7q5VXWItLvNVupwpqoZtlTf7gRmu1B1Ac1m+g19RPICwSm9lSh7wuvTY?=\n\t=?utf-8?q?TOC5lqJmdUaTt4LapyLPbzL3/AIgGU8bu2bp9ESDMLEt4d6/l0YaKY2zgjIOisSa+?=\n\t=?utf-8?q?4OPQ4RH89TMQOqzuwZWCjVo7XYzJUs/zMzz0+XGHcluf427urXkwb9Ju59RohpqgA?=\n\t=?utf-8?q?5XRjQjlfihiGUqYVWV+QwxPI68gWWh5uB/UlSMf2vg49OCFw9auJAYbTfYHyIAyzP?=\n\t=?utf-8?q?k1iPvcr3t8i7HppKFaTSRahJU/1MUsOK5/LV+g1LmkIzFGUuyfd2m1LjMD0f0hksR?=\n\t=?utf-8?q?05kb95M3s5Y+pZ4xXoXW1cWG6VNxf2psI3KtXZxOHz1pU16aij94KbUe8HsG1LdD+?=\n\t=?utf-8?q?+oMNFs8yk+4mn9J1zTiRyrpzzjZppMUOj9Tzp2p+KnU1zaAm4Gpdh4q/DjravTWPR?=\n\t=?utf-8?q?XHj+ftAc6a+RoOujXPglgGTSVxhELcbG2vMwUO6es0ZbwV0x5oXmk3FzOv93Dy30T?=\n\t=?utf-8?q?z5csVWcjaU8DzOg3Rd/JMpDRLxI4XQZVWBaIZVV4l6YLJpOFAzUd4691Wqs9Zs1lS?=\n\t=?utf-8?q?9N4zUaje9r6QbGouR4YINz83WtYKNc4i4oJ0LaJDfsBXIh6Y2kvlHhMBgSPrGNF3R?=\n\t=?utf-8?q?LQ4GZObmuu/GS2LMLeZGpjw9FplaOxE60vGVqtdWmqrEkAa8i6wpG9gZGgvICcOMd?=\n\t=?utf-8?q?8cpvogsYI56elR3CDd7bzPG6MN877nIKWA=3D=3D?=",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 919edd3a-1542-4f32-d003-08da5b085f4d",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "01 Jul 2022 02:21:14.3928 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "fe128f2c-073b-4c20-818e-7246a585940c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n KhBQ7BY7vpbhgZ/UllAkPejGqWLktlXc+ubVMMOEwq7HdWMmMrN8z8DL+HtMxIasnNonQDa2TM/FWajepiFz7Is9knYgvssQRSrxFf+jvSM=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CH2PR13MB4459",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "This commit adds the vNIC initialization logic for the flower PF vNIC.\nThe flower firmware exposes this vNIC for the purposes of fallback\ntraffic in the switchdev use-case. The logic of setting up this vNIC is\nsimilar to the logic seen in nfp_net_init() and nfp_net_start().\n\nThis commit also adds minimal dev_ops for this PF device. Because the\ndevice is being exposed externally to DPDK it should also be configured\nusing DPDK helpers like rte_eth_configure(). For these helpers to work\nthe flower logic needs to implements a minimal set of dev_ops. The Rx\nand Tx logic for this vNIC will be added in a subsequent commit.\n\nOVS expects incoming packets coming into the OVS datapath to be\nallocated from a mempool that contains objects of type \"struct\ndp_packet\". For the PF handling the slowpath into OVS it should\nuse a mempool that is compatible with OVS. This commit adds the logic\nto create the OVS compatible mempool. It adds certain OVS specific\nstructs to be able to instantiate the mempool.\n\nSigned-off-by: Chaoyong He <chaoyong.he@corigine.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>\n---\n drivers/net/nfp/flower/nfp_flower.c            | 390 ++++++++++++++++++++++++-\n drivers/net/nfp/flower/nfp_flower.h            |   9 +\n drivers/net/nfp/flower/nfp_flower_ovs_compat.h | 145 +++++++++\n drivers/net/nfp/nfp_common.h                   |   3 +\n 4 files changed, 543 insertions(+), 4 deletions(-)\n create mode 100644 drivers/net/nfp/flower/nfp_flower_ovs_compat.h",
    "diff": "diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c\nindex 1dddced..0a0b1db 100644\n--- a/drivers/net/nfp/flower/nfp_flower.c\n+++ b/drivers/net/nfp/flower/nfp_flower.c\n@@ -14,7 +14,35 @@\n #include \"../nfp_logs.h\"\n #include \"../nfp_ctrl.h\"\n #include \"../nfp_cpp_bridge.h\"\n+#include \"../nfp_rxtx.h\"\n+#include \"../nfpcore/nfp_mip.h\"\n+#include \"../nfpcore/nfp_rtsym.h\"\n+#include \"../nfpcore/nfp_nsp.h\"\n #include \"nfp_flower.h\"\n+#include \"nfp_flower_ovs_compat.h\"\n+\n+#define MAX_PKT_BURST 32\n+#define MEMPOOL_CACHE_SIZE 512\n+#define DEFAULT_FLBUF_SIZE 9216\n+\n+/*\n+ * Simple dev ops functions for the flower PF. Because a rte_device is exposed\n+ * to DPDK the flower logic also makes use of helper functions like\n+ * rte_dev_configure() to set up the PF device. Stub functions are needed to\n+ * use these helper functions\n+ */\n+static int\n+nfp_flower_pf_configure(__rte_unused struct rte_eth_dev *dev)\n+{\n+\treturn 0;\n+}\n+\n+static const struct eth_dev_ops nfp_flower_pf_dev_ops = {\n+\t.dev_configure          = nfp_flower_pf_configure,\n+\n+\t/* Use the normal dev_infos_get functionality in the NFP PMD */\n+\t.dev_infos_get          = nfp_net_infos_get,\n+};\n \n static struct rte_service_spec flower_services[NFP_FLOWER_SERVICE_MAX] = {\n };\n@@ -49,6 +77,310 @@\n \treturn ret;\n }\n \n+static void\n+nfp_flower_pf_mp_init(__rte_unused struct rte_mempool *mp,\n+\t\t__rte_unused void *opaque_arg,\n+\t\tvoid *_p,\n+\t\t__rte_unused unsigned int i)\n+{\n+\tstruct dp_packet *pkt = _p;\n+\tpkt->source      = DPBUF_DPDK;\n+\tpkt->l2_pad_size = 0;\n+\tpkt->l2_5_ofs    = UINT16_MAX;\n+\tpkt->l3_ofs      = UINT16_MAX;\n+\tpkt->l4_ofs      = UINT16_MAX;\n+\tpkt->packet_type = 0; /* PT_ETH */\n+}\n+\n+static struct rte_mempool *\n+nfp_flower_pf_mp_create(void)\n+{\n+\tuint32_t nb_mbufs;\n+\tuint32_t pkt_size;\n+\tuint32_t n_rxd = 1024;\n+\tuint32_t n_txd = 1024;\n+\tunsigned int numa_node;\n+\tuint32_t aligned_mbuf_size;\n+\tuint32_t mbuf_priv_data_len;\n+\tstruct rte_mempool *pktmbuf_pool;\n+\n+\tnb_mbufs = RTE_MAX(n_rxd + n_txd + MAX_PKT_BURST + MEMPOOL_CACHE_SIZE,\n+\t\t\t81920U);\n+\n+\t/*\n+\t * The size of the mbuf's private area (i.e. area that holds OvS'\n+\t * dp_packet data)\n+\t */\n+\tmbuf_priv_data_len = sizeof(struct dp_packet) - sizeof(struct rte_mbuf);\n+\t/* The size of the entire dp_packet. */\n+\tpkt_size = sizeof(struct dp_packet) + RTE_MBUF_DEFAULT_BUF_SIZE;\n+\t/* mbuf size, rounded up to cacheline size. */\n+\taligned_mbuf_size = ROUND_UP(pkt_size, RTE_CACHE_LINE_SIZE);\n+\tmbuf_priv_data_len += (aligned_mbuf_size - pkt_size);\n+\n+\tnuma_node = rte_socket_id();\n+\tpktmbuf_pool = rte_pktmbuf_pool_create(\"flower_pf_mbuf_pool\", nb_mbufs,\n+\t\t\t\tMEMPOOL_CACHE_SIZE, mbuf_priv_data_len,\n+\t\t\t\tRTE_MBUF_DEFAULT_BUF_SIZE, numa_node);\n+\tif (pktmbuf_pool == NULL) {\n+\t\tRTE_LOG(ERR, PMD, \"Cannot init mbuf pool\\n\");\n+\t\treturn NULL;\n+\t}\n+\n+\trte_mempool_obj_iter(pktmbuf_pool, nfp_flower_pf_mp_init, NULL);\n+\n+\treturn pktmbuf_pool;\n+}\n+\n+static void\n+nfp_flower_cleanup_pf_vnic(struct nfp_net_hw *hw)\n+{\n+\tuint16_t i;\n+\tstruct rte_eth_dev *eth_dev;\n+\tstruct nfp_app_flower *app_flower;\n+\n+\teth_dev = hw->eth_dev;\n+\tapp_flower = NFP_APP_PRIV_TO_APP_FLOWER(hw->pf_dev->app_priv);\n+\n+\tfor (i = 0; i < eth_dev->data->nb_tx_queues; i++)\n+\t\tnfp_net_tx_queue_release(eth_dev, i);\n+\n+\tfor (i = 0; i < eth_dev->data->nb_rx_queues; i++)\n+\t\tnfp_net_rx_queue_release(eth_dev, i);\n+\n+\trte_free(eth_dev->data->mac_addrs);\n+\trte_mempool_free(app_flower->pf_pktmbuf_pool);\n+\trte_free(eth_dev->data->dev_private);\n+\trte_eth_dev_release_port(hw->eth_dev);\n+}\n+\n+static int\n+nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type)\n+{\n+\tuint32_t start_q;\n+\tuint64_t rx_bar_off;\n+\tuint64_t tx_bar_off;\n+\tconst int stride = 4;\n+\tstruct nfp_pf_dev *pf_dev;\n+\tstruct rte_pci_device *pci_dev;\n+\n+\tpf_dev = hw->pf_dev;\n+\tpci_dev = hw->pf_dev->pci_dev;\n+\n+\t/* NFP can not handle DMA addresses requiring more than 40 bits */\n+\tif (rte_mem_check_dma_mask(40)) {\n+\t\tRTE_LOG(ERR, PMD, \"device %s can not be used: restricted dma \"\n+\t\t\t\"mask to 40 bits!\\n\", pci_dev->device.name);\n+\t\treturn -ENODEV;\n+\t};\n+\n+\thw->device_id = pci_dev->id.device_id;\n+\thw->vendor_id = pci_dev->id.vendor_id;\n+\thw->subsystem_device_id = pci_dev->id.subsystem_device_id;\n+\thw->subsystem_vendor_id = pci_dev->id.subsystem_vendor_id;\n+\n+\tPMD_INIT_LOG(DEBUG, \"%s vNIC ctrl bar: %p\", vnic_type, hw->ctrl_bar);\n+\n+\t/* Read the number of available rx/tx queues from hardware */\n+\thw->max_rx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_RXRINGS);\n+\thw->max_tx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_TXRINGS);\n+\n+\t/* Work out where in the BAR the queues start */\n+\tstart_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ);\n+\ttx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;\n+\tstart_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);\n+\trx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;\n+\n+\tPMD_INIT_LOG(DEBUG, \"%s vNIC tx_bar_off: 0x%\" PRIx64,\n+\t\t\tvnic_type, tx_bar_off);\n+\tPMD_INIT_LOG(DEBUG, \"%s vNIC rx_bar_off: 0x%\" PRIx64,\n+\t\t\tvnic_type, rx_bar_off);\n+\n+\thw->tx_bar = pf_dev->hw_queues + tx_bar_off;\n+\thw->rx_bar = pf_dev->hw_queues + rx_bar_off;\n+\n+\t/* Get some of the read-only fields from the config BAR */\n+\thw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);\n+\thw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);\n+\thw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);\n+\t/* Set the current MTU to the maximum supported */\n+\thw->mtu = hw->max_mtu;\n+\thw->flbufsz = DEFAULT_FLBUF_SIZE;\n+\n+\t/* read the Rx offset configured from firmware */\n+\tif (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 2)\n+\t\thw->rx_offset = NFP_NET_RX_OFFSET;\n+\telse\n+\t\thw->rx_offset = nn_cfg_readl(hw, NFP_NET_CFG_RX_OFFSET_ADDR);\n+\n+\thw->ctrl = 0;\n+\thw->stride_rx = stride;\n+\thw->stride_tx = stride;\n+\n+\t/* Reuse cfg queue setup function */\n+\tnfp_net_cfg_queue_setup(hw);\n+\n+\tPMD_INIT_LOG(INFO, \"%s vNIC max_rx_queues: %u, max_tx_queues: %u\",\n+\t\t\tvnic_type, hw->max_rx_queues, hw->max_tx_queues);\n+\n+\t/* Initializing spinlock for reconfigs */\n+\trte_spinlock_init(&hw->reconfig_lock);\n+\n+\treturn 0;\n+}\n+\n+static int\n+nfp_flower_init_pf_vnic(struct nfp_net_hw *hw)\n+{\n+\tint ret;\n+\tuint16_t i;\n+\tuint16_t n_txq;\n+\tuint16_t n_rxq;\n+\tuint16_t port_id;\n+\tunsigned int numa_node;\n+\tstruct rte_mempool *mp;\n+\tstruct nfp_pf_dev *pf_dev;\n+\tstruct rte_eth_dev *eth_dev;\n+\tstruct nfp_app_flower *app_flower;\n+\n+\tconst struct rte_eth_rxconf rx_conf = {\n+\t\t.rx_free_thresh = DEFAULT_RX_FREE_THRESH,\n+\t\t.rx_drop_en = 1,\n+\t};\n+\n+\tconst struct rte_eth_txconf tx_conf = {\n+\t\t.tx_thresh = {\n+\t\t\t.pthresh  = DEFAULT_TX_PTHRESH,\n+\t\t\t.hthresh = DEFAULT_TX_HTHRESH,\n+\t\t\t.wthresh = DEFAULT_TX_WTHRESH,\n+\t\t},\n+\t\t.tx_free_thresh = DEFAULT_TX_FREE_THRESH,\n+\t};\n+\n+\tstatic struct rte_eth_conf port_conf = {\n+\t\t.rxmode = {\n+\t\t\t.mq_mode  = RTE_ETH_MQ_RX_RSS,\n+\t\t\t.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,\n+\t\t},\n+\t\t.txmode = {\n+\t\t\t.mq_mode = RTE_ETH_MQ_TX_NONE,\n+\t\t},\n+\t};\n+\n+\t/* Set up some pointers here for ease of use */\n+\tpf_dev = hw->pf_dev;\n+\tapp_flower = NFP_APP_PRIV_TO_APP_FLOWER(pf_dev->app_priv);\n+\n+\t/*\n+\t * Perform the \"common\" part of setting up a flower vNIC.\n+\t * Mostly reading configuration from hardware.\n+\t */\n+\tret = nfp_flower_init_vnic_common(hw, \"pf_vnic\");\n+\tif (ret)\n+\t\tgoto done;\n+\n+\thw->eth_dev = rte_eth_dev_allocate(\"pf_vnic_eth_dev\");\n+\tif (hw->eth_dev == NULL) {\n+\t\tret = -ENOMEM;\n+\t\tgoto done;\n+\t}\n+\n+\t/* Grab the pointer to the newly created rte_eth_dev here */\n+\teth_dev = hw->eth_dev;\n+\n+\tnuma_node = rte_socket_id();\n+\teth_dev->data->dev_private =\n+\t\trte_zmalloc_socket(\"pf_vnic_eth_dev\", sizeof(struct nfp_net_hw),\n+\t\t\t\t   RTE_CACHE_LINE_SIZE, numa_node);\n+\tif (eth_dev->data->dev_private == NULL) {\n+\t\tret = -ENOMEM;\n+\t\tgoto port_release;\n+\t}\n+\n+\t/* Fill in some of the eth_dev fields */\n+\teth_dev->device = &pf_dev->pci_dev->device;\n+\teth_dev->data->nb_tx_queues = hw->max_tx_queues;\n+\teth_dev->data->nb_rx_queues = hw->max_rx_queues;\n+\teth_dev->data->dev_private = hw;\n+\n+\t/* Create a mbuf pool for the PF */\n+\tapp_flower->pf_pktmbuf_pool = nfp_flower_pf_mp_create();\n+\tif (app_flower->pf_pktmbuf_pool == NULL) {\n+\t\tret = -ENOMEM;\n+\t\tgoto private_cleanup;\n+\t}\n+\n+\tmp = app_flower->pf_pktmbuf_pool;\n+\n+\t/* Add Rx/Tx functions */\n+\teth_dev->dev_ops = &nfp_flower_pf_dev_ops;\n+\n+\t/* PF vNIC gets a random MAC */\n+\teth_dev->data->mac_addrs = rte_zmalloc(\"mac_addr\",\n+\t\t\tRTE_ETHER_ADDR_LEN, 0);\n+\tif (eth_dev->data->mac_addrs == NULL) {\n+\t\tret = -ENOMEM;\n+\t\tgoto mempool_cleanup;\n+\t}\n+\n+\trte_eth_random_addr(eth_dev->data->mac_addrs->addr_bytes);\n+\trte_eth_dev_probing_finish(eth_dev);\n+\n+\t/* Configure the PF device now */\n+\tn_rxq = hw->eth_dev->data->nb_rx_queues;\n+\tn_txq = hw->eth_dev->data->nb_tx_queues;\n+\tport_id = hw->eth_dev->data->port_id;\n+\n+\tret = rte_eth_dev_configure(port_id, n_rxq, n_txq, &port_conf);\n+\tif (ret) {\n+\t\tPMD_INIT_LOG(ERR, \"Could not configure PF device %d\", ret);\n+\t\tgoto mac_cleanup;\n+\t}\n+\n+\t/* Set up the Rx queues */\n+\tfor (i = 0; i < n_rxq; i++) {\n+\t\t/* Hardcoded number of desc to 1024 */\n+\t\tret = nfp_net_rx_queue_setup(eth_dev, i, 1024, numa_node,\n+\t\t\t&rx_conf, mp);\n+\t\tif (ret) {\n+\t\t\tPMD_INIT_LOG(ERR, \"Configure flower PF vNIC Rx queue\"\n+\t\t\t\t\" %d failed\", i);\n+\t\t\tgoto rx_queue_cleanup;\n+\t\t}\n+\t}\n+\n+\t/* Set up the Tx queues */\n+\tfor (i = 0; i < n_txq; i++) {\n+\t\t/* Hardcoded number of desc to 1024 */\n+\t\tret = nfp_net_nfd3_tx_queue_setup(eth_dev, i, 1024, numa_node,\n+\t\t\t&tx_conf);\n+\t\tif (ret) {\n+\t\t\tPMD_INIT_LOG(ERR, \"Configure flower PF vNIC Tx queue\"\n+\t\t\t\t\" %d failed\", i);\n+\t\t\tgoto tx_queue_cleanup;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+\n+tx_queue_cleanup:\n+\tfor (i = 0; i < n_txq; i++)\n+\t\tnfp_net_tx_queue_release(eth_dev, i);\n+rx_queue_cleanup:\n+\tfor (i = 0; i < n_rxq; i++)\n+\t\tnfp_net_rx_queue_release(eth_dev, i);\n+mac_cleanup:\n+\trte_free(eth_dev->data->mac_addrs);\n+mempool_cleanup:\n+\trte_mempool_free(mp);\n+private_cleanup:\n+\trte_free(eth_dev->data->dev_private);\n+port_release:\n+\trte_eth_dev_release_port(hw->eth_dev);\n+done:\n+\treturn ret;\n+}\n+\n int\n nfp_init_app_flower(struct nfp_pf_dev *pf_dev)\n {\n@@ -77,14 +409,49 @@\n \t\tgoto app_cleanup;\n \t}\n \n+\t/* Grab the number of physical ports present on hardware */\n+\tapp_flower->nfp_eth_table = nfp_eth_read_ports(pf_dev->cpp);\n+\tif (app_flower->nfp_eth_table == NULL) {\n+\t\tPMD_INIT_LOG(ERR, \"error reading nfp ethernet table\");\n+\t\tret = -EIO;\n+\t\tgoto vnic_cleanup;\n+\t}\n+\n+\t/* Map the PF ctrl bar */\n+\tpf_dev->ctrl_bar = nfp_rtsym_map(pf_dev->sym_tbl, \"_pf0_net_bar0\",\n+\t\t\t32768, &pf_dev->ctrl_area);\n+\tif (pf_dev->ctrl_bar == NULL) {\n+\t\tPMD_INIT_LOG(ERR, \"Cloud not map the PF vNIC ctrl bar\");\n+\t\tret = -ENODEV;\n+\t\tgoto eth_tbl_cleanup;\n+\t}\n+\n+\t/* Fill in the PF vNIC and populate app struct */\n+\tapp_flower->pf_hw = pf_hw;\n+\tpf_hw->ctrl_bar = pf_dev->ctrl_bar;\n+\tpf_hw->pf_dev = pf_dev;\n+\tpf_hw->cpp = pf_dev->cpp;\n+\n+\tret = nfp_flower_init_pf_vnic(app_flower->pf_hw);\n+\tif (ret) {\n+\t\tPMD_INIT_LOG(ERR, \"Could not initialize flower PF vNIC\");\n+\t\tgoto pf_cpp_area_cleanup;\n+\t}\n+\n \t/* Start up flower services */\n \tif (nfp_flower_enable_services(app_flower)) {\n \t\tret = -ESRCH;\n-\t\tgoto vnic_cleanup;\n+\t\tgoto pf_vnic_cleanup;\n \t}\n \n \treturn 0;\n \n+pf_vnic_cleanup:\n+\tnfp_flower_cleanup_pf_vnic(app_flower->pf_hw);\n+pf_cpp_area_cleanup:\n+\tnfp_cpp_area_free(pf_dev->ctrl_area);\n+eth_tbl_cleanup:\n+\tfree(app_flower->nfp_eth_table);\n vnic_cleanup:\n \trte_free(pf_hw);\n app_cleanup:\n@@ -94,8 +461,23 @@\n }\n \n int\n-nfp_secondary_init_app_flower(__rte_unused struct nfp_cpp *cpp)\n+nfp_secondary_init_app_flower(struct nfp_cpp *cpp)\n {\n-\tPMD_INIT_LOG(ERR, \"Flower firmware not supported\");\n-\treturn -ENOTSUP;\n+\tstruct rte_eth_dev *eth_dev;\n+\tconst char *port_name = \"pf_vnic_eth_dev\";\n+\n+\tPMD_DRV_LOG(DEBUG, \"Secondary attaching to port %s\", port_name);\n+\n+\teth_dev = rte_eth_dev_attach_secondary(port_name);\n+\tif (eth_dev == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"secondary process attach failed, \"\n+\t\t\t\"ethdev doesn't exist\");\n+\t\treturn -ENODEV;\n+\t}\n+\n+\teth_dev->process_private = cpp;\n+\teth_dev->dev_ops = &nfp_flower_pf_dev_ops;\n+\trte_eth_dev_probing_finish(eth_dev);\n+\n+\treturn 0;\n }\ndiff --git a/drivers/net/nfp/flower/nfp_flower.h b/drivers/net/nfp/flower/nfp_flower.h\nindex 4a9b302..f6fd4eb 100644\n--- a/drivers/net/nfp/flower/nfp_flower.h\n+++ b/drivers/net/nfp/flower/nfp_flower.h\n@@ -14,6 +14,15 @@ enum nfp_flower_service {\n struct nfp_app_flower {\n \t/* List of rte_service ID's for the flower app */\n \tuint32_t flower_services_ids[NFP_FLOWER_SERVICE_MAX];\n+\n+\t/* Pointer to a mempool for the PF vNIC */\n+\tstruct rte_mempool *pf_pktmbuf_pool;\n+\n+\t/* Pointer to the PF vNIC */\n+\tstruct nfp_net_hw *pf_hw;\n+\n+\t/* the eth table as reported by firmware */\n+\tstruct nfp_eth_table *nfp_eth_table;\n };\n \n int nfp_init_app_flower(struct nfp_pf_dev *pf_dev);\ndiff --git a/drivers/net/nfp/flower/nfp_flower_ovs_compat.h b/drivers/net/nfp/flower/nfp_flower_ovs_compat.h\nnew file mode 100644\nindex 0000000..f0fcbf2\n--- /dev/null\n+++ b/drivers/net/nfp/flower/nfp_flower_ovs_compat.h\n@@ -0,0 +1,145 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2022 Corigine, Inc.\n+ * All rights reserved.\n+ */\n+\n+#ifndef _NFP_FLOWER_OVS_COMPAT_H_\n+#define _NFP_FLOWER_OVS_COMPAT_H_\n+\n+/* From ovs */\n+#define PAD_PASTE2(x, y) x##y\n+#define PAD_PASTE(x, y) PAD_PASTE2(x, y)\n+#define PAD_ID PAD_PASTE(pad, __COUNTER__)\n+\n+/* Returns X rounded up to the nearest multiple of Y. */\n+#define ROUND_UP(X, Y) (DIV_ROUND_UP(X, Y) * (Y))\n+\n+typedef uint8_t OVS_CACHE_LINE_MARKER[1];\n+\n+#ifndef __cplusplus\n+#define PADDED_MEMBERS_CACHELINE_MARKER(UNIT, CACHELINE, MEMBERS)   \\\n+\tunion {                                                         \\\n+\t\tOVS_CACHE_LINE_MARKER CACHELINE;                            \\\n+\t\tstruct { MEMBERS };                                         \\\n+\t\tuint8_t PAD_ID[ROUND_UP(sizeof(struct { MEMBERS }), UNIT)]; \\\n+\t}\n+#else\n+#define PADDED_MEMBERS_CACHELINE_MARKER(UNIT, CACHELINE, MEMBERS)           \\\n+\tstruct struct_##CACHELINE { MEMBERS };                                  \\\n+\tunion {                                                                 \\\n+\t\tOVS_CACHE_LINE_MARKER CACHELINE;                                    \\\n+\t\tstruct { MEMBERS };                                                 \\\n+\t\tuint8_t PAD_ID[ROUND_UP(sizeof(struct struct_##CACHELINE), UNIT)];  \\\n+\t}\n+#endif\n+\n+struct ovs_key_ct_tuple_ipv4 {\n+\trte_be32_t ipv4_src;\n+\trte_be32_t ipv4_dst;\n+\trte_be16_t src_port;\n+\trte_be16_t dst_port;\n+\tuint8_t    ipv4_proto;\n+};\n+\n+struct ovs_key_ct_tuple_ipv6 {\n+\trte_be32_t ipv6_src[4];\n+\trte_be32_t ipv6_dst[4];\n+\trte_be16_t src_port;\n+\trte_be16_t dst_port;\n+\tuint8_t    ipv6_proto;\n+};\n+\n+/* Tunnel information used in flow key and metadata. */\n+struct flow_tnl {\n+\tuint32_t ip_dst;\n+\tstruct in6_addr ipv6_dst;\n+\tuint32_t ip_src;\n+\tstruct in6_addr ipv6_src;\n+\tuint64_t tun_id;\n+\tuint16_t flags;\n+\tuint8_t ip_tos;\n+\tuint8_t ip_ttl;\n+\tuint16_t tp_src;\n+\tuint16_t tp_dst;\n+\tuint16_t gbp_id;\n+\tuint8_t  gbp_flags;\n+\tuint8_t erspan_ver;\n+\tuint32_t erspan_idx;\n+\tuint8_t erspan_dir;\n+\tuint8_t erspan_hwid;\n+\tuint8_t gtpu_flags;\n+\tuint8_t gtpu_msgtype;\n+\tuint8_t pad1[4];     /* Pad to 64 bits. */\n+};\n+\n+enum dp_packet_source {\n+\tDPBUF_MALLOC,              /* Obtained via malloc(). */\n+\tDPBUF_STACK,               /* Un-movable stack space or static buffer. */\n+\tDPBUF_STUB,                /* Starts on stack, may expand into heap. */\n+\tDPBUF_DPDK,                /* buffer data is from DPDK allocated memory. */\n+\tDPBUF_AFXDP,               /* Buffer data from XDP frame. */\n+};\n+\n+/* Datapath packet metadata */\n+struct pkt_metadata {\n+PADDED_MEMBERS_CACHELINE_MARKER(RTE_CACHE_LINE_SIZE, cacheline0,\n+\t/* Recirculation id carried with the recirculating packets. */\n+\tuint32_t recirc_id;         /* 0 for packets received from the wire. */\n+\tuint32_t dp_hash;           /* hash value computed by the recirculation action. */\n+\tuint32_t skb_priority;      /* Packet priority for QoS. */\n+\tuint32_t pkt_mark;          /* Packet mark. */\n+\tuint8_t  ct_state;          /* Connection state. */\n+\tbool ct_orig_tuple_ipv6;\n+\tuint16_t ct_zone;           /* Connection zone. */\n+\tuint32_t ct_mark;           /* Connection mark. */\n+\tuint32_t ct_label[4];       /* Connection label. */\n+\tuint32_t in_port;           /* Input port. */\n+\tuint32_t orig_in_port;      /* Originating in_port for tunneled packets */\n+\tvoid *conn;                 /* Cached conntrack connection. */\n+\tbool reply;                 /* True if reply direction. */\n+\tbool icmp_related;          /* True if ICMP related. */\n+);\n+\n+PADDED_MEMBERS_CACHELINE_MARKER(RTE_CACHE_LINE_SIZE, cacheline1,\n+\tunion {                     /* Populated only for non-zero 'ct_state'. */\n+\t\tstruct ovs_key_ct_tuple_ipv4 ipv4;\n+\t\tstruct ovs_key_ct_tuple_ipv6 ipv6;   /* Used only if */\n+\t} ct_orig_tuple;                             /* 'ct_orig_tuple_ipv6' is set */\n+);\n+\n+/*\n+ * Encapsulating tunnel parameters. Note that if 'ip_dst' == 0,\n+ * the rest of the fields may be uninitialized.\n+ */\n+PADDED_MEMBERS_CACHELINE_MARKER(RTE_CACHE_LINE_SIZE, cacheline2,\n+\tstruct flow_tnl tunnel;);\n+};\n+\n+#define DP_PACKET_CONTEXT_SIZE 64\n+\n+/*\n+ * Buffer for holding packet data.  A dp_packet is automatically reallocated\n+ * as necessary if it grows too large for the available memory.\n+ * By default the packet type is set to Ethernet (PT_ETH).\n+ */\n+struct dp_packet {\n+\tstruct rte_mbuf mbuf;          /* DPDK mbuf */\n+\tenum dp_packet_source source;  /* Source of memory allocated as 'base'. */\n+\n+\t/*\n+\t * All the following elements of this struct are copied in a single call\n+\t * of memcpy in dp_packet_clone_with_headroom.\n+\t */\n+\tuint16_t l2_pad_size;          /* Detected l2 padding size. Padding is non-pullable. */\n+\tuint16_t l2_5_ofs;             /* MPLS label stack offset, or UINT16_MAX */\n+\tuint16_t l3_ofs;               /* Network-level header offset, or UINT16_MAX. */\n+\tuint16_t l4_ofs;               /* Transport-level header offset, or UINT16_MAX. */\n+\tuint32_t cutlen;               /* length in bytes to cut from the end. */\n+\tuint32_t packet_type;          /* Packet type as defined in OpenFlow */\n+\tunion {\n+\t\tstruct pkt_metadata md;\n+\t\tuint64_t data[DP_PACKET_CONTEXT_SIZE / 8];\n+\t};\n+};\n+\n+#endif /* _NFP_FLOWER_OVS_COMPAT_ */\ndiff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h\nindex b28ebc9..ab2e5c2 100644\n--- a/drivers/net/nfp/nfp_common.h\n+++ b/drivers/net/nfp/nfp_common.h\n@@ -448,6 +448,9 @@ int nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,\n #define NFP_APP_PRIV_TO_APP_NIC(app_priv)\\\n \t((struct nfp_app_nic *)app_priv)\n \n+#define NFP_APP_PRIV_TO_APP_FLOWER(app_priv)\\\n+\t((struct nfp_app_flower *)app_priv)\n+\n #endif /* _NFP_COMMON_H_ */\n /*\n  * Local variables:\n",
    "prefixes": [
        "v4",
        "05/12"
    ]
}