get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 840495,
    "url": "http://patchwork.ozlabs.org/api/patches/840495/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171122185711.29785.52716.stgit@localhost.localdomain/",
    "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": "<20171122185711.29785.52716.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-11-22T18:57:11",
    "name": "[jkirsher/next-queue,10/16] ixgbe: Don't assume dev->num_tc is equal to hardware TC config",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e66bdaa05bf79d2b8820e835e6b2d8899a96f34d",
    "submitter": {
        "id": 252,
        "url": "http://patchwork.ozlabs.org/api/people/252/?format=api",
        "name": "Alexander Duyck",
        "email": "alexander.duyck@gmail.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/20171122185711.29785.52716.stgit@localhost.localdomain/mbox/",
    "series": [
        {
            "id": 14756,
            "url": "http://patchwork.ozlabs.org/api/series/14756/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=14756",
            "date": "2017-11-22T18:56:10",
            "name": "ixgbe/fm10k: macvlan fixes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/14756/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/840495/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/840495/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.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"ON21a8Js\"; dkim-atps=neutral"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 3yhssg3tP2z9s3w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 23 Nov 2017 06:27:19 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 9B901871EB;\n\tWed, 22 Nov 2017 19:27:17 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id OHeqiKi-KRdV; Wed, 22 Nov 2017 19:27:16 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 31269870A4;\n\tWed, 22 Nov 2017 19:27:16 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id B9A2D1C2092\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Nov 2017 19:05:22 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B37CB8797B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Nov 2017 19:05:22 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ib_Dsj0EuWl0 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Nov 2017 19:05:21 +0000 (UTC)",
            "from mail-pl0-f67.google.com (mail-pl0-f67.google.com\n\t[209.85.160.67])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id CF2E687500\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Nov 2017 19:05:21 +0000 (UTC)",
            "by mail-pl0-f67.google.com with SMTP id s10so1262053plj.5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Nov 2017 11:05:21 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\ty79sm4352791pfb.113.2017.11.22.10.57.11\n\tfor <intel-wired-lan@lists.osuosl.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 22 Nov 2017 10:57:11 -0800 (PST)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=XAS7rZUPTF8ASnYPXZ79xeRJyh+GTsNjyHS2shCy8g0=;\n\tb=ON21a8Js+oyMHl6gfEomep6mniq44i6zdByAPtJw7rJmy2rfekORnmTrpL9p0OZ+80\n\tIe87KNFgniYBZFFeKHMENLjTmGzA8KDnYY+IQp8wZdYnT01C9fyeaOLEN54vZfcZv0MR\n\tdFm545vkLTUsRg+lOjwpA8r4d93jYl2MfNSJCu0zoZUn97mFZhpKi09jjmogF/6jTHHz\n\te1xEe0dHuwDfB7dpRizv3CuDnM/M23lir7h2KFkqW9FKrELOpNC9QqhJdvHAHOiBuw0L\n\tXmkZ7uF6vnbOdsKOL4mpIT8t7gqXvwJIoSx6hLnSeXsxcKgsqRFiYMwFvJnoX2TD0l2U\n\td7Gw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=XAS7rZUPTF8ASnYPXZ79xeRJyh+GTsNjyHS2shCy8g0=;\n\tb=ThgKvoP9rc6S29N6BYblOy4bdaC1gGrOdZBNhTa+R4FqRdJlUCmnzeiuMXWb0AwWgl\n\tkf1UCRY4nZ7+aY83ahcTqJ9NI6gtwUCmfh525Fx+w0tFdLSFLTE9KS03ZLlwly3wHchL\n\t5vtYEeN07UXyzKG5trULAccsttuW3PanHIM5CrJa8nWCowMzavvhSlbOB39CtIRziX6w\n\tRpyO7eLgl+sb7z/UpMMIWz+3ZekBBcF+youmip7S3kUrM/o5fuKfXIY5O7hITOz0N+WZ\n\tKidbdiZ+VZW/cb6wnFrdaknRPw4upNw+vPP3+k+qjRijZZ7BSscoasjwvsTX92kJYFSC\n\tG/CQ==",
        "X-Gm-Message-State": "AJaThX6kaCcVKrRFP41Z8ZNpvtGYz5fpxOqXh+vIizCsBprz2u07clHH\n\tShkFt2tpPNMdYGUB++eGt5GoVxEz",
        "X-Google-Smtp-Source": "AGs4zMZcaRvWf/9BvXPuC+69TluV9heHt1k+NyJtzfxNZeffDTYDs0ONAt6G6qRk0v/maRjQAeW8ng==",
        "X-Received": "by 10.84.235.135 with SMTP id p7mr18839911plk.94.1511377032008; \n\tWed, 22 Nov 2017 10:57:12 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 22 Nov 2017 10:57:11 -0800",
        "Message-ID": "<20171122185711.29785.52716.stgit@localhost.localdomain>",
        "In-Reply-To": "<20171122185256.29785.93548.stgit@localhost.localdomain>",
        "References": "<20171122185256.29785.93548.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [jkirsher/next-queue PATCH 10/16] ixgbe: Don't\n\tassume dev->num_tc is equal to hardware TC config",
        "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>",
        "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: Alexander Duyck <alexander.h.duyck@intel.com>\n\nThe code throughout ixgbe was assuming that dev->num_tc was populated and\nconfigured with the driver, when in fact this can be configured via mqprio\nwithout any hardware coordination other than restricting us to the real\nnumber of Tx queues we advertise.\n\nInstead of handling things this way we need to keep a local copy of the\nnumber of TCs in use so that we don't accidently pull in the TC\nconfiguration from mqprio when it is configured in software mode.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h         |    1 +\n drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c  |    2 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |    6 +++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c     |   17 ++++++++---------\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |   22 ++++++++++++----------\n drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c   |    8 ++++----\n 6 files changed, 29 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 09def116bb48..5891731984b1 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -672,6 +672,7 @@ struct ixgbe_adapter {\n \tstruct ieee_ets *ixgbe_ieee_ets;\n \tstruct ixgbe_dcb_config dcb_cfg;\n \tstruct ixgbe_dcb_config temp_dcb_cfg;\n+\tu8 hw_tcs;\n \tu8 dcb_set_bitmap;\n \tu8 dcbx_cap;\n \tenum ixgbe_fc_mode last_lfc_mode;\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c\nindex 78c52375acc6..b33f3f87e4b1 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c\n@@ -571,7 +571,7 @@ static int ixgbe_dcbnl_ieee_setets(struct net_device *dev,\n \tif (max_tc > adapter->dcb_cfg.num_tcs.pg_tcs)\n \t\treturn -EINVAL;\n \n-\tif (max_tc != netdev_get_num_tc(dev)) {\n+\tif (max_tc != adapter->hw_tcs) {\n \t\terr = ixgbe_setup_tc(dev, max_tc);\n \t\tif (err)\n \t\t\treturn err;\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\nindex 7634b1955863..539853aea8d2 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n@@ -3113,7 +3113,7 @@ static int ixgbe_get_ts_info(struct net_device *dev,\n static unsigned int ixgbe_max_channels(struct ixgbe_adapter *adapter)\n {\n \tunsigned int max_combined;\n-\tu8 tcs = netdev_get_num_tc(adapter->netdev);\n+\tu8 tcs = adapter->hw_tcs;\n \n \tif (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) {\n \t\t/* We only support one q_vector without MSI-X */\n@@ -3170,7 +3170,7 @@ static void ixgbe_get_channels(struct net_device *dev,\n \t\treturn;\n \n \t/* same thing goes for being DCB enabled */\n-\tif (netdev_get_num_tc(dev) > 1)\n+\tif (adapter->hw_tcs > 1)\n \t\treturn;\n \n \t/* if ATR is disabled we can exit */\n@@ -3216,7 +3216,7 @@ static int ixgbe_set_channels(struct net_device *dev,\n \n #endif\n \t/* use setup TC to update any traffic class queue mapping */\n-\treturn ixgbe_setup_tc(dev, netdev_get_num_tc(dev));\n+\treturn ixgbe_setup_tc(dev, adapter->hw_tcs);\n }\n \n static int ixgbe_get_module_info(struct net_device *dev,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c\nindex cceafbc3f1db..df23a57ddb56 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c\n@@ -47,7 +47,7 @@ static bool ixgbe_cache_ring_dcb_sriov(struct ixgbe_adapter *adapter)\n \tstruct ixgbe_ring_feature *vmdq = &adapter->ring_feature[RING_F_VMDQ];\n \tint i;\n \tu16 reg_idx;\n-\tu8 tcs = netdev_get_num_tc(adapter->netdev);\n+\tu8 tcs = adapter->hw_tcs;\n \n \t/* verify we have DCB queueing enabled before proceeding */\n \tif (tcs <= 1)\n@@ -111,9 +111,8 @@ static bool ixgbe_cache_ring_dcb_sriov(struct ixgbe_adapter *adapter)\n static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,\n \t\t\t\t    unsigned int *tx, unsigned int *rx)\n {\n-\tstruct net_device *dev = adapter->netdev;\n \tstruct ixgbe_hw *hw = &adapter->hw;\n-\tu8 num_tcs = netdev_get_num_tc(dev);\n+\tu8 num_tcs = adapter->hw_tcs;\n \n \t*tx = 0;\n \t*rx = 0;\n@@ -168,10 +167,9 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,\n  **/\n static bool ixgbe_cache_ring_dcb(struct ixgbe_adapter *adapter)\n {\n-\tstruct net_device *dev = adapter->netdev;\n+\tu8 num_tcs = adapter->hw_tcs;\n \tunsigned int tx_idx, rx_idx;\n \tint tc, offset, rss_i, i;\n-\tu8 num_tcs = netdev_get_num_tc(dev);\n \n \t/* verify we have DCB queueing enabled before proceeding */\n \tif (num_tcs <= 1)\n@@ -340,7 +338,7 @@ static bool ixgbe_set_dcb_sriov_queues(struct ixgbe_adapter *adapter)\n #ifdef IXGBE_FCOE\n \tu16 fcoe_i = 0;\n #endif\n-\tu8 tcs = netdev_get_num_tc(adapter->netdev);\n+\tu8 tcs = adapter->hw_tcs;\n \n \t/* verify we have DCB queueing enabled before proceeding */\n \tif (tcs <= 1)\n@@ -440,7 +438,7 @@ static bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter)\n \tint tcs;\n \n \t/* Map queue offset and counts onto allocated tx queues */\n-\ttcs = netdev_get_num_tc(dev);\n+\ttcs = adapter->hw_tcs;\n \n \t/* verify we have DCB queueing enabled before proceeding */\n \tif (tcs <= 1)\n@@ -839,7 +837,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter,\n \tint node = NUMA_NO_NODE;\n \tint cpu = -1;\n \tint ring_count, size;\n-\tu8 tcs = netdev_get_num_tc(adapter->netdev);\n+\tu8 tcs = adapter->hw_tcs;\n \n \tring_count = txr_count + rxr_count + xdp_count;\n \tsize = sizeof(struct ixgbe_q_vector) +\n@@ -1176,7 +1174,7 @@ static void ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)\n \t */\n \n \t/* Disable DCB unless we only have a single traffic class */\n-\tif (netdev_get_num_tc(adapter->netdev) > 1) {\n+\tif (adapter->hw_tcs > 1) {\n \t\te_dev_warn(\"Number of DCB TCs exceeds number of available queues. Disabling DCB support.\\n\");\n \t\tnetdev_reset_tc(adapter->netdev);\n \n@@ -1188,6 +1186,7 @@ static void ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)\n \t\tadapter->dcb_cfg.pfc_mode_enable = false;\n \t}\n \n+\tadapter->hw_tcs = 0;\n \tadapter->dcb_cfg.num_tcs.pg_tcs = 1;\n \tadapter->dcb_cfg.num_tcs.pfc_tcs = 1;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 611e6980b5ac..090d73df46cc 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -3572,7 +3572,7 @@ static void ixgbe_setup_mtqc(struct ixgbe_adapter *adapter)\n {\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \tu32 rttdcs, mtqc;\n-\tu8 tcs = netdev_get_num_tc(adapter->netdev);\n+\tu8 tcs = adapter->hw_tcs;\n \n \tif (hw->mac.type == ixgbe_mac_82598EB)\n \t\treturn;\n@@ -3927,7 +3927,7 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)\n \t\tif (adapter->ring_feature[RING_F_RSS].mask)\n \t\t\tmrqc = IXGBE_MRQC_RSSEN;\n \t} else {\n-\t\tu8 tcs = netdev_get_num_tc(adapter->netdev);\n+\t\tu8 tcs = adapter->hw_tcs;\n \n \t\tif (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {\n \t\t\tif (tcs > 4)\n@@ -5195,7 +5195,7 @@ static int ixgbe_lpbthresh(struct ixgbe_adapter *adapter, int pb)\n static void ixgbe_pbthresh_setup(struct ixgbe_adapter *adapter)\n {\n \tstruct ixgbe_hw *hw = &adapter->hw;\n-\tint num_tc = netdev_get_num_tc(adapter->netdev);\n+\tint num_tc = adapter->hw_tcs;\n \tint i;\n \n \tif (!num_tc)\n@@ -5218,7 +5218,7 @@ static void ixgbe_configure_pb(struct ixgbe_adapter *adapter)\n {\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \tint hdrm;\n-\tu8 tc = netdev_get_num_tc(adapter->netdev);\n+\tu8 tc = adapter->hw_tcs;\n \n \tif (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE ||\n \t    adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)\n@@ -8867,6 +8867,7 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc)\n \t\tnetdev_set_num_tc(dev, tc);\n \t\tixgbe_set_prio_tc_map(adapter);\n \n+\t\tadapter->hw_tcs = tc;\n \t\tadapter->flags |= IXGBE_FLAG_DCB_ENABLED;\n \n \t\tif (adapter->hw.mac.type == ixgbe_mac_82598EB) {\n@@ -8880,6 +8881,7 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc)\n \t\t\tadapter->hw.fc.requested_mode = adapter->last_lfc_mode;\n \n \t\tadapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;\n+\t\tadapter->hw_tcs = tc;\n \n \t\tadapter->temp_dcb_cfg.pfc_mode_enable = false;\n \t\tadapter->dcb_cfg.pfc_mode_enable = false;\n@@ -9410,7 +9412,7 @@ void ixgbe_sriov_reinit(struct ixgbe_adapter *adapter)\n \tstruct net_device *netdev = adapter->netdev;\n \n \trtnl_lock();\n-\tixgbe_setup_tc(netdev, netdev_get_num_tc(netdev));\n+\tixgbe_setup_tc(netdev, adapter->hw_tcs);\n \trtnl_unlock();\n }\n \n@@ -9486,7 +9488,7 @@ static int ixgbe_set_features(struct net_device *netdev,\n \t\t/* We cannot enable ATR if SR-IOV is enabled */\n \t\tif (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED ||\n \t\t    /* We cannot enable ATR if we have 2 or more tcs */\n-\t\t    (netdev_get_num_tc(netdev) > 1) ||\n+\t\t    (adapter->hw_tcs > 1) ||\n \t\t    /* We cannot enable ATR if RSS is disabled */\n \t\t    (adapter->ring_feature[RING_F_RSS].limit <= 1) ||\n \t\t    /* A sample rate of 0 indicates ATR disabled */\n@@ -9787,7 +9789,7 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)\n \tstruct ixgbe_fwd_adapter *fwd_adapter = NULL;\n \tstruct ixgbe_adapter *adapter = netdev_priv(pdev);\n \tint used_pools = adapter->num_vfs + adapter->num_rx_pools;\n-\tint tcs = netdev_get_num_tc(pdev) ? : 1;\n+\tint tcs = adapter->hw_tcs ? : 1;\n \tunsigned int limit;\n \tint pool, err;\n \n@@ -9833,7 +9835,7 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)\n \tadapter->ring_feature[RING_F_RSS].limit = vdev->num_tx_queues;\n \n \t/* Force reinit of ring allocation with VMDQ enabled */\n-\terr = ixgbe_setup_tc(pdev, netdev_get_num_tc(pdev));\n+\terr = ixgbe_setup_tc(pdev, adapter->hw_tcs);\n \tif (err)\n \t\tgoto fwd_add_err;\n \tfwd_adapter->pool = pool;\n@@ -9878,7 +9880,7 @@ static void ixgbe_fwd_del(struct net_device *pdev, void *priv)\n \t\tadapter->ring_feature[RING_F_RSS].limit = rss;\n \t}\n \n-\tixgbe_setup_tc(pdev, netdev_get_num_tc(pdev));\n+\tixgbe_setup_tc(pdev, adapter->hw_tcs);\n \tnetdev_dbg(pdev, \"pool %i:%i queues %i:%i\\n\",\n \t\t   fwd_adapter->pool, adapter->num_rx_pools,\n \t\t   fwd_adapter->rx_base_queue,\n@@ -9951,7 +9953,7 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)\n \n \t/* If transitioning XDP modes reconfigure rings */\n \tif (!!prog != !!old_prog) {\n-\t\tint err = ixgbe_setup_tc(dev, netdev_get_num_tc(dev));\n+\t\tint err = ixgbe_setup_tc(dev, adapter->hw_tcs);\n \n \t\tif (err) {\n \t\t\trcu_assign_pointer(adapter->xdp_prog, old_prog);\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\nindex 543f2e60e4b7..27a70a52f3c9 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n@@ -311,7 +311,7 @@ static int ixgbe_pci_sriov_enable(struct pci_dev *dev, int num_vfs)\n \t * than we have available pools. The PCI bus driver already checks for\n \t * other values out of range.\n \t */\n-\tnum_tc = netdev_get_num_tc(adapter->netdev);\n+\tnum_tc = adapter->hw_tcs;\n \tnum_rx_pools = adapter->num_rx_pools;\n \tlimit = (num_tc > 4) ? IXGBE_MAX_VFS_8TC :\n \t\t(num_tc > 1) ? IXGBE_MAX_VFS_4TC : IXGBE_MAX_VFS_1TC;\n@@ -713,7 +713,7 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)\n {\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \tstruct vf_data_storage *vfinfo = &adapter->vfinfo[vf];\n-\tu8 num_tcs = netdev_get_num_tc(adapter->netdev);\n+\tu8 num_tcs = adapter->hw_tcs;\n \n \t/* remove VLAN filters beloning to this VF */\n \tixgbe_clear_vf_vlans(adapter, vf);\n@@ -921,7 +921,7 @@ static int ixgbe_set_vf_vlan_msg(struct ixgbe_adapter *adapter,\n {\n \tu32 add = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK) >> IXGBE_VT_MSGINFO_SHIFT;\n \tu32 vid = (msgbuf[1] & IXGBE_VLVF_VLANID_MASK);\n-\tu8 tcs = netdev_get_num_tc(adapter->netdev);\n+\tu8 tcs = adapter->hw_tcs;\n \n \tif (adapter->vfinfo[vf].pf_vlan || tcs) {\n \t\te_warn(drv,\n@@ -1009,7 +1009,7 @@ static int ixgbe_get_vf_queues(struct ixgbe_adapter *adapter,\n \tstruct net_device *dev = adapter->netdev;\n \tstruct ixgbe_ring_feature *vmdq = &adapter->ring_feature[RING_F_VMDQ];\n \tunsigned int default_tc = 0;\n-\tu8 num_tcs = netdev_get_num_tc(dev);\n+\tu8 num_tcs = adapter->hw_tcs;\n \n \t/* verify the PF is supporting the correct APIs */\n \tswitch (adapter->vfinfo[vf].vf_api) {\n",
    "prefixes": [
        "jkirsher/next-queue",
        "10/16"
    ]
}