get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 140137,
    "url": "http://patchwork.dpdk.org/api/1.0/patches/140137/?format=api",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/1.0/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"
    },
    "msgid": "<20240516081243.576723-1-shaiqwani@intel.com>",
    "date": "2024-05-16T08:12:43",
    "name": "[v1] net/cpfl: check if DPDK is running on host IMC ACC",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "41926bd559faad41d8afcc213f72cb126c6d8bf7",
    "submitter": {
        "id": 3328,
        "url": "http://patchwork.dpdk.org/api/1.0/people/3328/?format=api",
        "name": "Shaiq Wani",
        "email": "shaiqwani@intel.com"
    },
    "delegate": {
        "id": 10,
        "url": "http://patchwork.dpdk.org/api/1.0/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240516081243.576723-1-shaiqwani@intel.com/mbox/",
    "series": [
        {
            "id": 31936,
            "url": "http://patchwork.dpdk.org/api/1.0/series/31936/?format=api",
            "date": "2024-05-16T08:12:43",
            "name": "[v1] net/cpfl: check if DPDK is running on host IMC ACC",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/31936/mbox/"
        }
    ],
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/140137/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DB97844042;\n\tThu, 16 May 2024 10:17:05 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 530BF4026E;\n\tThu, 16 May 2024 10:17:05 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [198.175.65.10])\n by mails.dpdk.org (Postfix) with ESMTP id D4D324025C\n for <dev@dpdk.org>; Thu, 16 May 2024 10:13:16 +0200 (CEST)",
            "from orviesa002.jf.intel.com ([10.64.159.142])\n by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 May 2024 01:13:16 -0700",
            "from unknown (HELO srv24.iind.intel.com) ([10.138.167.40])\n by orviesa002.jf.intel.com with ESMTP; 16 May 2024 01:13:14 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1715847197; x=1747383197;\n h=from:to:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=C7pPfM1/neqSSpmrnJeDm/vMC59CJ+wdpv08QqHYiVU=;\n b=Jh3IplrTmIQPi3yGj/usDIIfieIJZaZgslLURid9icPNRLuWBHBNDQzh\n EIQu+4d78T2XLnS8RTu17iuSJ0Jdgtk8QXwQ6I7zmiRwmI3ueN3MQz+GL\n sUHEOmG93RC38DC+6jLmK7oVQuhHm9NZC8JxChsQvgnim/zZSLg58F+0f\n Rx9ynwA9AwyuinwGesMZMFgcbCX16aR2NeUXUkUNsP4dGr1Id9+ZS9AaH\n 2RNbMrGsG9XKYidBZqtpR3B7vXukStazwbt1wDLSoD0jAZ+qwPQGUoov4\n zN5xZzkgiW3wIxthq/hFlLjSEJeGto5ItOozsNmjaU79vDtT7qUKzfgI/ g==;",
        "X-CSE-ConnectionGUID": [
            "bZVNZqr+Q7WWjtQ58t/vHQ==",
            "BNj7f15nSXiSz8P0OunUXA=="
        ],
        "X-CSE-MsgGUID": [
            "FxnUGWxuS5mU55TzwwJ3aQ==",
            "54f7WpydRrqilnGYNoPsPg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,11074\"; a=\"29440854\"",
            "E=Sophos;i=\"6.08,163,1712646000\"; d=\"scan'208\";a=\"29440854\"",
            "E=Sophos;i=\"6.08,163,1712646000\"; d=\"scan'208\";a=\"62191984\""
        ],
        "X-ExtLoop1": "1",
        "From": "Shaiq Wani <shaiqwani@intel.com>",
        "To": "dev@dpdk.org",
        "Subject": "[PATCH v1] net/cpfl: check if DPDK is running on host IMC ACC",
        "Date": "Thu, 16 May 2024 08:12:43 +0000",
        "Message-Id": "<20240516081243.576723-1-shaiqwani@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Thu, 16 May 2024 10:17:04 +0200",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Checks if DPDK is running on host, IMC or ACC\n\nSigned-off-by: Shaiq Wani <shaiqwani@intel.com>\n---\n get_running_host_id.patch | 70 +++++++++++++++++++++++++++++++++++++++\n 1 file changed, 70 insertions(+)\n create mode 100644 get_running_host_id.patch",
    "diff": "diff --git a/get_running_host_id.patch b/get_running_host_id.patch\nnew file mode 100644\nindex 0000000000..32aa3445ab\n--- /dev/null\n+++ b/get_running_host_id.patch\n@@ -0,0 +1,70 @@\n+diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c\n+index ef19aa1b6a..cc708039da 100644\n+--- a/drivers/net/cpfl/cpfl_ethdev.c\n++++ b/drivers/net/cpfl/cpfl_ethdev.c\n+@@ -2270,6 +2270,33 @@ cpfl_repr_allowlist_uninit(struct cpfl_adapter_ext *adapter)\n+\trte_hash_free(adapter->repr_allowlist_hash);\n+}\n++static uint8_t\n++get_running_host_id(void)\n++{\n++\tchar buf[BUFSIZ];\n++\tFILE *fd;\n++\tuint8_t host_id = CPFL_INVALID_HOST_ID;\n++\n++\tfd = fopen(\"/etc/issue.net\", \"r\");\n++\tif (fd == NULL) {\n++\t\tPMD_INIT_LOG(ERR, \"Cannot open /etc/issue.net\\n\");\n++\t\treturn host_id;\n++\t}\n++\n++\tif (fgets(buf, sizeof(buf), fd)) {\n++\t\t/* get the first line */\n++\t\tif (strstr(buf, \"IMC\")) {\n++\t\t\tPMD_INIT_LOG(ERR, \"CPFL PMD cannot running on IMC.\");\n++\t\t} else if (strstr(buf, \"ACC\")) {\n++\t\t\thost_id = CPFL_HOST_ID_ACC;\n++\t\t} else {\n++\t\t\thost_id = CPFL_HOST_ID_HOST;\n++\t\t}\n++\t}\n++\n++\tfclose(fd);\n++\treturn host_id;\n++}\n+static int\n+cpfl_adapter_ext_init(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *adapter,\n+@@ -2290,6 +2317,7 @@ cpfl_adapter_ext_init(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *a\n+\thw->device_id = pci_dev->id.device_id;\n+\thw->subsystem_vendor_id = pci_dev->id.subsystem_vendor_id;\n++\tadapter->host_id = get_running_host_id();\n+\tstrncpy(adapter->name, pci_dev->device.name, PCI_PRI_STR_SIZE);\n+\trte_memcpy(&base->caps, &req_caps, sizeof(struct virtchnl2_get_capabilities));\n+diff --git a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h\n+index 457db6d6be..3987afbd82 100644\n+--- a/drivers/net/cpfl/cpfl_ethdev.h\n++++ b/drivers/net/cpfl/cpfl_ethdev.h\n+@@ -66,6 +66,7 @@\n+#define CPFL_PF_TYPE_NUM\t2\n+#define CPFL_HOST_ID_HOST\t0\n+#define CPFL_HOST_ID_ACC\t1\n++#define CPFL_INVALID_HOST_ID    UINT8_MAX\n+#define CPFL_PF_TYPE_APF\t0\n+#define CPFL_PF_TYPE_CPF\t1\n+@@ -230,6 +231,8 @@ struct cpfl_adapter_ext {\n+\tuint8_t ctrl_vport_recv_info[IDPF_DFLT_MBX_BUF_SIZE];\n+\tstruct idpf_ctlq_info *ctlqp[CPFL_CFGQ_NUM];\n+\tstruct cpfl_ctlq_create_info cfgq_info[CPFL_CFGQ_NUM];\n++\n++\tuint8_t host_id;\n+};\n+TAILQ_HEAD(cpfl_adapter_list, cpfl_adapter_ext);\n+@@ -296,7 +299,8 @@ cpfl_get_vsi_id(struct cpfl_itf *itf)\n+\t\tvport_identity.func_type = CPCHNL2_FTYPE_LAN_PF;\n+\t\t/* host: CPFL_HOST0_CPF_ID, acc: CPFL_ACC_CPF_ID */\n+-\t\tvport_identity.pf_id = CPFL_ACC_CPF_ID;\n++\t\tvport_identity.pf_id = (itf->adapter->host_id == CPFL_HOST_ID_ACC) ?\n++\t\t\t\t\t\t\t\tCPFL_ACC_CPF_ID : CPFL_HOST0_CPF_ID;\n+\t\tvport_identity.vf_id = 0;\n+\t\tvport_identity.vport_id = vport_id;\n+\t\tret = rte_hash_lookup_data(itf->adapter->vport_map_hash,\n\\ No newline at end of file\n",
    "prefixes": [
        "v1"
    ]
}