get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113144,
    "url": "http://patches.dpdk.org/api/patches/113144/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1655798919-38659-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": "<1655798919-38659-6-git-send-email-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1655798919-38659-6-git-send-email-chaoyong.he@corigine.com",
    "date": "2022-06-21T08:08:32",
    "name": "[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/1655798919-38659-6-git-send-email-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 23648,
            "url": "http://patches.dpdk.org/api/series/23648/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23648",
            "date": "2022-06-21T08:08:27",
            "name": "preparation for the rte_flow offload of nfp PMD",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/23648/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/113144/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/113144/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 A2AE5A0543;\n\tTue, 21 Jun 2022 10:10:11 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D50D042B89;\n\tTue, 21 Jun 2022 10:09:23 +0200 (CEST)",
            "from NAM12-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam12on2117.outbound.protection.outlook.com [40.107.243.117])\n by mails.dpdk.org (Postfix) with ESMTP id 46D2342B83\n for <dev@dpdk.org>; Tue, 21 Jun 2022 10:09:21 +0200 (CEST)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by DM5PR13MB1756.namprd13.prod.outlook.com (2603:10b6:3:12f::22) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Tue, 21 Jun\n 2022 08:09:19 +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%7]) with mapi id 15.20.5373.015; Tue, 21 Jun 2022\n 08:09:19 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=fkMD0urKOMDdeer13XCGW87+7/yNbds6sREjExKWNh2Tfz1QT2IcnVpiNSL6iYSCfy/CnW+lJKPk0YZN+ySnfFTWWniywG1sZURWzPakIkFThCyXqpdLllVaMhp2XaGwkU2P0FowvZKMrKgwTiDukGhAzrjdguncz2ajv8tpsyzsYUQpNeWvS5tAkKUZXRpv458cUmVAKe9kqaqzNhSpBQDGlRBr5tewnYZiNGTNhcPhDhW6bwvT+BZPlnf3DD/mFKGEuTuU+g5GSHTriawARsAdhh3fR2XaJrLh7dqupVuU3HtfaMAz0UFmzOhP/8vdVpZ+rb6qF2WMLfGjX+2dkg==",
        "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=UnKrwt8WgpzsCMYgP3U6iw+1XfwXYYz4SP7gOH7B3hw/KUFuQfrg8xuT+V0xwplmK12Sl5JvvtP6yGx3AjTZg7+0BDddxI57pElpQUDyZ8FR5xP9TU9gxLPJVZsNZ8ub3FN/htQNCNuUBncFeaJslaNj68NYTkJ5co9pk6EqW7Ey9AP4DyI/wisgO6xRyb8TSPkqSoJP0MEYd01C/kWwlDB1cQtfvBWaclPPgrEDLbEFL07WApdMHfGDDogmxzwEyn0sGFTK1+T/MpTtdKJ/2VI20l0Ieq63fgL6RgYnQBYHu8E6o/fLWfsbUkit58iNxoqG1xe+Ejq8hwkW4w5vEg==",
        "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=GWewLpJackPzed0FCbt2iEZE+cAQI5jz28NVuH3VIq/fYkyWjuv6+T4F6yZ1e9/Pn2dsz3Zpco/aMSDOICu3CWObPQY/KdUDq0TZ8/RS3w2fyZ4P8lEc7kkT6S9/x/F7/ACj2qW99kgVljJ6x6sGNy6M5LkPHZhFeu72AWdN8BU=",
        "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 05/12] net/nfp: add flower PF setup and mempool init logic",
        "Date": "Tue, 21 Jun 2022 16:08:32 +0800",
        "Message-Id": "<1655798919-38659-6-git-send-email-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1655798919-38659-1-git-send-email-chaoyong.he@corigine.com>",
        "References": "<1655798919-38659-1-git-send-email-chaoyong.he@corigine.com>",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "OS0P286CA0009.JPNP286.PROD.OUTLOOK.COM\n (2603:1096:604:9c::14) 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": "4be51f1b-6c1d-47a4-ae2e-08da535d57aa",
        "X-MS-TrafficTypeDiagnostic": "DM5PR13MB1756:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <DM5PR13MB175646F4403A08DDDE4AB9019EB39@DM5PR13MB1756.namprd13.prod.outlook.com>",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n XYDSJQbprzvZvUI7Ls0ZtWj9WJ30GpKEH1K219Ln56uFHVS4pdzLhdTqIh3lXum41IdNWSFaHcjNNXoXIQUY0ENdBJfLjpL4ALLptR+6S+mpNZPooao7lJ90bolOUOCGcmBpKoq+jSvXJ4+tdCgg6pGzfJWXncOQdSG66pofWDeBvZmcUiY/iqUhzRHs7CWa8JWmWKQ/b4NKgGaC482YecIlp3iMmHGWrFfgbxKibhMermFC0KDgfOVWTqcUNXzRZeOFTM45Px1i8aDv52DkTh720BdYgx/vLG6ihG0N4O/NtvZJ/SDDdRHZH7w1mFQzrv6LA07IZtidNLaw8VCM6J+ro5LYIcdAGUWavYjUu0YNMx145epvB1NoOFdiGLNSFsUa+GQSbH9LhIPAb2tzqBqGzCOUWDhtVpY2mhrNcSP6x/MGwLq6y/i4lBCoHTuBuoLYA95wXxv+7ET7eMoD/1zSzJCE7+1fSqcSMhWpgOHz2DFUHr4TQwsmUTAZCEGPoZnNoub7SnthKATjORYx5zcZ1QId8Lngw09514JOS1H+EfrJWsg3wIVDPMRo7WmMm2XKKTR8qJ3NLQBJUul8iponue3b4kbhr3dFvnAmvhTkF3C8wwVlnYF2FJNGQOOeNCyaQmGFWY+kCek6Mnq3063D7wVyoqKE5Z3ahXHUw8bQbIU0imwRAoYsKqcmsh5xFcnNDSGH1XzbZCijT/V5ow==",
        "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)(376002)(136003)(366004)(396003)(39840400004)(346002)(26005)(2906002)(6666004)(6512007)(8936002)(36756003)(107886003)(83380400001)(44832011)(5660300002)(66574015)(186003)(86362001)(30864003)(4326008)(2616005)(6916009)(316002)(6486002)(8676002)(41300700001)(66476007)(66556008)(66946007)(478600001)(52116002)(38100700002)(6506007)(38350700002);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "=?utf-8?q?Qs2hXBPw0gA0rT4B4tviUx9HaFMj?=\n\t=?utf-8?q?Ip6DRtW8Gg3/6+FULDjbqu3J/qUAbeRDOV+C/is38fThKXgN4MmmsOL4AE5BDF3H2?=\n\t=?utf-8?q?4z23ocdLercuS5u57QpBHbJBTVrrMugufCQiWi5L9zrDmZI7iguJIIAP9zOnbyCkv?=\n\t=?utf-8?q?zvt/ZRtVuqlm7kb+UGKN3au1Y+ESaHNAn4q9H3Agob+H+xk2LAC5zG4VZFdckpb53?=\n\t=?utf-8?q?1dbWkQlhQ7H8NfPmjRrABpwYyr+8q6gXkyNRw8WIn2qOhQLWQi1r23BHI3c+0VywO?=\n\t=?utf-8?q?7dkYE4nKMIkN32Xi2KIbF895K5RBbnwrJLIxE3X0nR8vwmGtKWmAzB7X9zql/iMlp?=\n\t=?utf-8?q?AVMIE/cvvKu7GwggAuzktQcs70yV5A/Rxzu3znLDraP2qHl+e2wLJWJecYsQouiL8?=\n\t=?utf-8?q?Gl1prknSU5CqgQ96VmhhrTOabAKR9J94CDT9E26tk8F29jwcBa7wnBZWYDVO4vQFv?=\n\t=?utf-8?q?J8w5sUriSdoMC47m+9Bm3kREKma0tT8WkEBeVhsY/BiJZXx2r9eUMPUoCdmlfay9K?=\n\t=?utf-8?q?trijp6Did0lHWBmEQ+88d/75PBEoCV6+19uj1aZKu2vZPWwXl7MI+k7B0gIcMOU3P?=\n\t=?utf-8?q?J3jTFNtdBAnZNnrN2JyqOAuyDW6j+RxEagTOLzcfbFxdyHalk1LsjlX1PqDeN1wPG?=\n\t=?utf-8?q?KPqE01oyr3vkOXG6F831JbWQW0ON4Fm5k3+8uc2brb6+MLpqcOK+1DdNSalduJZBE?=\n\t=?utf-8?q?PTyQrNkg0aGgN6CPArFhkmZtdWbjELfIxpO739Tk0nV4nAFegBK6fIBlwc/2Xkf3B?=\n\t=?utf-8?q?Lkc4YdqlRgCGv8vfwUx91e9v/lpSNgKgP9Mg/4T4+HT8KzCoOO1xcPWunlOBbq+nC?=\n\t=?utf-8?q?tBC+/1EnsdRy8nsnNcqCKW9RuHttnTPpJsyt0RpbQwQmxVMr6wsQ4A99EYZu884xS?=\n\t=?utf-8?q?KCqzgNjJi2cw0w1xSzTIfv8rhBb6TftEXVIQsRRyzWoikfLsMO88T78k44ueX6WKY?=\n\t=?utf-8?q?xRar5D8TynN83OnRsQHdQcNSIjiI7DxBK4ISFp2ZsXsl5HX68AqkkxR0Lrd6y8x9E?=\n\t=?utf-8?q?2GdP1f5sZeaXhqz0t/fDppcPUukAV+PKBJ6dfNKwaZY1Kc8CRifR0HDW1jICcnPgu?=\n\t=?utf-8?q?CQYHqv6DGgmTXZSYIkuDPMEwbQ/dPjJRnb+k45yqEcA8Sf+2WdYRlQyPBVPNuce73?=\n\t=?utf-8?q?Cn9AxkjEbfjuAJHM06uQUDXbJ2PFUo2jX9AedRgQ5RhT/Dljfn8BmGv7HnPitd8Ic?=\n\t=?utf-8?q?+PWcWnYAQ+PIjLjb6L2BeVjzDt6yjs7KLXie0/m25vF2epTDNcZ2/1qd6pgBzSNju?=\n\t=?utf-8?q?jnth+cVfzruFS0NK4l5oBUW6DzP0hhq5c9QfjonI5x9kxwV7VPiLTP0ulMwm5Cmor?=\n\t=?utf-8?q?sYJNkk81f5aQirIPwlSgt/iKzjlwQiOCi/sY7e7oV0LroJHYcR4HzmFGMRzG53eOU?=\n\t=?utf-8?q?zdmC5G5oLnZHm5SAe6Uslq3rj5INrRY37U/0avUMGgptJYDl2nLMPQli9iSRSqKTL?=\n\t=?utf-8?q?23t9oy0bSCJXaWaOSLzjgwelenC6yLeB6hCNqsTa7sSePIkNI63xUNz8BOLt94RV7?=\n\t=?utf-8?q?y89+12AahZi6i1y1TbNE/9K2brxm/4hGR62KKhBcJVryDfLuRZ4p3IbvteB9zQhQW?=\n\t=?utf-8?q?yyVCsO5fV+JjMYD9HTe8KjnpGyhTl2P3CGhwZDec+/SjZeMLiSPao+wh25M7L60w0?=\n\t=?utf-8?q?4kSRHJ/aqsu/lWvFxVFTD9zZEX+cWve1MXuLk0jX8Epa/c7B8dMGw=3D?=",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 4be51f1b-6c1d-47a4-ae2e-08da535d57aa",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "21 Jun 2022 08:09:19.5151 (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 bZI7Fv9pG96ZqYbhMVBTDFV57XZxLR6Y26PU3QSc9RuuYPVYYw4i1qSUvzYPlYnjLziAB33DuSgjWRy63rMvy7l4SI4nzrW8T8XOzIdq2b0=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM5PR13MB1756",
        "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": [
        "05/12"
    ]
}