Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233057/?format=api
{ "id": 2233057, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233057/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260505152923.1040589-5-aleksander.lobakin@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260505152923.1040589-5-aleksander.lobakin@intel.com>", "list_archive_url": null, "date": "2026-05-05T15:29:22", "name": "[iwl-next,v5,4/5] ice: implement Rx queue management ops", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "f73bdf85aa17435ffb3a41f6b2ed42d6ff6b26b2", "submitter": { "id": 85827, "url": "http://patchwork.ozlabs.org/api/1.2/people/85827/?format=api", "name": "Alexander Lobakin", "email": "aleksander.lobakin@intel.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/1.2/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/20260505152923.1040589-5-aleksander.lobakin@intel.com/mbox/", "series": [ { "id": 502856, "url": "http://patchwork.ozlabs.org/api/1.2/series/502856/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=502856", "date": "2026-05-05T15:29:18", "name": "ice: add support for devmem/io_uring Rx and Tx", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/502856/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233057/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233057/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=e/WYh9+0;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\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 4g92Xf2XSDz1yJx\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 01:30:58 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 8429140AA6;\n\tTue, 5 May 2026 15:30:56 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id yp0JmIXTVJIb; Tue, 5 May 2026 15:30:54 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 7888D40AAB;\n\tTue, 5 May 2026 15:30:54 +0000 (UTC)", "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists1.osuosl.org (Postfix) with ESMTP id 464972A8\n for <intel-wired-lan@lists.osuosl.org>; Tue, 5 May 2026 15:30:53 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 2CC53608B4\n for <intel-wired-lan@lists.osuosl.org>; Tue, 5 May 2026 15:30:53 +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 9JrIj3POOKRk for <intel-wired-lan@lists.osuosl.org>;\n Tue, 5 May 2026 15:30:52 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.7])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 2427A608B2\n for <intel-wired-lan@lists.osuosl.org>; Tue, 5 May 2026 15:30:52 +0000 (UTC)", "from orviesa010.jf.intel.com ([10.64.159.150])\n by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 05 May 2026 08:30:52 -0700", "from newjersey.igk.intel.com ([10.102.20.203])\n by orviesa010.jf.intel.com with ESMTP; 05 May 2026 08:30:49 -0700" ], "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 smtp4.osuosl.org 7888D40AAB", "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2427A608B2" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1777995054;\n\tbh=q6l74F/Rnz582h9fqu65hbMu7Ze2CgDMrHEAJa6+w14=;\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=e/WYh9+0QWItn+wcWFGluPE4TkYy/1I2FkdDcYyfabppikZumxg71xPVQ0qTOq16N\n\t cNB1yc67x8Xfe7LghA9pL5pAMbEIts3OZms9hc81lH+BJxEop8/KgtzXMfel5XSuVv\n\t Q+Xupa9Wy+Qlnq4N3KpNKNX55O2KaOEcyf4HqdGbfWHLe1184AB2r0O3G4t3Kg0xPC\n\t 3HqkOZHQtFm4pU87JGltlqD6M/OMGHAFmS84c/oLdwDuYDAPYCnRaqV6SbYtn/2W5D\n\t 9FfS0X2WW74R/7tgxy7346ZgB2oMyURpX9kmYoEzoGLN0X3TfoA/ik54zIkLjBZi+P\n\t YgyELjBpOk5lw==", "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 2427A608B2", "X-CSE-ConnectionGUID": [ "gR26ZFkTQNWKb+rdmDkokA==", "mDCsF+t3Tcakp4aapCinmw==" ], "X-CSE-MsgGUID": [ "gC+zK9CdSy6Qc4kchjwMmw==", "XutFSfbDTqmmv1q5tbfLXA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11777\"; a=\"104317038\"", "E=Sophos;i=\"6.23,217,1770624000\"; d=\"scan'208\";a=\"104317038\"", "E=Sophos;i=\"6.23,217,1770624000\"; d=\"scan'208\";a=\"234971627\"" ], "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 Kohei Enju <kohei@enjuk.jp>, 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": "Tue, 5 May 2026 17:29:22 +0200", "Message-ID": "<20260505152923.1040589-5-aleksander.lobakin@intel.com>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260505152923.1040589-1-aleksander.lobakin@intel.com>", "References": "<20260505152923.1040589-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=1777995052; x=1809531052;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=TKK2BFcYNojkQ+YOzFrS5br6Zc1oRY+7dI4Deo/rPt0=;\n b=MAUOeW92SnKZdYaR0Q5xsXl6kHUMaZM/muTewj80FMCo1/2KYxJfwxYj\n PKgbs1LPuBaKAXgAY5lxs0Iyz0bAW/Q2/PsTHiRjgZb0L3WVdtpxIuRTE\n R+EZBQTZtLTMBkQk6LYdcKU7LcEWfTH6AWxjMePMWecX+vd7UAJe4TaJX\n vob4pxP8vvF4qGKF5Mc/I5QaRjRQgBBY5cIQAsMf7V2Qd6Ytycrk7CH6N\n EJN9EBU9ieipc+b89Jx+3pdNQ2SNB/W4rQ701JowtvspFNn8MLyXCjFKX\n RkqX016J8+8u1M8W9i1sadwXUa1W5wDqdKlDW2ffcLqx4HYzKH4xPuxlN\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=MAUOeW92" ], "Subject": "[Intel-wired-lan] [PATCH iwl-next v5 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 | 182 +++++++++++++++-----\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, 165 insertions(+), 54 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h\nindex 476fa54ec4e8..e1e85976e523 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@@ -135,4 +137,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 5e517f219379..7c22b2015067 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.h\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.h\n@@ -462,6 +462,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 1add82d894bb..4e0b8895c303 100644\n--- a/drivers/net/ethernet/intel/ice/ice_base.c\n+++ b/drivers/net/ethernet/intel/ice/ice_base.c\n@@ -653,6 +653,43 @@ 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,\n+\t\t\t struct netdev_queue_config *qcfg,\n+\t\t\t void *per_queue_mem, 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->truesize);\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@@ -691,19 +728,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, NULL, 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\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->truesize);\n-\t\t\tif (err)\n-\t\t\t\tgoto err_destroy_fq;\n-\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@@ -712,7 +740,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@@ -743,12 +771,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@@ -1460,27 +1488,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@@ -1519,23 +1527,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@@ -1553,10 +1573,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@@ -1577,3 +1593,81 @@ 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,\n+\t\t\t struct netdev_queue_config *qcfg,\n+\t\t\t void *per_queue_mem, 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 50975fe7cab7..a88f9e3c0077 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -3452,7 +3452,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 cd6ba53a873b..8d1541712abc 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 4ca1a0602307..43b467076027 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.c\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c\n@@ -531,17 +531,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@@ -570,8 +566,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@@ -581,6 +581,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", "v5", "4/5" ] }