Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/48996/?format=api
https://patches.dpdk.org/api/patches/48996/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1545032259-77179-27-git-send-email-wenzhuo.lu@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1545032259-77179-27-git-send-email-wenzhuo.lu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1545032259-77179-27-git-send-email-wenzhuo.lu@intel.com", "date": "2018-12-17T07:37:34", "name": "[v5,26/31] net/ice: support EEPROM information getting", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "01b87363602d5d58df59edd5d1d9e5f84dd3bd2c", "submitter": { "id": 258, "url": "https://patches.dpdk.org/api/people/258/?format=api", "name": "Wenzhuo Lu", "email": "wenzhuo.lu@intel.com" }, "delegate": { "id": 1540, "url": "https://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1545032259-77179-27-git-send-email-wenzhuo.lu@intel.com/mbox/", "series": [ { "id": 2824, "url": "https://patches.dpdk.org/api/series/2824/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=2824", "date": "2018-12-17T07:37:08", "name": "A new net PMD - ICE", "version": 5, "mbox": "https://patches.dpdk.org/series/2824/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/48996/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/48996/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BE71D1BB09;\n\tMon, 17 Dec 2018 08:33:39 +0100 (CET)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 070461B5F5\n\tfor <dev@dpdk.org>; Mon, 17 Dec 2018 08:33:26 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Dec 2018 23:33:25 -0800", "from dpdk26.sh.intel.com ([10.67.110.164])\n\tby orsmga002.jf.intel.com with ESMTP; 16 Dec 2018 23:33:25 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,364,1539673200\"; d=\"scan'208\";a=\"118899336\"", "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>", "To": "dev@dpdk.org", "Cc": "Wenzhuo Lu <wenzhuo.lu@intel.com>,\n\tWei Zhao <wei.zhao1@intel.com>", "Date": "Mon, 17 Dec 2018 15:37:34 +0800", "Message-Id": "<1545032259-77179-27-git-send-email-wenzhuo.lu@intel.com>", "X-Mailer": "git-send-email 1.9.3", "In-Reply-To": "<1545032259-77179-1-git-send-email-wenzhuo.lu@intel.com>", "References": "<1542956179-80951-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1545032259-77179-1-git-send-email-wenzhuo.lu@intel.com>", "Subject": "[dpdk-dev] [PATCH v5 26/31] net/ice: support EEPROM information\n\tgetting", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add below ops,\nget_eeprom_length\nget_eeprom\n\nSigned-off-by: Wei Zhao <wei.zhao1@intel.com>\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\n---\n doc/guides/nics/features/ice.ini | 1 +\n drivers/net/ice/ice_ethdev.c | 45 ++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 46 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini\nindex 4867433..c939b52 100644\n--- a/doc/guides/nics/features/ice.ini\n+++ b/doc/guides/nics/features/ice.ini\n@@ -20,6 +20,7 @@ VLAN filter = Y\n VLAN offload = Y\n QinQ offload = Y\n FW version = Y\n+Module EEPROM dump = Y\n BSD nic_uio = Y\n Linux UIO = Y\n Linux VFIO = Y\ndiff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 13d233a..42460a4 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -56,6 +56,9 @@ static int ice_fw_version_get(struct rte_eth_dev *dev, char *fw_version,\n \t\t\t size_t fw_size);\n static int ice_vlan_pvid_set(struct rte_eth_dev *dev,\n \t\t\t uint16_t pvid, int on);\n+static int ice_get_eeprom_length(struct rte_eth_dev *dev);\n+static int ice_get_eeprom(struct rte_eth_dev *dev,\n+\t\t\t struct rte_dev_eeprom_info *eeprom);\n \n static const struct rte_pci_id pci_id_ice_map[] = {\n \t{ RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_BACKPLANE) },\n@@ -96,6 +99,8 @@ static int ice_vlan_pvid_set(struct rte_eth_dev *dev,\n \t.rx_queue_intr_disable = ice_rx_queue_intr_disable,\n \t.fw_version_get = ice_fw_version_get,\n \t.vlan_pvid_set = ice_vlan_pvid_set,\n+\t.get_eeprom_length = ice_get_eeprom_length,\n+\t.get_eeprom = ice_get_eeprom,\n };\n \n static void\n@@ -2581,6 +2586,46 @@ static int ice_rx_queue_intr_disable(struct rte_eth_dev *dev,\n }\n \n static int\n+ice_get_eeprom_length(struct rte_eth_dev *dev)\n+{\n+\tstruct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\n+\t/* Convert word count to byte count */\n+\treturn hw->nvm.sr_words << 1;\n+}\n+\n+static int\n+ice_get_eeprom(struct rte_eth_dev *dev,\n+\t struct rte_dev_eeprom_info *eeprom)\n+{\n+\tstruct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tuint16_t *data = eeprom->data;\n+\tuint16_t offset, length, i;\n+\tenum ice_status ret_code = ICE_SUCCESS;\n+\n+\toffset = eeprom->offset >> 1;\n+\tlength = eeprom->length >> 1;\n+\n+\tif (offset > hw->nvm.sr_words ||\n+\t offset + length > hw->nvm.sr_words) {\n+\t\tPMD_DRV_LOG(ERR, \"Requested EEPROM bytes out of range.\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\teeprom->magic = hw->vendor_id | (hw->device_id << 16);\n+\n+\tfor (i = 0; i < length; i++) {\n+\t\tret_code = ice_read_sr_word(hw, offset + i, &data[i]);\n+\t\tif (ret_code != ICE_SUCCESS) {\n+\t\t\tPMD_DRV_LOG(ERR, \"EEPROM read failed.\");\n+\t\t\treturn -EIO;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n ice_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t struct rte_pci_device *pci_dev)\n {\n", "prefixes": [ "v5", "26/31" ] }{ "id": 48996, "url": "