Show a patch.

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

{
    "id": 83,
    "url": "https://patches.dpdk.org/api/patches/83/",
    "web_url": "https://patches.dpdk.org/patch/83/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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": "<1406090907-24347-1-git-send-email-changchun.ouyang@intel.com>",
    "date": "2014-07-23T04:48:27",
    "name": "[dpdk-dev,v2] ethdev: Rename RX/TX enable queue field for queue start and stop",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ddfb6be5a34e42a3d1d3bb68aa6844e38e989aba",
    "submitter": {
        "id": 31,
        "url": "https://patches.dpdk.org/api/people/31/",
        "name": "Ouyang Changchun",
        "email": "changchun.ouyang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/83/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/83/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/83/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "Received": [
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 28DDA594D\n\tfor <dev@dpdk.org>; Wed, 23 Jul 2014 06:47:14 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP; 22 Jul 2014 21:42:01 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 22 Jul 2014 21:48:34 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s6N4mW0t029260;\n\tWed, 23 Jul 2014 12:48:32 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s6N4mTIt024448; Wed, 23 Jul 2014 12:48:31 +0800",
            "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s6N4mSq3024444; \n\tWed, 23 Jul 2014 12:48:28 +0800"
        ],
        "From": "Ouyang Changchun <changchun.ouyang@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Message-Id": "<1406090907-24347-1-git-send-email-changchun.ouyang@intel.com>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Date": "Wed, 23 Jul 2014 12:48:27 +0800",
        "Subject": "[dpdk-dev] [PATCH v2] ethdev: Rename RX/TX enable queue field for\n\tqueue start and stop",
        "Precedence": "list",
        "X-List-Received-Date": "Wed, 23 Jul 2014 04:47:15 -0000",
        "X-BeenThere": "dev@dpdk.org",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<couyang@shecgisg004.sh.intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "X-ExtLoop1": "1",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "X-IronPort-AV": "E=Sophos;i=\"5.01,714,1400050800\"; d=\"scan'208\";a=\"565849462\""
    },
    "content": "Update comments for the field start_rx_per_q for better readability.\nRename the field name to rx_enable_queue for better readability too.\nAccordingly Update its reference in sample vhost.\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n examples/vhost/main.c             |  4 ++--\n lib/librte_ether/rte_ethdev.h     | 16 ++++++++++++++--\n lib/librte_pmd_ixgbe/ixgbe_rxtx.c |  8 ++++----\n lib/librte_pmd_ixgbe/ixgbe_rxtx.h |  4 ++--\n 4 files changed, 22 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/examples/vhost/main.c b/examples/vhost/main.c\nindex 193aa25..2eea431 100644\n--- a/examples/vhost/main.c\n+++ b/examples/vhost/main.c\n@@ -2984,9 +2984,9 @@ MAIN(int argc, char *argv[])\n \t\tchar pool_name[RTE_MEMPOOL_NAMESIZE];\n \t\tchar ring_name[RTE_MEMPOOL_NAMESIZE];\n \n-\t\trx_conf_default.start_rx_per_q = (uint8_t)zero_copy;\n+\t\trx_conf_default.rx_enable_queue = (uint8_t)zero_copy;\n \t\trx_conf_default.rx_drop_en = 0;\n-\t\ttx_conf_default.start_tx_per_q = (uint8_t)zero_copy;\n+\t\ttx_conf_default.tx_enable_queue = (uint8_t)zero_copy;\n \t\tnb_mbuf = num_rx_descriptor\n \t\t\t+ num_switching_cores * MBUF_CACHE_SIZE_ZCP\n \t\t\t+ num_switching_cores * MAX_PKT_BURST;\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 50df654..ba439f6 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -604,7 +604,16 @@ struct rte_eth_rxconf {\n \tstruct rte_eth_thresh rx_thresh; /**< RX ring threshold registers. */\n \tuint16_t rx_free_thresh; /**< Drives the freeing of RX descriptors. */\n \tuint8_t rx_drop_en; /**< Drop packets if no descriptors are available. */\n-\tuint8_t start_rx_per_q; /**< start rx per queue. */\n+\t/**< If rx_enable_queue is true, rte_eth_dev_rx_queue_start should be\n+\t\tinvocated to start RX for one queue after rte_eth_dev_start is\n+\t\tinvocated, and rte_eth_dev_rx_queue_start instead of\n+\t\trte_eth_dev_start is responsible for allocating mbuf from\n+\t\tmempool and setup the DMA physical address. It is useful in\n+\t\tsuch scenario: buffer address is not available at the point of\n+\t\trte_eth_dev_start's invocating but available later, e.g. in\n+\t\tVHOST zero copy case, the buffer address used to setup DMA\n+\t\taddress is available only after one VM(guest) startup. */\n+\tuint8_t rx_enable_queue;\n };\n \n #define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=1 for all mbufs */\n@@ -625,7 +634,10 @@ struct rte_eth_txconf {\n \tuint16_t tx_rs_thresh; /**< Drives the setting of RS bit on TXDs. */\n \tuint16_t tx_free_thresh; /**< Drives the freeing of TX buffers. */\n \tuint32_t txq_flags; /**< Set flags for the Tx queue */\n-\tuint8_t start_tx_per_q; /**< start tx per queue. */\n+\t/**< If tx_enable_queue is true, rte_eth_dev_tx_queue_start must be\n+\t\tinvocated to start TX for one queue after rte_eth_dev_start is\n+\t\tinvocated. Refer to start_rx_per_q for the use case. */\n+\tuint8_t tx_enable_queue;\n };\n \n /**\ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\nindex dfc2076..2872fad 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\n@@ -1846,7 +1846,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \ttxq->port_id = dev->data->port_id;\n \ttxq->txq_flags = tx_conf->txq_flags;\n \ttxq->ops = &def_txq_ops;\n-\ttxq->start_tx_per_q = tx_conf->start_tx_per_q;\n+\ttxq->tx_enable_queue = tx_conf->tx_enable_queue;\n \n \t/*\n \t * Modification to set VFTDT for virtual function if vf is detected\n@@ -2091,7 +2091,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,\n \trxq->crc_len = (uint8_t) ((dev->data->dev_conf.rxmode.hw_strip_crc) ?\n \t\t\t\t\t\t\t0 : ETHER_CRC_LEN);\n \trxq->drop_en = rx_conf->rx_drop_en;\n-\trxq->start_rx_per_q = rx_conf->start_rx_per_q;\n+\trxq->rx_enable_queue = rx_conf->rx_enable_queue;\n \n \t/*\n \t * Allocate RX ring hardware descriptors. A memzone large enough to\n@@ -3652,13 +3652,13 @@ ixgbe_dev_rxtx_start(struct rte_eth_dev *dev)\n \n \tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n \t\ttxq = dev->data->tx_queues[i];\n-\t\tif (!txq->start_tx_per_q)\n+\t\tif (!txq->tx_enable_queue)\n \t\t\tixgbe_dev_tx_queue_start(dev, i);\n \t}\n \n \tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n \t\trxq = dev->data->rx_queues[i];\n-\t\tif (!rxq->start_rx_per_q)\n+\t\tif (!rxq->rx_enable_queue)\n \t\t\tixgbe_dev_rx_queue_start(dev, i);\n \t}\n \ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h\nindex 64c0695..d6d856e 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h\n@@ -135,7 +135,7 @@ struct igb_rx_queue {\n \tuint8_t             port_id;  /**< Device port identifier. */\n \tuint8_t             crc_len;  /**< 0 if CRC stripped, 4 otherwise. */\n \tuint8_t             drop_en;  /**< If not 0, set SRRCTL.Drop_En. */\n-\tuint8_t             start_rx_per_q;\n+\tuint8_t             rx_enable_queue;\n #ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC\n \t/** need to alloc dummy mbuf, for wraparound when scanning hw ring */\n \tstruct rte_mbuf fake_mbuf;\n@@ -200,7 +200,7 @@ struct igb_tx_queue {\n \t/** Hardware context0 history. */\n \tstruct ixgbe_advctx_info ctx_cache[IXGBE_CTX_NUM];\n \tstruct ixgbe_txq_ops *ops;          /**< txq ops */\n-\tuint8_t             start_tx_per_q;\n+\tuint8_t             tx_enable_queue;\n };\n \n struct ixgbe_txq_ops {\n",
    "prefixes": [
        "dpdk-dev",
        "v2"
    ]
}