get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 112249,
    "url": "http://patchwork.dpdk.org/api/patches/112249/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220602015304.710197-11-jin.liu@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20220602015304.710197-11-jin.liu@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220602015304.710197-11-jin.liu@corigine.com",
    "date": "2022-06-02T01:53:00",
    "name": "[10/14] net/nfp: add queue stop and close helper function",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "f7be1c417cb7f4753343042af1f054d5e54581ec",
    "submitter": {
        "id": 2670,
        "url": "http://patchwork.dpdk.org/api/people/2670/?format=api",
        "name": "Jin Liu",
        "email": "jin.liu@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220602015304.710197-11-jin.liu@corigine.com/mbox/",
    "series": [
        {
            "id": 23295,
            "url": "http://patchwork.dpdk.org/api/series/23295/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=23295",
            "date": "2022-06-02T01:52:50",
            "name": "Add support of NFP3800 chip and firmware with NFDk",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/23295/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/112249/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/112249/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 03378A0548;\n\tThu,  2 Jun 2022 03:55:27 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1B68542B8B;\n\tThu,  2 Jun 2022 03:55:03 +0200 (CEST)",
            "from NAM11-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam11on2108.outbound.protection.outlook.com [40.107.223.108])\n by mails.dpdk.org (Postfix) with ESMTP id CCE51427EA\n for <dev@dpdk.org>; Thu,  2 Jun 2022 03:55:00 +0200 (CEST)",
            "from DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21)\n by DM4PR13MB5858.namprd13.prod.outlook.com (2603:10b6:8:46::6) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.5314.11; Thu, 2 Jun 2022 01:54:59 +0000",
            "from DM6PR13MB3004.namprd13.prod.outlook.com\n ([fe80::d902:ed7d:82bb:c753]) by DM6PR13MB3004.namprd13.prod.outlook.com\n ([fe80::d902:ed7d:82bb:c753%4]) with mapi id 15.20.5314.013; Thu, 2 Jun 2022\n 01:54:59 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=GDuWFz5bsVgHxA/yEd/hUtGNS9APQFQY5rmgKkT6PLFCO71UM8I2DHTRegfFGbngqACWwL6jjB+J1/LmpjhQul/3Mf6rffz5fT0H3xbChMwAfdr+xYQb7N5PXTx9+LUXFmPeOje6fu5sgLE4XTpDvEz+glVYCt3VDmEVMIjIrUf8DdzWyMzEmdW9RsalIiuQL8gU9B1gEeiE2gTLfxvgqxHdcjab5dkduSDat3293yRVdMo5oACFQBWYGV/zczNa7xV/iSRYsvaOBbVEwe3cU1IIOjiN4Q+tO4nBcuFgAaCeqEQON1SVoBQxnhnm8WzovkIHQJoOGWoaS0wpZW94dQ==",
        "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=BA4ECEfWpEHsTRhrYdl53bPa5sJqgs5epkE7LnihItU=;\n b=VESYakmlhtLrCCdTa5j0qva/nt/5KaTtGuf216lWuOGRhUJZ/WCiYEsHjrjGh1BFXdmP/vssUcsu2dduw/h3NSee5MTGgZXYg3/IH2vWmgirnvZx5FGhWV1eU6q2zAsaBgPNoUyq/TddZmeg/8a21qFGScO8/KXVWm3qxSUx/uXu8Gs5oLiQff0B5Ex/ksgsbq2DD59H8Nd3v3BxBI2mZjE/WpP1OI4H1e4Lqtijg+eScW0yASVNMv6ZvP/ZZT6VDFiZcj7BCIPCjumAhmxUArk/p5TvbR8HZjp49r8BrU8h17JXIjhtb5IsvazPsSgFWEm5LCMvPdNpw/l7S3YtBQ==",
        "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=BA4ECEfWpEHsTRhrYdl53bPa5sJqgs5epkE7LnihItU=;\n b=QNV42lxUdT1II/eC1aFpL4WILCPaz7YgT8Q6vsgRl6cQE1VX3ovXLcGAJ20LigQLww79aTom3uf/KJo9ZE54soA+oxnDVLelpMRR+QHlcV3W7C8G5JgwG2iHGUhSo5ayLnKZIhClJcKtytpqUWhdSNSAjeUvAOYKtKbeD9enWOA=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Jin Liu <jin.liu@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "niklas.soderlund@corigine.com, Jin Liu <jin.liu@corigine.com>,\n Diana Wang <na.wang@corigine.com>, Peng Zhang <peng.zhang@corigine.com>,\n Chaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH 10/14] net/nfp: add queue stop and close helper function",
        "Date": "Thu,  2 Jun 2022 03:53:00 +0200",
        "Message-Id": "<20220602015304.710197-11-jin.liu@corigine.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20220602015304.710197-1-jin.liu@corigine.com>",
        "References": "<20220602015304.710197-1-jin.liu@corigine.com>",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "LO4P123CA0457.GBRP123.PROD.OUTLOOK.COM\n (2603:10a6:600:1aa::12) To DM6PR13MB3004.namprd13.prod.outlook.com\n (2603:10b6:5:191::21)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "6b91a59d-cf4d-45f1-a00b-08da443ae69e",
        "X-MS-TrafficTypeDiagnostic": "DM4PR13MB5858:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <DM4PR13MB58585BE87BD9C6C1E943C00B94DE9@DM4PR13MB5858.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 d/o7SFKfbZK/JskS0VdzZkDiuf0Lw93NCSeQzVtkOOI2nekZNyyGfN4lGsoXyE9Y+/X377UEUr+1ev/TGxPGMC+0T1f+UbM8sfx5ALeMKXGNRMRMe37PhaBTSiKTP9392tIFKwAawIzPfpVuQc0+Vz83ghWJNY9a4Dcd+YkkQYSQdIha/1PteytnsHYYR4T1xLaMhVCxLsU7kGsZycIItnsnFANhJUgGtUhoKUx0sFjKreAtQDrbdANRkr9znWy/NT7jeVoYxUwkn8c+oWY+5T33IpQ+mXmzhNWT6tCcLZSzST/HmYKuRbsOsvPUd91+oQaLq1o735vIsJM+go/IECf384cygoqp07L3MWwgnoEAYIdgQ7WrqTU3gO5FsoowscPl0+wLOiGaD0DjBaH0iBaM85pkI6nJzUKSUVhBLs6NxBL8+LBXrOKEK1LLiorF7vIUBzxQU42tlL9yfD64h3uGcskNrHgseJxdpHpQDDLHIEdEF+vv/qw5Qfpds4VqD/4aEMgyHAVMUETqVnKuyKdMCmdEWdCCL3WmRyBsyd5DWUgcxh0Sq1iwK6FlVOg74QC1h5OxOnX+9U6CIdTNavYfvb6WAQ6N4dVr4+bJ492pAKb7mc6s0Jk6f2sQSPk7Ia3Y2ikw4D7f4a4iXGwfJgQj0AxWTsEuLOqmLtvejWsE4WujsNghfZ0F1dv7ic4CFRop1UzB2NIoPE6WGlfG4A==",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:DM6PR13MB3004.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230001)(4636009)(346002)(366004)(396003)(136003)(376002)(39840400004)(36756003)(186003)(66574015)(83380400001)(5660300002)(4326008)(44832011)(8936002)(2906002)(6916009)(54906003)(1076003)(107886003)(6506007)(316002)(2616005)(41300700001)(8676002)(66946007)(66476007)(6666004)(66556008)(26005)(6512007)(52116002)(38100700002)(38350700002)(86362001)(6486002)(508600001);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "=?utf-8?q?0c5WD9KOAUYhqkKpiTBqhiu6wUt0?=\n\t=?utf-8?q?bYidCs0bH3+DMxRD7RZ/AlP/RRbwpHgD6BB9kHhoWH0eJal4/v4O3t6rScpdi6I/A?=\n\t=?utf-8?q?ERWQJtTy2BG8QSeCWuHgFFFMmmrDohUFhstHJyuCGE6KHrP5gOiS1OWG72Jgp5dCh?=\n\t=?utf-8?q?LMrac2hb27LFs/6uHHToq0B0bW1MmyPHp0SLtGSBRu1bAh2woNixQOV1OLnDaksu6?=\n\t=?utf-8?q?ilqERvVegzVVzAVyE50OzfQMT6BY/sxxUQXszQ9XJS/qxfQXc/LVUZEmlk80xX88z?=\n\t=?utf-8?q?Fyk9s6A2RNDTFbhJud+IkiLbRyyZ14GaXy3lsQ/WZsiXGzzSj2C7IyT6cOZYlwKEr?=\n\t=?utf-8?q?qpBaFVonwAuaZclJcX1AbAS0sEaWv+wMtSLCJA3l1Uqgg+L7hViVWh0tERHzd0mcV?=\n\t=?utf-8?q?Z8PJhYfLGKarlHSTBCrzNMJr/8nZiUo7YfWVMWcGpbmq0ATIzwjEaPfRiUGWGgNcZ?=\n\t=?utf-8?q?MLjk4OmjZYaiSHuvR4zZ+GTcF9xVMT2lL2HVGb3Yxyc0gt4pxeQElk8kiXdCIvcsl?=\n\t=?utf-8?q?+SqetIcqMY3yYjiwxlDcxLaHtbIQSJfWEMsE4sE77upeghxWqw94snjkw9tYKxgMs?=\n\t=?utf-8?q?T7uywdDb4VAukRVZkM0mbKpP8+f+LppsjulsuTd0hBp11QOz/Dnr8+3o9z09oGyzg?=\n\t=?utf-8?q?/8mvtRLt0g+6vMKGl3Uk05TEhI5gPaWjoKyF+kUZuhc2kw4nYwf4S3Jj/kz/mIqFz?=\n\t=?utf-8?q?/Iko2dZgIROhiEtjcWH3YcjrSzLlobYtZps6/pLXxzjJbBgwfRflrhSH0tTz8UswM?=\n\t=?utf-8?q?ftD5/wWbaNGcleMMrC/SpLVVXLJPgOHFEDCim7E/FlQb6IyxOuWkr+/cK3NII17TS?=\n\t=?utf-8?q?wSEXwIHEEPOMGqaPbrLTcIKeenIMzbdQ7Hde1HhywJO1zB+OstKx3zTEXDHENWncj?=\n\t=?utf-8?q?M0LQ/bmI8wKpMS3ENaGQvJDHRBfvkxdTvCzXGCJiT/AmGC32KBuLuCrLWlwiw2WIc?=\n\t=?utf-8?q?76XcFWNmh6IDJvO/+XYq5knOwLQHtFQ8/AkK37sHh9vdQcmzVBI7amtgQwM5JXWF5?=\n\t=?utf-8?q?eyDUGtQnDl4vJHZIIVlrfwHG33zK41luJ9gaaJB3NMr7J7W7UQ88sR0Wp9k3S4HtZ?=\n\t=?utf-8?q?uOI0AMF31wom0ewN9D5tydWiKql04Epu3PFbfbessbVaYQGBej14D55H39lL7UUeQ?=\n\t=?utf-8?q?yijb2YIBUHrKhMGnHJOzcJBIuLzMqNOJSudohGY4P3GDN9CWY2S5O1yowbZih0ZWp?=\n\t=?utf-8?q?whcCx4huJEUTRp6JYzmbG7t1q6TTV3J+iHqyK61PKfqwRmicV3mfovLzm+lMOkKd3?=\n\t=?utf-8?q?GGbYn5HvrI7GKKc4OXJ1OsdYCD+hZA1Z6C/wcg4BZUG8ztgz7/+yKP+wQbDt4+rjS?=\n\t=?utf-8?q?W8YpIiRgDvZidvOIVEO+u43NXymIiuSpJ0DIA0ceXJduVynRQyHKmYKgV+RILY2wF?=\n\t=?utf-8?q?ld0EooCMENzzDHc98crpC+CpqK00n9Gmj+oTfyT8a3wKtiigR1MxawkA/DghRJmk+?=\n\t=?utf-8?q?ZXYMp56M3krtYszp2hYXee6YQTxLp1epd6DSSnT8V/hIU9RWBFmPOR0vWoyHcM6f9?=\n\t=?utf-8?q?/FCNQENhTKWhNyRk/yQO+MeaV8p5n6GEQzla6JEv3VAPjcfu/KJH5Xt+UFSi8mhrX?=\n\t=?utf-8?q?cwfTj22dCvMgSagzYLgClBbdkMoQImR89MnFE/6RjFpXkymhC2tGsJRFPQ0yJKRVN?=\n\t=?utf-8?q?4IG++LXr9tnN4Z+UY27JsPQ0rrpGTjvg=3D=3D?=",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 6b91a59d-cf4d-45f1-a00b-08da443ae69e",
        "X-MS-Exchange-CrossTenant-AuthSource": "DM6PR13MB3004.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "02 Jun 2022 01:54:59.6793 (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 QR0aY0HW+HvR9Dy3LV+dJ4tXh2vWir918fT0+gi789M/V1Z7JMQd7a8LB3+voVoAZpHwK3NqfhlNPq5nFTFqog==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM4PR13MB5858",
        "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 does not introduce new features, just integrate some common\nlogic into helper functions to reduce the same logic and increase code\nreuse, include queue stop and queue close logic, will be used when NFP\nnet stop and close.\n\nqueue stop: reset queue\nqueue close: reset and release queue\n\nModify nfd3 firmware net stop and close function, use helper function to\nstop and close queue instead of before logic.\n\nSigned-off-by: Jin Liu <jin.liu@corigine.com>\nSigned-off-by: Diana Wang <na.wang@corigine.com>\nSigned-off-by: Peng Zhang <peng.zhang@corigine.com>\nSigned-off-by: Chaoyong He <chaoyong.he@corigine.com>\nSigned-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>\n---\n drivers/net/nfp/nfp_common.c    | 75 +++++++++++++++++++++++++++++++++\n drivers/net/nfp/nfp_common.h    |  6 +++\n drivers/net/nfp/nfp_ethdev.c    | 27 ++----------\n drivers/net/nfp/nfp_ethdev_vf.c | 29 ++-----------\n 4 files changed, 89 insertions(+), 48 deletions(-)",
    "diff": "diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c\nindex 6cd1085c1c..58e20081fc 100644\n--- a/drivers/net/nfp/nfp_common.c\n+++ b/drivers/net/nfp/nfp_common.c\n@@ -1293,6 +1293,81 @@ nfp_net_rss_config_default(struct rte_eth_dev *dev)\n \treturn ret;\n }\n \n+void\n+nfp_net_stop_rx_queue(struct rte_eth_dev *dev)\n+{\n+\tuint16_t i;\n+\tstruct nfp_net_rxq *this_rx_q;\n+\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\tthis_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];\n+\t\tnfp_net_reset_rx_queue(this_rx_q);\n+\t}\n+}\n+\n+void\n+nfp_net_close_rx_queue(struct rte_eth_dev *dev)\n+{\n+\tuint16_t i;\n+\tstruct nfp_net_rxq *this_rx_q;\n+\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\tthis_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];\n+\t\tnfp_net_reset_rx_queue(this_rx_q);\n+\t\tnfp_net_rx_queue_release(dev, i);\n+\t}\n+}\n+\n+void\n+nfp_net_nfd3_stop_tx_queue(struct rte_eth_dev *dev)\n+{\n+\tuint16_t i;\n+\tstruct nfp_net_txq *this_tx_q;\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tthis_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];\n+\t\tnfp_net_nfd3_reset_tx_queue(this_tx_q);\n+\t}\n+}\n+\n+void\n+nfp_net_nfd3_close_tx_queue(struct rte_eth_dev *dev)\n+{\n+\tuint16_t i;\n+\tstruct nfp_net_txq *this_tx_q;\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tthis_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];\n+\t\tnfp_net_nfd3_reset_tx_queue(this_tx_q);\n+\t\tnfp_net_nfd3_tx_queue_release(dev, i);\n+\t}\n+}\n+\n+void\n+nfp_net_nfdk_stop_tx_queue(struct rte_eth_dev *dev)\n+{\n+\tuint16_t i;\n+\tstruct nfp_net_txq *this_tx_q;\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tthis_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];\n+\t\tnfp_net_nfdk_reset_tx_queue(this_tx_q);\n+\t}\n+}\n+\n+void\n+nfp_net_nfdk_close_tx_queue(struct rte_eth_dev *dev)\n+{\n+\tuint16_t i;\n+\tstruct nfp_net_txq *this_tx_q;\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tthis_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];\n+\t\tnfp_net_nfdk_reset_tx_queue(this_tx_q);\n+\t\tnfp_net_nfdk_tx_queue_release(dev, i);\n+\t}\n+}\n+\n RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE);\n RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE);\n /*\ndiff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h\nindex 346fece527..1489b2ac65 100644\n--- a/drivers/net/nfp/nfp_common.h\n+++ b/drivers/net/nfp/nfp_common.h\n@@ -409,6 +409,12 @@ int nfp_net_rss_hash_update(struct rte_eth_dev *dev,\n int nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,\n \t\t\t      struct rte_eth_rss_conf *rss_conf);\n int nfp_net_rss_config_default(struct rte_eth_dev *dev);\n+void nfp_net_stop_rx_queue(struct rte_eth_dev *dev);\n+void nfp_net_close_rx_queue(struct rte_eth_dev *dev);\n+void nfp_net_nfd3_stop_tx_queue(struct rte_eth_dev *dev);\n+void nfp_net_nfd3_close_tx_queue(struct rte_eth_dev *dev);\n+void nfp_net_nfdk_stop_tx_queue(struct rte_eth_dev *dev);\n+void nfp_net_nfdk_close_tx_queue(struct rte_eth_dev *dev);\n \n #define NFP_NET_DEV_PRIVATE_TO_HW(adapter)\\\n \t(&((struct nfp_net_adapter *)adapter)->hw)\ndiff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c\nindex 2bf7a565bc..0a5c703190 100644\n--- a/drivers/net/nfp/nfp_ethdev.c\n+++ b/drivers/net/nfp/nfp_ethdev.c\n@@ -181,10 +181,7 @@ nfp_net_start(struct rte_eth_dev *dev)\n static int\n nfp_net_nfd3_stop(struct rte_eth_dev *dev)\n {\n-\tint i;\n \tstruct nfp_net_hw *hw;\n-\tstruct nfp_net_txq *this_tx_q;\n-\tstruct nfp_net_rxq *this_rx_q;\n \n \tPMD_INIT_LOG(DEBUG, \"Stop\");\n \n@@ -193,15 +190,9 @@ nfp_net_nfd3_stop(struct rte_eth_dev *dev)\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 = (struct nfp_net_txq *)dev->data->tx_queues[i];\n-\t\tnfp_net_nfd3_reset_tx_queue(this_tx_q);\n-\t}\n+\tnfp_net_nfd3_stop_tx_queue(dev);\n \n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\tthis_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];\n-\t\tnfp_net_reset_rx_queue(this_rx_q);\n-\t}\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@@ -256,8 +247,6 @@ nfp_net_nfd3_close(struct rte_eth_dev *dev)\n \tstruct nfp_net_hw *hw;\n \tstruct rte_pci_device *pci_dev;\n \tstruct nfp_pf_dev *pf_dev;\n-\tstruct nfp_net_txq *this_tx_q;\n-\tstruct nfp_net_rxq *this_rx_q;\n \tint i;\n \n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n@@ -277,17 +266,9 @@ nfp_net_nfd3_close(struct rte_eth_dev *dev)\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 = (struct nfp_net_txq *)dev->data->tx_queues[i];\n-\t\tnfp_net_nfd3_reset_tx_queue(this_tx_q);\n-\t\tnfp_net_nfd3_tx_queue_release(dev, i);\n-\t}\n+\tnfp_net_nfd3_close_tx_queue(dev);\n \n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\tthis_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];\n-\t\tnfp_net_reset_rx_queue(this_rx_q);\n-\t\tnfp_net_rx_queue_release(dev, i);\n-\t}\n+\tnfp_net_close_rx_queue(dev);\n \n \t/* Cancel possible impending LSC work here before releasing the port*/\n \trte_eal_alarm_cancel(nfp_net_dev_interrupt_delayed_handler,\ndiff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c\nindex ee9ff977cc..d347c98134 100644\n--- a/drivers/net/nfp/nfp_ethdev_vf.c\n+++ b/drivers/net/nfp/nfp_ethdev_vf.c\n@@ -145,24 +145,14 @@ nfp_netvf_start(struct rte_eth_dev *dev)\n static int\n nfp_netvf_nfd3_stop(struct rte_eth_dev *dev)\n {\n-\tstruct nfp_net_txq *this_tx_q;\n-\tstruct nfp_net_rxq *this_rx_q;\n-\tint i;\n-\n \tPMD_INIT_LOG(DEBUG, \"Stop\");\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 = (struct nfp_net_txq *)dev->data->tx_queues[i];\n-\t\tnfp_net_nfd3_reset_tx_queue(this_tx_q);\n-\t}\n+\tnfp_net_nfd3_stop_tx_queue(dev);\n \n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\tthis_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];\n-\t\tnfp_net_reset_rx_queue(this_rx_q);\n-\t}\n+\tnfp_net_stop_rx_queue(dev);\n \n \treturn 0;\n }\n@@ -185,9 +175,6 @@ static int\n nfp_netvf_nfd3_close(struct rte_eth_dev *dev)\n {\n \tstruct rte_pci_device *pci_dev;\n-\tstruct nfp_net_txq *this_tx_q;\n-\tstruct nfp_net_rxq *this_rx_q;\n-\tint i;\n \n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n@@ -204,17 +191,9 @@ nfp_netvf_nfd3_close(struct rte_eth_dev *dev)\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 =  (struct nfp_net_txq *)dev->data->tx_queues[i];\n-\t\tnfp_net_nfd3_reset_tx_queue(this_tx_q);\n-\t\tnfp_net_nfd3_tx_queue_release(dev, i);\n-\t}\n+\tnfp_net_nfd3_close_tx_queue(dev);\n \n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\tthis_rx_q =  (struct nfp_net_rxq *)dev->data->rx_queues[i];\n-\t\tnfp_net_reset_rx_queue(this_rx_q);\n-\t\tnfp_net_rx_queue_release(dev, i);\n-\t}\n+\tnfp_net_close_rx_queue(dev);\n \n \trte_intr_disable(pci_dev->intr_handle);\n \n",
    "prefixes": [
        "10/14"
    ]
}