get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2171500,
    "url": "http://patchwork.ozlabs.org/api/patches/2171500/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20251204155133.2437621-5-aleksander.lobakin@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20251204155133.2437621-5-aleksander.lobakin@intel.com>",
    "list_archive_url": null,
    "date": "2025-12-04T15:51:32",
    "name": "[iwl-next,v2,4/5] ice: implement Rx queue management ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "under-review",
    "archived": false,
    "hash": "3565f9369e41c84969bafb02c260f61647232ffa",
    "submitter": {
        "id": 85827,
        "url": "http://patchwork.ozlabs.org/api/people/85827/?format=api",
        "name": "Alexander Lobakin",
        "email": "aleksander.lobakin@intel.com"
    },
    "delegate": {
        "id": 109701,
        "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api",
        "username": "anguy11",
        "first_name": "Anthony",
        "last_name": "Nguyen",
        "email": "anthony.l.nguyen@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20251204155133.2437621-5-aleksander.lobakin@intel.com/mbox/",
    "series": [
        {
            "id": 484409,
            "url": "http://patchwork.ozlabs.org/api/series/484409/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=484409",
            "date": "2025-12-04T15:51:29",
            "name": "ice: add support for devmem/io_uring Rx and Tx",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/484409/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2171500/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2171500/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=mx6466iM;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dMfCG2dPdz1xq8\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 05 Dec 2025 02:52:10 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id BA73360ADB;\n\tThu,  4 Dec 2025 15:52:08 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id HZLCC3Xiomby; Thu,  4 Dec 2025 15:52:07 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id D533E614D5;\n\tThu,  4 Dec 2025 15:52:07 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists1.osuosl.org (Postfix) with ESMTP id 6D308E7\n for <intel-wired-lan@lists.osuosl.org>; Thu,  4 Dec 2025 15:52:06 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 53A4B614D5\n for <intel-wired-lan@lists.osuosl.org>; Thu,  4 Dec 2025 15:52:06 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id g93-nfVrl0gj for <intel-wired-lan@lists.osuosl.org>;\n Thu,  4 Dec 2025 15:52:04 +0000 (UTC)",
            "from mgamail.intel.com (mgamail.intel.com [192.198.163.7])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 3AD6560ADB\n for <intel-wired-lan@lists.osuosl.org>; Thu,  4 Dec 2025 15:52:04 +0000 (UTC)",
            "from fmviesa007.fm.intel.com ([10.60.135.147])\n by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 04 Dec 2025 07:52:01 -0800",
            "from newjersey.igk.intel.com ([10.102.20.203])\n by fmviesa007.fm.intel.com with ESMTP; 04 Dec 2025 07:51:57 -0800"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org D533E614D5",
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3AD6560ADB"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1764863527;\n\tbh=EaXhmULyleN2TOl6zxaNSBm/gTTZoltJPSGwM7ZMfFo=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=mx6466iM3aD9FZkFH929JY7CKsEQjk7aVc0V2/TF+SC6lxxEMy27j4rMdG+cuJ3Uj\n\t inTMYC4G258nx420Ohtsjzbj5LV0nxNB1FlEAmbrMYYu7PttoI7koqcN4UbTbXbtYu\n\t AGV/2XybVQL4CQg2W6MswSlONJ1sSuPvG8oCpe0Nr/UcDat9WiT6m+9W1ikvu6OMo8\n\t 4JKAkerZXMG309/TPG4jUUrl2i8ZWJ3/ydGsN5fQZgUA+8NNzhQV1iP13t5QsJglBQ\n\t YePuZzsANoDXqxBY3ZLuZaq3nTNuOjlwyuBLa5Akphz6jiU3bljxJqDJhJsESeKxvM\n\t PAqfguBVF8iVQ==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7;\n helo=mgamail.intel.com; envelope-from=aleksander.lobakin@intel.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org 3AD6560ADB",
        "X-CSE-ConnectionGUID": [
            "IwW4dMyCQS+3ZgfkNGggfw==",
            "yDe8UagYRJSuE0iByuFK2Q=="
        ],
        "X-CSE-MsgGUID": [
            "fBI1vw26RzuJgYR7bm/4AA==",
            "wsggtH19TY6eicO4qtF1DQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11632\"; a=\"92365148\"",
            "E=Sophos;i=\"6.20,249,1758610800\"; d=\"scan'208\";a=\"92365148\"",
            "E=Sophos;i=\"6.20,249,1758610800\"; d=\"scan'208\";a=\"194677286\""
        ],
        "X-ExtLoop1": "1",
        "From": "Alexander Lobakin <aleksander.lobakin@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Cc": "Alexander Lobakin <aleksander.lobakin@intel.com>,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>,\n \"David S. Miller\" <davem@davemloft.net>,\n Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>,\n Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,\n Jacob Keller <jacob.e.keller@intel.com>,\n Aleksandr Loktionov <aleksandr.loktionov@intel.com>,\n nxne.cnse.osdt.itp.upstreaming@intel.com, netdev@vger.kernel.org,\n linux-kernel@vger.kernel.org",
        "Date": "Thu,  4 Dec 2025 16:51:32 +0100",
        "Message-ID": "<20251204155133.2437621-5-aleksander.lobakin@intel.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20251204155133.2437621-1-aleksander.lobakin@intel.com>",
        "References": "<20251204155133.2437621-1-aleksander.lobakin@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1764863524; x=1796399524;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=f9UDea29lu8cpYEglSq82yFHqRMlFa5MXpp+E2WlLZE=;\n b=RE4VuqIzUaKwiVmI1Iu9rdv9mvan+lswbHvDYIWItVWtv6X7tR7GqegJ\n 6lZtxyv9BYGkHAjpIJixQDiQI3jcUEY8d+KowjXuAYlbeWkWEN8EzxSDk\n lSBm9GARK/n69/AkzwP7e44CNl2HAXR5EVxyKGweLOB2il9EtC06hRQgU\n 2/Qs6Offhgs97g2bWfSxi4It1vlpxZU+71+UbpwnEwwfthdrH66fdvmC4\n WcCWLaJMoM7aIJc2TkNJRResLyrg9ZbuV4x01+HHVYyyChA8m8cV41P61\n AAK4BbXdIdS9wJJh1qkB06bJgnd771BxkS2e7y8itoBhkYiGhndODqbHx\n g==;",
        "X-Mailman-Original-Authentication-Results": [
            "smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com",
            "smtp3.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=RE4VuqIz"
        ],
        "Subject": "[Intel-wired-lan] [PATCH iwl-next v2 4/5] ice: implement Rx queue\n management ops",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Now ice is ready to get queue_mgmt_ops support. It already has API\nto disable/reconfig/enable one particular queue (for XSk). Reuse as\nmuch of its code as possible to implement Rx queue management\ncallbacks and vice versa -- ice_queue_mem_{alloc,free}() can be\nreused during ifup/ifdown to elide code duplication.\nWith this, ice passes the io_uring zcrx selftests, meaning the Rx\npart of netmem/MP support is done.\n\nReviewed-by: Jacob Keller <jacob.e.keller@intel.com>\nReviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\nSigned-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_lib.h    |   5 +\n drivers/net/ethernet/intel/ice/ice_txrx.h   |   2 +\n drivers/net/ethernet/intel/ice/ice_base.c   | 192 ++++++++++++++------\n drivers/net/ethernet/intel/ice/ice_main.c   |   2 +-\n drivers/net/ethernet/intel/ice/ice_sf_eth.c |   2 +-\n drivers/net/ethernet/intel/ice/ice_txrx.c   |  26 ++-\n 6 files changed, 163 insertions(+), 66 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h\nindex 347b63e497e7..2d3168458891 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.h\n@@ -4,6 +4,8 @@\n #ifndef _ICE_LIB_H_\n #define _ICE_LIB_H_\n \n+#include <net/netdev_queues.h>\n+\n #include \"ice.h\"\n #include \"ice_vlan.h\"\n \n@@ -132,4 +134,7 @@ void ice_clear_feature_support(struct ice_pf *pf, enum ice_feature f);\n void ice_init_feature_support(struct ice_pf *pf);\n bool ice_vsi_is_rx_queue_active(struct ice_vsi *vsi);\n void ice_vsi_update_l2tsel(struct ice_vsi *vsi, enum ice_l2tsel l2tsel);\n+\n+extern const struct netdev_queue_mgmt_ops ice_queue_mgmt_ops;\n+\n #endif /* !_ICE_LIB_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_txrx.h b/drivers/net/ethernet/intel/ice/ice_txrx.h\nindex c51b1e60f717..e3c682723107 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.h\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.h\n@@ -440,6 +440,8 @@ u16\n ice_select_queue(struct net_device *dev, struct sk_buff *skb,\n \t\t struct net_device *sb_dev);\n void ice_clean_tx_ring(struct ice_tx_ring *tx_ring);\n+void ice_queue_mem_free(struct net_device *dev, void *per_queue_mem);\n+void ice_zero_rx_ring(struct ice_rx_ring *rx_ring);\n void ice_clean_rx_ring(struct ice_rx_ring *rx_ring);\n int ice_setup_tx_ring(struct ice_tx_ring *tx_ring);\n int ice_setup_rx_ring(struct ice_rx_ring *rx_ring);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c\nindex 7097324c38f3..4479bb5e66ac 100644\n--- a/drivers/net/ethernet/intel/ice/ice_base.c\n+++ b/drivers/net/ethernet/intel/ice/ice_base.c\n@@ -651,6 +651,42 @@ static int ice_rxq_pp_create(struct ice_rx_ring *rq)\n \treturn err;\n }\n \n+static int ice_queue_mem_alloc(struct net_device *dev, void *per_queue_mem,\n+\t\t\t       int idx)\n+{\n+\tconst struct ice_netdev_priv *priv = netdev_priv(dev);\n+\tconst struct ice_rx_ring *real = priv->vsi->rx_rings[idx];\n+\tstruct ice_rx_ring *new = per_queue_mem;\n+\tint ret;\n+\n+\tnew->count = real->count;\n+\tnew->netdev = real->netdev;\n+\tnew->q_index = real->q_index;\n+\tnew->q_vector = real->q_vector;\n+\tnew->vsi = real->vsi;\n+\n+\tret = ice_rxq_pp_create(new);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tif (!netif_running(dev))\n+\t\treturn 0;\n+\n+\tret = __xdp_rxq_info_reg(&new->xdp_rxq, new->netdev, new->q_index,\n+\t\t\t\t new->q_vector->napi.napi_id, new->rx_buf_len);\n+\tif (ret)\n+\t\tgoto err_destroy_fq;\n+\n+\txdp_rxq_info_attach_page_pool(&new->xdp_rxq, new->pp);\n+\n+\treturn 0;\n+\n+err_destroy_fq:\n+\tice_rxq_pp_destroy(new);\n+\n+\treturn ret;\n+}\n+\n /**\n  * ice_vsi_cfg_rxq - Configure an Rx queue\n  * @ring: the ring being configured\n@@ -665,23 +701,12 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)\n \tint err;\n \n \tif (ring->vsi->type == ICE_VSI_PF || ring->vsi->type == ICE_VSI_SF) {\n-\t\tif (!xdp_rxq_info_is_reg(&ring->xdp_rxq)) {\n-\t\t\terr = __xdp_rxq_info_reg(&ring->xdp_rxq, ring->netdev,\n-\t\t\t\t\t\t ring->q_index,\n-\t\t\t\t\t\t ring->q_vector->napi.napi_id,\n-\t\t\t\t\t\t ring->rx_buf_len);\n-\t\t\tif (err)\n-\t\t\t\treturn err;\n-\t\t}\n-\n \t\tice_rx_xsk_pool(ring);\n \t\terr = ice_realloc_rx_xdp_bufs(ring, ring->xsk_pool);\n \t\tif (err)\n \t\t\treturn err;\n \n \t\tif (ring->xsk_pool) {\n-\t\t\txdp_rxq_info_unreg(&ring->xdp_rxq);\n-\n \t\t\trx_buf_len =\n \t\t\t\txsk_pool_get_rx_frame_size(ring->xsk_pool);\n \t\t\terr = __xdp_rxq_info_reg(&ring->xdp_rxq, ring->netdev,\n@@ -700,20 +725,10 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)\n \t\t\tdev_info(dev, \"Registered XDP mem model MEM_TYPE_XSK_BUFF_POOL on Rx ring %d\\n\",\n \t\t\t\t ring->q_index);\n \t\t} else {\n-\t\t\terr = ice_rxq_pp_create(ring);\n+\t\t\terr = ice_queue_mem_alloc(ring->netdev, ring,\n+\t\t\t\t\t\t  ring->q_index);\n \t\t\tif (err)\n \t\t\t\treturn err;\n-\n-\t\t\tif (!xdp_rxq_info_is_reg(&ring->xdp_rxq)) {\n-\t\t\t\terr = __xdp_rxq_info_reg(&ring->xdp_rxq, ring->netdev,\n-\t\t\t\t\t\t\t ring->q_index,\n-\t\t\t\t\t\t\t ring->q_vector->napi.napi_id,\n-\t\t\t\t\t\t\t ring->rx_buf_len);\n-\t\t\t\tif (err)\n-\t\t\t\t\tgoto err_destroy_fq;\n-\t\t\t}\n-\t\t\txdp_rxq_info_attach_page_pool(&ring->xdp_rxq,\n-\t\t\t\t\t\t      ring->pp);\n \t\t}\n \t}\n \n@@ -722,7 +737,7 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)\n \tif (err) {\n \t\tdev_err(dev, \"ice_setup_rx_ctx failed for RxQ %d, err %d\\n\",\n \t\t\tring->q_index, err);\n-\t\tgoto err_destroy_fq;\n+\t\tgoto err_clean_rq;\n \t}\n \n \tif (ring->xsk_pool) {\n@@ -753,12 +768,12 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)\n \t\terr = ice_alloc_rx_bufs(ring, num_bufs);\n \n \tif (err)\n-\t\tgoto err_destroy_fq;\n+\t\tgoto err_clean_rq;\n \n \treturn 0;\n \n-err_destroy_fq:\n-\tice_rxq_pp_destroy(ring);\n+err_clean_rq:\n+\tice_clean_rx_ring(ring);\n \n \treturn err;\n }\n@@ -1425,27 +1440,7 @@ static void ice_qp_reset_stats(struct ice_vsi *vsi, u16 q_idx)\n \t\t       sizeof(vsi->xdp_rings[q_idx]->ring_stats->stats));\n }\n \n-/**\n- * ice_qp_clean_rings - Cleans all the rings of a given index\n- * @vsi: VSI that contains rings of interest\n- * @q_idx: ring index in array\n- */\n-static void ice_qp_clean_rings(struct ice_vsi *vsi, u16 q_idx)\n-{\n-\tice_clean_tx_ring(vsi->tx_rings[q_idx]);\n-\tif (vsi->xdp_rings)\n-\t\tice_clean_tx_ring(vsi->xdp_rings[q_idx]);\n-\tice_clean_rx_ring(vsi->rx_rings[q_idx]);\n-}\n-\n-/**\n- * ice_qp_dis - Disables a queue pair\n- * @vsi: VSI of interest\n- * @q_idx: ring index in array\n- *\n- * Returns 0 on success, negative on failure.\n- */\n-int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)\n+static int __ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)\n {\n \tstruct ice_txq_meta txq_meta = { };\n \tstruct ice_q_vector *q_vector;\n@@ -1484,23 +1479,35 @@ int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)\n \t}\n \n \tice_vsi_ctrl_one_rx_ring(vsi, false, q_idx, false);\n-\tice_qp_clean_rings(vsi, q_idx);\n \tice_qp_reset_stats(vsi, q_idx);\n \n+\tice_clean_tx_ring(vsi->tx_rings[q_idx]);\n+\tif (vsi->xdp_rings)\n+\t\tice_clean_tx_ring(vsi->xdp_rings[q_idx]);\n+\n \treturn fail;\n }\n \n /**\n- * ice_qp_ena - Enables a queue pair\n+ * ice_qp_dis - Disables a queue pair\n  * @vsi: VSI of interest\n  * @q_idx: ring index in array\n  *\n  * Returns 0 on success, negative on failure.\n  */\n-int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)\n+int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)\n+{\n+\tint ret;\n+\n+\tret = __ice_qp_dis(vsi, q_idx);\n+\tice_clean_rx_ring(vsi->rx_rings[q_idx]);\n+\n+\treturn ret;\n+}\n+\n+static int __ice_qp_ena(struct ice_vsi *vsi, u16 q_idx, int fail)\n {\n \tstruct ice_q_vector *q_vector;\n-\tint fail = 0;\n \tbool link_up;\n \tint err;\n \n@@ -1518,10 +1525,6 @@ int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)\n \t\tice_tx_xsk_pool(vsi, q_idx);\n \t}\n \n-\terr = ice_vsi_cfg_single_rxq(vsi, q_idx);\n-\tif (!fail)\n-\t\tfail = err;\n-\n \tq_vector = vsi->rx_rings[q_idx]->q_vector;\n \tice_qvec_cfg_msix(vsi, q_vector, q_idx);\n \n@@ -1542,3 +1545,80 @@ int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)\n \n \treturn fail;\n }\n+\n+/**\n+ * ice_qp_ena - Enables a queue pair\n+ * @vsi: VSI of interest\n+ * @q_idx: ring index in array\n+ *\n+ * Returns 0 on success, negative on failure.\n+ */\n+int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)\n+{\n+\treturn __ice_qp_ena(vsi, q_idx, ice_vsi_cfg_single_rxq(vsi, q_idx));\n+}\n+\n+static int ice_queue_start(struct net_device *dev, void *per_queue_mem,\n+\t\t\t   int idx)\n+{\n+\tconst struct ice_netdev_priv *priv = netdev_priv(dev);\n+\tstruct ice_rx_ring *real = priv->vsi->rx_rings[idx];\n+\tstruct ice_rx_ring *new = per_queue_mem;\n+\tstruct napi_struct *napi;\n+\tint ret;\n+\n+\treal->pp = new->pp;\n+\treal->rx_fqes = new->rx_fqes;\n+\treal->hdr_fqes = new->hdr_fqes;\n+\treal->hdr_pp = new->hdr_pp;\n+\n+\treal->hdr_truesize = new->hdr_truesize;\n+\treal->truesize = new->truesize;\n+\treal->rx_hdr_len = new->rx_hdr_len;\n+\treal->rx_buf_len = new->rx_buf_len;\n+\n+\tmemcpy(&real->xdp_rxq, &new->xdp_rxq, sizeof(new->xdp_rxq));\n+\n+\tret = ice_setup_rx_ctx(real);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tnapi = &real->q_vector->napi;\n+\n+\tpage_pool_enable_direct_recycling(real->pp, napi);\n+\tif (real->hdr_pp)\n+\t\tpage_pool_enable_direct_recycling(real->hdr_pp, napi);\n+\n+\tret = ice_alloc_rx_bufs(real, ICE_DESC_UNUSED(real));\n+\n+\treturn __ice_qp_ena(priv->vsi, idx, ret);\n+}\n+\n+static int ice_queue_stop(struct net_device *dev, void *per_queue_mem,\n+\t\t\t  int idx)\n+{\n+\tconst struct ice_netdev_priv *priv = netdev_priv(dev);\n+\tstruct ice_rx_ring *real = priv->vsi->rx_rings[idx];\n+\tint ret;\n+\n+\tret = __ice_qp_dis(priv->vsi, idx);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tpage_pool_disable_direct_recycling(real->pp);\n+\tif (real->hdr_pp)\n+\t\tpage_pool_disable_direct_recycling(real->hdr_pp);\n+\n+\tice_zero_rx_ring(real);\n+\tmemcpy(per_queue_mem, real, sizeof(*real));\n+\n+\treturn 0;\n+}\n+\n+const struct netdev_queue_mgmt_ops ice_queue_mgmt_ops = {\n+\t.ndo_queue_mem_alloc\t= ice_queue_mem_alloc,\n+\t.ndo_queue_mem_free\t= ice_queue_mem_free,\n+\t.ndo_queue_mem_size\t= sizeof(struct ice_rx_ring),\n+\t.ndo_queue_start\t= ice_queue_start,\n+\t.ndo_queue_stop\t\t= ice_queue_stop,\n+};\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 881b41d37821..25e9091ca309 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -3523,7 +3523,7 @@ static void ice_set_ops(struct ice_vsi *vsi)\n \t}\n \n \tnetdev->netdev_ops = &ice_netdev_ops;\n-\tnetdev->request_ops_lock = true;\n+\tnetdev->queue_mgmt_ops = &ice_queue_mgmt_ops;\n \tnetdev->udp_tunnel_nic_info = &pf->hw.udp_tunnel_nic;\n \tnetdev->xdp_metadata_ops = &ice_xdp_md_ops;\n \tice_set_ethtool_ops(netdev);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_sf_eth.c b/drivers/net/ethernet/intel/ice/ice_sf_eth.c\nindex 2c3db1b03055..41e1606a8222 100644\n--- a/drivers/net/ethernet/intel/ice/ice_sf_eth.c\n+++ b/drivers/net/ethernet/intel/ice/ice_sf_eth.c\n@@ -58,7 +58,7 @@ static int ice_sf_cfg_netdev(struct ice_dynamic_port *dyn_port,\n \teth_hw_addr_set(netdev, dyn_port->hw_addr);\n \tether_addr_copy(netdev->perm_addr, dyn_port->hw_addr);\n \tnetdev->netdev_ops = &ice_sf_netdev_ops;\n-\tnetdev->request_ops_lock = true;\n+\tnetdev->queue_mgmt_ops = &ice_queue_mgmt_ops;\n \tSET_NETDEV_DEVLINK_PORT(netdev, devlink_port);\n \n \terr = register_netdev(netdev);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c\nindex 47d44796635a..b6f56cb81f93 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.c\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c\n@@ -530,17 +530,13 @@ void ice_rxq_pp_destroy(struct ice_rx_ring *rq)\n \trq->hdr_pp = NULL;\n }\n \n-/**\n- * ice_clean_rx_ring - Free Rx buffers\n- * @rx_ring: ring to be cleaned\n- */\n-void ice_clean_rx_ring(struct ice_rx_ring *rx_ring)\n+void ice_queue_mem_free(struct net_device *dev, void *per_queue_mem)\n {\n-\tu32 size;\n+\tstruct ice_rx_ring *rx_ring = per_queue_mem;\n \n \tif (rx_ring->xsk_pool) {\n \t\tice_xsk_clean_rx_ring(rx_ring);\n-\t\tgoto rx_skip_free;\n+\t\treturn;\n \t}\n \n \t/* ring already cleared, nothing to do */\n@@ -567,8 +563,12 @@ void ice_clean_rx_ring(struct ice_rx_ring *rx_ring)\n \t}\n \n \tice_rxq_pp_destroy(rx_ring);\n+}\n+\n+void ice_zero_rx_ring(struct ice_rx_ring *rx_ring)\n+{\n+\tsize_t size;\n \n-rx_skip_free:\n \t/* Zero out the descriptor ring */\n \tsize = ALIGN(rx_ring->count * sizeof(union ice_32byte_rx_desc),\n \t\t     PAGE_SIZE);\n@@ -579,6 +579,16 @@ void ice_clean_rx_ring(struct ice_rx_ring *rx_ring)\n \trx_ring->next_to_use = 0;\n }\n \n+/**\n+ * ice_clean_rx_ring - Free Rx buffers\n+ * @rx_ring: ring to be cleaned\n+ */\n+void ice_clean_rx_ring(struct ice_rx_ring *rx_ring)\n+{\n+\tice_queue_mem_free(rx_ring->netdev, rx_ring);\n+\tice_zero_rx_ring(rx_ring);\n+}\n+\n /**\n  * ice_free_rx_ring - Free Rx resources\n  * @rx_ring: ring to clean the resources from\n",
    "prefixes": [
        "iwl-next",
        "v2",
        "4/5"
    ]
}