get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 902058,
    "url": "http://patchwork.ozlabs.org/api/patches/902058/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180420084140.8081-7-alice.michael@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": "<20180420084140.8081-7-alice.michael@intel.com>",
    "list_archive_url": null,
    "date": "2018-04-20T08:41:39",
    "name": "[next,S90,7/8] i40e/i40evf: take into account queue map from vf when handling queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8364ac0603a824737e7f092ffef437662c04a90d",
    "submitter": {
        "id": 71123,
        "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api",
        "name": "Michael, Alice",
        "email": "alice.michael@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/20180420084140.8081-7-alice.michael@intel.com/mbox/",
    "series": [
        {
            "id": 40130,
            "url": "http://patchwork.ozlabs.org/api/series/40130/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=40130",
            "date": "2018-04-20T08:41:38",
            "name": "[next,S90,1/8] i40e/i40evf: cleanup incorrect function doxygen comments",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/40130/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/902058/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/902058/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\tdmarc=none (p=none dis=none) header.from=intel.com"
        ],
        "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 40SML633tPz9s1t\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 21 Apr 2018 02:50:38 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CCD8E88DE7;\n\tFri, 20 Apr 2018 16:50:36 +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 ReaNqKThtkDZ; Fri, 20 Apr 2018 16:50:31 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B45A988DC9;\n\tFri, 20 Apr 2018 16:50:31 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 971411CF121\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 20 Apr 2018 16:50:26 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 91EC322609\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 20 Apr 2018 16:50:26 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id s+v6TiFvWaKX for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 20 Apr 2018 16:50:25 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby silver.osuosl.org (Postfix) with ESMTPS id DB27E2EF15\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 20 Apr 2018 16:50:23 +0000 (UTC)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Apr 2018 09:50:22 -0700",
            "from alicemic-2.jf.intel.com ([10.166.16.121])\n\tby fmsmga008.fm.intel.com with ESMTP; 20 Apr 2018 09:50:22 -0700"
        ],
        "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.49,302,1520924400\"; d=\"scan'208\";a=\"34086384\"",
        "From": "Alice Michael <alice.michael@intel.com>",
        "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 20 Apr 2018 01:41:39 -0700",
        "Message-Id": "<20180420084140.8081-7-alice.michael@intel.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20180420084140.8081-1-alice.michael@intel.com>",
        "References": "<20180420084140.8081-1-alice.michael@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S90 7/8] i40e/i40evf: take into\n\taccount queue map from vf when handling queues",
        "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\nThe expectation of the ops VIRTCHNL_OP_ENABLE_QUEUES and\nVIRTCHNL_OP_DISABLE_QUEUES is that the queue map sent by\nthe VF is taken into account when enabling/disabling\nqueues in the VF VSI. This patch makes sure that happens.\n\nBy breaking out the individual queue set up functions so\nthat they can be called directly from the i40e_virtchnl_pf.c\nfile, only the queues as specified by the queue bit map that\naccompanies the enable/disable queues ops will be handled.\n\nSigned-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h             |  3 +\n drivers/net/ethernet/intel/i40e/i40e_main.c        | 40 +++++++++----\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 69 +++++++++++++++++++++-\n 3 files changed, 99 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 1d59ab6..7a80652 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -987,6 +987,9 @@ void i40e_service_event_schedule(struct i40e_pf *pf);\n void i40e_notify_client_of_vf_msg(struct i40e_vsi *vsi, u32 vf_id,\n \t\t\t\t  u8 *msg, u16 len);\n \n+int i40e_control_wait_tx_q(int seid, struct i40e_pf *pf, int pf_q, bool is_xdp,\n+\t\t\t   bool enable);\n+int i40e_control_wait_rx_q(struct i40e_pf *pf, int pf_q, bool enable);\n int i40e_vsi_start_rings(struct i40e_vsi *vsi);\n void i40e_vsi_stop_rings(struct i40e_vsi *vsi);\n void i40e_vsi_stop_rings_no_wait(struct  i40e_vsi *vsi);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 0babde1..b500bbf 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -4235,8 +4235,8 @@ static void i40e_control_tx_q(struct i40e_pf *pf, int pf_q, bool enable)\n  * @is_xdp: true if the queue is used for XDP\n  * @enable: start or stop the queue\n  **/\n-static int i40e_control_wait_tx_q(int seid, struct i40e_pf *pf, int pf_q,\n-\t\t\t\t  bool is_xdp, bool enable)\n+int i40e_control_wait_tx_q(int seid, struct i40e_pf *pf, int pf_q,\n+\t\t\t   bool is_xdp, bool enable)\n {\n \tint ret;\n \n@@ -4281,7 +4281,6 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable)\n \t\tif (ret)\n \t\t\tbreak;\n \t}\n-\n \treturn ret;\n }\n \n@@ -4320,9 +4319,9 @@ static int i40e_pf_rxq_wait(struct i40e_pf *pf, int pf_q, bool enable)\n  * @pf_q: the PF queue to configure\n  * @enable: start or stop the queue\n  *\n- * This function enables or disables a single queue. Note that any delay\n- * required after the operation is expected to be handled by the caller of\n- * this function.\n+ * This function enables or disables a single queue. Note that\n+ * any delay required after the operation is expected to be\n+ * handled by the caller of this function.\n  **/\n static void i40e_control_rx_q(struct i40e_pf *pf, int pf_q, bool enable)\n {\n@@ -4352,6 +4351,30 @@ static void i40e_control_rx_q(struct i40e_pf *pf, int pf_q, bool enable)\n }\n \n /**\n+ * i40e_control_wait_rx_q\n+ * @pf: the PF structure\n+ * @pf_q: queue being configured\n+ * @enable: start or stop the rings\n+ *\n+ * This function enables or disables a single queue along with waiting\n+ * for the change to finish. The caller of this function should handle\n+ * the delays needed in the case of disabling queues.\n+ **/\n+int i40e_control_wait_rx_q(struct i40e_pf *pf, int pf_q, bool enable)\n+{\n+\tint ret = 0;\n+\n+\ti40e_control_rx_q(pf, pf_q, enable);\n+\n+\t/* wait for the change to finish */\n+\tret = i40e_pf_rxq_wait(pf, pf_q, enable);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\treturn ret;\n+}\n+\n+/**\n  * i40e_vsi_control_rx - Start or stop a VSI's rings\n  * @vsi: the VSI being configured\n  * @enable: start or stop the rings\n@@ -4363,10 +4386,7 @@ static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable)\n \n \tpf_q = vsi->base_queue;\n \tfor (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {\n-\t\ti40e_control_rx_q(pf, pf_q, enable);\n-\n-\t\t/* wait for the change to finish */\n-\t\tret = i40e_pf_rxq_wait(pf, pf_q, enable);\n+\t\tret = i40e_control_wait_rx_q(pf, pf_q, enable);\n \t\tif (ret) {\n \t\t\tdev_info(&pf->pdev->dev,\n \t\t\t\t \"VSI seid %d Rx ring %d %sable timeout\\n\",\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex 2ceea63..c6d24ea 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -2154,6 +2154,51 @@ static int i40e_vc_config_irq_map_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)\n }\n \n /**\n+ * i40e_ctrl_vf_tx_rings\n+ * @vsi: the SRIOV VSI being configured\n+ * @q_map: bit map of the queues to be enabled\n+ * @enable: start or stop the queue\n+ **/\n+static int i40e_ctrl_vf_tx_rings(struct i40e_vsi *vsi, unsigned long q_map,\n+\t\t\t\t bool enable)\n+{\n+\tstruct i40e_pf *pf = vsi->back;\n+\tint ret = 0;\n+\tu16 q_id;\n+\n+\tfor_each_set_bit(q_id, &q_map, I40E_MAX_VF_QUEUES) {\n+\t\tret = i40e_control_wait_tx_q(vsi->seid, pf,\n+\t\t\t\t\t     vsi->base_queue + q_id,\n+\t\t\t\t\t     false /*is xdp*/, enable);\n+\t\tif (ret)\n+\t\t\tbreak;\n+\t}\n+\treturn ret;\n+}\n+\n+/**\n+ * i40e_ctrl_vf_rx_rings\n+ * @vsi: the SRIOV VSI being configured\n+ * @q_map: bit map of the queues to be enabled\n+ * @enable: start or stop the queue\n+ **/\n+static int i40e_ctrl_vf_rx_rings(struct i40e_vsi *vsi, unsigned long q_map,\n+\t\t\t\t bool enable)\n+{\n+\tstruct i40e_pf *pf = vsi->back;\n+\tint ret = 0;\n+\tu16 q_id;\n+\n+\tfor_each_set_bit(q_id, &q_map, I40E_MAX_VF_QUEUES) {\n+\t\tret = i40e_control_wait_rx_q(pf, vsi->base_queue + q_id,\n+\t\t\t\t\t     enable);\n+\t\tif (ret)\n+\t\t\tbreak;\n+\t}\n+\treturn ret;\n+}\n+\n+/**\n  * i40e_vc_enable_queues_msg\n  * @vf: pointer to the VF info\n  * @msg: pointer to the msg buffer\n@@ -2185,8 +2230,17 @@ static int i40e_vc_enable_queues_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)\n \t\tgoto error_param;\n \t}\n \n-\tif (i40e_vsi_start_rings(pf->vsi[vf->lan_vsi_idx]))\n+\t/* Use the queue bit map sent by the VF */\n+\tif (i40e_ctrl_vf_rx_rings(pf->vsi[vf->lan_vsi_idx], vqs->rx_queues,\n+\t\t\t\t  true)) {\n+\t\taq_ret = I40E_ERR_TIMEOUT;\n+\t\tgoto error_param;\n+\t}\n+\tif (i40e_ctrl_vf_tx_rings(pf->vsi[vf->lan_vsi_idx], vqs->tx_queues,\n+\t\t\t\t  true)) {\n \t\taq_ret = I40E_ERR_TIMEOUT;\n+\t\tgoto error_param;\n+\t}\n \n \t/* need to start the rings for additional ADq VSI's as well */\n \tif (vf->adq_enabled) {\n@@ -2234,8 +2288,17 @@ static int i40e_vc_disable_queues_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)\n \t\tgoto error_param;\n \t}\n \n-\ti40e_vsi_stop_rings(pf->vsi[vf->lan_vsi_idx]);\n-\n+\t/* Use the queue bit map sent by the VF */\n+\tif (i40e_ctrl_vf_tx_rings(pf->vsi[vf->lan_vsi_idx], vqs->tx_queues,\n+\t\t\t\t  false)) {\n+\t\taq_ret = I40E_ERR_TIMEOUT;\n+\t\tgoto error_param;\n+\t}\n+\tif (i40e_ctrl_vf_rx_rings(pf->vsi[vf->lan_vsi_idx], vqs->rx_queues,\n+\t\t\t\t  false)) {\n+\t\taq_ret = I40E_ERR_TIMEOUT;\n+\t\tgoto error_param;\n+\t}\n error_param:\n \t/* send the response to the VF */\n \treturn i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_DISABLE_QUEUES,\n",
    "prefixes": [
        "next",
        "S90",
        "7/8"
    ]
}