Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1247918/?format=api
{ "id": 1247918, "url": "http://patchwork.ozlabs.org/api/patches/1247918/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200302233107.4691-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": "<20200302233107.4691-6-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2020-03-02T23:31:07", "name": "[S34,v4,6/6] ice: Pass through communications to VF", "commit_ref": null, "pull_url": null, "state": "superseded", "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/20200302233107.4691-6-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 162010, "url": "http://patchwork.ozlabs.org/api/series/162010/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=162010", "date": "2020-03-02T23:31:07", "name": "[S34,v4,1/6] ice: Create and register virtual bus for RDMA", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/162010/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1247918/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1247918/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 48Wbyf4xpXz9sSQ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 3 Mar 2020 10:32:10 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 74987204F4;\n\tMon, 2 Mar 2020 23:32:08 +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 ogtgHZpEi95T; Mon, 2 Mar 2020 23:32:05 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id F1C252000B;\n\tMon, 2 Mar 2020 23:32:04 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 402D11BF25B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 2 Mar 2020 23:32:03 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 2AD5586303\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 2 Mar 2020 23:32:03 +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 ukeWXz50LOlu for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 2 Mar 2020 23:32:02 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 0DA2D85A67\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 2 Mar 2020 23:32:01 +0000 (UTC)", "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Mar 2020 15:32:01 -0800", "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga007.jf.intel.com with ESMTP; 02 Mar 2020 15:32:01 -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,509,1574150400\"; d=\"scan'208\";a=\"228655749\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 2 Mar 2020 15:31:07 -0800", "Message-Id": "<20200302233107.4691-6-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200302233107.4691-1-anthony.l.nguyen@intel.com>", "References": "<20200302233107.4691-1-anthony.l.nguyen@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH S34 v4 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 7b23050a8e52..f237df923ea1 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -391,6 +391,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": [ "S34", "v4", "6/6" ] }