get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53460,
    "url": "http://patches.dpdk.org/api/patches/53460/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1557980885-183777-3-git-send-email-mesut.a.ergin@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": "<1557980885-183777-3-git-send-email-mesut.a.ergin@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1557980885-183777-3-git-send-email-mesut.a.ergin@intel.com",
    "date": "2019-05-16T04:28:04",
    "name": "[2/3] net/i40e: add runtime option to disable vector rx",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "a6a2814a1d5977d47f3a65792150420bae9b4355",
    "submitter": {
        "id": 455,
        "url": "http://patches.dpdk.org/api/people/455/?format=api",
        "name": "Ergin, Mesut A",
        "email": "mesut.a.ergin@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1557980885-183777-3-git-send-email-mesut.a.ergin@intel.com/mbox/",
    "series": [
        {
            "id": 4685,
            "url": "http://patches.dpdk.org/api/series/4685/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4685",
            "date": "2019-05-16T04:28:02",
            "name": "net/i40e: improve rte_flow offload with MARK + RSS",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4685/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53460/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/53460/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 732CA5B2A;\n\tThu, 16 May 2019 06:28:31 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 087B62F7D\n\tfor <dev@dpdk.org>; Thu, 16 May 2019 06:28:25 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 May 2019 21:28:23 -0700",
            "from skx-pink.jf.intel.com ([10.54.80.236])\n\tby orsmga001.jf.intel.com with ESMTP; 15 May 2019 21:28:23 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Mesut Ali Ergin <mesut.a.ergin@intel.com>",
        "To": "beilei.xing@intel.com,\n\tqi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org,\n\tMesut Ali Ergin <mesut.a.ergin@intel.com>",
        "Date": "Wed, 15 May 2019 21:28:04 -0700",
        "Message-Id": "<1557980885-183777-3-git-send-email-mesut.a.ergin@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1557980885-183777-1-git-send-email-mesut.a.ergin@intel.com>",
        "References": "<1557980885-183777-1-git-send-email-mesut.a.ergin@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/3] net/i40e: add runtime option to disable\n\tvector rx",
        "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": "Vector RX functions are not at feature parity with non-vector ones and\ncurrently the vector RX path is enabled by default. Hence, the only\noption to force selection of non-vector variants and be able to retain\nfunctionality is to disable vector PMD globally at compile time via the\nconfig file option.\n\nThis patch introduces a new runtime device config option named\ndisable-vec-rx to allow users to limit the driver to make a choice among\nnon-vector RX functions, on a per device basis. This runtime option\ndefaults to a value of zero, allowing vector RX functions to be\nselected (current behavior). When disable-vec-rx=1 is specified for a\ndevice, even if all the other requirements to select a vector RX\nfunction are satisfied, the driver will still pick one out of the\nappropriate non-vector RX functions.\n\nSigned-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>\n---\n doc/guides/nics/i40e.rst       | 14 +++++++++\n drivers/net/i40e/i40e_ethdev.c | 70 +++++++++++++++++++++++++++++++++++++++++-\n drivers/net/i40e/i40e_ethdev.h |  1 +\n drivers/net/i40e/i40e_rxtx.c   |  4 +++\n 4 files changed, 88 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst\nindex a97484c..532cc64 100644\n--- a/doc/guides/nics/i40e.rst\n+++ b/doc/guides/nics/i40e.rst\n@@ -183,6 +183,20 @@ Runtime Config Options\n \n   -w 84:00.0,use-latest-supported-vec=1\n \n+- ``Disable RX Vector Functions `` (default ``vector RX enabled``)\n+\n+  When config file option for the vector PMD is enabled, vector RX functions may\n+  be the default choice of the driver at device initialization time, if certain\n+  conditions apply. However, vector RX functions may not always be at feature\n+  parity with non-vector ones. In order to allow users to override vector RX\n+  function selection behavior at runtime, the ``devargs`` parameter\n+  ``disable-vec-rx`` is introduced, such that\n+\n+  -w DBDF,disable-vec-rx=1\n+\n+  would force driver to limit its choices to non-vector RX function variants for\n+  the device specified by the DBDF.\n+\n Vector RX Pre-conditions\n ~~~~~~~~~~~~~~~~~~~~~~~~\n For Vector RX it is assumed that the number of descriptor rings will be a power\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex cab440f..19fbd23 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -44,6 +44,7 @@\n #define ETH_I40E_SUPPORT_MULTI_DRIVER\t\"support-multi-driver\"\n #define ETH_I40E_QUEUE_NUM_PER_VF_ARG\t\"queue-num-per-vf\"\n #define ETH_I40E_USE_LATEST_VEC\t\"use-latest-supported-vec\"\n+#define ETH_I40E_DISABLE_VEC_RX\t\"disable-vec-rx\"\n \n #define I40E_CLEAR_PXE_WAIT_MS     200\n \n@@ -410,6 +411,7 @@ static const char *const valid_keys[] = {\n \tETH_I40E_SUPPORT_MULTI_DRIVER,\n \tETH_I40E_QUEUE_NUM_PER_VF_ARG,\n \tETH_I40E_USE_LATEST_VEC,\n+\tETH_I40E_DISABLE_VEC_RX,\n \tNULL};\n \n static const struct rte_pci_id pci_id_i40e_map[] = {\n@@ -1263,6 +1265,68 @@ i40e_use_latest_vec(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n+static int\n+i40e_parse_disable_vec_rx_handler(__rte_unused const char *key,\n+\t\t\t\tconst char *value,\n+\t\t\t\tvoid *opaque)\n+{\n+\tstruct i40e_adapter *ad;\n+\n+\tad = (struct i40e_adapter *)opaque;\n+\n+\tswitch (atoi(value)) {\n+\tcase 0:\n+\t\t/* Selection of RX vector functions left untouched*/\n+\t\tbreak;\n+\tcase 1:\n+\t\t/* Disable RX vector functions as requested*/\n+\t\tad->rx_vec_allowed = false;\n+\tbreak;\n+\tdefault:\n+\t\tPMD_DRV_LOG(WARNING, \"Value should be 0 or 1, set it as 1!\");\n+\tbreak;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+int\n+i40e_disable_vec_rx(struct rte_eth_dev *dev)\n+{\n+\tstruct i40e_adapter *ad =\n+\t\tI40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n+\tstruct rte_kvargs *kvlist;\n+\tint kvargs_count;\n+\n+\n+\tif (!dev->device->devargs)\n+\t\treturn 0;\n+\n+\tkvlist = rte_kvargs_parse(dev->device->devargs->args, valid_keys);\n+\tif (!kvlist)\n+\t\treturn -EINVAL;\n+\n+\tkvargs_count = rte_kvargs_count(kvlist, ETH_I40E_DISABLE_VEC_RX);\n+\tif (!kvargs_count) {\n+\t\trte_kvargs_free(kvlist);\n+\t\treturn 0;\n+\t}\n+\n+\tif (kvargs_count > 1)\n+\t\tPMD_DRV_LOG(WARNING, \"More than one argument \\\"%s\\\" and only \"\n+\t\t\t    \"the first invalid or last valid one is used !\",\n+\t\t\t    ETH_I40E_DISABLE_VEC_RX);\n+\n+\tif (rte_kvargs_process(kvlist, ETH_I40E_DISABLE_VEC_RX,\n+\t\t\t\ti40e_parse_disable_vec_rx_handler, ad) < 0) {\n+\t\trte_kvargs_free(kvlist);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\trte_kvargs_free(kvlist);\n+\treturn 0;\n+}\n+\n #define I40E_ALARM_INTERVAL 50000 /* us */\n \n static int\n@@ -1795,6 +1859,9 @@ i40e_dev_configure(struct rte_eth_dev *dev)\n \tad->tx_simple_allowed = true;\n \tad->tx_vec_allowed = true;\n \n+\t/* Check if users wanted to disable vector RX functions */\n+\ti40e_disable_vec_rx(dev);\n+\n \t/* Only legacy filter API needs the following fdir config. So when the\n \t * legacy filter API is deprecated, the following codes should also be\n \t * removed.\n@@ -12790,4 +12857,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_i40e,\n \t\t\t      ETH_I40E_FLOATING_VEB_LIST_ARG \"=<string>\"\n \t\t\t      ETH_I40E_QUEUE_NUM_PER_VF_ARG \"=1|2|4|8|16\"\n \t\t\t      ETH_I40E_SUPPORT_MULTI_DRIVER \"=1\"\n-\t\t\t      ETH_I40E_USE_LATEST_VEC \"=0|1\");\n+\t\t\t      ETH_I40E_USE_LATEST_VEC \"=0|1\"\n+\t\t\t      ETH_I40E_DISABLE_VEC_RX \"=0|1\");\ndiff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h\nindex 9855038..906bfe9 100644\n--- a/drivers/net/i40e/i40e_ethdev.h\n+++ b/drivers/net/i40e/i40e_ethdev.h\n@@ -1248,6 +1248,7 @@ int i40e_config_rss_filter(struct i40e_pf *pf,\n \t\tstruct i40e_rte_flow_rss_conf *conf, bool add);\n int i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params);\n int i40e_vf_representor_uninit(struct rte_eth_dev *ethdev);\n+int i40e_disable_vec_rx(struct rte_eth_dev *dev);\n \n #define I40E_DEV_TO_PCI(eth_dev) \\\n \tRTE_DEV_TO_PCI((eth_dev)->device)\ndiff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c\nindex 1489552..7e66f59 100644\n--- a/drivers/net/i40e/i40e_rxtx.c\n+++ b/drivers/net/i40e/i40e_rxtx.c\n@@ -1736,6 +1736,10 @@ i40e_dev_rx_queue_setup_runtime(struct rte_eth_dev *dev,\n \t\t */\n \t\tad->rx_bulk_alloc_allowed = true;\n \t\tad->rx_vec_allowed = true;\n+\n+\t\t/* Check if users wanted to disable vector RX functions */\n+\t\ti40e_disable_vec_rx(dev);\n+\n \t\tdev->data->scattered_rx = use_scattered_rx;\n \t\tif (use_def_burst_func)\n \t\t\tad->rx_bulk_alloc_allowed = false;\n",
    "prefixes": [
        "2/3"
    ]
}