get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2235033,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2235033/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260508124208.11622-16-przemyslaw.kitszel@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": "<20260508124208.11622-16-przemyslaw.kitszel@intel.com>",
    "list_archive_url": null,
    "date": "2026-05-08T12:42:08",
    "name": "[iwl-next,v1,15/15] ice: support up to 256 VF queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "23cfc5228bbf1f20134aeb0a5ad0aece9f0dd81c",
    "submitter": {
        "id": 85252,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/85252/?format=api",
        "name": "Przemek Kitszel",
        "email": "przemyslaw.kitszel@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260508124208.11622-16-przemyslaw.kitszel@intel.com/mbox/",
    "series": [
        {
            "id": 503388,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503388/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=503388",
            "date": "2026-05-08T12:41:53",
            "name": "devlink, mlx5, iavf, ice: XLVF for iavf",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/503388/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2235033/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2235033/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=kHWxIW05;\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 4gBq3J5ZkCz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 23:00:12 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 6BF2941281;\n\tFri,  8 May 2026 13:00:11 +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 imMNpWBKLmJL; Fri,  8 May 2026 13:00:10 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 02A7D40F74;\n\tFri,  8 May 2026 13:00:10 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists1.osuosl.org (Postfix) with ESMTP id 8E271317\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 13:00:08 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 8B83940F8C\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 13:00:08 +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 KpTUquV2nZt2 for <intel-wired-lan@lists.osuosl.org>;\n Fri,  8 May 2026 13:00:07 +0000 (UTC)",
            "from mgamail.intel.com (mgamail.intel.com [198.175.65.17])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 36045410AA\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 13:00:07 +0000 (UTC)",
            "from fmviesa005.fm.intel.com ([10.60.135.145])\n by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 May 2026 06:00:07 -0700",
            "from irvmail002.ir.intel.com ([10.43.11.120])\n by fmviesa005.fm.intel.com with ESMTP; 08 May 2026 06:00:00 -0700",
            "from vecna.igk.intel.com (vecna.igk.intel.com [10.123.220.17])\n by irvmail002.ir.intel.com (Postfix) with ESMTP id D618A2FC41;\n Fri,  8 May 2026 13:59:58 +0100 (IST)"
        ],
        "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 02A7D40F74",
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 36045410AA"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1778245210;\n\tbh=5F3qmPonnpG9UicxwSTV/tGKo1H8pWd5J3JD6jNwqDM=;\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=kHWxIW05iDxlIYPbNBsL8gPgGY0yRlAHlpBDXNISlK3UVCHzIs4uK7ebps0OGPuJr\n\t gl9iU7tAjwvKxlR0VEHjz31M0RHUHhSPSW6hmeDHwIKABXMaEQ+hKZaH818qoXq5Ak\n\t Mis3hslTLoRzl/+6e2E+Wb2JtTOMKnewt5oC8v7FdEc39vYesSE936npVVXzqPpNk5\n\t +wVJBh3lw+XRO1UIVaXFLK7t0FBrQanjFJXbiEskrsOvsaKPJ235/vyGmCvk1olcuQ\n\t wNNGuWedW2tVz/5OD25ZgRa0+X0oQ6htoWtcHVNv81VcSD53Ap8Ff4YFBCDXJ3d0li\n\t f4x3deEMSjMLQ==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.17;\n helo=mgamail.intel.com; envelope-from=przemyslaw.kitszel@intel.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org 36045410AA",
        "X-CSE-ConnectionGUID": [
            "KoeWwfTZTdaVyQkAuqp+rA==",
            "iOmkLC7lT22hmXlZb8Q87A=="
        ],
        "X-CSE-MsgGUID": [
            "GgAYX9u4QqOAq+I3PgcCRQ==",
            "BuKjJpg8QKG3eXJdQzNjbQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11779\"; a=\"79200017\"",
            "E=Sophos;i=\"6.23,223,1770624000\"; d=\"scan'208\";a=\"79200017\"",
            "E=Sophos;i=\"6.23,223,1770624000\"; d=\"scan'208\";a=\"241730300\""
        ],
        "X-ExtLoop1": "1",
        "From": "Przemek Kitszel <przemyslaw.kitszel@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org, Michal Schmidt <mschmidt@redhat.com>,\n Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@resnulli.us>",
        "Cc": "netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,\n bruce.richardson@intel.com,\n Vladimir Medvedkin <vladimir.medvedkin@intel.com>,\n padraig.j.connolly@intel.com, ananth.s@intel.com,\n timothy.miskell@intel.com, Jacob Keller <jacob.e.keller@intel.com>,\n Lukasz Czapnik <lukasz.czapnik@intel.com>,\n Aleksandr Loktionov <aleksandr.loktionov@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>,\n \"David S. Miller\" <davem@davemloft.net>,\n Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>,\n Saeed Mahameed <saeedm@nvidia.com>, Leon Romanovsky <leon@kernel.org>,\n Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Jedrzej Jagielski <jedrzej.jagielski@intel.com>",
        "Date": "Fri,  8 May 2026 14:42:08 +0200",
        "Message-Id": "<20260508124208.11622-16-przemyslaw.kitszel@intel.com>",
        "X-Mailer": "git-send-email 2.39.3",
        "In-Reply-To": "<20260508124208.11622-1-przemyslaw.kitszel@intel.com>",
        "References": "<20260508124208.11622-1-przemyslaw.kitszel@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=1778245208; x=1809781208;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=tRjA3Mv7plFdbQhSTB+xQGBFDB7tp/p65WZXZRKik3E=;\n b=fA3fn8H1GwVIKvqT22sYb+M/yDYqkLPHXHS6duZa97noh4+K3MO6Zu+g\n AW4nW5yutkRNt5IlDgoJQ4Voegb1v9w43dSUhHnKVk5StfyM/vqzhMe/M\n hYwdxvPAy+uJ65g5GYHUd0u3EhPM3z6nOdHLL4p/DMkqAqwuVxef0lKPR\n 7yFpE3FMgv83s+tfhMa5uiMsCkcugbu30joJPubDZEATyYueIC0hKC+sU\n lOzBvileS2rdyfOX+PXRhMzKXE1ZKAdurBBR8+ueh92MyQ2UNIsP8v5Hk\n J96k3NyFO3ehXjKKUPI/CtcgRUfmiVNGL9Nx1dz0rbrEohrSuYfxdntCK\n A==;",
        "X-Mailman-Original-Authentication-Results": [
            "smtp4.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com",
            "smtp4.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=fA3fn8H1"
        ],
        "Subject": "[Intel-wired-lan] [PATCH iwl-next v1 15/15] ice: support up to 256\n VF queues",
        "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": "Add support for up to 256 VF queues. To enable more than usual 16, user\nneeds to assign GLOBAL LUT (devlink resource named \"rss/lut_512\") for 64\nqueues or PF LUT (name \"rss/lut_2048\") for maximum of 256 queues. There is\na need to assign the GLOBAL LUT to PF first, then release the PF LUT\n(initially assigned to PF) from PF, to finally assign it to VF, see\nexamples further below. Usual default of number of CPU cores does still\napply, but queues could be requested later by usual ethtool -L command.\n\nAdd devlink instance of VF device to track RSS LUT resources under\na respective PF devlink instance.\n\nNumber of MSI-X vectors assigned to VF is orthogonal to this.\n\nNote that VF reset is deferred to service task.\n\nHow to use:\n1. Up to 64 queues\n   a. assign one of 16 GLOBAL LUTs to VF:\n      sudo devlink resource set pci/0000:18:01.0 path rss/lut_512 size 1\n   b. if more queues than the default (num of vCPU/CPU cores) are wanted:\n      sudo ethtool -L $vfiface combined $more\n\n2. Up to 256 queues\n   a. assign a GLOBAL LUT to PF:\n      sudo devlink resource set pci/0000:18:00.0 path rss/lut_512 size 1\n   b. free the PF LUT from PF:\n      sudo devlink resource set pci/0000:18:00.0 path rss/lut_2048 size 0\n   c. assign the PF LUT to VF:\n      sudo devlink resource set pci/0000:18:01.0 path rss/lut_2048 size 1\n   d. if more queues than the default (num of vCPU/CPU cores) are wanted:\n      sudo ethtool -L $vfiface combined\t$more\n\n3. display current RSS LUT or RSS table:\n   a. see if RSS is mapped correctly (e.g. for lut_512 there are 512\n      entries expected):\n      ethtool -x $vfiface\n   b. see what devlink devices are present:\n      devlink dev show # note the \"faux\" device over your pci netdevs\n   c. see PF, VF, and \"whole device aggregate\" (faux) resources:\n      devlink resource show pci/0000:18:00.0 # PF\n      devlink resource show pci/0000:18:01.0 # VF\n      devlink resource show faux/ice-90-cf-4c-ff-ff-6f-7c-50 # whole dev\n\noutput will look like: below, for device with 1 of PF and GLOBAL LUTs:\npci/0000:18:00.0:\n  name rss size 2 unit entry size_min 0 size_max 2 size_gran 1 dpipe_tables none\n    resources:\n      name lut_512 size 1 unit entry size_min 0 size_max 1 size_gran 1 dpipe_tables none\n      name lut_2048 size 1 unit entry size_min 0 size_max 1 size_gran 1 dpipe_tables none\n\nBig thanks to Mateusz for working together on the whole story for long\ntime! Big thanks to Alex Loktionov for pointing the reason of one nasty\nbug with the message size!\n\nCo-developed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>\nSigned-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\nReviewed-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>\nSigned-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>\n---\n .../net/ethernet/intel/ice/devlink/resource.h |   3 +\n drivers/net/ethernet/intel/ice/ice_lib.h      |   5 +-\n drivers/net/ethernet/intel/ice/ice_vf_lib.h   |  13 +++\n drivers/net/ethernet/intel/ice/virt/rss.h     |   1 +\n .../net/ethernet/intel/ice/virt/virtchnl.h    |   4 +\n .../net/ethernet/intel/ice/devlink/resource.c | 105 +++++++++++++++++-\n drivers/net/ethernet/intel/ice/ice_lib.c      |  27 ++++-\n drivers/net/ethernet/intel/ice/ice_main.c     |  25 +++++\n drivers/net/ethernet/intel/ice/ice_sriov.c    |  10 ++\n drivers/net/ethernet/intel/ice/ice_vf_lib.c   |  42 +++++++\n drivers/net/ethernet/intel/ice/virt/rss.c     |  36 +++++-\n .../net/ethernet/intel/ice/virt/virtchnl.c    |  47 +++++++-\n 12 files changed, 305 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/devlink/resource.h b/drivers/net/ethernet/intel/ice/devlink/resource.h\nindex 947f77a3cd49..9c6c97e2e62d 100644\n--- a/drivers/net/ethernet/intel/ice/devlink/resource.h\n+++ b/drivers/net/ethernet/intel/ice/devlink/resource.h\n@@ -8,12 +8,15 @@ struct devlink;\n struct ice_adapter;\n struct ice_hw;\n struct ice_pf;\n+struct ice_vf;\n \n+void ice_devlink_vf_resources_register(struct ice_vf *vf);\n void ice_devl_pf_resources_register(struct ice_pf *pf);\n void ice_devl_whole_dev_resources_register(const struct ice_hw *hw,\n \t\t\t\t\t   struct ice_adapter *adapter);\n \n int ice_take_rss_lut_pf(struct ice_pf *pf);\n void ice_free_rss_lut_flr(struct ice_pf *pf);\n+void ice_free_rss_lut_vf(struct ice_vf *vf);\n \n #endif /* _ICE_DEVL_RESOURCE_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h\nindex 54377c797bac..76efea676583 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.h\n@@ -8,16 +8,19 @@\n #include \"ice_vlan.h\"\n \n /* Flags used for VSI configuration and rebuild */\n-#define ICE_VSI_FLAG_INIT\tBIT(0)\n #define ICE_VSI_FLAG_NO_INIT\t0\n+#define ICE_VSI_FLAG_INIT\tBIT(0)\n+#define ICE_VSI_FLAG_RELOAD\tBIT(1) /* devlink reload action */\n \n #define ICE_L2TSEL_QRX_CONTEXT_REG_IDX\t3\n #define ICE_L2TSEL_BIT_OFFSET\t\t23\n enum ice_l2tsel {\n \tICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG2_2ND,\n \tICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG1,\n };\n \n+u16 ice_lut_type_to_qs_num(enum ice_lut_type lut_type);\n+\n const char *ice_vsi_type_str(enum ice_vsi_type vsi_type);\n \n bool ice_pf_state_is_nominal(struct ice_pf *pf);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.h b/drivers/net/ethernet/intel/ice/ice_vf_lib.h\nindex 5411eaa1761c..397e1fa00dbc 100644\n--- a/drivers/net/ethernet/intel/ice/ice_vf_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.h\n@@ -145,6 +145,7 @@ struct ice_vf {\n \tstruct kref refcnt;\n \tstruct ice_pf *pf;\n \tstruct pci_dev *vfdev;\n+\tstruct devlink *devlink;\n \t/* Used during virtchnl message handling and NDO ops against the VF\n \t * that will trigger a VFR\n \t */\n@@ -175,6 +176,7 @@ struct ice_vf {\n \tu8 link_forced:1;\n \tu8 link_up:1;\t\t\t/* only valid if VF link is forced */\n \tu8 lldp_tx_ena:1;\n+\tu8 needs_deferred_reset:1;\n \n \tu16 num_msix;\t\t\t/* num of MSI-X configured on this VF */\n \n@@ -320,9 +322,12 @@ int\n ice_vf_clear_vsi_promisc(struct ice_vf *vf, struct ice_vsi *vsi, u8 promisc_m);\n int ice_reset_vf(struct ice_vf *vf, u32 flags);\n void ice_reset_all_vfs(struct ice_pf *pf);\n+void ice_schedule_vf_reset(struct ice_vf *vf);\n struct ice_vsi *ice_get_vf_ctrl_vsi(struct ice_pf *pf, struct ice_vsi *vsi);\n void ice_vf_update_mac_lldp_num(struct ice_vf *vf, struct ice_vsi *vsi,\n \t\t\t\tbool incr);\n+void ice_init_vf_devlink(struct ice_vf *vf);\n+void ice_deinit_vf_devlink(struct ice_vf *vf);\n #else /* CONFIG_PCI_IOV */\n static inline struct ice_vf *ice_get_vf_by_id(struct ice_pf *pf, u16 vf_id)\n {\n@@ -399,6 +404,14 @@ ice_get_vf_ctrl_vsi(struct ice_pf *pf, struct ice_vsi *vsi)\n {\n \treturn NULL;\n }\n+\n+static inline void ice_init_vf_devlink(struct ice_vf *vf)\n+{\n+}\n+\n+static inline void ice_deinit_vf_devlink(struct ice_vf *vf)\n+{\n+}\n #endif /* !CONFIG_PCI_IOV */\n \n #endif /* _ICE_VF_LIB_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/virt/rss.h b/drivers/net/ethernet/intel/ice/virt/rss.h\nindex 784d4c43ce8b..388f980b4cdf 100644\n--- a/drivers/net/ethernet/intel/ice/virt/rss.h\n+++ b/drivers/net/ethernet/intel/ice/virt/rss.h\n@@ -14,5 +14,6 @@ int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg);\n int ice_vc_config_rss_hfunc(struct ice_vf *vf, u8 *msg);\n int ice_vc_get_rss_hashcfg(struct ice_vf *vf);\n int ice_vc_set_rss_hashcfg(struct ice_vf *vf, u8 *msg);\n+int ice_vc_get_max_rss_qregion(struct ice_vf *vf);\n \n #endif /* _ICE_VIRT_RSS_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/virt/virtchnl.h b/drivers/net/ethernet/intel/ice/virt/virtchnl.h\nindex f7f909424098..c7e074726f8a 100644\n--- a/drivers/net/ethernet/intel/ice/virt/virtchnl.h\n+++ b/drivers/net/ethernet/intel/ice/virt/virtchnl.h\n@@ -78,6 +78,10 @@ struct ice_virtchnl_ops {\n \tint (*get_ptp_cap)(struct ice_vf *vf,\n \t\t\t   const struct virtchnl_ptp_caps *msg);\n \tint (*get_phc_time)(struct ice_vf *vf);\n+\tint (*get_max_rss_qregion)(struct ice_vf *vf);\n+\tint (*ena_qs_v2_msg)(struct ice_vf *vf, u8 *msg, u16 msglen);\n+\tint (*dis_qs_v2_msg)(struct ice_vf *vf, u8 *msg, u16 msglen);\n+\tint (*map_q_vector_msg)(struct ice_vf *vf, u8 *msg, u16 msglen);\n };\n \n #ifdef CONFIG_PCI_IOV\ndiff --git a/drivers/net/ethernet/intel/ice/devlink/resource.c b/drivers/net/ethernet/intel/ice/devlink/resource.c\nindex 42b65730ea52..dd2410f266b6 100644\n--- a/drivers/net/ethernet/intel/ice/devlink/resource.c\n+++ b/drivers/net/ethernet/intel/ice/devlink/resource.c\n@@ -104,6 +104,16 @@ void ice_free_rss_lut_flr(struct ice_pf *pf)\n \t}\t\t\n }\n \n+void ice_free_rss_lut_vf(struct ice_vf *vf)\n+{\n+\tstruct ice_pf *pf = vf->pf;\n+\n+\tscoped_guard(ice_adapter_devl, pf->adapter) {\n+\t\tice_devl_res_free(pf, ICE_RSS_LUT_GLOBAL, vf);\n+\t\tice_devl_res_free(pf, ICE_RSS_LUT_PF, vf);\n+\t}\n+}\n+\n static int ice_devl_res_owned_idx(struct ice_adapter *adapter,\n \t\t\t\t  enum ice_devl_resource_id res_id, void *owner)\n {\n@@ -175,6 +185,37 @@ static u64 ice_rss_lut_pf_occ_get_both(void *priv)\n \t\t       ice_is_devl_res_owned_by(adapter, ICE_RSS_LUT_GLOBAL, pf);\n }\n \n+static u64 ice_rss_lut_vf_occ_get_global(void *priv)\n+{\n+\tstruct ice_adapter *adapter;\n+\tstruct ice_vf *vf = priv;\n+\n+\tadapter = vf->pf->adapter;\n+\tscoped_guard(ice_adapter_devl, adapter)\n+\t\treturn ice_is_devl_res_owned_by(adapter, ICE_RSS_LUT_GLOBAL, vf);\n+}\n+\n+static u64 ice_rss_lut_vf_occ_get_pf(void *priv)\n+{\n+\tstruct ice_adapter *adapter;\n+\tstruct ice_vf *vf = priv;\n+\n+\tadapter = vf->pf->adapter;\n+\tscoped_guard(ice_adapter_devl, adapter)\n+\t\treturn ice_is_devl_res_owned_by(adapter, ICE_RSS_LUT_PF, vf);\n+}\n+\n+static u64 ice_rss_lut_vf_occ_get_both(void *priv)\n+{\n+\tstruct ice_adapter *adapter;\n+\tstruct ice_vf *vf = priv;\n+\n+\tadapter = vf->pf->adapter;\n+\tscoped_guard(ice_adapter_devl, adapter)\n+\t\treturn ice_is_devl_res_owned_by(adapter, ICE_RSS_LUT_PF, vf) +\n+\t\t       ice_is_devl_res_owned_by(adapter, ICE_RSS_LUT_GLOBAL, vf);\n+}\n+\n static int ice_devl_resource_deny_occ_set(u64 size,\n \t\t\t\t\t  struct netlink_ext_ack *extack,\n \t\t\t\t\t  void *priv)\n@@ -220,6 +261,7 @@ static int ice_maybe_change_rss_lut(struct ice_pf *pf, void *owner,\n \tstruct ice_hw *hw = &pf->hw;\n \tenum ice_lut_type lut_type;\n \tint err, lut_size, lut_id;\n+\tstruct ice_vf *vf = NULL;\n \tstruct ice_vsi *vsi;\n \tu8 *lut;\n \n@@ -246,7 +288,8 @@ static int ice_maybe_change_rss_lut(struct ice_pf *pf, void *owner,\n \tif (pf == owner) {\n \t\tvsi = ice_get_main_vsi(pf);\n \t} else {\n-\t\treturn -EOPNOTSUPP;\n+\t\tvf = owner;\n+\t\tvsi = ice_get_vf_vsi(vf);\n \t}\n \n \tlut_size = ice_lut_type_to_size(lut_type);\n@@ -266,6 +309,11 @@ static int ice_maybe_change_rss_lut(struct ice_pf *pf, void *owner,\n \n \tvsi->rss_table_size = lut_size;\n \tvsi->rss_lut_type = lut_type;\n+\tif (vf) {\n+\t\tvsi->rss_size = ice_lut_type_to_qs_num(lut_type);\n+\t\tvsi->flags |= ICE_VSI_FLAG_RELOAD;\n+\t\tice_schedule_vf_reset(vf);\n+\t}\n out:\n \tkfree(lut);\n \treturn err;\n@@ -354,6 +402,30 @@ static int ice_rss_lut_pf_occ_set_global(u64 size,\n \t\t\t\t\t   ICE_ANY_SLOT, extack);\n }\n \n+static int ice_rss_lut_vf_occ_set_pf(u64 size, struct netlink_ext_ack *extack,\n+\t\t\t\t     void *occ_priv)\n+{\n+\tstruct ice_vf *vf = occ_priv;\n+\tstruct ice_pf *pf = vf->pf;\n+\tint pf_id = pf->hw.pf_id;\n+\n+\tscoped_guard(ice_adapter_devl, pf->adapter)\n+\t\treturn ice_devl_res_change(size, ICE_RSS_LUT_PF, pf, vf, pf_id,\n+\t\t\t\t\t   extack);\n+}\n+\n+static int ice_rss_lut_vf_occ_set_global(u64 size,\n+\t\t\t\t\t struct netlink_ext_ack *extack,\n+\t\t\t\t\t void *occ_priv)\n+{\n+\tstruct ice_vf *vf = occ_priv;\n+\tstruct ice_pf *pf = vf->pf;\n+\n+\tscoped_guard(ice_adapter_devl, pf->adapter)\n+\t\treturn ice_devl_res_change(size, ICE_RSS_LUT_GLOBAL, pf, vf,\n+\t\t\t\t\t   ICE_ANY_SLOT, extack);\n+}\n+\n /**\n  * ice_take_rss_lut_pf - allocate PF RSS LUT for PF\n  * @pf: the PF device that PF LUT is physically on, and to allocate it for\n@@ -467,3 +539,34 @@ void ice_devl_pf_resources_register(struct ice_pf *pf)\n \tdevl_assert_locked(devlink);\n \tice_devl_res_register(devlink, pf_resources, pf);\n }\n+\n+void ice_devlink_vf_resources_register(struct ice_vf *vf)\n+{\n+\tstruct ice_devl_resource vf_resources[ICE_DEVL_RESOURCES_COUNT] = {\n+\t\t[ICE_RSS_LUT_GLOBAL] = {\n+\t\t\t.name = \"lut_512\",\n+\t\t\t.parent_id = ICE_RSS_LUT_BOTH,\n+\t\t\t.max_size = 1,\n+\t\t\t.get = ice_rss_lut_vf_occ_get_global,\n+\t\t\t.set = ice_rss_lut_vf_occ_set_global,\n+\t\t},\n+\t\t[ICE_RSS_LUT_PF] = {\n+\t\t\t.name = \"lut_2048\",\n+\t\t\t.parent_id = ICE_RSS_LUT_BOTH,\n+\t\t\t.max_size = 1,\n+\t\t\t.get = ice_rss_lut_vf_occ_get_pf,\n+\t\t\t.set = ice_rss_lut_vf_occ_set_pf,\n+\t\t},\n+\t\t[ICE_RSS_LUT_BOTH] = {\n+\t\t\t.name = \"rss\",\n+\t\t\t.parent_id = ICE_TOP_RESOURCE,\n+\t\t\t.max_size = 2,\n+\t\t\t.get = ice_rss_lut_vf_occ_get_both,\n+\t\t\t.set = ice_devl_resource_deny_occ_set,\n+\t\t},\n+\t};\n+\tstruct devlink *devlink = vf->devlink;\n+\n+\tscoped_guard(devl, devlink)\n+\t\tice_devl_res_register(devlink, vf_resources, vf);\n+}\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex e47f2f881701..2ab44eca7e11 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -12,6 +12,23 @@\n \n #include \"devlink/resource.h\"\n \n+#define ICE_LUT_VSI_MAX_QS\t16\n+#define ICE_LUT_GLOBAL_MAX_QS\t64\n+#define ICE_LUT_PF_MAX_QS\t256\n+\n+u16 ice_lut_type_to_qs_num(enum ice_lut_type lut_type)\n+{\n+\tswitch (lut_type) {\n+\tcase ICE_LUT_PF:\n+\t\treturn ICE_LUT_PF_MAX_QS;\n+\tcase ICE_LUT_GLOBAL:\n+\t\treturn ICE_LUT_GLOBAL_MAX_QS;\n+\tcase ICE_LUT_VSI:\n+\tdefault:\n+\t\treturn ICE_LUT_VSI_MAX_QS;\n+\t}\n+}\n+\n /**\n  * ice_vsi_type_str - maps VSI type enum to string equivalents\n  * @vsi_type: VSI type enum\n@@ -1547,8 +1564,6 @@ int ice_vsi_cfg_rss_lut_key(struct ice_vsi *vsi)\n \t    (test_bit(ICE_FLAG_TC_MQPRIO, pf->flags))) {\n \t\tvsi->rss_size = min_t(u16, vsi->rss_size, vsi->ch_rss_size);\n \t} else {\n-\t\tvsi->rss_size = min_t(u16, vsi->rss_size, vsi->num_rxq);\n-\n \t\t/* If orig_rss_size is valid and it is less than determined\n \t\t * main VSI's rss_size, update main VSI's rss_size to be\n \t\t * orig_rss_size so that when tc-qdisc is deleted, main VSI\n@@ -2572,8 +2587,14 @@ void ice_vsi_decfg(struct ice_vsi *vsi)\n \tice_vsi_free_arrays(vsi);\n \n \tif (vsi->flags & ICE_VSI_FLAG_INIT) {\n-\t\tif (vsi->type == ICE_VSI_PF)\n+\t\tif (vsi->type == ICE_VSI_PF) {\n \t\t\tice_free_rss_lut_flr(pf);\n+\t\t} else if (vsi->type == ICE_VSI_VF) {\n+\t\t\tstruct ice_vf *vf = vsi->vf;\n+\n+\t\t\tvf->num_req_qs = 0;\n+\t\t\tvf->num_vf_qs = min(vf->num_vf_qs, pf->vfs.num_qps_per);\n+\t\t}\n \t}\n \n \t/* SR-IOV determines needed MSIX resources all at once instead of per\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 94232f4a45ad..606e863f0f54 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -2275,6 +2275,30 @@ static void ice_check_media_subtask(struct ice_pf *pf)\n \t}\n }\n \n+static void ice_handle_deferred_vf_reset(struct ice_pf *pf)\n+{\n+\tstruct ice_vf *vf;\n+\tunsigned int bkt;\n+\tint err;\n+\n+\tmutex_lock(&pf->vfs.table_lock);\n+\tice_for_each_vf(pf, bkt, vf) {\n+\t\tif (!vf->needs_deferred_reset)\n+\t\t\tcontinue;\n+\n+\t\tdev_info(ice_pf_to_dev(pf), \"doing deferred reset of VF %d\\n\",\n+\t\t\t vf->vf_id);\n+\t\terr = ice_reset_vf(vf, ICE_VF_RESET_NOTIFY | ICE_VF_RESET_LOCK);\n+\t\tif (err)\n+\t\t\tdev_warn(ice_pf_to_dev(pf), \"deferred reset of VF %d failed: %d\\n\",\n+\t\t\t\t vf->vf_id, err);\n+\n+\t\tvf->needs_deferred_reset = 0;\n+\t\tice_put_vf(vf);\n+\t}\n+\tmutex_unlock(&pf->vfs.table_lock);\n+}\n+\n static void ice_service_task_recovery_mode(struct work_struct *work)\n {\n \tstruct ice_pf *pf = container_of(work, struct ice_pf, serv_task);\n@@ -2357,6 +2381,7 @@ static void ice_service_task(struct work_struct *work)\n \t\treturn;\n \t}\n \n+\tice_handle_deferred_vf_reset(pf);\n \tice_process_vflr_event(pf);\n \tice_clean_mailboxq_subtask(pf);\n \tice_clean_sbq_subtask(pf);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c b/drivers/net/ethernet/intel/ice/ice_sriov.c\nindex 28f9e68f46cd..3de352e8f45b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_sriov.c\n+++ b/drivers/net/ethernet/intel/ice/ice_sriov.c\n@@ -655,6 +655,15 @@ static void ice_sriov_post_vsi_rebuild(struct ice_vf *vf)\n \twr32(&vf->pf->hw, VFGEN_RSTAT(vf->vf_id), VIRTCHNL_VFR_VFACTIVE);\n }\n \n+static struct ice_q_vector *ice_sriov_get_q_vector(struct ice_vsi *vsi,\n+\t\t\t\t\t\t   u16 vector_id)\n+{\n+\t/* Subtract non queue vector from vector_id passed by VF\n+\t * to get actual number of VSI queue vector array index\n+\t */\n+\treturn vsi->q_vectors[vector_id - ICE_NONQ_VECS_VF];\n+}\n+\n static const struct ice_vf_ops ice_sriov_vf_ops = {\n \t.reset_type = ICE_VF_RESET,\n \t.free = ice_sriov_free_vf,\n@@ -665,6 +674,7 @@ static const struct ice_vf_ops ice_sriov_vf_ops = {\n \t.clear_reset_trigger = ice_sriov_clear_reset_trigger,\n \t.irq_close = NULL,\n \t.post_vsi_rebuild = ice_sriov_post_vsi_rebuild,\n+\t.get_q_vector = ice_sriov_get_q_vector,\n };\n \n /**\ndiff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c b/drivers/net/ethernet/intel/ice/ice_vf_lib.c\nindex 55ad03085bc9..6e1f1c9733ef 100644\n--- a/drivers/net/ethernet/intel/ice/ice_vf_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.c\n@@ -6,6 +6,7 @@\n #include \"ice_lib.h\"\n #include \"ice_fltr.h\"\n #include \"virt/allowlist.h\"\n+#include \"devlink/resource.h\"\n \n /* Public functions which may be accessed by all driver files */\n \n@@ -248,6 +249,8 @@ static void ice_vf_pre_vsi_rebuild(struct ice_vf *vf)\n \tvf->vf_ops->clear_reset_trigger(vf);\n }\n \n+int ice_vsi_realloc_stat_arrays(struct ice_vsi *);\n+\n /**\n  * ice_vf_reconfig_vsi - Reconfigure a VF VSI with the device\n  * @vf: VF to reconfigure the VSI for\n@@ -989,6 +992,16 @@ int ice_reset_vf(struct ice_vf *vf, u32 flags)\n \treturn err;\n }\n \n+/**\n+ * ice_schedule_vf_reset - reset VF, deferred to next service_task context\n+ * @vf: VF to reset\n+ */\n+void ice_schedule_vf_reset(struct ice_vf *vf)\n+{\n+\tkref_get(&vf->refcnt);\n+\tvf->needs_deferred_reset = 1;\n+}\n+\n /**\n  * ice_set_vf_state_dis - Set VF state to disabled\n  * @vf: pointer to the VF structure\n@@ -1043,6 +1056,9 @@ void ice_deinitialize_vf_entry(struct ice_vf *vf)\n {\n \tstruct ice_pf *pf = vf->pf;\n \n+\tice_free_rss_lut_vf(vf);\n+\tice_deinit_vf_devlink(vf);\n+\n \tif (!ice_is_feature_supported(pf, ICE_F_MBX_LIMIT))\n \t\tlist_del(&vf->mbx_info.list_entry);\n }\n@@ -1429,3 +1445,29 @@ void ice_vf_update_mac_lldp_num(struct ice_vf *vf, struct ice_vsi *vsi,\n \tif (was_ena != is_ena)\n \t\tice_vsi_cfg_sw_lldp(vsi, false, is_ena);\n }\n+\n+void ice_init_vf_devlink(struct ice_vf *vf)\n+{\n+\tstatic const struct devlink_ops noop = {};\n+\tstruct device *dev = &vf->vfdev->dev;\n+\tstruct devlink *devlink;\n+\n+\tdevlink = devlink_alloc(&noop, 0, dev);\n+\tif (!devlink)\n+\t\treturn;\n+\n+\tdevl_nested_devlink_set(priv_to_devlink(vf->pf), devlink);\n+\tdevlink_register(devlink);\n+\tvf->devlink = devlink;\n+\n+\tice_devlink_vf_resources_register(vf);\n+}\n+\n+void ice_deinit_vf_devlink(struct ice_vf *vf)\n+{\n+\tstruct devlink *devlink = vf->devlink;\n+\n+\tdevlink_resources_unregister(devlink);\n+\tdevlink_unregister(devlink);\n+\tdevlink_free(devlink);\n+}\ndiff --git a/drivers/net/ethernet/intel/ice/virt/rss.c b/drivers/net/ethernet/intel/ice/virt/rss.c\nindex 960012ca91b5..9b23ad40f7e2 100644\n--- a/drivers/net/ethernet/intel/ice/virt/rss.c\n+++ b/drivers/net/ethernet/intel/ice/virt/rss.c\n@@ -1746,7 +1746,13 @@ int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg)\n \t\tgoto error_param;\n \t}\n \n-\tif (vrl->lut_entries != ICE_LUT_VSI_SIZE) {\n+\tvsi = ice_get_vf_vsi(vf);\n+\tif (!vsi) {\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\tgoto error_param;\n+\t}\n+\n+\tif (vrl->lut_entries != vsi->rss_table_size) {\n \t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n@@ -1762,7 +1768,7 @@ int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg)\n \t\tgoto error_param;\n \t}\n \n-\tif (ice_set_rss_lut(vsi, vrl->lut, ICE_LUT_VSI_SIZE))\n+\tif (ice_set_rss_lut(vsi, vrl->lut, vrl->lut_entries))\n \t\tv_ret = VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR;\n error_param:\n \treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_RSS_LUT, v_ret,\n@@ -1920,3 +1926,29 @@ int ice_vc_set_rss_hashcfg(struct ice_vf *vf, u8 *msg)\n \t\t\t\t     NULL, 0);\n }\n \n+int ice_vc_get_max_rss_qregion(struct ice_vf *vf)\n+{\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n+\tstruct virtchnl_max_rss_qregion max_rss_qregion = {};\n+\tstruct ice_vsi *vsi;\n+\tint err, len = 0;\n+\n+\tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\tgoto reply;\n+\t}\n+\n+\tvsi = vf->pf->vsi[vf->lan_vsi_idx];\n+\tif (!vsi) {\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\tgoto reply;\n+\t}\n+\n+\tlen = sizeof(max_rss_qregion);\n+\tmax_rss_qregion.vport_id = vsi->vsi_num;\n+\tmax_rss_qregion.qregion_width = ilog2(vsi->rss_table_size);\n+reply:\n+\terr = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_MAX_RSS_QREGION, v_ret,\n+\t\t\t\t    (u8 *)&max_rss_qregion, len);\n+\treturn err;\n+}\ndiff --git a/drivers/net/ethernet/intel/ice/virt/virtchnl.c b/drivers/net/ethernet/intel/ice/virt/virtchnl.c\nindex 06d2f9be93ae..b7ece2c36165 100644\n--- a/drivers/net/ethernet/intel/ice/virt/virtchnl.c\n+++ b/drivers/net/ethernet/intel/ice/virt/virtchnl.c\n@@ -246,10 +246,10 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)\n {\n \tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_vf_resource *vfres = NULL;\n+\tint ret, allowed_queues, len = 0;\n \tstruct ice_hw *hw = &vf->pf->hw;\n+\tenum ice_lut_type lut_type;\n \tstruct ice_vsi *vsi;\n-\tint len = 0;\n-\tint ret;\n \n \tif (ice_check_vf_init(vf)) {\n \t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n@@ -330,16 +330,24 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)\n \t\tvfres->vf_cap_flags |= VIRTCHNL_VF_CAP_PTP;\n \n \tvfres->num_vsis = 1;\n-\t/* Tx and Rx queue are equal for VF */\n-\tvfres->num_queue_pairs = vsi->num_txq;\n+\n+\tlut_type = vsi->rss_lut_type;\n+\tif (vf->driver_caps & VIRTCHNL_VF_LARGE_NUM_QPAIRS &&\n+\t    lut_type != ICE_LUT_VSI) {\n+\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_LARGE_NUM_QPAIRS;\n+\t\tallowed_queues = ice_lut_type_to_qs_num(lut_type);\n+\t} else {\n+\t\tallowed_queues = vsi->num_txq;\n+\t}\n+\tvfres->num_queue_pairs = allowed_queues;\n \tvfres->max_vectors = vf->num_msix;\n \tvfres->rss_key_size = ICE_VSIQF_HKEY_ARRAY_SIZE;\n-\tvfres->rss_lut_size = ICE_LUT_VSI_SIZE;\n+\tvfres->rss_lut_size = vsi->rss_table_size;\n \tvfres->max_mtu = ice_vc_get_max_frame_size(vf);\n \n \tvfres->vsi_res[0].vsi_id = ICE_VF_VSI_ID;\n \tvfres->vsi_res[0].vsi_type = VIRTCHNL_VSI_SRIOV;\n-\tvfres->vsi_res[0].num_queue_pairs = vsi->num_txq;\n+\tvfres->vsi_res[0].num_queue_pairs = allowed_queues;\n \tether_addr_copy(vfres->vsi_res[0].default_mac_addr,\n \t\t\tvf->hw_lan_addr);\n \n@@ -2539,6 +2547,10 @@ static const struct ice_virtchnl_ops ice_virtchnl_dflt_ops = {\n \t.cfg_q_quanta = ice_vc_cfg_q_quanta,\n \t.get_ptp_cap = ice_vc_get_ptp_cap,\n \t.get_phc_time = ice_vc_get_phc_time,\n+\t.get_max_rss_qregion = ice_vc_get_max_rss_qregion,\n+\t.ena_qs_v2_msg = ice_vc_ena_qs_v2_msg,\n+\t.dis_qs_v2_msg = ice_vc_dis_qs_v2_msg,\n+\t.map_q_vector_msg = ice_vc_map_q_vector_msg,\n \t/* If you add a new op here please make sure to add it to\n \t * ice_virtchnl_repr_ops as well.\n \t */\n@@ -2676,6 +2688,10 @@ static const struct ice_virtchnl_ops ice_virtchnl_repr_ops = {\n \t.cfg_q_quanta = ice_vc_cfg_q_quanta,\n \t.get_ptp_cap = ice_vc_get_ptp_cap,\n \t.get_phc_time = ice_vc_get_phc_time,\n+\t.get_max_rss_qregion = ice_vc_get_max_rss_qregion,\n+\t.ena_qs_v2_msg = ice_vc_ena_qs_v2_msg,\n+\t.dis_qs_v2_msg = ice_vc_dis_qs_v2_msg,\n+\t.map_q_vector_msg = ice_vc_map_q_vector_msg,\n };\n \n /**\n@@ -2745,6 +2761,7 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event,\n \tu32 v_opcode = le32_to_cpu(event->desc.cookie_high);\n \ts16 vf_id = le16_to_cpu(event->desc.retval);\n \tconst struct ice_virtchnl_ops *ops;\n+\tbool need_devlink_init = false;\n \tu16 msglen = event->msg_len;\n \tu8 *msg = event->msg_buf;\n \tstruct ice_vf *vf = NULL;\n@@ -2783,6 +2800,8 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event,\n \t\t\terr = -EINVAL;\n \t}\n \n+\tneed_devlink_init = !vf->devlink;\n+\n error_handler:\n \tif (err) {\n \t\tice_vc_send_msg_to_vf(vf, v_opcode, VIRTCHNL_STATUS_ERR_PARAM,\n@@ -2907,6 +2926,20 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event,\n \tcase VIRTCHNL_OP_GET_QOS_CAPS:\n \t\terr = ops->get_qos_caps(vf);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_GET_MAX_RSS_QREGION:\n+\t\terr = ops->get_max_rss_qregion(vf);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_ENABLE_QUEUES_V2:\n+\t\terr = ops->ena_qs_v2_msg(vf, msg, msglen);\n+\t\tif (!err)\n+\t\t\tice_vc_notify_vf_link_state(vf);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_DISABLE_QUEUES_V2:\n+\t\terr = ops->dis_qs_v2_msg(vf, msg, msglen);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_MAP_QUEUE_VECTOR:\n+\t\terr = ops->map_q_vector_msg(vf, msg, msglen);\n+\t\tbreak;\n \tcase VIRTCHNL_OP_CONFIG_QUEUE_BW:\n \t\terr = ops->cfg_q_bw(vf, msg);\n \t\tbreak;\n@@ -2938,5 +2971,7 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event,\n \n finish:\n \tmutex_unlock(&vf->cfg_lock);\n+\tif (need_devlink_init)\n+\t\tice_init_vf_devlink(vf);\n \tice_put_vf(vf);\n }\n",
    "prefixes": [
        "iwl-next",
        "v1",
        "15/15"
    ]
}