get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116657,
    "url": "http://patches.dpdk.org/api/patches/116657/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1663868722-39949-3-git-send-email-nicolas.chautru@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1663868722-39949-3-git-send-email-nicolas.chautru@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1663868722-39949-3-git-send-email-nicolas.chautru@intel.com",
    "date": "2022-09-22T17:45:17",
    "name": "[v9,2/7] bbdev: add device status info",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8a3b8f686e1c0a5d46f19886bcf2dac3e4fa5e25",
    "submitter": {
        "id": 1314,
        "url": "http://patches.dpdk.org/api/people/1314/?format=api",
        "name": "Chautru, Nicolas",
        "email": "nicolas.chautru@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1663868722-39949-3-git-send-email-nicolas.chautru@intel.com/mbox/",
    "series": [
        {
            "id": 24785,
            "url": "http://patches.dpdk.org/api/series/24785/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24785",
            "date": "2022-09-22T17:45:15",
            "name": "bbdev changes for 22.11",
            "version": 9,
            "mbox": "http://patches.dpdk.org/series/24785/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/116657/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/116657/checks/",
    "tags": {},
    "related": [],
    "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 132DFA0543;\n\tThu, 22 Sep 2022 19:46:07 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CDAA942684;\n\tThu, 22 Sep 2022 19:45:57 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 667AD40156\n for <dev@dpdk.org>; Thu, 22 Sep 2022 19:45:54 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Sep 2022 10:45:53 -0700",
            "from unknown (HELO icx-npg-scs1-cp1.localdomain) ([10.233.180.245])\n by orsmga002.jf.intel.com with ESMTP; 22 Sep 2022 10:45:52 -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=1663868754; x=1695404754;\n h=from:to:cc:subject:date:message-id:in-reply-to: references;\n bh=1KNj9b+8IiSeyrQW3zg/pJZF/npuFv7WqesVJbmfMTw=;\n b=eSfKsUZkyUk+AeQVahs+kUCmchajih1FxTVtyGwWX2oDm2H8qIhShjRM\n 1BodDpCUGJeHFi9eECHl3xBnLDNNLdGbwXKAI0aq0tK46Mxn+vROVQanb\n Y1QD46QsVda/TKffLZ+iq4x2g0+REqIJviObUuZzzs5/IJ0trc5K8Z4Nj\n XuBsS3fGGUmuViXWHvVMNNgOk0nApDTKK1sG4AWf71X+NJ5Zr5blLABUr\n ivlpWYkgLAlM1+LBMX/CADWZhWiB3ilTVK812zhfRNo1WDd2kO2js+9SL\n 3f9tifA4KFhueDtNkM4oTAammB2hhWSDCglvilOnQvUz/aY0/vhvBriG3 A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10478\"; a=\"280099959\"",
            "E=Sophos;i=\"5.93,337,1654585200\"; d=\"scan'208\";a=\"280099959\"",
            "E=Sophos;i=\"5.93,337,1654585200\"; d=\"scan'208\";a=\"619887776\""
        ],
        "X-ExtLoop1": "1",
        "From": "Nic Chautru <nicolas.chautru@intel.com>",
        "To": "dev@dpdk.org,\n\tthomas@monjalon.net,\n\tgakhil@marvell.com",
        "Cc": "maxime.coquelin@redhat.com, trix@redhat.com, mdr@ashroe.eu,\n bruce.richardson@intel.com, david.marchand@redhat.com,\n stephen@networkplumber.org, mingshan.zhang@intel.com,\n hemant.agrawal@nxp.com, Nicolas Chautru <nicolas.chautru@intel.com>",
        "Subject": "[PATCH v9 2/7] bbdev: add device status info",
        "Date": "Thu, 22 Sep 2022 10:45:17 -0700",
        "Message-Id": "<1663868722-39949-3-git-send-email-nicolas.chautru@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1663868722-39949-1-git-send-email-nicolas.chautru@intel.com>",
        "References": "<1655491040-183649-6-git-send-email-nicolas.chautru@intel.com>\n <1663868722-39949-1-git-send-email-nicolas.chautru@intel.com>",
        "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": "From: Nicolas Chautru <nicolas.chautru@intel.com>\n\nAdded device status information, so that the PMD can\nexpose information related to the underlying accelerator device status.\nMinor order change in structure to fit into padding hole.\n\nSigned-off-by: Nicolas Chautru <nicolas.chautru@intel.com>\nAcked-by: Mingshan Zhang <mingshan.zhang@intel.com>\nAcked-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/baseband/acc100/rte_acc100_pmd.c           |  1 +\n drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c |  1 +\n drivers/baseband/fpga_lte_fec/fpga_lte_fec.c       |  1 +\n drivers/baseband/la12xx/bbdev_la12xx.c             |  1 +\n drivers/baseband/null/bbdev_null.c                 |  1 +\n drivers/baseband/turbo_sw/bbdev_turbo_software.c   |  1 +\n lib/bbdev/rte_bbdev.c                              | 22 ++++++++++++++\n lib/bbdev/rte_bbdev.h                              | 35 ++++++++++++++++++++--\n lib/bbdev/version.map                              |  7 +++++\n 9 files changed, 68 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c\nindex de7e4bc..17ba798 100644\n--- a/drivers/baseband/acc100/rte_acc100_pmd.c\n+++ b/drivers/baseband/acc100/rte_acc100_pmd.c\n@@ -1060,6 +1060,7 @@\n \n \t/* Read and save the populated config from ACC100 registers */\n \tfetch_acc100_config(dev);\n+\tdev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;\n \n \t/* This isn't ideal because it reports the maximum number of queues but\n \t * does not provide info on how many can be uplink/downlink or different\ndiff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c\nindex 82ae6ba..57b12af 100644\n--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c\n+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c\n@@ -369,6 +369,7 @@\n \tdev_info->capabilities = bbdev_capabilities;\n \tdev_info->cpu_flag_reqs = NULL;\n \tdev_info->data_endianness = RTE_LITTLE_ENDIAN;\n+\tdev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;\n \n \t/* Calculates number of queues assigned to device */\n \tdev_info->max_num_queues = 0;\ndiff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c\nindex 21d3529..2a330c4 100644\n--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c\n+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c\n@@ -645,6 +645,7 @@ struct __rte_cache_aligned fpga_queue {\n \tdev_info->capabilities = bbdev_capabilities;\n \tdev_info->cpu_flag_reqs = NULL;\n \tdev_info->data_endianness = RTE_LITTLE_ENDIAN;\n+\tdev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;\n \n \t/* Calculates number of queues assigned to device */\n \tdev_info->max_num_queues = 0;\ndiff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c\nindex 4d1bd16..c1f88c6 100644\n--- a/drivers/baseband/la12xx/bbdev_la12xx.c\n+++ b/drivers/baseband/la12xx/bbdev_la12xx.c\n@@ -100,6 +100,7 @@ struct bbdev_la12xx_params {\n \tdev_info->capabilities = bbdev_capabilities;\n \tdev_info->cpu_flag_reqs = NULL;\n \tdev_info->min_alignment = 64;\n+\tdev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;\n \n \trte_bbdev_log_debug(\"got device info from %u\", dev->data->dev_id);\n }\ndiff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c\nindex 248e129..94a1976 100644\n--- a/drivers/baseband/null/bbdev_null.c\n+++ b/drivers/baseband/null/bbdev_null.c\n@@ -82,6 +82,7 @@ struct bbdev_queue {\n \t * here for code completeness.\n \t */\n \tdev_info->data_endianness = RTE_LITTLE_ENDIAN;\n+\tdev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;\n \n \trte_bbdev_log_debug(\"got device info from %u\", dev->data->dev_id);\n }\ndiff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c\nindex af7bc41..dbc5524 100644\n--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c\n+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c\n@@ -254,6 +254,7 @@ struct turbo_sw_queue {\n \tdev_info->min_alignment = 64;\n \tdev_info->harq_buffer_size = 0;\n \tdev_info->data_endianness = RTE_LITTLE_ENDIAN;\n+\tdev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;\n \n \trte_bbdev_log_debug(\"got device info from %u\\n\", dev->data->dev_id);\n }\ndiff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c\nindex 4da8047..38630a2 100644\n--- a/lib/bbdev/rte_bbdev.c\n+++ b/lib/bbdev/rte_bbdev.c\n@@ -1133,3 +1133,25 @@ struct rte_mempool *\n \trte_bbdev_log(ERR, \"Invalid operation type\");\n \treturn NULL;\n }\n+\n+const char *\n+rte_bbdev_device_status_str(enum rte_bbdev_device_status status)\n+{\n+\tstatic const char * const dev_sta_string[] = {\n+\t\t\"RTE_BBDEV_DEV_NOSTATUS\",\n+\t\t\"RTE_BBDEV_DEV_NOT_SUPPORTED\",\n+\t\t\"RTE_BBDEV_DEV_RESET\",\n+\t\t\"RTE_BBDEV_DEV_CONFIGURED\",\n+\t\t\"RTE_BBDEV_DEV_ACTIVE\",\n+\t\t\"RTE_BBDEV_DEV_FATAL_ERR\",\n+\t\t\"RTE_BBDEV_DEV_RESTART_REQ\",\n+\t\t\"RTE_BBDEV_DEV_RECONFIG_REQ\",\n+\t\t\"RTE_BBDEV_DEV_CORRECT_ERR\",\n+\t};\n+\n+\tif (status < sizeof(dev_sta_string) / sizeof(char *))\n+\t\treturn dev_sta_string[status];\n+\n+\trte_bbdev_log(ERR, \"Invalid device status\");\n+\treturn NULL;\n+}\ndiff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h\nindex b88c881..5ba7a61 100644\n--- a/lib/bbdev/rte_bbdev.h\n+++ b/lib/bbdev/rte_bbdev.h\n@@ -223,6 +223,21 @@ struct rte_bbdev_queue_conf {\n int\n rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);\n \n+/**\n+ * Flags indicate the status of the device\n+ */\n+enum rte_bbdev_device_status {\n+\tRTE_BBDEV_DEV_NOSTATUS,        /**< Nothing being reported */\n+\tRTE_BBDEV_DEV_NOT_SUPPORTED,   /**< Device status is not supported on the PMD */\n+\tRTE_BBDEV_DEV_RESET,           /**< Device in reset and un-configured state */\n+\tRTE_BBDEV_DEV_CONFIGURED,      /**< Device is configured and ready to use */\n+\tRTE_BBDEV_DEV_ACTIVE,          /**< Device is configured and VF is being used */\n+\tRTE_BBDEV_DEV_FATAL_ERR,       /**< Device has hit a fatal uncorrectable error */\n+\tRTE_BBDEV_DEV_RESTART_REQ,     /**< Device requires application to restart */\n+\tRTE_BBDEV_DEV_RECONFIG_REQ,    /**< Device requires application to reconfigure queues */\n+\tRTE_BBDEV_DEV_CORRECT_ERR,     /**< Warning of a correctable error event happened */\n+};\n+\n /** Device statistics. */\n struct rte_bbdev_stats {\n \tuint64_t enqueued_count;  /**< Count of all operations enqueued */\n@@ -284,10 +299,12 @@ struct rte_bbdev_driver_info {\n \tuint8_t max_ul_queue_priority;\n \t/** Set if device supports per-queue interrupts */\n \tbool queue_intr_supported;\n-\t/** Minimum alignment of buffers, in bytes */\n-\tuint16_t min_alignment;\n+\t/** Device Status */\n+\tenum rte_bbdev_device_status device_status;\n \t/** HARQ memory available in kB */\n \tuint32_t harq_buffer_size;\n+\t/** Minimum alignment of buffers, in bytes */\n+\tuint16_t min_alignment;\n \t/** Byte endianness (RTE_BIG_ENDIAN/RTE_LITTLE_ENDIAN) supported\n \t *  for input/output data\n \t */\n@@ -827,6 +844,20 @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,\n rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,\n \t\tvoid *data);\n \n+/**\n+ * Converts device status from enum to string\n+ *\n+ * @param status\n+ *   Device status as enum\n+ *\n+ * @returns\n+ *   Operation type as string or NULL if op_type is invalid\n+ *\n+ */\n+__rte_experimental\n+const char*\n+rte_bbdev_device_status_str(enum rte_bbdev_device_status status);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/bbdev/version.map b/lib/bbdev/version.map\nindex cce3f3c..f0a072e 100644\n--- a/lib/bbdev/version.map\n+++ b/lib/bbdev/version.map\n@@ -39,3 +39,10 @@ DPDK_22 {\n \n \tlocal: *;\n };\n+\n+EXPERIMENTAL {\n+\tglobal:\n+\n+\t# added in 22.11\n+\trte_bbdev_device_status_str;\n+};\n",
    "prefixes": [
        "v9",
        "2/7"
    ]
}