get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6856,
    "url": "https://patches.dpdk.org/api/patches/6856/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1441143062-2557-8-git-send-email-thomas.monjalon@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": "<1441143062-2557-8-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1441143062-2557-8-git-send-email-thomas.monjalon@6wind.com",
    "date": "2015-09-01T21:31:01",
    "name": "[dpdk-dev,8/9] kni: remove deprecated functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8275418e65882719039ec993b6db1ee7af0eb4a8",
    "submitter": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1441143062-2557-8-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6856/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6856/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 25A5D8E8E;\n\tTue,  1 Sep 2015 23:32:32 +0200 (CEST)",
            "from mail-wi0-f180.google.com (mail-wi0-f180.google.com\n\t[209.85.212.180]) by dpdk.org (Postfix) with ESMTP id 6414A8E8C\n\tfor <dev@dpdk.org>; Tue,  1 Sep 2015 23:32:30 +0200 (CEST)",
            "by wicmc4 with SMTP id mc4so46787848wic.0\n\tfor <dev@dpdk.org>; Tue, 01 Sep 2015 14:32:30 -0700 (PDT)",
            "from localhost.localdomain (136-92-190-109.dsl.ovh.fr.\n\t[109.190.92.136]) by smtp.gmail.com with ESMTPSA id\n\tej5sm29085583wjd.22.2015.09.01.14.32.28\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tTue, 01 Sep 2015 14:32:29 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=MV40MS9w5C29nLNrXw8XzHQ+xiGtB57RtWr10ATEEB0=;\n\tb=kkHjA8RnZs7IIPF0gjr9dThD/utFAvOYZItovRPdd/PPwytlCd/9mCJgeOHwp9vHhi\n\tkpa0WCxb407Hb9ZDeB50g4XRi60SW+DljKibrprCBeL2EFFrG4JWcdNYG/AP1CvAlS3P\n\tDSrKmjCSkidLgsIKRBAh/RMLvWpm42hFieTAOAs/aov6USkp6feL6kyGQxOZvkS91fVI\n\t7LPb8tIuP/xUUdwO8vH44837RZ+iBz2WgXrN4knQSbZ9fzn0A+PR+VPPNImXnoKMJQnM\n\tA4SROaLTQEcl0MUXsLJKNtJxDj56gPoRmga5fbybppyN5dZzBQzY8CkEtq30lZCwehpU\n\tkv/g==",
        "X-Gm-Message-State": "ALoCoQkpfArUtccY/K2zioBurfm8V6wkQFIBKbjfwiq0z+NNBz/sDOa+hiKQp1osV8M7AxXgGn60",
        "X-Received": "by 10.180.91.131 with SMTP id ce3mr269821wib.84.1441143150277;\n\tTue, 01 Sep 2015 14:32:30 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  1 Sep 2015 23:31:01 +0200",
        "Message-Id": "<1441143062-2557-8-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.5.1",
        "In-Reply-To": "<1441138697-25157-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<1441138697-25157-1-git-send-email-thomas.monjalon@6wind.com>",
        "Cc": "Stephen Hemminger <shemming@brocade.com>",
        "Subject": "[dpdk-dev] [PATCH 8/9] kni: remove deprecated functions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "From: Stephen Hemminger <shemming@brocade.com>\n\nThese functions were tagged as deprecated in 2.0 so they can be\nremoved in 2.2\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Helin Zhang <helin.zhang@intel.com>\n[Thomas: update doc]\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n app/test/Makefile                                 |  6 ---\n app/test/test_kni.c                               | 36 ---------------\n doc/guides/prog_guide/kernel_nic_interface.rst    |  2 -\n doc/guides/rel_notes/deprecation.rst              |  3 --\n doc/guides/sample_app_ug/kernel_nic_interface.rst |  9 ----\n lib/librte_kni/rte_kni.c                          | 51 ---------------------\n lib/librte_kni/rte_kni.h                          | 54 -----------------------\n lib/librte_kni/rte_kni_version.map                |  3 --\n 8 files changed, 164 deletions(-)",
    "diff": "diff --git a/app/test/Makefile b/app/test/Makefile\nindex e7f148f..7778e1c 100644\n--- a/app/test/Makefile\n+++ b/app/test/Makefile\n@@ -146,12 +146,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n \n-# Disable warnings of deprecated-declarations in test_kni.c\n-ifeq ($(CC), icc)\n-CFLAGS_test_kni.o += -wd1478\n-else\n-CFLAGS_test_kni.o += -Wno-deprecated-declarations\n-endif\n CFLAGS += -D_GNU_SOURCE\n \n # Disable VTA for memcpy test\ndiff --git a/app/test/test_kni.c b/app/test/test_kni.c\nindex 506b543..9dad988 100644\n--- a/app/test/test_kni.c\n+++ b/app/test/test_kni.c\n@@ -398,17 +398,6 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp)\n \t\tprintf(\"fail to create kni\\n\");\n \t\treturn -1;\n \t}\n-\tif (rte_kni_get_port_id(kni) != port_id) {\n-\t\tprintf(\"fail to get port id\\n\");\n-\t\tret = -1;\n-\t\tgoto fail_kni;\n-\t}\n-\n-\tif (rte_kni_info_get(RTE_MAX_ETHPORTS)) {\n-\t\tprintf(\"Unexpectedly get a KNI successfully\\n\");\n-\t\tret = -1;\n-\t\tgoto fail_kni;\n-\t}\n \n \ttest_kni_ctx = kni;\n \ttest_kni_processing_flag = 0;\n@@ -591,14 +580,6 @@ test_kni(void)\n \t\tgoto fail;\n \t}\n \n-\t/* test of getting port id according to NULL kni context */\n-\tif (rte_kni_get_port_id(NULL) < RTE_MAX_ETHPORTS) {\n-\t\tret = -1;\n-\t\tprintf(\"unexpectedly get port id successfully by NULL kni \"\n-\t\t\t\t\t\t\t\t\"pointer\\n\");\n-\t\tgoto fail;\n-\t}\n-\n \t/* test of releasing NULL kni context */\n \tret = rte_kni_release(NULL);\n \tif (ret == 0) {\n@@ -645,23 +626,6 @@ test_kni(void)\n \t\tgoto fail;\n \t}\n \n-\t/* test the interface of creating a KNI, for backward compatibility */\n-\tmemset(&ops, 0, sizeof(ops));\n-\tops = kni_ops;\n-\tkni = rte_kni_create(port_id, MAX_PACKET_SZ, mp, &ops);\n-\tif (!kni) {\n-\t\tret = -1;\n-\t\tprintf(\"Fail to create a KNI device for port %d\\n\", port_id);\n-\t\tgoto fail;\n-\t}\n-\n-\tret = rte_kni_release(kni);\n-\tif (ret < 0) {\n-\t\tprintf(\"Fail to release a KNI device\\n\");\n-\t\tgoto fail;\n-\t}\n-\n-\tret = 0;\n \n fail:\n \trte_eth_dev_stop(port_id);\ndiff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst\nindex 713d30b..0d91476 100644\n--- a/doc/guides/prog_guide/kernel_nic_interface.rst\n+++ b/doc/guides/prog_guide/kernel_nic_interface.rst\n@@ -100,8 +100,6 @@ Refer to rte_kni_common.h in the DPDK source code for more details.\n \n The physical addresses will be re-mapped into the kernel address space and stored in separate KNI contexts.\n \n-Once KNI interfaces are created, the KNI context information can be queried by calling the rte_kni_info_get() function.\n-\n The KNI interfaces can be deleted by a DPDK application dynamically after being created.\n Furthermore, all those KNI interfaces not deleted will be deleted on the release operation\n of the miscellaneous device (when the DPDK application is closed).\ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex e7e213c..04819fa 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -40,9 +40,6 @@ Deprecation Notices\n   the tunnel type, TNI/VNI, inner MAC and inner VLAN are monitored.\n   The release 2.2 will contain these changes without backwards compatibility.\n \n-* librte_kni: Functions based on port id are deprecated for a long time and\n-  should be removed (rte_kni_create, rte_kni_get_port_id and rte_kni_info_get).\n-\n * librte_pmd_ring: The deprecated functions rte_eth_ring_pair_create and\n   rte_eth_ring_pair_attach should be removed.\n \ndiff --git a/doc/guides/sample_app_ug/kernel_nic_interface.rst b/doc/guides/sample_app_ug/kernel_nic_interface.rst\nindex 02dde59..f1deca9 100644\n--- a/doc/guides/sample_app_ug/kernel_nic_interface.rst\n+++ b/doc/guides/sample_app_ug/kernel_nic_interface.rst\n@@ -242,15 +242,6 @@ Setup of mbuf pool, driver and queues is similar to the setup done in the L2 For\n In addition, one or more kernel NIC interfaces are allocated for each\n of the configured ports according to the command line parameters.\n \n-The code for creating the kernel NIC interface for a specific port is as follows:\n-\n-.. code-block:: c\n-\n-    kni = rte_kni_create(port, MAX_PACKET_SZ, pktmbuf_pool, &kni_ops);\n-    if (kni == NULL)\n-        rte_exit(EXIT_FAILURE, \"Fail to create kni dev \"\n-           \"for port: %d\\n\", port);\n-\n The code for allocating the kernel NIC interfaces for a specific port is as follows:\n \n .. code-block:: c\ndiff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c\nindex 08155db..ea9baf4 100644\n--- a/lib/librte_kni/rte_kni.c\n+++ b/lib/librte_kni/rte_kni.c\n@@ -311,31 +311,6 @@ kni_fail:\n \t\t\t max_kni_ifaces);\n }\n \n-/* It is deprecated and just for backward compatibility */\n-struct rte_kni *\n-rte_kni_create(uint8_t port_id,\n-\t       unsigned mbuf_size,\n-\t       struct rte_mempool *pktmbuf_pool,\n-\t       struct rte_kni_ops *ops)\n-{\n-\tstruct rte_kni_conf conf;\n-\tstruct rte_eth_dev_info info;\n-\n-\tmemset(&info, 0, sizeof(info));\n-\tmemset(&conf, 0, sizeof(conf));\n-\trte_eth_dev_info_get(port_id, &info);\n-\n-\tsnprintf(conf.name, sizeof(conf.name), \"vEth%u\", port_id);\n-\tconf.addr = info.pci_dev->addr;\n-\tconf.id = info.pci_dev->id;\n-\tconf.group_id = (uint16_t)port_id;\n-\tconf.mbuf_size = mbuf_size;\n-\n-\t/* Save the port id for request handling */\n-\tops->port_id = port_id;\n-\n-\treturn rte_kni_alloc(pktmbuf_pool, &conf, ops);\n-}\n \n struct rte_kni *\n rte_kni_alloc(struct rte_mempool *pktmbuf_pool,\n@@ -650,16 +625,6 @@ kni_allocate_mbufs(struct rte_kni *kni)\n \t}\n }\n \n-/* It is deprecated and just for backward compatibility */\n-uint8_t\n-rte_kni_get_port_id(struct rte_kni *kni)\n-{\n-\tif (!kni)\n-\t\treturn ~0x0;\n-\n-\treturn kni->ops.port_id;\n-}\n-\n struct rte_kni *\n rte_kni_get(const char *name)\n {\n@@ -686,22 +651,6 @@ rte_kni_get_name(const struct rte_kni *kni)\n \treturn kni->name;\n }\n \n-/*\n- * It is deprecated and just for backward compatibility.\n- */\n-struct rte_kni *\n-rte_kni_info_get(uint8_t port_id)\n-{\n-\tchar name[RTE_MEMZONE_NAMESIZE];\n-\n-\tif (port_id >= RTE_MAX_ETHPORTS)\n-\t\treturn NULL;\n-\n-\tsnprintf(name, RTE_MEMZONE_NAMESIZE, \"vEth%u\", port_id);\n-\n-\treturn rte_kni_get(name);\n-}\n-\n static enum kni_ops_status\n kni_check_request_register(struct rte_kni_ops *ops)\n {\ndiff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h\nindex 52ffdb7..ef9faa9 100644\n--- a/lib/librte_kni/rte_kni.h\n+++ b/lib/librte_kni/rte_kni.h\n@@ -129,30 +129,6 @@ extern struct rte_kni *rte_kni_alloc(struct rte_mempool *pktmbuf_pool,\n \t\t\t\t     struct rte_kni_ops *ops);\n \n /**\n- * It create a KNI device for specific port.\n- *\n- * Note: It is deprecated and just for backward compatibility.\n- *\n- * @param port_id\n- *  Port ID.\n- * @param mbuf_size\n- *  mbuf size.\n- * @param pktmbuf_pool\n- *  The mempool for allocting mbufs for packets.\n- * @param ops\n- *  The pointer to the callbacks for the KNI kernel requests.\n- *\n- * @return\n- *  - The pointer to the context of a KNI interface.\n- *  - NULL indicate error.\n- */\n-extern struct rte_kni *rte_kni_create(uint8_t port_id,\n-\t\t\t\t      unsigned mbuf_size,\n-\t\t\t\t      struct rte_mempool *pktmbuf_pool,\n-\t\t\t\t      struct rte_kni_ops *ops) \\\n-\t\t\t\t      __attribute__ ((deprecated));\n-\n-/**\n  * Release KNI interface according to the context. It will also release the\n  * paired KNI interface in kernel space. All processing on the specific KNI\n  * context need to be stopped before calling this interface.\n@@ -221,21 +197,6 @@ extern unsigned rte_kni_tx_burst(struct rte_kni *kni,\n \t\tstruct rte_mbuf **mbufs, unsigned num);\n \n /**\n- * Get the port id from KNI interface.\n- *\n- * Note: It is deprecated and just for backward compatibility.\n- *\n- * @param kni\n- *  The KNI interface context.\n- *\n- * @return\n- *  On success: The port id.\n- *  On failure: ~0x0\n- */\n-extern uint8_t rte_kni_get_port_id(struct rte_kni *kni) \\\n-\t\t\t\t__attribute__ ((deprecated));\n-\n-/**\n  * Get the KNI context of its name.\n  *\n  * @param name\n@@ -258,21 +219,6 @@ extern struct rte_kni *rte_kni_get(const char *name);\n extern const char *rte_kni_get_name(const struct rte_kni *kni);\n \n /**\n- * Get the KNI context of the specific port.\n- *\n- * Note: It is deprecated and just for backward compatibility.\n- *\n- * @param port_id\n- *  the port id.\n- *\n- * @return\n- *  On success: Pointer to KNI interface.\n- *  On failure: NULL\n- */\n-extern struct rte_kni *rte_kni_info_get(uint8_t port_id) \\\n-\t\t\t\t__attribute__ ((deprecated));\n-\n-/**\n  * Register KNI request handling for a specified port,and it can\n  * be called by master process or slave process.\n  *\ndiff --git a/lib/librte_kni/rte_kni_version.map b/lib/librte_kni/rte_kni_version.map\nindex a987d31..acd515e 100644\n--- a/lib/librte_kni/rte_kni_version.map\n+++ b/lib/librte_kni/rte_kni_version.map\n@@ -3,12 +3,9 @@ DPDK_2.0 {\n \n \trte_kni_alloc;\n \trte_kni_close;\n-\trte_kni_create;\n \trte_kni_get;\n \trte_kni_get_name;\n-\trte_kni_get_port_id;\n \trte_kni_handle_request;\n-\trte_kni_info_get;\n \trte_kni_init;\n \trte_kni_register_handlers;\n \trte_kni_release;\n",
    "prefixes": [
        "dpdk-dev",
        "8/9"
    ]
}