get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6764,
    "url": "https://patches.dpdk.org/api/patches/6764/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1439808354-7269-1-git-send-email-vladz@cloudius-systems.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": "<1439808354-7269-1-git-send-email-vladz@cloudius-systems.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1439808354-7269-1-git-send-email-vladz@cloudius-systems.com",
    "date": "2015-08-17T10:45:54",
    "name": "[dpdk-dev,v2] ixgbe_pmd: forbid tx_rs_thresh above 1 for all NICs but 82598",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6e8dabefd0ce7927f6f5a681a4ef64b4252fb47b",
    "submitter": {
        "id": 141,
        "url": "https://patches.dpdk.org/api/people/141/?format=api",
        "name": "Vladislav Zolotarov",
        "email": "vladz@cloudius-systems.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1439808354-7269-1-git-send-email-vladz@cloudius-systems.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6764/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6764/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 191718DAD;\n\tMon, 17 Aug 2015 12:46:01 +0200 (CEST)",
            "from mail-wi0-f176.google.com (mail-wi0-f176.google.com\n\t[209.85.212.176]) by dpdk.org (Postfix) with ESMTP id AF94B8D4D\n\tfor <dev@dpdk.org>; Mon, 17 Aug 2015 12:46:00 +0200 (CEST)",
            "by wibhh20 with SMTP id hh20so77244114wib.0\n\tfor <dev@dpdk.org>; Mon, 17 Aug 2015 03:45:59 -0700 (PDT)",
            "from vladz-laptop.localdomain (bzq-109-64-112-195.red.bezeqint.net.\n\t[109.64.112.195]) by smtp.gmail.com with ESMTPSA id\n\thn2sm21244298wjc.45.2015.08.17.03.45.57\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 17 Aug 2015 03:45:58 -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;\n\tbh=DJjPwUhVZwO88AvbwjG2fAQ5MGBzjDrujU2Avjt4RSs=;\n\tb=DS0l3T7cxlyzTI/gtCt2oova+pRLnD0lZP7QmXfHiz09w3nB55RRI2OlNmfL6dh678\n\tRB3stb9OhzzivkDUEN0VanIoANOXgOCPwDQ4hBoE3zxiLQyLPqew/2TnaD4lrJ4BIAQe\n\tstlM1noT0jY5HtMpoJfSptU86Kh7b/IiojU3FHjIZXdo4Yjew5Y6a7Ls5nZ03Z7IoI6t\n\tZtl84iowSQgvI4x5TNn2tuK0hWUqp874wQ8Vb8eARUkCMEdibOusxAqWDqnFdPfA7chE\n\tyFKNydL3dpTr9XHWJHzTIuJ7d219lliKCWXu+Cj8jzIjY0gqRGF47Fg2pRwJrKd8i6UP\n\tr1Eg==",
        "X-Gm-Message-State": "ALoCoQnZYv4m9WImKGcjnpo8GBUaXLxi2XdA2IzhEzGove29x2dp3/kWSkmjqxy0fU9j29aDZLJm",
        "X-Received": "by 10.194.24.167 with SMTP id v7mr1502069wjf.37.1439808359501;\n\tMon, 17 Aug 2015 03:45:59 -0700 (PDT)",
        "From": "Vlad Zolotarov <vladz@cloudius-systems.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 17 Aug 2015 13:45:54 +0300",
        "Message-Id": "<1439808354-7269-1-git-send-email-vladz@cloudius-systems.com>",
        "X-Mailer": "git-send-email 2.1.0",
        "Subject": "[dpdk-dev] [PATCH v2] ixgbe_pmd: forbid tx_rs_thresh above 1 for\n\tall NICs but 82598",
        "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": "According to 82599 and x540 HW specifications RS bit *must* be\nset in the last descriptor of *every* packet.\n\nThis patch fixes the Tx hang we were constantly hitting with a\nseastar-based application on x540 NIC.\n\nSigned-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>\n---\nNew in v2:\n   - ixgbevf: ixgbevf_dev_info_get(): return tx_rs_thresh=1 in\n              default tx configuration for all devices since VFs\n              are available only on devices newer than 82598.\n\nSigned-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>\n---\n drivers/net/ixgbe/ixgbe_ethdev.c | 19 ++++++++++++++++++-\n drivers/net/ixgbe/ixgbe_rxtx.c   | 23 ++++++++++++++++++++++-\n 2 files changed, 40 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex b8ee1e9..fd9cb77 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -2414,6 +2414,15 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \t\t.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |\n \t\t\t\tETH_TXQ_FLAGS_NOOFFLOADS,\n \t};\n+\n+\t/*\n+\t * According to 82599 and x540 specifications RS bit *must* be set on the\n+\t * last descriptor of *every* packet. Therefore we will not allow the\n+\t * tx_rs_thresh above 1 for all NICs newer than 82598.\n+\t */\n+\tif (hw->mac.type > ixgbe_mac_82598EB)\n+\t\tdev_info->default_txconf.tx_rs_thresh = 1;\n+\n \tdev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);\n \tdev_info->reta_size = ETH_RSS_RETA_SIZE_128;\n \tdev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL;\n@@ -2463,7 +2472,15 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,\n \t\t\t.wthresh = IXGBE_DEFAULT_TX_WTHRESH,\n \t\t},\n \t\t.tx_free_thresh = IXGBE_DEFAULT_TX_FREE_THRESH,\n-\t\t.tx_rs_thresh = IXGBE_DEFAULT_TX_RSBIT_THRESH,\n+\t\t/*\n+\t\t * According to 82599 and x540 specifications RS bit *must* be\n+\t\t * set on the last descriptor of *every* packet. Therefore we\n+\t\t * will not allow the tx_rs_thresh above 1 for all NICs newer\n+\t\t * than 82598. Since VFs are available only on devices starting\n+\t\t * from 82599, tx_rs_thresh should be set to 1 for ALL VF\n+\t\t * devices.\n+\t\t */\n+\t\t.tx_rs_thresh = 1,\n \t\t.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |\n \t\t\t\tETH_TXQ_FLAGS_NOOFFLOADS,\n \t};\ndiff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c\nindex 91023b9..8dbdffc 100644\n--- a/drivers/net/ixgbe/ixgbe_rxtx.c\n+++ b/drivers/net/ixgbe/ixgbe_rxtx.c\n@@ -2085,11 +2085,19 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \tstruct ixgbe_tx_queue *txq;\n \tstruct ixgbe_hw     *hw;\n \tuint16_t tx_rs_thresh, tx_free_thresh;\n+\tbool rs_deferring_allowed;\n \n \tPMD_INIT_FUNC_TRACE();\n \thw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \n \t/*\n+\t * According to 82599 and x540 specifications RS bit *must* be set on the\n+\t * last descriptor of *every* packet. Therefore we will not allow the\n+\t * tx_rs_thresh above 1 for all NICs newer than 82598.\n+\t */\n+\trs_deferring_allowed = (hw->mac.type <= ixgbe_mac_82598EB);\n+\n+\t/*\n \t * Validate number of transmit descriptors.\n \t * It must not exceed hardware maximum, and must be multiple\n \t * of IXGBE_ALIGN.\n@@ -2110,6 +2118,8 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \t * to transmit a packet is greater than the number of free TX\n \t * descriptors.\n \t * The following constraints must be satisfied:\n+\t *  tx_rs_thresh must be less than 2 for NICs for which RS deferring is\n+\t *  forbidden (all but 82598).\n \t *  tx_rs_thresh must be greater than 0.\n \t *  tx_rs_thresh must be less than the size of the ring minus 2.\n \t *  tx_rs_thresh must be less than or equal to tx_free_thresh.\n@@ -2121,9 +2131,20 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \t * When set to zero use default values.\n \t */\n \ttx_rs_thresh = (uint16_t)((tx_conf->tx_rs_thresh) ?\n-\t\t\ttx_conf->tx_rs_thresh : DEFAULT_TX_RS_THRESH);\n+\t\t\ttx_conf->tx_rs_thresh :\n+\t\t\t(rs_deferring_allowed ? DEFAULT_TX_RS_THRESH : 1));\n \ttx_free_thresh = (uint16_t)((tx_conf->tx_free_thresh) ?\n \t\t\ttx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH);\n+\n+\tif (!rs_deferring_allowed && tx_rs_thresh > 1) {\n+\t\tPMD_INIT_LOG(ERR, \"tx_rs_thresh must be less than 2 since RS \"\n+\t\t\t\t  \"must be set for every packet for this HW. \"\n+\t\t\t\t  \"(tx_rs_thresh=%u port=%d queue=%d)\",\n+\t\t\t     (unsigned int)tx_rs_thresh,\n+\t\t\t     (int)dev->data->port_id, (int)queue_idx);\n+\t\treturn -(EINVAL);\n+\t}\n+\n \tif (tx_rs_thresh >= (nb_desc - 2)) {\n \t\tPMD_INIT_LOG(ERR, \"tx_rs_thresh must be less than the number \"\n \t\t\t     \"of TX descriptors minus 2. (tx_rs_thresh=%u \"\n",
    "prefixes": [
        "dpdk-dev",
        "v2"
    ]
}