Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/860163/?format=api
{ "id": 860163, "url": "http://patchwork.ozlabs.org/api/patches/860163/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180112193251.11739-3-jeffrey.t.kirsher@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": "<20180112193251.11739-3-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2018-01-12T19:32:42", "name": "[03/12] i40evf : add ndo_setup_tc callback to i40evf", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5b9553a34e9c192355000ac773e84d811b53291f", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180112193251.11739-3-jeffrey.t.kirsher@intel.com/mbox/", "series": [ { "id": 23043, "url": "http://patchwork.ozlabs.org/api/series/23043/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=23043", "date": "2018-01-12T19:32:45", "name": "[01/12] i40evf: Fix link up issue when queues are disabled", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/23043/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/860163/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/860163/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@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zJCZf1Lh3z9sBd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 13 Jan 2018 06:32:58 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id BA81489EF8;\n\tFri, 12 Jan 2018 19:32:56 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id tLDbDq13-cRB; Fri, 12 Jan 2018 19:32:53 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 6522289F0B;\n\tFri, 12 Jan 2018 19:32:53 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 6135C1C002D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:50 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5596A89F28\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:50 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id WieHZAsk24bb for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:48 +0000 (UTC)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 14A5789E92\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:48 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Jan 2018 11:32:47 -0800", "from jtkirshe-nuc.jf.intel.com ([134.134.177.151])\n\tby orsmga003.jf.intel.com with ESMTP; 12 Jan 2018 11:32:47 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.46,350,1511856000\"; d=\"scan'208\";a=\"19654866\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 12 Jan 2018 11:32:42 -0800", "Message-Id": "<20180112193251.11739-3-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.14.3", "In-Reply-To": "<20180112193251.11739-1-jeffrey.t.kirsher@intel.com>", "References": "<20180112193251.11739-1-jeffrey.t.kirsher@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 03/12] i40evf : add ndo_setup_tc callback\n\tto i40evf", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<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\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>\n\nThis patch introduces the callback to the ndo_setup_tc function\nin the VF driver. We add a wrapper function to make room for the\nupcoming cloud filter patches which add calls to different functions\nfrom setup_tc.\n\nFirst, we add support for capability exchange for ADQ between the\nPF and VF. Next, we add support to take in the mqprio configuration\nand configure queues as per the traffic classes, rate limit and the\npriorities specified by the user. This is done by passing the channel\nconfig to the PF driver through a virtchannel message.\n\nThe flags and bits added, track if ADq is enabled, set max number of\ntraffic classes to 4 and provide ability to negotiate capability with\nthe PF.\n\nSigned-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>\n---\n drivers/net/ethernet/intel/i40evf/i40evf.h | 22 +++\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 154 +++++++++++++++++++++\n .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 82 ++++++++++-\n 3 files changed, 257 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h\nindex 89ce2f9a0fbe..c8d68c8d2c33 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h\n@@ -52,6 +52,7 @@\n #include <linux/socket.h>\n #include <linux/jiffies.h>\n #include <net/ip6_checksum.h>\n+#include <net/pkt_cls.h>\n #include <net/udp.h>\n \n #include \"i40e_type.h\"\n@@ -168,6 +169,20 @@ struct i40evf_vlan_filter {\n \tbool add;\t\t/* filter needs to be added */\n };\n \n+#define I40EVF_MAX_TRAFFIC_CLASS\t4\n+/* State of traffic class creation */\n+enum i40evf_tc_state_t {\n+\t__I40EVF_TC_INVALID, /* no traffic class, default state */\n+\t__I40EVF_TC_RUNNING, /* traffic classes have been created */\n+};\n+\n+/* channel info */\n+struct i40evf_channel_config {\n+\tstruct virtchnl_channel_info ch_info[I40EVF_MAX_TRAFFIC_CLASS];\n+\tenum i40evf_tc_state_t state;\n+\tu8 total_qps;\n+};\n+\n /* Driver state. The order of these is important! */\n enum i40evf_state_t {\n \t__I40EVF_STARTUP,\t\t/* driver loaded, probe complete */\n@@ -269,6 +284,8 @@ struct i40evf_adapter {\n #define I40EVF_FLAG_AQ_RELEASE_ALLMULTI\t\tBIT(18)\n #define I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING\tBIT(19)\n #define I40EVF_FLAG_AQ_DISABLE_VLAN_STRIPPING\tBIT(20)\n+#define I40EVF_FLAG_AQ_ENABLE_CHANNELS\t\tBIT(21)\n+#define I40EVF_FLAG_AQ_DISABLE_CHANNELS\t\tBIT(22)\n \n \t/* OS defined structs */\n \tstruct net_device *netdev;\n@@ -314,6 +331,9 @@ struct i40evf_adapter {\n \tu16 rss_lut_size;\n \tu8 *rss_key;\n \tu8 *rss_lut;\n+\t/* ADQ related members */\n+\tstruct i40evf_channel_config ch_config;\n+\tu8 num_tc;\n };\n \n \n@@ -380,4 +400,6 @@ void i40evf_notify_client_message(struct i40e_vsi *vsi, u8 *msg, u16 len);\n void i40evf_notify_client_l2_params(struct i40e_vsi *vsi);\n void i40evf_notify_client_open(struct i40e_vsi *vsi);\n void i40evf_notify_client_close(struct i40e_vsi *vsi, bool reset);\n+void i40evf_enable_channels(struct i40evf_adapter *adapter);\n+void i40evf_disable_channels(struct i40evf_adapter *adapter);\n #endif /* _I40EVF_H_ */\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 3014a5e3fbcc..ec0275f8b7ef 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -1714,6 +1714,17 @@ static void i40evf_watchdog_task(struct work_struct *work)\n \t\ti40evf_set_promiscuous(adapter, 0);\n \t\tgoto watchdog_done;\n \t}\n+\n+\tif (adapter->aq_required & I40EVF_FLAG_AQ_ENABLE_CHANNELS) {\n+\t\ti40evf_enable_channels(adapter);\n+\t\tgoto watchdog_done;\n+\t}\n+\n+\tif (adapter->aq_required & I40EVF_FLAG_AQ_DISABLE_CHANNELS) {\n+\t\ti40evf_disable_channels(adapter);\n+\t\tgoto watchdog_done;\n+\t}\n+\n \tschedule_delayed_work(&adapter->client_task, msecs_to_jiffies(5));\n \n \tif (adapter->state == __I40EVF_RUNNING)\n@@ -2193,6 +2204,148 @@ void i40evf_free_all_rx_resources(struct i40evf_adapter *adapter)\n \t\t\ti40evf_free_rx_resources(&adapter->rx_rings[i]);\n }\n \n+/**\n+ * i40evf_validate_channel_config - validate queue mapping info\n+ * @adapter: board private structure\n+ * @mqprio_qopt: queue parameters\n+ *\n+ * This function validates if the config provided by the user to\n+ * configure queue channels is valid or not. Returns 0 on a valid\n+ * config.\n+ **/\n+static int i40evf_validate_ch_config(struct i40evf_adapter *adapter,\n+\t\t\t\t struct tc_mqprio_qopt_offload *mqprio_qopt)\n+{\n+\tint i, num_qps = 0;\n+\n+\tif (mqprio_qopt->qopt.num_tc > I40EVF_MAX_TRAFFIC_CLASS ||\n+\t mqprio_qopt->qopt.num_tc < 1)\n+\t\treturn -EINVAL;\n+\n+\tfor (i = 0; i <= mqprio_qopt->qopt.num_tc - 1; i++) {\n+\t\tif (!mqprio_qopt->qopt.count[i] ||\n+\t\t mqprio_qopt->min_rate[i] ||\n+\t\t mqprio_qopt->max_rate[i] ||\n+\t\t mqprio_qopt->qopt.offset[i] != num_qps)\n+\t\t\treturn -EINVAL;\n+\t\tnum_qps += mqprio_qopt->qopt.count[i];\n+\t}\n+\tif (num_qps > MAX_QUEUES)\n+\t\treturn -EINVAL;\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * __i40evf_setup_tc - configure multiple traffic classes\n+ * @netdev: network interface device structure\n+ * @type_date: tc offload data\n+ *\n+ * This function processes the config information provided by the\n+ * user to configure traffic classes/queue channels and packages the\n+ * information to request the PF to setup traffic classes.\n+ *\n+ * Returns 0 on success.\n+ **/\n+static int __i40evf_setup_tc(struct net_device *netdev, void *type_data)\n+{\n+\tstruct tc_mqprio_qopt_offload *mqprio_qopt = type_data;\n+\tstruct i40evf_adapter *adapter = netdev_priv(netdev);\n+\tstruct virtchnl_vf_resource *vfres = adapter->vf_res;\n+\tu8 num_tc = 0, total_qps = 0;\n+\tint ret = 0, netdev_tc = 0;\n+\tu16 mode;\n+\tint i;\n+\n+\tnum_tc = mqprio_qopt->qopt.num_tc;\n+\tmode = mqprio_qopt->mode;\n+\n+\t/* delete queue_channel */\n+\tif (!mqprio_qopt->qopt.hw) {\n+\t\tif (adapter->ch_config.state == __I40EVF_TC_RUNNING) {\n+\t\t\t/* reset the tc configuration */\n+\t\t\tnetdev_reset_tc(netdev);\n+\t\t\tadapter->num_tc = 0;\n+\t\t\tnetif_tx_stop_all_queues(netdev);\n+\t\t\tnetif_tx_disable(netdev);\n+\t\t\tadapter->aq_required = I40EVF_FLAG_AQ_DISABLE_CHANNELS;\n+\t\t\tgoto exit;\n+\t\t} else {\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\t/* add queue channel */\n+\tif (mode == TC_MQPRIO_MODE_CHANNEL) {\n+\t\tif (!(vfres->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADQ)) {\n+\t\t\tdev_err(&adapter->pdev->dev, \"ADq not supported\\n\");\n+\t\t\treturn -EOPNOTSUPP;\n+\t\t}\n+\t\tif (adapter->ch_config.state != __I40EVF_TC_INVALID) {\n+\t\t\tdev_err(&adapter->pdev->dev, \"TC configuration already exists\\n\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tret = i40evf_validate_ch_config(adapter, mqprio_qopt);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t\t/* Return if same TC config is requested */\n+\t\tif (adapter->num_tc == num_tc)\n+\t\t\treturn 0;\n+\t\tadapter->num_tc = num_tc;\n+\n+\t\tfor (i = 0; i < I40EVF_MAX_TRAFFIC_CLASS; i++) {\n+\t\t\tif (i < num_tc) {\n+\t\t\t\tadapter->ch_config.ch_info[i].count =\n+\t\t\t\t\tmqprio_qopt->qopt.count[i];\n+\t\t\t\tadapter->ch_config.ch_info[i].offset =\n+\t\t\t\t\tmqprio_qopt->qopt.offset[i];\n+\t\t\t\ttotal_qps += mqprio_qopt->qopt.count[i];\n+\t\t\t} else {\n+\t\t\t\tadapter->ch_config.ch_info[i].count = 1;\n+\t\t\t\tadapter->ch_config.ch_info[i].offset = 0;\n+\t\t\t}\n+\t\t}\n+\t\tadapter->ch_config.total_qps = total_qps;\n+\t\tnetif_tx_stop_all_queues(netdev);\n+\t\tnetif_tx_disable(netdev);\n+\t\tadapter->aq_required |= I40EVF_FLAG_AQ_ENABLE_CHANNELS;\n+\t\tnetdev_reset_tc(netdev);\n+\t\t/* Report the tc mapping up the stack */\n+\t\tnetdev_set_num_tc(adapter->netdev, num_tc);\n+\t\tfor (i = 0; i < I40EVF_MAX_TRAFFIC_CLASS; i++) {\n+\t\t\tu16 qcount = mqprio_qopt->qopt.count[i];\n+\t\t\tu16 qoffset = mqprio_qopt->qopt.offset[i];\n+\n+\t\t\tif (i < num_tc)\n+\t\t\t\tnetdev_set_tc_queue(netdev, netdev_tc++, qcount,\n+\t\t\t\t\t\t qoffset);\n+\t\t}\n+\t}\n+exit:\n+\treturn ret;\n+}\n+\n+/**\n+ * i40evf_setup_tc - configure multiple traffic classes\n+ * @netdev: network interface device structure\n+ * @type: type of offload\n+ * @type_date: tc offload data\n+ *\n+ * This function is the callback to ndo_setup_tc in the\n+ * netdev_ops.\n+ *\n+ * Returns 0 on success\n+ **/\n+static int i40evf_setup_tc(struct net_device *netdev, enum tc_setup_type type,\n+\t\t\t void *type_data)\n+{\n+\tif (type != TC_SETUP_QDISC_MQPRIO)\n+\t\treturn -EOPNOTSUPP;\n+\n+\treturn __i40evf_setup_tc(netdev, type_data);\n+}\n+\n /**\n * i40evf_open - Called when a network interface is made active\n * @netdev: network interface device structure\n@@ -2460,6 +2613,7 @@ static const struct net_device_ops i40evf_netdev_ops = {\n #ifdef CONFIG_NET_POLL_CONTROLLER\n \t.ndo_poll_controller\t= i40evf_netpoll,\n #endif\n+\t.ndo_setup_tc\t\t= i40evf_setup_tc,\n };\n \n /**\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\nindex 9f8c007c1a99..8329f37f431e 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n@@ -161,7 +161,8 @@ int i40evf_send_vf_config_msg(struct i40evf_adapter *adapter)\n \t VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 |\n \t VIRTCHNL_VF_OFFLOAD_ENCAP |\n \t VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM |\n-\t VIRTCHNL_VF_OFFLOAD_REQ_QUEUES;\n+\t VIRTCHNL_VF_OFFLOAD_REQ_QUEUES |\n+\t VIRTCHNL_VF_OFFLOAD_ADQ;\n \n \tadapter->current_op = VIRTCHNL_OP_GET_VF_RESOURCES;\n \tadapter->aq_required &= ~I40EVF_FLAG_AQ_GET_CONFIG;\n@@ -972,6 +973,70 @@ static void i40evf_print_link_message(struct i40evf_adapter *adapter)\n \tnetdev_info(netdev, \"NIC Link is Up %sbps Full Duplex\\n\", speed);\n }\n \n+/**\n+ * i40evf_enable_channel\n+ * @adapter: adapter structure\n+ *\n+ * Request that the PF enable channels as specified by\n+ * the user via tc tool.\n+ **/\n+void i40evf_enable_channels(struct i40evf_adapter *adapter)\n+{\n+\tstruct virtchnl_tc_info *vti = NULL;\n+\tu16 len;\n+\tint i;\n+\n+\tif (adapter->current_op != VIRTCHNL_OP_UNKNOWN) {\n+\t\t/* bail because we already have a command pending */\n+\t\tdev_err(&adapter->pdev->dev, \"Cannot configure mqprio, command %d pending\\n\",\n+\t\t\tadapter->current_op);\n+\t\treturn;\n+\t}\n+\n+\tlen = (adapter->num_tc * sizeof(struct virtchnl_channel_info)) +\n+\t sizeof(struct virtchnl_tc_info);\n+\n+\tvti = kzalloc(len, GFP_KERNEL);\n+\tif (!vti)\n+\t\treturn;\n+\tvti->num_tc = adapter->num_tc;\n+\tfor (i = 0; i < vti->num_tc; i++) {\n+\t\tvti->list[i].count = adapter->ch_config.ch_info[i].count;\n+\t\tvti->list[i].offset = adapter->ch_config.ch_info[i].offset;\n+\t}\n+\n+\tadapter->ch_config.state = __I40EVF_TC_RUNNING;\n+\tadapter->flags |= I40EVF_FLAG_REINIT_ITR_NEEDED;\n+\tadapter->current_op = VIRTCHNL_OP_ENABLE_CHANNELS;\n+\tadapter->aq_required &= ~I40EVF_FLAG_AQ_ENABLE_CHANNELS;\n+\ti40evf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_CHANNELS,\n+\t\t\t (u8 *)vti, len);\n+\tkfree(vti);\n+}\n+\n+/**\n+ * i40evf_disable_channel\n+ * @adapter: adapter structure\n+ *\n+ * Request that the PF disable channels that are configured\n+ **/\n+void i40evf_disable_channels(struct i40evf_adapter *adapter)\n+{\n+\tif (adapter->current_op != VIRTCHNL_OP_UNKNOWN) {\n+\t\t/* bail because we already have a command pending */\n+\t\tdev_err(&adapter->pdev->dev, \"Cannot configure mqprio, command %d pending\\n\",\n+\t\t\tadapter->current_op);\n+\t\treturn;\n+\t}\n+\n+\tadapter->ch_config.state = __I40EVF_TC_INVALID;\n+\tadapter->flags |= I40EVF_FLAG_REINIT_ITR_NEEDED;\n+\tadapter->current_op = VIRTCHNL_OP_DISABLE_CHANNELS;\n+\tadapter->aq_required &= ~I40EVF_FLAG_AQ_DISABLE_CHANNELS;\n+\ti40evf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_CHANNELS,\n+\t\t\t NULL, 0);\n+}\n+\n /**\n * i40evf_request_reset\n * @adapter: adapter structure\n@@ -1080,6 +1145,21 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,\n \t\t\tdev_err(&adapter->pdev->dev, \"Failed to delete MAC filter, error %s\\n\",\n \t\t\t\ti40evf_stat_str(&adapter->hw, v_retval));\n \t\t\tbreak;\n+\t\tcase VIRTCHNL_OP_ENABLE_CHANNELS:\n+\t\t\tdev_err(&adapter->pdev->dev, \"Failed to configure queue channels, error %s\\n\",\n+\t\t\t\ti40evf_stat_str(&adapter->hw, v_retval));\n+\t\t\tadapter->flags &= ~I40EVF_FLAG_REINIT_ITR_NEEDED;\n+\t\t\tadapter->ch_config.state = __I40EVF_TC_INVALID;\n+\t\t\tnetdev_reset_tc(netdev);\n+\t\t\tnetif_tx_start_all_queues(netdev);\n+\t\t\tbreak;\n+\t\tcase VIRTCHNL_OP_DISABLE_CHANNELS:\n+\t\t\tdev_err(&adapter->pdev->dev, \"Failed to disable queue channels, error %s\\n\",\n+\t\t\t\ti40evf_stat_str(&adapter->hw, v_retval));\n+\t\t\tadapter->flags &= ~I40EVF_FLAG_REINIT_ITR_NEEDED;\n+\t\t\tadapter->ch_config.state = __I40EVF_TC_RUNNING;\n+\t\t\tnetif_tx_start_all_queues(netdev);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tdev_err(&adapter->pdev->dev, \"PF returned error %d (%s) to our request %d\\n\",\n \t\t\t\tv_retval,\n", "prefixes": [ "03/12" ] }