Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1224512/?format=api
{ "id": 1224512, "url": "http://patchwork.ozlabs.org/api/patches/1224512/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200116230610.1868-1-shiraz.saleem@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": "<20200116230610.1868-1-shiraz.saleem@intel.com>", "list_archive_url": null, "date": "2020-01-16T23:06:09", "name": "[1/2] i40e: Move client header location", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "05164f90ec883f2ac6897c584661720c9bcc167c", "submitter": { "id": 69500, "url": "http://patchwork.ozlabs.org/api/people/69500/?format=api", "name": "Saleem, Shiraz", "email": "shiraz.saleem@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/20200116230610.1868-1-shiraz.saleem@intel.com/mbox/", "series": [ { "id": 153688, "url": "http://patchwork.ozlabs.org/api/series/153688/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=153688", "date": "2020-01-16T23:06:10", "name": "[1/2] i40e: Move client header location", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/153688/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1224512/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1224512/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 47zKZx00mhz9s1x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 17 Jan 2020 10:07:04 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8999A87F52;\n\tThu, 16 Jan 2020 23:07: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 KMP401QNkz4p; Thu, 16 Jan 2020 23:06:58 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5305B85BA7;\n\tThu, 16 Jan 2020 23:06:58 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 96A9C1BF39D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 16 Jan 2020 23:06:56 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 92D08203CA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 16 Jan 2020 23:06:56 +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 CNnvLNNpuS+k for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 16 Jan 2020 23:06:52 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 9231E203B5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 16 Jan 2020 23:06:52 +0000 (UTC)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Jan 2020 15:06:51 -0800", "from nmaznan-mobl1.gar.corp.intel.com (HELO\n\tssaleem-MOBL.amr.corp.intel.com) ([10.254.99.102])\n\tby fmsmga005.fm.intel.com with ESMTP; 16 Jan 2020 15:06:51 -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,327,1574150400\"; d=\"scan'208\";a=\"424242455\"", "From": "Shiraz Saleem <shiraz.saleem@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 16 Jan 2020 17:06:09 -0600", "Message-Id": "<20200116230610.1868-1-shiraz.saleem@intel.com>", "X-Mailer": "git-send-email 2.21.0", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 1/2] i40e: Move client header location", "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>", "Cc": "Shiraz Saleem <shiraz.saleem@intel.com>", "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: \"Shiraz Saleem\" <shiraz.saleem@intel.com>\n\nMove i40e_client.h to include/linux/net/intel/*\nsince its shared between i40iw and i40e.\n\nSigned-off-by: Shiraz Saleem <shiraz.saleem@intel.com>\n---\n drivers/infiniband/hw/i40iw/Makefile | 1 -\n drivers/infiniband/hw/i40iw/i40iw.h | 2 +-\n drivers/net/ethernet/intel/i40e/i40e.h | 2 +-\n drivers/net/ethernet/intel/i40e/i40e_client.c | 2 +-\n drivers/net/ethernet/intel/i40e/i40e_client.h | 203 --------------------------\n include/linux/net/intel/i40e_client.h | 203 ++++++++++++++++++++++++++\n 6 files changed, 206 insertions(+), 207 deletions(-)\n delete mode 100644 drivers/net/ethernet/intel/i40e/i40e_client.h\n create mode 100644 include/linux/net/intel/i40e_client.h", "diff": "diff --git a/drivers/infiniband/hw/i40iw/Makefile b/drivers/infiniband/hw/i40iw/Makefile\nindex 8942f82..34da9eb 100644\n--- a/drivers/infiniband/hw/i40iw/Makefile\n+++ b/drivers/infiniband/hw/i40iw/Makefile\n@@ -1,5 +1,4 @@\n # SPDX-License-Identifier: GPL-2.0\n-ccflags-y := -I $(srctree)/drivers/net/ethernet/intel/i40e\n \n obj-$(CONFIG_INFINIBAND_I40IW) += i40iw.o\n \ndiff --git a/drivers/infiniband/hw/i40iw/i40iw.h b/drivers/infiniband/hw/i40iw/i40iw.h\nindex 8feec35..f628325 100644\n--- a/drivers/infiniband/hw/i40iw/i40iw.h\n+++ b/drivers/infiniband/hw/i40iw/i40iw.h\n@@ -45,6 +45,7 @@\n #include <linux/slab.h>\n #include <linux/io.h>\n #include <linux/crc32c.h>\n+#include <linux/net/intel/i40e_client.h>\n #include <rdma/ib_smi.h>\n #include <rdma/ib_verbs.h>\n #include <rdma/ib_pack.h>\n@@ -57,7 +58,6 @@\n #include \"i40iw_d.h\"\n #include \"i40iw_hmc.h\"\n \n-#include <i40e_client.h>\n #include \"i40iw_type.h\"\n #include \"i40iw_p.h\"\n #include <rdma/i40iw-abi.h>\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 4833187..05453f55 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -38,7 +38,7 @@\n #include <net/xdp_sock.h>\n #include \"i40e_type.h\"\n #include \"i40e_prototype.h\"\n-#include \"i40e_client.h\"\n+#include <linux/net/intel/i40e_client.h>\n #include <linux/avf/virtchnl.h>\n #include \"i40e_virtchnl_pf.h\"\n #include \"i40e_txrx.h\"\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c\nindex e81530c..befd301 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_client.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c\n@@ -3,10 +3,10 @@\n \n #include <linux/list.h>\n #include <linux/errno.h>\n+#include <linux/net/intel/i40e_client.h>\n \n #include \"i40e.h\"\n #include \"i40e_prototype.h\"\n-#include \"i40e_client.h\"\n \n static const char i40e_client_interface_version_str[] = I40E_CLIENT_VERSION_STR;\n static struct i40e_client *registered_client;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_client.h b/drivers/net/ethernet/intel/i40e/i40e_client.h\ndeleted file mode 100644\nindex 72994ba..0000000\n--- a/drivers/net/ethernet/intel/i40e/i40e_client.h\n+++ /dev/null\n@@ -1,203 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0 */\n-/* Copyright(c) 2013 - 2018 Intel Corporation. */\n-\n-#ifndef _I40E_CLIENT_H_\n-#define _I40E_CLIENT_H_\n-\n-#define I40E_CLIENT_STR_LENGTH 10\n-\n-/* Client interface version should be updated anytime there is a change in the\n- * existing APIs or data structures.\n- */\n-#define I40E_CLIENT_VERSION_MAJOR 0\n-#define I40E_CLIENT_VERSION_MINOR 01\n-#define I40E_CLIENT_VERSION_BUILD 00\n-#define I40E_CLIENT_VERSION_STR \\\n-\t__stringify(I40E_CLIENT_VERSION_MAJOR) \".\" \\\n-\t__stringify(I40E_CLIENT_VERSION_MINOR) \".\" \\\n-\t__stringify(I40E_CLIENT_VERSION_BUILD)\n-\n-struct i40e_client_version {\n-\tu8 major;\n-\tu8 minor;\n-\tu8 build;\n-\tu8 rsvd;\n-};\n-\n-enum i40e_client_state {\n-\t__I40E_CLIENT_NULL,\n-\t__I40E_CLIENT_REGISTERED\n-};\n-\n-enum i40e_client_instance_state {\n-\t__I40E_CLIENT_INSTANCE_NONE,\n-\t__I40E_CLIENT_INSTANCE_OPENED,\n-};\n-\n-struct i40e_ops;\n-struct i40e_client;\n-\n-/* HW does not define a type value for AEQ; only for RX/TX and CEQ.\n- * In order for us to keep the interface simple, SW will define a\n- * unique type value for AEQ.\n- */\n-#define I40E_QUEUE_TYPE_PE_AEQ 0x80\n-#define I40E_QUEUE_INVALID_IDX\t0xFFFF\n-\n-struct i40e_qv_info {\n-\tu32 v_idx; /* msix_vector */\n-\tu16 ceq_idx;\n-\tu16 aeq_idx;\n-\tu8 itr_idx;\n-};\n-\n-struct i40e_qvlist_info {\n-\tu32 num_vectors;\n-\tstruct i40e_qv_info qv_info[1];\n-};\n-\n-#define I40E_CLIENT_MSIX_ALL 0xFFFFFFFF\n-\n-/* set of LAN parameters useful for clients managed by LAN */\n-\n-/* Struct to hold per priority info */\n-struct i40e_prio_qos_params {\n-\tu16 qs_handle; /* qs handle for prio */\n-\tu8 tc; /* TC mapped to prio */\n-\tu8 reserved;\n-};\n-\n-#define I40E_CLIENT_MAX_USER_PRIORITY 8\n-/* Struct to hold Client QoS */\n-struct i40e_qos_params {\n-\tstruct i40e_prio_qos_params prio_qos[I40E_CLIENT_MAX_USER_PRIORITY];\n-};\n-\n-struct i40e_params {\n-\tstruct i40e_qos_params qos;\n-\tu16 mtu;\n-};\n-\n-/* Structure to hold Lan device info for a client device */\n-struct i40e_info {\n-\tstruct i40e_client_version version;\n-\tu8 lanmac[6];\n-\tstruct net_device *netdev;\n-\tstruct pci_dev *pcidev;\n-\tu8 __iomem *hw_addr;\n-\tu8 fid;\t/* function id, PF id or VF id */\n-#define I40E_CLIENT_FTYPE_PF 0\n-#define I40E_CLIENT_FTYPE_VF 1\n-\tu8 ftype; /* function type, PF or VF */\n-\tvoid *pf;\n-\n-\t/* All L2 params that could change during the life span of the PF\n-\t * and needs to be communicated to the client when they change\n-\t */\n-\tstruct i40e_qvlist_info *qvlist_info;\n-\tstruct i40e_params params;\n-\tstruct i40e_ops *ops;\n-\n-\tu16 msix_count;\t /* number of msix vectors*/\n-\t/* Array down below will be dynamically allocated based on msix_count */\n-\tstruct msix_entry *msix_entries;\n-\tu16 itr_index; /* Which ITR index the PE driver is suppose to use */\n-\tu16 fw_maj_ver; /* firmware major version */\n-\tu16 fw_min_ver; /* firmware minor version */\n-\tu32 fw_build; /* firmware build number */\n-};\n-\n-#define I40E_CLIENT_RESET_LEVEL_PF 1\n-#define I40E_CLIENT_RESET_LEVEL_CORE 2\n-#define I40E_CLIENT_VSI_FLAG_TCP_ENABLE BIT(1)\n-\n-struct i40e_ops {\n-\t/* setup_q_vector_list enables queues with a particular vector */\n-\tint (*setup_qvlist)(struct i40e_info *ldev, struct i40e_client *client,\n-\t\t\t struct i40e_qvlist_info *qv_info);\n-\n-\tint (*virtchnl_send)(struct i40e_info *ldev, struct i40e_client *client,\n-\t\t\t u32 vf_id, u8 *msg, u16 len);\n-\n-\t/* If the PE Engine is unresponsive, RDMA driver can request a reset.\n-\t * The level helps determine the level of reset being requested.\n-\t */\n-\tvoid (*request_reset)(struct i40e_info *ldev,\n-\t\t\t struct i40e_client *client, u32 level);\n-\n-\t/* API for the RDMA driver to set certain VSI flags that control\n-\t * PE Engine.\n-\t */\n-\tint (*update_vsi_ctxt)(struct i40e_info *ldev,\n-\t\t\t struct i40e_client *client,\n-\t\t\t bool is_vf, u32 vf_id,\n-\t\t\t u32 flag, u32 valid_flag);\n-};\n-\n-struct i40e_client_ops {\n-\t/* Should be called from register_client() or whenever PF is ready\n-\t * to create a specific client instance.\n-\t */\n-\tint (*open)(struct i40e_info *ldev, struct i40e_client *client);\n-\n-\t/* Should be called when netdev is unavailable or when unregister\n-\t * call comes in. If the close is happenening due to a reset being\n-\t * triggered set the reset bit to true.\n-\t */\n-\tvoid (*close)(struct i40e_info *ldev, struct i40e_client *client,\n-\t\t bool reset);\n-\n-\t/* called when some l2 managed parameters changes - mtu */\n-\tvoid (*l2_param_change)(struct i40e_info *ldev,\n-\t\t\t\tstruct i40e_client *client,\n-\t\t\t\tstruct i40e_params *params);\n-\n-\tint (*virtchnl_receive)(struct i40e_info *ldev,\n-\t\t\t\tstruct i40e_client *client, u32 vf_id,\n-\t\t\t\tu8 *msg, u16 len);\n-\n-\t/* called when a VF is reset by the PF */\n-\tvoid (*vf_reset)(struct i40e_info *ldev,\n-\t\t\t struct i40e_client *client, u32 vf_id);\n-\n-\t/* called when the number of VFs changes */\n-\tvoid (*vf_enable)(struct i40e_info *ldev,\n-\t\t\t struct i40e_client *client, u32 num_vfs);\n-\n-\t/* returns true if VF is capable of specified offload */\n-\tint (*vf_capable)(struct i40e_info *ldev,\n-\t\t\t struct i40e_client *client, u32 vf_id);\n-};\n-\n-/* Client device */\n-struct i40e_client_instance {\n-\tstruct list_head list;\n-\tstruct i40e_info lan_info;\n-\tstruct i40e_client *client;\n-\tunsigned long state;\n-};\n-\n-struct i40e_client {\n-\tstruct list_head list;\t\t/* list of registered clients */\n-\tchar name[I40E_CLIENT_STR_LENGTH];\n-\tstruct i40e_client_version version;\n-\tunsigned long state;\t\t/* client state */\n-\tatomic_t ref_cnt; /* Count of all the client devices of this kind */\n-\tu32 flags;\n-#define I40E_CLIENT_FLAGS_LAUNCH_ON_PROBE\tBIT(0)\n-#define I40E_TX_FLAGS_NOTIFY_OTHER_EVENTS\tBIT(2)\n-\tu8 type;\n-#define I40E_CLIENT_IWARP 0\n-\tconst struct i40e_client_ops *ops; /* client ops provided by the client */\n-};\n-\n-static inline bool i40e_client_is_registered(struct i40e_client *client)\n-{\n-\treturn test_bit(__I40E_CLIENT_REGISTERED, &client->state);\n-}\n-\n-/* used by clients */\n-int i40e_register_client(struct i40e_client *client);\n-int i40e_unregister_client(struct i40e_client *client);\n-\n-#endif /* _I40E_CLIENT_H_ */\ndiff --git a/include/linux/net/intel/i40e_client.h b/include/linux/net/intel/i40e_client.h\nnew file mode 100644\nindex 0000000..72994ba\n--- /dev/null\n+++ b/include/linux/net/intel/i40e_client.h\n@@ -0,0 +1,203 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/* Copyright(c) 2013 - 2018 Intel Corporation. */\n+\n+#ifndef _I40E_CLIENT_H_\n+#define _I40E_CLIENT_H_\n+\n+#define I40E_CLIENT_STR_LENGTH 10\n+\n+/* Client interface version should be updated anytime there is a change in the\n+ * existing APIs or data structures.\n+ */\n+#define I40E_CLIENT_VERSION_MAJOR 0\n+#define I40E_CLIENT_VERSION_MINOR 01\n+#define I40E_CLIENT_VERSION_BUILD 00\n+#define I40E_CLIENT_VERSION_STR \\\n+\t__stringify(I40E_CLIENT_VERSION_MAJOR) \".\" \\\n+\t__stringify(I40E_CLIENT_VERSION_MINOR) \".\" \\\n+\t__stringify(I40E_CLIENT_VERSION_BUILD)\n+\n+struct i40e_client_version {\n+\tu8 major;\n+\tu8 minor;\n+\tu8 build;\n+\tu8 rsvd;\n+};\n+\n+enum i40e_client_state {\n+\t__I40E_CLIENT_NULL,\n+\t__I40E_CLIENT_REGISTERED\n+};\n+\n+enum i40e_client_instance_state {\n+\t__I40E_CLIENT_INSTANCE_NONE,\n+\t__I40E_CLIENT_INSTANCE_OPENED,\n+};\n+\n+struct i40e_ops;\n+struct i40e_client;\n+\n+/* HW does not define a type value for AEQ; only for RX/TX and CEQ.\n+ * In order for us to keep the interface simple, SW will define a\n+ * unique type value for AEQ.\n+ */\n+#define I40E_QUEUE_TYPE_PE_AEQ 0x80\n+#define I40E_QUEUE_INVALID_IDX\t0xFFFF\n+\n+struct i40e_qv_info {\n+\tu32 v_idx; /* msix_vector */\n+\tu16 ceq_idx;\n+\tu16 aeq_idx;\n+\tu8 itr_idx;\n+};\n+\n+struct i40e_qvlist_info {\n+\tu32 num_vectors;\n+\tstruct i40e_qv_info qv_info[1];\n+};\n+\n+#define I40E_CLIENT_MSIX_ALL 0xFFFFFFFF\n+\n+/* set of LAN parameters useful for clients managed by LAN */\n+\n+/* Struct to hold per priority info */\n+struct i40e_prio_qos_params {\n+\tu16 qs_handle; /* qs handle for prio */\n+\tu8 tc; /* TC mapped to prio */\n+\tu8 reserved;\n+};\n+\n+#define I40E_CLIENT_MAX_USER_PRIORITY 8\n+/* Struct to hold Client QoS */\n+struct i40e_qos_params {\n+\tstruct i40e_prio_qos_params prio_qos[I40E_CLIENT_MAX_USER_PRIORITY];\n+};\n+\n+struct i40e_params {\n+\tstruct i40e_qos_params qos;\n+\tu16 mtu;\n+};\n+\n+/* Structure to hold Lan device info for a client device */\n+struct i40e_info {\n+\tstruct i40e_client_version version;\n+\tu8 lanmac[6];\n+\tstruct net_device *netdev;\n+\tstruct pci_dev *pcidev;\n+\tu8 __iomem *hw_addr;\n+\tu8 fid;\t/* function id, PF id or VF id */\n+#define I40E_CLIENT_FTYPE_PF 0\n+#define I40E_CLIENT_FTYPE_VF 1\n+\tu8 ftype; /* function type, PF or VF */\n+\tvoid *pf;\n+\n+\t/* All L2 params that could change during the life span of the PF\n+\t * and needs to be communicated to the client when they change\n+\t */\n+\tstruct i40e_qvlist_info *qvlist_info;\n+\tstruct i40e_params params;\n+\tstruct i40e_ops *ops;\n+\n+\tu16 msix_count;\t /* number of msix vectors*/\n+\t/* Array down below will be dynamically allocated based on msix_count */\n+\tstruct msix_entry *msix_entries;\n+\tu16 itr_index; /* Which ITR index the PE driver is suppose to use */\n+\tu16 fw_maj_ver; /* firmware major version */\n+\tu16 fw_min_ver; /* firmware minor version */\n+\tu32 fw_build; /* firmware build number */\n+};\n+\n+#define I40E_CLIENT_RESET_LEVEL_PF 1\n+#define I40E_CLIENT_RESET_LEVEL_CORE 2\n+#define I40E_CLIENT_VSI_FLAG_TCP_ENABLE BIT(1)\n+\n+struct i40e_ops {\n+\t/* setup_q_vector_list enables queues with a particular vector */\n+\tint (*setup_qvlist)(struct i40e_info *ldev, struct i40e_client *client,\n+\t\t\t struct i40e_qvlist_info *qv_info);\n+\n+\tint (*virtchnl_send)(struct i40e_info *ldev, struct i40e_client *client,\n+\t\t\t u32 vf_id, u8 *msg, u16 len);\n+\n+\t/* If the PE Engine is unresponsive, RDMA driver can request a reset.\n+\t * The level helps determine the level of reset being requested.\n+\t */\n+\tvoid (*request_reset)(struct i40e_info *ldev,\n+\t\t\t struct i40e_client *client, u32 level);\n+\n+\t/* API for the RDMA driver to set certain VSI flags that control\n+\t * PE Engine.\n+\t */\n+\tint (*update_vsi_ctxt)(struct i40e_info *ldev,\n+\t\t\t struct i40e_client *client,\n+\t\t\t bool is_vf, u32 vf_id,\n+\t\t\t u32 flag, u32 valid_flag);\n+};\n+\n+struct i40e_client_ops {\n+\t/* Should be called from register_client() or whenever PF is ready\n+\t * to create a specific client instance.\n+\t */\n+\tint (*open)(struct i40e_info *ldev, struct i40e_client *client);\n+\n+\t/* Should be called when netdev is unavailable or when unregister\n+\t * call comes in. If the close is happenening due to a reset being\n+\t * triggered set the reset bit to true.\n+\t */\n+\tvoid (*close)(struct i40e_info *ldev, struct i40e_client *client,\n+\t\t bool reset);\n+\n+\t/* called when some l2 managed parameters changes - mtu */\n+\tvoid (*l2_param_change)(struct i40e_info *ldev,\n+\t\t\t\tstruct i40e_client *client,\n+\t\t\t\tstruct i40e_params *params);\n+\n+\tint (*virtchnl_receive)(struct i40e_info *ldev,\n+\t\t\t\tstruct i40e_client *client, u32 vf_id,\n+\t\t\t\tu8 *msg, u16 len);\n+\n+\t/* called when a VF is reset by the PF */\n+\tvoid (*vf_reset)(struct i40e_info *ldev,\n+\t\t\t struct i40e_client *client, u32 vf_id);\n+\n+\t/* called when the number of VFs changes */\n+\tvoid (*vf_enable)(struct i40e_info *ldev,\n+\t\t\t struct i40e_client *client, u32 num_vfs);\n+\n+\t/* returns true if VF is capable of specified offload */\n+\tint (*vf_capable)(struct i40e_info *ldev,\n+\t\t\t struct i40e_client *client, u32 vf_id);\n+};\n+\n+/* Client device */\n+struct i40e_client_instance {\n+\tstruct list_head list;\n+\tstruct i40e_info lan_info;\n+\tstruct i40e_client *client;\n+\tunsigned long state;\n+};\n+\n+struct i40e_client {\n+\tstruct list_head list;\t\t/* list of registered clients */\n+\tchar name[I40E_CLIENT_STR_LENGTH];\n+\tstruct i40e_client_version version;\n+\tunsigned long state;\t\t/* client state */\n+\tatomic_t ref_cnt; /* Count of all the client devices of this kind */\n+\tu32 flags;\n+#define I40E_CLIENT_FLAGS_LAUNCH_ON_PROBE\tBIT(0)\n+#define I40E_TX_FLAGS_NOTIFY_OTHER_EVENTS\tBIT(2)\n+\tu8 type;\n+#define I40E_CLIENT_IWARP 0\n+\tconst struct i40e_client_ops *ops; /* client ops provided by the client */\n+};\n+\n+static inline bool i40e_client_is_registered(struct i40e_client *client)\n+{\n+\treturn test_bit(__I40E_CLIENT_REGISTERED, &client->state);\n+}\n+\n+/* used by clients */\n+int i40e_register_client(struct i40e_client *client);\n+int i40e_unregister_client(struct i40e_client *client);\n+\n+#endif /* _I40E_CLIENT_H_ */\n", "prefixes": [ "1/2" ] }