get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1264469,
    "url": "http://patchwork.ozlabs.org/api/patches/1264469/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200331011053.339291-6-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": "<20200331011053.339291-6-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2020-03-31T01:10:53",
    "name": "[next-queue,v5,6/6] ice: Pass through communications to VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b90f9a2af696b07d0e8fe0427c404f7fd70e850b",
    "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/20200331011053.339291-6-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [
        {
            "id": 167727,
            "url": "http://patchwork.ozlabs.org/api/series/167727/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=167727",
            "date": "2020-03-31T01:10:53",
            "name": "[next-queue,v5,1/6] ice: Create and register virtual bus for RDMA",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/167727/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1264469/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1264469/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.136;\n\thelo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 48rrqv0kmFz9sPF\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 31 Mar 2020 12:11:06 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2E49623B88;\n\tTue, 31 Mar 2020 01:11:05 +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 o9bnSTwgWQAd; Tue, 31 Mar 2020 01:11:03 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id DF6EB23735;\n\tTue, 31 Mar 2020 01:11:03 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id D7F191BF982\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Mar 2020 01:11:01 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D4B278610E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Mar 2020 01:11:01 +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 sblygeWB7_Og for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Mar 2020 01:11:01 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 60B8686239\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Mar 2020 01:11:00 +0000 (UTC)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; \n\t30 Mar 2020 18:10:59 -0700",
            "from jtkirshe-desk1.jf.intel.com ([134.134.177.86])\n\tby orsmga001.jf.intel.com with ESMTP; 30 Mar 2020 18:10:58 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "IronPort-SDR": [
            "+uJGOTrHZdg3dv+6sns0iEjqA7uClUG3Ou0CsFg6wOYntzBZ1Vr2AdsiORY3NLcQAX7D6o0lBi\n\teaV6oBDG5xSQ==",
            "5fX/1B4h0AjHFfTudAKLdtp1/w2VhqDpAysAJqpGiJHOZmpWykuvu+j3kpqm7VMwBaV2CFxt2H\n\taH3ZziA/0yiQ=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,326,1580803200\"; d=\"scan'208\";a=\"327925975\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Mon, 30 Mar 2020 18:10:53 -0700",
        "Message-Id": "<20200331011053.339291-6-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200331011053.339291-1-jeffrey.t.kirsher@intel.com>",
        "References": "<20200331011053.339291-1-jeffrey.t.kirsher@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next-queue v5 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>\nTested-by: Andrew Bowers <andrewx.bowers@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 b9e21af84502..107d3dc5333c 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -397,6 +397,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 5e1877772245..c8b6f0ea45fb 100644\n--- a/drivers/net/ethernet/intel/ice/ice_idc.c\n+++ b/drivers/net/ethernet/intel/ice/ice_idc.c\n@@ -1070,6 +1070,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@@ -1082,6 +1114,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@@ -1263,6 +1296,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 68c2717407f8..1aac440f199b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n@@ -3169,6 +3169,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@@ -3303,6 +3334,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": [
        "next-queue",
        "v5",
        "6/6"
    ]
}