get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 36149,
    "url": "https://patches.dpdk.org/api/patches/36149/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1521193331-25177-1-git-send-email-zijie.pan@6wind.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": "<1521193331-25177-1-git-send-email-zijie.pan@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1521193331-25177-1-git-send-email-zijie.pan@6wind.com",
    "date": "2018-03-16T09:42:11",
    "name": "[dpdk-dev,v2,3/5] net/ixgbe: add module EEPROM callbacks for ixgbe",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "bc222da34158acf0692cbae8f9f71b053dc5d7ad",
    "submitter": {
        "id": 991,
        "url": "https://patches.dpdk.org/api/people/991/?format=api",
        "name": "Zijie Pan",
        "email": "zijie.pan@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1521193331-25177-1-git-send-email-zijie.pan@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/36149/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/36149/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 264785F2D;\n\tFri, 16 Mar 2018 10:42:32 +0100 (CET)",
            "from mail-wr0-f196.google.com (mail-wr0-f196.google.com\n\t[209.85.128.196]) by dpdk.org (Postfix) with ESMTP id B712F5B12\n\tfor <dev@dpdk.org>; Fri, 16 Mar 2018 10:42:30 +0100 (CET)",
            "by mail-wr0-f196.google.com with SMTP id z12so11052352wrg.4\n\tfor <dev@dpdk.org>; Fri, 16 Mar 2018 02:42:30 -0700 (PDT)",
            "from cougar.6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tp21sm1060783wmc.0.2018.03.16.02.42.29\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 16 Mar 2018 02:42:29 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=FwlpPnnHbrj3R23nZvguCOi/gJ/NyWivD+xvp5c5hNM=;\n\tb=jg9tBQV09UYWPa2BEZJ0mFN/bmFYcaWM26RF4+ij6zRZ3EDz0nu3NaptiCkZWx5vKr\n\t1/3d711y0tyWOr1mB9vwOlhr0rf7texyQQwUJwts23CvY62lIFsJ9fk5+LImkHEg5ZJy\n\t0eZGLdj7UaP0rKU8cobEbwCcfNhMs1dhE1ohuH6WGVaLzixhOhYE5LW9vdiPWbfz9oUc\n\t6wkpsHLA39gg1Ib2PeOWgDWVTGfqSFjoBOV6mfUlc89L8qWTttwG5Cla/+Vo0S8fLfoC\n\tdQ0+tPN/duM+paKabcZOyG78NfZcXU7SJG2k5dFub7fuFT8eKMI9a298c1yJH4B7Km+i\n\tQ4dw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=FwlpPnnHbrj3R23nZvguCOi/gJ/NyWivD+xvp5c5hNM=;\n\tb=pfRUFdATRPV7f2RKl+DpXC3nnub2dPVprHBzTDx45DUpT0CYJRHIFa5vsQv17I1ROC\n\tZq2f54AKtkCWbDsoQt+pzrPaGRwp2CM+VSwjOuYnxzjNycFLMCm5NDrsPDloU0gQFYP+\n\tOnPs5SPkL5iQoiDlbA2cz9Qk+JCb7XyghiZ/NeCHrkYP5zSoXif2H+bhnKiOdzadUXl5\n\tAqRPMXLB+aGWaG3UtFr6wbAWHO5IQsAjuzdaLB0ovD1TQRgod2t6D4f9ZX0avnDjEY1M\n\tIDxRBHLqi4/dZhjd/j62r2zLyIIj8GJfwWPBP7h+4r0NeLyWI0bkgd4uo5a+Zn+WJIm9\n\tRj7w==",
        "X-Gm-Message-State": "AElRT7G6P45KJLLYh1zoBpupaPG3WoTgU9C6JG/cGtwzPU5kgV/DvIqN\n\troYqM+8GxVySD8anTqAp3XBmBGrFTuo=",
        "X-Google-Smtp-Source": "AG47ELuVrLXqensdK+Orx/z5zsVNXfDemNoOCp/RDLAVmPy3wjBlU1F3yyy7KzWbePcuNd4cDMuejQ==",
        "X-Received": "by 10.223.139.130 with SMTP id o2mr1072523wra.147.1521193350217; \n\tFri, 16 Mar 2018 02:42:30 -0700 (PDT)",
        "From": "Zijie Pan <zijie.pan@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "remy.horton@intel.com, wenzhuo.lu@intel.com, konstantin.ananyev@intel.com",
        "Date": "Fri, 16 Mar 2018 10:42:11 +0100",
        "Message-Id": "<1521193331-25177-1-git-send-email-zijie.pan@6wind.com>",
        "X-Mailer": "git-send-email 1.7.10.4",
        "In-Reply-To": "<1520828243-25191-4-git-send-email-zijie.pan@6wind.com>",
        "References": "<1520828243-25191-4-git-send-email-zijie.pan@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/5] net/ixgbe: add module EEPROM callbacks\n\tfor ixgbe",
        "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/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 new callbacks for eth_dev_ops of ixgbe to get the information\nand data of plugin module eeprom.\n\nSigned-off-by: Zijie Pan <zijie.pan@6wind.com>\n---\n drivers/net/ixgbe/ixgbe_ethdev.c |   79 ++++++++++++++++++++++++++++++++++++++\n 1 file changed, 79 insertions(+)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex 4483258..28f09d3 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -328,6 +328,11 @@ static int ixgbe_get_eeprom(struct rte_eth_dev *dev,\n static int ixgbe_set_eeprom(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_dev_eeprom_info *eeprom);\n \n+static int ixgbe_get_module_info(struct rte_eth_dev *dev,\n+\t\t\t\t struct rte_dev_module_info *modinfo);\n+static int ixgbe_get_module_eeprom(struct rte_eth_dev *dev,\n+\t\t\t\t   struct rte_dev_eeprom_info *info);\n+\n static int ixgbevf_get_reg_length(struct rte_eth_dev *dev);\n static int ixgbevf_get_regs(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_dev_reg_info *regs);\n@@ -565,6 +570,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,\n \t.get_eeprom_length    = ixgbe_get_eeprom_length,\n \t.get_eeprom           = ixgbe_get_eeprom,\n \t.set_eeprom           = ixgbe_set_eeprom,\n+\t.get_module_info      = ixgbe_get_module_info,\n+\t.get_module_eeprom    = ixgbe_get_module_eeprom,\n \t.get_dcb_info         = ixgbe_dev_get_dcb_info,\n \t.timesync_adjust_time = ixgbe_timesync_adjust_time,\n \t.timesync_read_time   = ixgbe_timesync_read_time,\n@@ -7166,6 +7173,78 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)\n \treturn eeprom->ops.write_buffer(hw,  first, length, data);\n }\n \n+static int\n+ixgbe_get_module_info(struct rte_eth_dev *dev,\n+\t\t      struct rte_dev_module_info *modinfo)\n+{\n+\tstruct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tuint32_t status;\n+\tuint8_t sff8472_rev, addr_mode;\n+\tbool page_swap = false;\n+\n+\t/* Check whether we support SFF-8472 or not */\n+\tstatus = hw->phy.ops.read_i2c_eeprom(hw,\n+\t\t\t\t\t     IXGBE_SFF_SFF_8472_COMP,\n+\t\t\t\t\t     &sff8472_rev);\n+\tif (status != 0)\n+\t\treturn -EIO;\n+\n+\t/* addressing mode is not supported */\n+\tstatus = hw->phy.ops.read_i2c_eeprom(hw,\n+\t\t\t\t\t     IXGBE_SFF_SFF_8472_SWAP,\n+\t\t\t\t\t     &addr_mode);\n+\tif (status != 0)\n+\t\treturn -EIO;\n+\n+\tif (addr_mode & IXGBE_SFF_ADDRESSING_MODE) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"Address change required to access page 0xA2, \"\n+\t\t\t    \"but not supported. Please report the module \"\n+\t\t\t    \"type to the driver maintainers.\");\n+\t\tpage_swap = true;\n+\t}\n+\n+\tif (sff8472_rev == IXGBE_SFF_SFF_8472_UNSUP || page_swap) {\n+\t\t/* We have a SFP, but it does not support SFF-8472 */\n+\t\tmodinfo->type = ETH_MODULE_SFF_8079;\n+\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;\n+\t} else {\n+\t\t/* We have a SFP which supports a revision of SFF-8472. */\n+\t\tmodinfo->type = ETH_MODULE_SFF_8472;\n+\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+ixgbe_get_module_eeprom(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_dev_eeprom_info *info)\n+{\n+\tstruct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tuint32_t status = IXGBE_ERR_PHY_ADDR_INVALID;\n+\tuint8_t databyte = 0xFF;\n+\tuint8_t *data = info->data;\n+\tuint32_t i = 0;\n+\n+\tif (info->length == 0)\n+\t\treturn -EINVAL;\n+\n+\tfor (i = info->offset; i < info->offset + info->length; i++) {\n+\t\tif (i < ETH_MODULE_SFF_8079_LEN)\n+\t\t\tstatus = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte);\n+\t\telse\n+\t\t\tstatus = hw->phy.ops.read_i2c_sff8472(hw, i, &databyte);\n+\n+\t\tif (status != 0)\n+\t\t\treturn -EIO;\n+\n+\t\tdata[i - info->offset] = databyte;\n+\t}\n+\n+\treturn 0;\n+}\n+\n uint16_t\n ixgbe_reta_size_get(enum ixgbe_mac_type mac_type) {\n \tswitch (mac_type) {\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "3/5"
    ]
}