get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133566,
    "url": "http://patches.dpdk.org/api/patches/133566/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231028065315.1937188-12-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": "<20231028065315.1937188-12-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231028065315.1937188-12-chaoyong.he@corigine.com",
    "date": "2023-10-28T06:53:15",
    "name": "[v2,11/11] net/nfp: remove the redundancy logic of representor port",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5f56bb581b61ceddd8257a0f10dd4c628ea94513",
    "submitter": {
        "id": 2554,
        "url": "http://patches.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231028065315.1937188-12-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 30041,
            "url": "http://patches.dpdk.org/api/series/30041/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30041",
            "date": "2023-10-28T06:53:04",
            "name": "Clean up NFP PMD",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30041/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/133566/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/133566/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 661F543220;\n\tSat, 28 Oct 2023 08:54:59 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3506042DCB;\n\tSat, 28 Oct 2023 08:54:10 +0200 (CEST)",
            "from NAM11-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam11on2097.outbound.protection.outlook.com [40.107.223.97])\n by mails.dpdk.org (Postfix) with ESMTP id 8F0E9427D7\n for <dev@dpdk.org>; Sat, 28 Oct 2023 08:54:08 +0200 (CEST)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by SA1PR13MB6055.namprd13.prod.outlook.com (2603:10b6:806:338::20)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Sat, 28 Oct\n 2023 06:54:06 +0000",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6933.022; Sat, 28 Oct 2023\n 06:54:06 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=edvOVIACUSpqT/E+qsy5GxPUmtSkxzVEnUajbIdTTk2iO7jcwdD2GFKTA6Gx+ZX9NYd5OGIOYWzABQTrG3udkJRiS5JfyQvLcNE7/mTwPgy9vNPrtbXrI++jx1jJxkPXMGjYCuvtVZW5vqawb88RkP4bu94hD+Llab6fS0rbr9u9kfO9VgaSJ5NVPYQjgXmBHinVqJ5AEmaJxz8D/YK/4iy5t4FA762oXPOj/dzPEGP2DT+6s/4M0TsF2TnZukHKNdJvgrbjZ4W3rd/UiE+8qEzINKMsFqMfXSvmxgXggRBnRQoE3WQmA+JrCf4m8ePY+PmveRb30/NBhRcJ8p3dFQ==",
        "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=nWyV7bqPllBDAbKZk1duPwT0Q9UjyD0xUP2b8+AeKUs=;\n b=k7pO4HPpSVBiGIu1cIQSThOYbx9XI28L+CaV72tkR33O4CEcANjtGptBlH0eu7dmak1sf6r5yOw8pbKmzlUbwVe+jOf4aYKpWhJu7kGaPb1Mh3+BJvPTyZwtB8c2vHsbpKjZFWePlkhtyVI+OCVgyFR+Lo0bxJdFNPGuuscZFhuyi0JbXFwaO/LolZQFNxscyLK3e2c6MKQU8Ukg7HSrzGyK5yq8OY1L8HR2IDisINdYxINwHO/vspqm0D6Av+bSweaTC6W4ok2sVvPmAyYwW+wM3dMhq07Y3Vl8we554U+8W80qjClXKV5eTUUrxgo7jCt5+4dymTyCSgGVCYqzEA==",
        "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=nWyV7bqPllBDAbKZk1duPwT0Q9UjyD0xUP2b8+AeKUs=;\n b=uYacWZRC4eBebNt2gOPDB7w61vcYt565RXPaePIsmMsi9hQzEoYKGxMm6+1KxSHfrTmoYoij3EQtZYRz80kysGxFvbZazH4KpJOWKFiqcVgibEDavywRNQutEvjj+zXCypTcE+jDohzVIS6sDaLwcGLwXzDLh/fsv6Vh+KeVK9M=",
        "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": "oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>,\n Peng Zhang <peng.zhang@corigine.com>",
        "Subject": "[PATCH v2 11/11] net/nfp: remove the redundancy logic of representor\n port",
        "Date": "Sat, 28 Oct 2023 14:53:15 +0800",
        "Message-Id": "<20231028065315.1937188-12-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20231028065315.1937188-1-chaoyong.he@corigine.com>",
        "References": "<20231028061558.1842855-1-chaoyong.he@corigine.com>\n <20231028065315.1937188-1-chaoyong.he@corigine.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "SA0PR11CA0020.namprd11.prod.outlook.com\n (2603:10b6:806:d3::25) To SJ0PR13MB5545.namprd13.prod.outlook.com\n (2603:10b6:a03:424::5)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SJ0PR13MB5545:EE_|SA1PR13MB6055:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "b8758521-71ff-4c42-37ef-08dbd782ad86",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n tHlq3k7UbCps/nkrDkzYw4n6YYBEjZNyT2zr2ED/L5YodEI13Q3Etp8RAu2pxplrla4kl2DnHYqSMtH8oOh6qlifxUionTR0W1rd3zxLrQIfskYoBRAFWizsq4A63v5l5s1cMk6Ow2Va6HEcR/jhpScVzydGhudLZCX1xJHoMsj7JwC2+zdDNZWyOcS36Walo2qkmhA3J36Lhf01xyEa8AmYGauGTMAEyK6IEBV3NJTFzFQbVhEkZJnTcVN3mJDwYmsObFInE0sxjr6AgfByzMrGxY3Kvh3BYaVoQfucZV2UqdsHSlylB4DPxZkWp+nhl6TXMRc0h58c09LxAmeuJO+Op3BqwsIt83t5jlPNSazasPEibwpOPh86YvsLFckNt9DXmoKFE6C70O69qGYJ0NAZVMg4TkqnSrN4ZTkBGoSw3dwQmbDBYKPJjKiSpsSy07DqyyctBDj5Rd9sU0Clolo5B6irAUPm0VbqT1yGZ59hnxkgzhlfOVDOFR1zywv0vtkkgbun76ggjmTq0o306fPZMvZbs0Cy12zJkKbbEJ1PVebdFDB1j0gfYLxV0tympMjqNR1hyp0NqDOmGZdcwgxOqpUFxcbtpxf1BwS+dTKcS0/ezu/hyz5QKgMf6Jqb8YmZjGQuVRY0pafvoL7We7VBtP5ypEKBuN+6726Mn0Q=",
        "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:(13230031)(346002)(136003)(396003)(366004)(39830400003)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(6486002)(8676002)(30864003)(8936002)(478600001)(6666004)(54906003)(66476007)(66946007)(66556008)(86362001)(4326008)(41300700001)(5660300002)(6916009)(2906002)(44832011)(316002)(6506007)(52116002)(38100700002)(36756003)(2616005)(1076003)(107886003)(6512007)(26005)(38350700005)(83380400001);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n ZMdKIYJnz8XzQVz0baFqwVPIqpWViYE0S+AMj7SC73ngIcvvQAsjCqDVYPazS27zH1OKYNKNA1JpuCKJB8Nhg/M3QfldfQ1yvn/3RMz+rBKmiR3ifRI+i9Sz6eu6gGus2ZS06kF1mw7SyhziDgFFnZyiradP/kytUhwHQSQdp3lLuyIcTEBppzDepZdqb7kNI1dVHpf04BRSElM9sSsVbG1W2F8zpIWksOIE2Bq0S9q3BaDirIb0Ytk53qIK42i8WGtWqSigw5OlaynVSVVKYaUgHLkkXBPdbuAMISPoIPzVTR8dSVkpabAXB1MFxjrVwVhH/Wrh9X0qJzZBA58n3mySmeP5R/gN3EUytGb3sj5SWnq0TYcwmMkw+J2VXvvgYNieVFP9DtGjexvgYzl5tIBZn+xsDlSBW9f/+DO0icQD9t+SLOT7WsQB7GeqAKKVuGLoQ/TIR0uooOdrat3JWvkhzzNNmEv3ks8QZBAFcHwMYPgqrYRHtlD+0xUtWs3kx9454sd6FkOLcYHnOrQgi4SDGhtm5wpAsMqwmKZh3za6DuiRcCauiJ1/4G2ok73nSKt7609OR+hqkxYJYhnWMWEtyWoxUu0A3bpwxyOLS1np3zDDKH8syStzBdrCp6sVsbKZcmpZU6I/N+Ofp5kdgPp/c8SL70errvKUdTqKbBPhZJ7InMxdLao1lh+JJw8aHBPsuAdrR4JQhxBbLY/R3NVexlTYl3GA8SAgojnNtW/Dk6gTFY17TB7Dfr9B1BDq25MnhsDQGyPRzhK6JxN8joe0ZwNjLE+EfxlqPum0QfrOTLDwxaUw8F5z4NrzwZeTjJe2cpAZhoMQBpt4jYMDaDuRooTxaHTBF6zgXqblLfwYbHzeCxfZeKBkCa8ssDQkz1Ca+iXFF0yP38us4coNn58qJ+s/kug+UZamuE6MC9QzdYauYhQ9vOGA+PnVuAMG/zfagb6qLn6Y0zJPpU5X2V4p9N45rpAZf+SSvv3m4f+9ruIzWkOqJ3yf86lN18JUcQOT6peIaar9WKvREwr2uSqy/OZYsRaeK04mMIDIL9VU/79G8UdVMgroWLo3hy7uZ1IcxJNzwMi3XMATdmwDh2YW17mYw3ngIczcWwlIeyFFZx3OXjNusCrzvkHQv+KyT6+d3zqJizNM/pm7r785TRHJzV77oXFZDyASSlyIjO2RiD/Ig6FZRY+xp5taMZ4QX/4sj86yp81GhdEd7ZrwpSeklDVbwZLN2zpAoP6vjekKrT/R0wRtdQbgp+3GbKolXB3sWl8R0L4dmgqKljypmrYGaFkMbObH6O2Jc7mS0T2Dl+f9RN4vpeDcU43rmp7kSYL6ZCYqm7olQLqFnaZ7fTuVskr0bxP4HIcU9+ssURDaCyWBuI8RsVbMrjeY0+DIiuURt3ok0LaWulXLkXzu6Z6UN+UiITeJdRM04dAI9+8vj5GQzYyljFSCzfqnxwOJAl+RQLy9tC7uvyhM7zG3Wm32sTURPnk8dxd1iNXlA9fHEgItlxgNcs6uoGu3ymMyUuS8O0nDUI72/rWmd8x26QyVSWkzBPEeHUjh2FYs39K6JoVCharMb/VjljpdqPSHpdrWCUDHu85UQJQDu1IqPw==",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n b8758521-71ff-4c42-37ef-08dbd782ad86",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "28 Oct 2023 06:54:06.3198 (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 NwvJGKdcBoFFihKwPhQP+Z61TcamKPLu6ASEE7a38gV0/t4Ttzb67MgRyuQ1otktUCZ9HSJe+LVAoeu+P4qQwC1zH/3XkNdYND0hAxbkaHI=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SA1PR13MB6055",
        "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": "Using the helper function, we can remove some redundancy logic of\nrepresentor port by reusing the functions in common module.\n\nSigned-off-by: Chaoyong He <chaoyong.he@corigine.com>\nReviewed-by: Peng Zhang <peng.zhang@corigine.com>\n---\n drivers/net/nfp/flower/nfp_flower.c           |  47 +---\n drivers/net/nfp/flower/nfp_flower.h           |   1 -\n .../net/nfp/flower/nfp_flower_representor.c   | 253 +-----------------\n drivers/net/nfp/nfd3/nfp_nfd3_dp.c            |   2 +-\n drivers/net/nfp/nfdk/nfp_nfdk_dp.c            |   2 +-\n drivers/net/nfp/nfp_ethdev.c                  |  28 +-\n drivers/net/nfp/nfp_net_common.c              | 127 +++++----\n drivers/net/nfp/nfp_net_common.h              |   6 +-\n drivers/net/nfp/nfp_rxtx.c                    |   4 +-\n 9 files changed, 93 insertions(+), 377 deletions(-)",
    "diff": "diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c\nindex 0727e7fd9f..f2e6eb6a6f 100644\n--- a/drivers/net/nfp/flower/nfp_flower.c\n+++ b/drivers/net/nfp/flower/nfp_flower.c\n@@ -48,11 +48,7 @@ nfp_flower_pf_start(struct rte_eth_dev *dev)\n \tnfp_net_params_setup(net_hw);\n \n \tupdate |= NFP_NET_CFG_UPDATE_RSS;\n-\n-\tif ((hw->cap & NFP_NET_CFG_CTRL_RSS2) != 0)\n-\t\tnew_ctrl |= NFP_NET_CFG_CTRL_RSS2;\n-\telse\n-\t\tnew_ctrl |= NFP_NET_CFG_CTRL_RSS;\n+\tnew_ctrl |= nfp_net_cfg_ctrl_rss(hw->cap);\n \n \t/* Enable device */\n \tnew_ctrl |= NFP_NET_CFG_CTRL_ENABLE;\n@@ -62,8 +58,6 @@ nfp_flower_pf_start(struct rte_eth_dev *dev)\n \tif ((hw->cap & NFP_NET_CFG_CTRL_RINGCFG) != 0)\n \t\tnew_ctrl |= NFP_NET_CFG_CTRL_RINGCFG;\n \n-\tnn_cfg_writel(hw, NFP_NET_CFG_CTRL, new_ctrl);\n-\n \t/* If an error when reconfig we avoid to change hw state */\n \tret = nfp_reconfig(hw, new_ctrl, update);\n \tif (ret != 0) {\n@@ -88,43 +82,6 @@ nfp_flower_pf_start(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n-/* Stop device: disable rx and tx functions to allow for reconfiguring. */\n-int\n-nfp_flower_pf_stop(struct rte_eth_dev *dev)\n-{\n-\tuint16_t i;\n-\tstruct nfp_net_hw *hw;\n-\tstruct nfp_net_txq *this_tx_q;\n-\tstruct nfp_net_rxq *this_rx_q;\n-\tstruct nfp_flower_representor *repr;\n-\n-\trepr = dev->data->dev_private;\n-\thw = repr->app_fw_flower->pf_hw;\n-\n-\tnfp_net_disable_queues(dev);\n-\n-\t/* Clear queues */\n-\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n-\t\tthis_tx_q = dev->data->tx_queues[i];\n-\t\tnfp_net_reset_tx_queue(this_tx_q);\n-\t\tdev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;\n-\t}\n-\n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\tthis_rx_q = dev->data->rx_queues[i];\n-\t\tnfp_net_reset_rx_queue(this_rx_q);\n-\t\tdev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;\n-\t}\n-\n-\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n-\t\t/* Configure the physical port down */\n-\t\tnfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);\n-\telse\n-\t\tnfp_eth_set_configured(dev->process_private, hw->nfp_idx, 0);\n-\n-\treturn 0;\n-}\n-\n /* Reset and stop device. The device can not be restarted. */\n static int\n nfp_flower_pf_close(struct rte_eth_dev *dev)\n@@ -188,7 +145,7 @@ static const struct eth_dev_ops nfp_flower_pf_vnic_ops = {\n \t.dev_configure          = nfp_net_configure,\n \n \t.dev_start              = nfp_flower_pf_start,\n-\t.dev_stop               = nfp_flower_pf_stop,\n+\t.dev_stop               = nfp_net_stop,\n \t.dev_close              = nfp_flower_pf_close,\n };\n \ndiff --git a/drivers/net/nfp/flower/nfp_flower.h b/drivers/net/nfp/flower/nfp_flower.h\nindex a989c4a8b8..220b714018 100644\n--- a/drivers/net/nfp/flower/nfp_flower.h\n+++ b/drivers/net/nfp/flower/nfp_flower.h\n@@ -113,7 +113,6 @@ bool nfp_flower_pf_dispatch_pkts(struct nfp_net_hw *hw,\n uint16_t nfp_flower_pf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\tuint16_t nb_pkts);\n int nfp_flower_pf_start(struct rte_eth_dev *dev);\n-int nfp_flower_pf_stop(struct rte_eth_dev *dev);\n uint32_t nfp_flower_pkt_add_metadata(struct nfp_app_fw_flower *app_fw_flower,\n \t\tstruct rte_mbuf *mbuf, uint32_t port_id);\n \ndiff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c\nindex b52c6f514a..0f0e63aae0 100644\n--- a/drivers/net/nfp/flower/nfp_flower_representor.c\n+++ b/drivers/net/nfp/flower/nfp_flower_representor.c\n@@ -18,232 +18,23 @@ enum nfp_repr_type {\n \tNFP_REPR_TYPE_MAX,          /*<< Number of representor types */\n };\n \n-static int\n-nfp_pf_repr_rx_queue_setup(struct rte_eth_dev *dev,\n-\t\tuint16_t queue_idx,\n-\t\tuint16_t nb_desc,\n-\t\tunsigned int socket_id,\n-\t\tconst struct rte_eth_rxconf *rx_conf,\n-\t\tstruct rte_mempool *mp)\n-{\n-\tstruct nfp_net_hw *hw;\n-\tstruct nfp_net_rxq *rxq;\n-\tconst struct rte_memzone *tz;\n-\tstruct nfp_flower_representor *repr;\n-\n-\trepr = dev->data->dev_private;\n-\thw = repr->app_fw_flower->pf_hw;\n-\n-\t/* Allocating rx queue data structure */\n-\trxq = rte_zmalloc_socket(\"ethdev RX queue\", sizeof(struct nfp_net_rxq),\n-\t\t\tRTE_CACHE_LINE_SIZE, socket_id);\n-\tif (rxq == NULL)\n-\t\treturn -ENOMEM;\n-\n-\tdev->data->rx_queues[queue_idx] = rxq;\n-\n-\t/* Hw queues mapping based on firmware configuration */\n-\trxq->qidx = queue_idx;\n-\trxq->fl_qcidx = queue_idx * hw->stride_rx;\n-\trxq->qcp_fl = hw->rx_bar + NFP_QCP_QUEUE_OFF(rxq->fl_qcidx);\n-\n-\t/*\n-\t * Tracking mbuf size for detecting a potential mbuf overflow due to\n-\t * RX offset.\n-\t */\n-\trxq->mem_pool = mp;\n-\trxq->mbuf_size = rxq->mem_pool->elt_size;\n-\trxq->mbuf_size -= (sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM);\n-\thw->flbufsz = rxq->mbuf_size;\n-\n-\trxq->rx_count = nb_desc;\n-\trxq->port_id = dev->data->port_id;\n-\trxq->rx_free_thresh = rx_conf->rx_free_thresh;\n-\n-\t/*\n-\t * Allocate RX ring hardware descriptors. A memzone large enough to\n-\t * handle the maximum ring size is allocated in order to allow for\n-\t * resizing in later calls to the queue setup function.\n-\t */\n-\ttz = rte_eth_dma_zone_reserve(dev, \"rx_ring\", queue_idx,\n-\t\t\tsizeof(struct nfp_net_rx_desc) *\n-\t\t\thw->dev_info->max_qc_size,\n-\t\t\tNFP_MEMZONE_ALIGN, socket_id);\n-\tif (tz == NULL) {\n-\t\tPMD_DRV_LOG(ERR, \"Error allocating rx dma\");\n-\t\tnfp_net_rx_queue_release(dev, queue_idx);\n-\t\tdev->data->rx_queues[queue_idx] = NULL;\n-\t\treturn -ENOMEM;\n-\t}\n-\n-\t/* Saving physical and virtual addresses for the RX ring */\n-\trxq->dma = (uint64_t)tz->iova;\n-\trxq->rxds = tz->addr;\n-\n-\t/* Mbuf pointers array for referencing mbufs linked to RX descriptors */\n-\trxq->rxbufs = rte_zmalloc_socket(\"rxq->rxbufs\",\n-\t\t\tsizeof(*rxq->rxbufs) * nb_desc,\n-\t\t\tRTE_CACHE_LINE_SIZE, socket_id);\n-\tif (rxq->rxbufs == NULL) {\n-\t\tnfp_net_rx_queue_release(dev, queue_idx);\n-\t\tdev->data->rx_queues[queue_idx] = NULL;\n-\t\treturn -ENOMEM;\n-\t}\n-\n-\tnfp_net_reset_rx_queue(rxq);\n-\trxq->hw = hw;\n-\n-\t/*\n-\t * Telling the HW about the physical address of the RX ring and number\n-\t * of descriptors in log2 format.\n-\t */\n-\tnn_cfg_writeq(&hw->super, NFP_NET_CFG_RXR_ADDR(queue_idx), rxq->dma);\n-\tnn_cfg_writeb(&hw->super, NFP_NET_CFG_RXR_SZ(queue_idx), rte_log2_u32(nb_desc));\n-\n-\treturn 0;\n-}\n-\n-static int\n-nfp_pf_repr_tx_queue_setup(struct rte_eth_dev *dev,\n-\t\tuint16_t queue_idx,\n-\t\tuint16_t nb_desc,\n-\t\tunsigned int socket_id,\n-\t\tconst struct rte_eth_txconf *tx_conf)\n-{\n-\tstruct nfp_net_hw *hw;\n-\tstruct nfp_net_txq *txq;\n-\tuint16_t tx_free_thresh;\n-\tconst struct rte_memzone *tz;\n-\tstruct nfp_flower_representor *repr;\n-\n-\trepr = dev->data->dev_private;\n-\thw = repr->app_fw_flower->pf_hw;\n-\n-\ttx_free_thresh = (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :\n-\t\t\tDEFAULT_TX_FREE_THRESH;\n-\tif (tx_free_thresh > nb_desc)\n-\t\treturn -EINVAL;\n-\n-\t/* Allocating tx queue data structure */\n-\ttxq = rte_zmalloc_socket(\"ethdev TX queue\", sizeof(struct nfp_net_txq),\n-\t\t\tRTE_CACHE_LINE_SIZE, socket_id);\n-\tif (txq == NULL) {\n-\t\tPMD_DRV_LOG(ERR, \"Error allocating tx dma\");\n-\t\treturn -ENOMEM;\n-\t}\n-\n-\tdev->data->tx_queues[queue_idx] = txq;\n-\n-\t/*\n-\t * Allocate TX ring hardware descriptors. A memzone large enough to\n-\t * handle the maximum ring size is allocated in order to allow for\n-\t * resizing in later calls to the queue setup function.\n-\t */\n-\ttz = rte_eth_dma_zone_reserve(dev, \"tx_ring\", queue_idx,\n-\t\t\tsizeof(struct nfp_net_nfd3_tx_desc) *\n-\t\t\thw->dev_info->max_qc_size,\n-\t\t\tNFP_MEMZONE_ALIGN, socket_id);\n-\tif (tz == NULL) {\n-\t\tPMD_DRV_LOG(ERR, \"Error allocating tx dma\");\n-\t\tnfp_net_tx_queue_release(dev, queue_idx);\n-\t\tdev->data->tx_queues[queue_idx] = NULL;\n-\t\treturn -ENOMEM;\n-\t}\n-\n-\ttxq->tx_count = nb_desc;\n-\ttxq->tx_free_thresh = tx_free_thresh;\n-\n-\t/* Queue mapping based on firmware configuration */\n-\ttxq->qidx = queue_idx;\n-\ttxq->tx_qcidx = queue_idx * hw->stride_tx;\n-\ttxq->qcp_q = hw->tx_bar + NFP_QCP_QUEUE_OFF(txq->tx_qcidx);\n-\n-\ttxq->port_id = dev->data->port_id;\n-\n-\t/* Saving physical and virtual addresses for the TX ring */\n-\ttxq->dma = (uint64_t)tz->iova;\n-\ttxq->txds = tz->addr;\n-\n-\t/* Mbuf pointers array for referencing mbufs linked to TX descriptors */\n-\ttxq->txbufs = rte_zmalloc_socket(\"txq->txbufs\",\n-\t\t\tsizeof(*txq->txbufs) * nb_desc,\n-\t\t\tRTE_CACHE_LINE_SIZE, socket_id);\n-\tif (txq->txbufs == NULL) {\n-\t\tnfp_net_tx_queue_release(dev, queue_idx);\n-\t\tdev->data->tx_queues[queue_idx] = NULL;\n-\t\treturn -ENOMEM;\n-\t}\n-\n-\tnfp_net_reset_tx_queue(txq);\n-\ttxq->hw = hw;\n-\n-\t/*\n-\t * Telling the HW about the physical address of the TX ring and number\n-\t * of descriptors in log2 format.\n-\t */\n-\tnn_cfg_writeq(&hw->super, NFP_NET_CFG_TXR_ADDR(queue_idx), txq->dma);\n-\tnn_cfg_writeb(&hw->super, NFP_NET_CFG_TXR_SZ(queue_idx), rte_log2_u32(nb_desc));\n-\n-\treturn 0;\n-}\n-\n static int\n nfp_flower_repr_link_update(struct rte_eth_dev *dev,\n \t\t__rte_unused int wait_to_complete)\n {\n \tint ret;\n-\tuint32_t i;\n \tuint32_t nn_link_status;\n \tstruct nfp_net_hw *pf_hw;\n \tstruct rte_eth_link *link;\n-\tstruct nfp_eth_table *nfp_eth_table;\n \tstruct nfp_flower_representor *repr;\n \n-\tstatic const uint32_t ls_to_ethtool[] = {\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_UNSUPPORTED] = RTE_ETH_SPEED_NUM_NONE,\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_UNKNOWN]     = RTE_ETH_SPEED_NUM_NONE,\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_1G]          = RTE_ETH_SPEED_NUM_1G,\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_10G]         = RTE_ETH_SPEED_NUM_10G,\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_25G]         = RTE_ETH_SPEED_NUM_25G,\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_40G]         = RTE_ETH_SPEED_NUM_40G,\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_50G]         = RTE_ETH_SPEED_NUM_50G,\n-\t\t[NFP_NET_CFG_STS_LINK_RATE_100G]        = RTE_ETH_SPEED_NUM_100G,\n-\t};\n-\n \trepr = dev->data->dev_private;\n \tlink = &repr->link;\n-\tlink->link_speed = RTE_ETH_SPEED_NUM_NONE;\n-\tpf_hw = repr->app_fw_flower->pf_hw;\n \n-\tif (link->link_status == RTE_ETH_LINK_UP) {\n-\t\tif (pf_hw->pf_dev != NULL) {\n-\t\t\tnfp_eth_table = pf_hw->pf_dev->nfp_eth_table;\n-\t\t\tif (nfp_eth_table != NULL) {\n-\t\t\t\tuint32_t speed = nfp_eth_table->ports[pf_hw->idx].speed;\n-\t\t\t\tfor (i = 0; i < RTE_DIM(ls_to_ethtool); i++) {\n-\t\t\t\t\tif (ls_to_ethtool[i] == speed) {\n-\t\t\t\t\t\tlink->link_speed = speed;\n-\t\t\t\t\t\tbreak;\n-\t\t\t\t\t}\n-\t\t\t\t}\n-\t\t\t}\n-\t\t} else {\n-\t\t\tnn_link_status = nn_cfg_readw(&pf_hw->super, NFP_NET_CFG_STS);\n-\t\t\tnn_link_status = (nn_link_status >> NFP_NET_CFG_STS_LINK_RATE_SHIFT) &\n-\t\t\t\t\tNFP_NET_CFG_STS_LINK_RATE_MASK;\n-\n-\t\t\tif (nn_link_status < RTE_DIM(ls_to_ethtool))\n-\t\t\t\tlink->link_speed = ls_to_ethtool[nn_link_status];\n-\t\t}\n-\t}\n+\tpf_hw = repr->app_fw_flower->pf_hw;\n+\tnn_link_status = nn_cfg_readw(&pf_hw->super, NFP_NET_CFG_STS);\n \n-\tret = rte_eth_linkstatus_set(dev, link);\n-\tif (ret == 0) {\n-\t\tif (link->link_status)\n-\t\t\tPMD_DRV_LOG(INFO, \"NIC Link is Up\");\n-\t\telse\n-\t\t\tPMD_DRV_LOG(INFO, \"NIC Link is Down\");\n-\t}\n+\tret = nfp_net_link_update_common(dev, pf_hw, link, nn_link_status);\n \n \treturn ret;\n }\n@@ -275,30 +66,6 @@ nfp_flower_repr_dev_infos_get(__rte_unused struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n-static int\n-nfp_flower_repr_dev_configure(struct rte_eth_dev *dev)\n-{\n-\tstruct nfp_net_hw *pf_hw;\n-\tstruct rte_eth_conf *dev_conf;\n-\tstruct rte_eth_rxmode *rxmode;\n-\tstruct nfp_flower_representor *repr;\n-\n-\trepr = dev->data->dev_private;\n-\tpf_hw = repr->app_fw_flower->pf_hw;\n-\n-\tdev_conf = &dev->data->dev_conf;\n-\trxmode = &dev_conf->rxmode;\n-\n-\t/* Checking MTU set */\n-\tif (rxmode->mtu > pf_hw->flbufsz) {\n-\t\tPMD_DRV_LOG(INFO, \"MTU (%u) larger then current mbufsize (%u) not supported\",\n-\t\t\t\trxmode->mtu, pf_hw->flbufsz);\n-\t\treturn -ERANGE;\n-\t}\n-\n-\treturn 0;\n-}\n-\n static int\n nfp_flower_repr_dev_start(struct rte_eth_dev *dev)\n {\n@@ -528,11 +295,11 @@ static const struct eth_dev_ops nfp_flower_pf_repr_dev_ops = {\n \t.dev_infos_get        = nfp_flower_repr_dev_infos_get,\n \n \t.dev_start            = nfp_flower_pf_start,\n-\t.dev_configure        = nfp_flower_repr_dev_configure,\n-\t.dev_stop             = nfp_flower_pf_stop,\n+\t.dev_configure        = nfp_net_configure,\n+\t.dev_stop             = nfp_net_stop,\n \n-\t.rx_queue_setup       = nfp_pf_repr_rx_queue_setup,\n-\t.tx_queue_setup       = nfp_pf_repr_tx_queue_setup,\n+\t.rx_queue_setup       = nfp_net_rx_queue_setup,\n+\t.tx_queue_setup       = nfp_net_tx_queue_setup,\n \n \t.link_update          = nfp_flower_repr_link_update,\n \n@@ -543,14 +310,14 @@ static const struct eth_dev_ops nfp_flower_pf_repr_dev_ops = {\n \t.promiscuous_disable  = nfp_net_promisc_disable,\n \n \t.mac_addr_set         = nfp_flower_repr_mac_addr_set,\n-\t.fw_version_get       = nfp_repr_firmware_version_get,\n+\t.fw_version_get       = nfp_net_firmware_version_get,\n };\n \n static const struct eth_dev_ops nfp_flower_repr_dev_ops = {\n \t.dev_infos_get        = nfp_flower_repr_dev_infos_get,\n \n \t.dev_start            = nfp_flower_repr_dev_start,\n-\t.dev_configure        = nfp_flower_repr_dev_configure,\n+\t.dev_configure        = nfp_net_configure,\n \t.dev_stop             = nfp_flower_repr_dev_stop,\n \n \t.rx_queue_setup       = nfp_flower_repr_rx_queue_setup,\n@@ -565,7 +332,7 @@ static const struct eth_dev_ops nfp_flower_repr_dev_ops = {\n \t.promiscuous_disable  = nfp_net_promisc_disable,\n \n \t.mac_addr_set         = nfp_flower_repr_mac_addr_set,\n-\t.fw_version_get       = nfp_repr_firmware_version_get,\n+\t.fw_version_get       = nfp_net_firmware_version_get,\n \n \t.flow_ops_get         = nfp_net_flow_ops_get,\n \t.mtr_ops_get          = nfp_net_mtr_ops_get,\ndiff --git a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c\nindex 3f9909c6e0..ff9b10f046 100644\n--- a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c\n+++ b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c\n@@ -377,7 +377,7 @@ nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev,\n \tuint16_t tx_free_thresh;\n \tconst struct rte_memzone *tz;\n \n-\thw = dev->data->dev_private;\n+\thw = nfp_net_get_hw(dev);\n \n \tnfp_net_tx_desc_limits(hw, &min_tx_desc, &max_tx_desc);\n \ndiff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c\nindex fe87ea3e25..1f330b7bb6 100644\n--- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c\n+++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c\n@@ -454,7 +454,7 @@ nfp_net_nfdk_tx_queue_setup(struct rte_eth_dev *dev,\n \tstruct nfp_net_txq *txq;\n \tconst struct rte_memzone *tz;\n \n-\thw = dev->data->dev_private;\n+\thw = nfp_net_get_hw(dev);\n \n \tnfp_net_tx_desc_limits(hw, &min_tx_desc, &max_tx_desc);\n \ndiff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c\nindex c4a36027b9..69050e03f5 100644\n--- a/drivers/net/nfp/nfp_ethdev.c\n+++ b/drivers/net/nfp/nfp_ethdev.c\n@@ -51,7 +51,6 @@ nfp_net_start(struct rte_eth_dev *dev)\n \tuint32_t ctrl_extend = 0;\n \tstruct nfp_net_hw *net_hw;\n \tstruct nfp_pf_dev *pf_dev;\n-\tstruct rte_eth_conf *dev_conf;\n \tstruct rte_eth_rxmode *rxmode;\n \tstruct nfp_app_fw_nic *app_fw_nic;\n \tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n@@ -113,9 +112,7 @@ nfp_net_start(struct rte_eth_dev *dev)\n \t/* Writing configuration parameters in the device */\n \tnfp_net_params_setup(net_hw);\n \n-\tdev_conf = &dev->data->dev_conf;\n-\trxmode = &dev_conf->rxmode;\n-\n+\trxmode = &dev->data->dev_conf.rxmode;\n \tif ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS) != 0) {\n \t\tnfp_net_rss_config_default(dev);\n \t\tupdate |= NFP_NET_CFG_UPDATE_RSS;\n@@ -197,29 +194,6 @@ nfp_net_start(struct rte_eth_dev *dev)\n \treturn ret;\n }\n \n-/* Stop device: disable rx and tx functions to allow for reconfiguring. */\n-static int\n-nfp_net_stop(struct rte_eth_dev *dev)\n-{\n-\tstruct nfp_net_hw *hw;\n-\n-\thw = dev->data->dev_private;\n-\n-\tnfp_net_disable_queues(dev);\n-\n-\t/* Clear queues */\n-\tnfp_net_stop_tx_queue(dev);\n-\tnfp_net_stop_rx_queue(dev);\n-\n-\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n-\t\t/* Configure the physical port down */\n-\t\tnfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);\n-\telse\n-\t\tnfp_eth_set_configured(dev->process_private, hw->nfp_idx, 0);\n-\n-\treturn 0;\n-}\n-\n /* Set the link up. */\n static int\n nfp_net_set_link_up(struct rte_eth_dev *dev)\ndiff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c\nindex 1be0d7d060..76b1de0e49 100644\n--- a/drivers/net/nfp/nfp_net_common.c\n+++ b/drivers/net/nfp/nfp_net_common.c\n@@ -581,43 +581,27 @@ nfp_net_promisc_disable(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n-/*\n- * Return 0 means link status changed, -1 means not changed\n- *\n- * Wait to complete is needed as it can take up to 9 seconds to get the Link\n- * status.\n- */\n int\n-nfp_net_link_update(struct rte_eth_dev *dev,\n-\t\t__rte_unused int wait_to_complete)\n+nfp_net_link_update_common(struct rte_eth_dev *dev,\n+\t\tstruct nfp_net_hw *hw,\n+\t\tstruct rte_eth_link *link,\n+\t\tuint32_t link_status)\n {\n \tint ret;\n \tuint32_t i;\n-\tstruct nfp_net_hw *hw;\n \tuint32_t nn_link_status;\n-\tstruct rte_eth_link link;\n \tstruct nfp_eth_table *nfp_eth_table;\n \n-\thw = nfp_net_get_hw(dev);\n-\n-\tmemset(&link, 0, sizeof(struct rte_eth_link));\n+\tlink->link_speed = RTE_ETH_SPEED_NUM_NONE;\n \n-\t/* Read link status */\n-\tnn_link_status = nn_cfg_readw(&hw->super, NFP_NET_CFG_STS);\n-\tif ((nn_link_status & NFP_NET_CFG_STS_LINK) != 0)\n-\t\tlink.link_status = RTE_ETH_LINK_UP;\n-\n-\tlink.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;\n-\tlink.link_speed = RTE_ETH_SPEED_NUM_NONE;\n-\n-\tif (link.link_status == RTE_ETH_LINK_UP) {\n+\tif (link->link_status == RTE_ETH_LINK_UP) {\n \t\tif (hw->pf_dev != NULL) {\n \t\t\tnfp_eth_table = hw->pf_dev->nfp_eth_table;\n \t\t\tif (nfp_eth_table != NULL) {\n \t\t\t\tuint32_t speed = nfp_eth_table->ports[hw->idx].speed;\n \t\t\t\tfor (i = 0; i < RTE_DIM(nfp_net_link_speed_nfp2rte); i++) {\n \t\t\t\t\tif (nfp_net_link_speed_nfp2rte[i] == speed) {\n-\t\t\t\t\t\tlink.link_speed = speed;\n+\t\t\t\t\t\tlink->link_speed = speed;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t}\n@@ -627,21 +611,52 @@ nfp_net_link_update(struct rte_eth_dev *dev,\n \t\t\t * Shift and mask nn_link_status so that it is effectively the value\n \t\t\t * at offset NFP_NET_CFG_STS_NSP_LINK_RATE.\n \t\t\t */\n-\t\t\tnn_link_status = (nn_link_status >> NFP_NET_CFG_STS_LINK_RATE_SHIFT) &\n+\t\t\tnn_link_status = (link_status >> NFP_NET_CFG_STS_LINK_RATE_SHIFT) &\n \t\t\t\t\tNFP_NET_CFG_STS_LINK_RATE_MASK;\n \t\t\tif (nn_link_status < RTE_DIM(nfp_net_link_speed_nfp2rte))\n-\t\t\t\tlink.link_speed = nfp_net_link_speed_nfp2rte[nn_link_status];\n+\t\t\t\tlink->link_speed = nfp_net_link_speed_nfp2rte[nn_link_status];\n \t\t}\n \t}\n \n-\tret = rte_eth_linkstatus_set(dev, &link);\n+\tret = rte_eth_linkstatus_set(dev, link);\n \tif (ret == 0) {\n-\t\tif (link.link_status != 0)\n+\t\tif (link->link_status != 0)\n \t\t\tPMD_DRV_LOG(INFO, \"NIC Link is Up\");\n \t\telse\n \t\t\tPMD_DRV_LOG(INFO, \"NIC Link is Down\");\n \t}\n \n+\treturn ret;\n+}\n+\n+/*\n+ * Return 0 means link status changed, -1 means not changed\n+ *\n+ * Wait to complete is needed as it can take up to 9 seconds to get the Link\n+ * status.\n+ */\n+int\n+nfp_net_link_update(struct rte_eth_dev *dev,\n+\t\t__rte_unused int wait_to_complete)\n+{\n+\tint ret;\n+\tstruct nfp_net_hw *hw;\n+\tuint32_t nn_link_status;\n+\tstruct rte_eth_link link;\n+\n+\thw = nfp_net_get_hw(dev);\n+\n+\tmemset(&link, 0, sizeof(struct rte_eth_link));\n+\n+\t/* Read link status */\n+\tnn_link_status = nn_cfg_readw(&hw->super, NFP_NET_CFG_STS);\n+\tif ((nn_link_status & NFP_NET_CFG_STS_LINK) != 0)\n+\t\tlink.link_status = RTE_ETH_LINK_UP;\n+\n+\tlink.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;\n+\n+\tret = nfp_net_link_update_common(dev, hw, &link, nn_link_status);\n+\n \t/*\n \t * Notify the port to update the speed value in the CTRL BAR from NSP.\n \t * Not applicable for VFs as the associated PF is still attached to the\n@@ -1996,11 +2011,15 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,\n \tif (fw_size < FW_VER_LEN)\n \t\treturn FW_VER_LEN;\n \n-\thw = dev->data->dev_private;\n+\thw = nfp_net_get_hw(dev);\n \n-\tsnprintf(vnic_version, FW_VER_LEN, \"%d.%d.%d.%d\",\n+\tif ((dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) != 0) {\n+\t\tsnprintf(vnic_version, FW_VER_LEN, \"%d.%d.%d.%d\",\n \t\t\thw->ver.extend, hw->ver.class,\n \t\t\thw->ver.major, hw->ver.minor);\n+\t} else {\n+\t\tsnprintf(vnic_version, FW_VER_LEN, \"*\");\n+\t}\n \n \tnfp_net_get_nsp_info(hw, nsp_version);\n \tnfp_net_get_mip_name(hw, mip_name);\n@@ -2012,33 +2031,6 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n-int\n-nfp_repr_firmware_version_get(struct rte_eth_dev *dev,\n-\t\tchar *fw_version,\n-\t\tsize_t fw_size)\n-{\n-\tstruct nfp_net_hw *hw;\n-\tchar mip_name[FW_VER_LEN];\n-\tchar app_name[FW_VER_LEN];\n-\tchar nsp_version[FW_VER_LEN];\n-\tstruct nfp_flower_representor *repr;\n-\n-\tif (fw_size < FW_VER_LEN)\n-\t\treturn FW_VER_LEN;\n-\n-\trepr = dev->data->dev_private;\n-\thw = repr->app_fw_flower->pf_hw;\n-\n-\tnfp_net_get_nsp_info(hw, nsp_version);\n-\tnfp_net_get_mip_name(hw, mip_name);\n-\tnfp_net_get_app_name(hw, app_name);\n-\n-\tsnprintf(fw_version, FW_VER_LEN, \"* %s %s %s\",\n-\t\t\tnsp_version, mip_name, app_name);\n-\n-\treturn 0;\n-}\n-\n bool\n nfp_net_is_valid_nfd_version(struct nfp_net_fw_ver version)\n {\n@@ -2059,3 +2051,26 @@ nfp_net_is_valid_nfd_version(struct nfp_net_fw_ver version)\n \n \treturn false;\n }\n+\n+/* Disable rx and tx functions to allow for reconfiguring. */\n+int\n+nfp_net_stop(struct rte_eth_dev *dev)\n+{\n+\tstruct nfp_net_hw *hw;\n+\n+\thw = nfp_net_get_hw(dev);\n+\n+\tnfp_net_disable_queues(dev);\n+\n+\t/* Clear queues */\n+\tnfp_net_stop_tx_queue(dev);\n+\tnfp_net_stop_rx_queue(dev);\n+\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\t\t/* Configure the physical port down */\n+\t\tnfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);\n+\telse\n+\t\tnfp_eth_set_configured(dev->process_private, hw->nfp_idx, 0);\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h\nindex e242251bc2..af8f8d15ae 100644\n--- a/drivers/net/nfp/nfp_net_common.h\n+++ b/drivers/net/nfp/nfp_net_common.h\n@@ -178,6 +178,10 @@ int nfp_configure_rx_interrupt(struct rte_eth_dev *dev,\n uint32_t nfp_check_offloads(struct rte_eth_dev *dev);\n int nfp_net_promisc_enable(struct rte_eth_dev *dev);\n int nfp_net_promisc_disable(struct rte_eth_dev *dev);\n+int nfp_net_link_update_common(struct rte_eth_dev *dev,\n+\t\tstruct nfp_net_hw *hw,\n+\t\tstruct rte_eth_link *link,\n+\t\tuint32_t link_status);\n int nfp_net_link_update(struct rte_eth_dev *dev,\n \t\t__rte_unused int wait_to_complete);\n int nfp_net_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);\n@@ -235,9 +239,9 @@ int nfp_net_check_dma_mask(struct nfp_net_hw *hw, char *name);\n void nfp_net_init_metadata_format(struct nfp_net_hw *hw);\n void nfp_net_cfg_read_version(struct nfp_net_hw *hw);\n int nfp_net_firmware_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size);\n-int nfp_repr_firmware_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size);\n bool nfp_net_is_valid_nfd_version(struct nfp_net_fw_ver version);\n struct nfp_net_hw *nfp_net_get_hw(const struct rte_eth_dev *dev);\n+int nfp_net_stop(struct rte_eth_dev *dev);\n \n #define NFP_PRIV_TO_APP_FW_NIC(app_fw_priv)\\\n \t((struct nfp_app_fw_nic *)app_fw_priv)\ndiff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c\nindex be1ac32c73..b2a9ba6875 100644\n--- a/drivers/net/nfp/nfp_rxtx.c\n+++ b/drivers/net/nfp/nfp_rxtx.c\n@@ -840,7 +840,7 @@ nfp_net_rx_queue_setup(struct rte_eth_dev *dev,\n \tstruct nfp_net_rxq *rxq;\n \tconst struct rte_memzone *tz;\n \n-\thw = dev->data->dev_private;\n+\thw = nfp_net_get_hw(dev);\n \n \tnfp_net_rx_desc_limits(hw, &min_rx_desc, &max_rx_desc);\n \n@@ -1067,7 +1067,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev,\n {\n \tstruct nfp_net_hw *hw;\n \n-\thw = dev->data->dev_private;\n+\thw = nfp_net_get_hw(dev);\n \n \tif (hw->ver.extend == NFP_NET_CFG_VERSION_DP_NFD3)\n \t\treturn nfp_net_nfd3_tx_queue_setup(dev, queue_idx,\n",
    "prefixes": [
        "v2",
        "11/11"
    ]
}