get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1226848,
    "url": "http://patchwork.ozlabs.org/api/patches/1226848/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200121162021.17107-6-anthony.l.nguyen@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": "<20200121162021.17107-6-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2020-01-21T16:20:21",
    "name": "[S34,v3,6/6] ice: Pass through communications to VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "b90f9a2af696b07d0e8fe0427c404f7fd70e850b",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@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/20200121162021.17107-6-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 154551,
            "url": "http://patchwork.ozlabs.org/api/series/154551/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=154551",
            "date": "2020-01-21T16:20:19",
            "name": "[S34,v3,1/6] ice: Create and register virtual bus for RDMA",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/154551/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1226848/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1226848/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; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.133;\n\thelo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 482Rj95DVtz9sRk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 22 Jan 2020 11:53:17 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E6C9987B0F;\n\tWed, 22 Jan 2020 00:53:15 +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 2ke0pdW8yZmR; Wed, 22 Jan 2020 00:53:14 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id F241287B25;\n\tWed, 22 Jan 2020 00:53:13 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id F3DF71BF475\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Jan 2020 00:53:11 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id F09D586005\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Jan 2020 00:53:11 +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 BJ3TvZT87ArV for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Jan 2020 00:53:09 +0000 (UTC)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 73C8A8686D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 22 Jan 2020 00:53:07 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t21 Jan 2020 16:53:06 -0800",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby FMSMGA003.fm.intel.com with ESMTP; 21 Jan 2020 16:53:05 -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.70,347,1574150400\"; d=\"scan'208\";a=\"275463005\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 21 Jan 2020 08:20:21 -0800",
        "Message-Id": "<20200121162021.17107-6-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200121162021.17107-1-anthony.l.nguyen@intel.com>",
        "References": "<20200121162021.17107-1-anthony.l.nguyen@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH S34 v3 6/6] ice: Pass through\n\tcommunications to VF",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "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: Dave Ertman <david.m.ertman@intel.com>\n\nAllow for forwarding of RDMA and VF virt channel messages. The driver will\nforward messages from the RDMA driver to the VF via the vc_send operation\nand invoke the peer's vc_receive() call when receiving a virt channel\nmessage destined for the peer driver.\n\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice.h          |  1 +\n drivers/net/ethernet/intel/ice/ice_idc.c      | 34 +++++++++++++++++++\n .../net/ethernet/intel/ice/ice_virtchnl_pf.c  | 34 +++++++++++++++++++\n 3 files changed, 69 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex 24ec228b99d8..8b33fe62198f 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -384,6 +384,7 @@ struct ice_pf {\n \tu32 msg_enable;\n \tu32 num_rdma_msix;\t/* Total MSIX vectors for RDMA driver */\n \tu32 rdma_base_vector;\n+\tstruct iidc_peer_dev *rdma_peer;\n \tu32 hw_csum_rx_error;\n \tu32 oicr_idx;\t\t/* Other interrupt cause MSIX vector index */\n \tu32 num_avail_sw_msix;\t/* remaining MSIX SW vectors left unclaimed */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_idc.c b/drivers/net/ethernet/intel/ice/ice_idc.c\nindex 6d625cc18a9d..0f884bf187f2 100644\n--- a/drivers/net/ethernet/intel/ice/ice_idc.c\n+++ b/drivers/net/ethernet/intel/ice/ice_idc.c\n@@ -1095,6 +1095,38 @@ ice_peer_update_vsi_filter(struct iidc_peer_dev *peer_dev,\n \treturn ret;\n }\n \n+/**\n+ * ice_peer_vc_send - send a virt channel message from RDMA peer\n+ * @peer_dev: pointer to RDMA peer dev\n+ * @vf_id: the absolute VF ID of recipient of message\n+ * @msg: pointer to message contents\n+ * @len: len of message\n+ */\n+static int\n+ice_peer_vc_send(struct iidc_peer_dev *peer_dev, u32 vf_id, u8 *msg, u16 len)\n+{\n+\tstruct ice_pf *pf;\n+\tint err;\n+\n+\tif (!ice_validate_peer_dev(peer_dev))\n+\t\treturn -EINVAL;\n+\tif (!msg || !len)\n+\t\treturn -ENOMEM;\n+\n+\tpf = pci_get_drvdata(peer_dev->pdev);\n+\tif (vf_id >= pf->num_alloc_vfs || len > ICE_AQ_MAX_BUF_LEN)\n+\t\treturn -EINVAL;\n+\n+\t/* VIRTCHNL_OP_IWARP is being used for RoCEv2 msg also */\n+\terr = ice_aq_send_msg_to_vf(&pf->hw, vf_id, VIRTCHNL_OP_IWARP, 0, msg,\n+\t\t\t\t    len, NULL);\n+\tif (err)\n+\t\tdev_err(ice_pf_to_dev(pf), \"Unable to send RDMA msg to VF, error %d\\n\",\n+\t\t\terr);\n+\n+\treturn err;\n+}\n+\n /* Initialize the ice_ops struct, which is used in 'ice_init_peer_devices' */\n static const struct iidc_ops ops = {\n \t.alloc_res\t\t\t= ice_peer_alloc_res,\n@@ -1107,6 +1139,7 @@ static const struct iidc_ops ops = {\n \t.peer_register\t\t\t= ice_peer_register,\n \t.peer_unregister\t\t= ice_peer_unregister,\n \t.update_vsi_filter\t\t= ice_peer_update_vsi_filter,\n+\t.vc_send\t\t\t= ice_peer_vc_send,\n };\n \n /**\n@@ -1286,6 +1319,7 @@ int ice_init_peer_devices(struct ice_pf *pf)\n \t\tswitch (ice_peers[i].id) {\n \t\tcase IIDC_PEER_RDMA_ID:\n \t\t\tif (test_bit(ICE_FLAG_IWARP_ENA, pf->flags)) {\n+\t\t\t\tpf->rdma_peer = peer_dev;\n \t\t\t\tpeer_dev->msix_count = pf->num_rdma_msix;\n \t\t\t\tentry = &pf->msix_entries[pf->rdma_base_vector];\n \t\t\t}\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\nindex c4f825650f30..d8016d104ca4 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n@@ -3031,6 +3031,37 @@ static int ice_vc_dis_vlan_stripping(struct ice_vf *vf)\n \t\t\t\t     v_ret, NULL, 0);\n }\n \n+/**\n+ * ice_vc_rdma_msg - send msg to RDMA PF from VF\n+ * @vf: pointer to VF info\n+ * @msg: pointer to msg buffer\n+ * @len: length of the message\n+ *\n+ * This function is called indirectly from the AQ clean function.\n+ */\n+static int ice_vc_rdma_msg(struct ice_vf *vf, u8 *msg, u16 len)\n+{\n+\tstruct iidc_peer_dev *rdma_peer;\n+\tint ret;\n+\n+\trdma_peer = vf->pf->rdma_peer;\n+\tif (!rdma_peer) {\n+\t\tpr_err(\"Invalid RDMA peer attempted to send message to peer\\n\");\n+\t\treturn -EIO;\n+\t}\n+\n+\tif (!rdma_peer->peer_ops || !rdma_peer->peer_ops->vc_receive) {\n+\t\tpr_err(\"Incomplete RMDA peer attempting to send msg\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tret = rdma_peer->peer_ops->vc_receive(rdma_peer, vf->vf_id, msg, len);\n+\tif (ret)\n+\t\tpr_err(\"Failed to send message to RDMA peer, error %d\\n\", ret);\n+\n+\treturn ret;\n+}\n+\n /**\n  * ice_vf_init_vlan_stripping - enable/disable VLAN stripping on initialization\n  * @vf: VF to enable/disable VLAN stripping for on initialization\n@@ -3166,6 +3197,9 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)\n \tcase VIRTCHNL_OP_DISABLE_VLAN_STRIPPING:\n \t\terr = ice_vc_dis_vlan_stripping(vf);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_IWARP:\n+\t\terr = ice_vc_rdma_msg(vf, msg, msglen);\n+\t\tbreak;\n \tcase VIRTCHNL_OP_UNKNOWN:\n \tdefault:\n \t\tdev_err(dev, \"Unsupported opcode %d from VF %d\\n\", v_opcode,\n",
    "prefixes": [
        "S34",
        "v3",
        "6/6"
    ]
}