get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 540,
    "url": "https://patches.dpdk.org/api/patches/540/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1411707653-10661-1-git-send-email-changchun.ouyang@intel.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": "<1411707653-10661-1-git-send-email-changchun.ouyang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1411707653-10661-1-git-send-email-changchun.ouyang@intel.com",
    "date": "2014-09-26T05:00:53",
    "name": "[dpdk-dev,v3] ethdev: Rename RX/TX enable queue field for queue start and stop",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "04d035d1715bdc3696fc304ebbaaa41628267872",
    "submitter": {
        "id": 31,
        "url": "https://patches.dpdk.org/api/people/31/?format=api",
        "name": "Ouyang Changchun",
        "email": "changchun.ouyang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1411707653-10661-1-git-send-email-changchun.ouyang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/540/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/540/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 3706E7DFC;\n\tFri, 26 Sep 2014 06:54:44 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id B01F17DFB\n\tfor <dev@dpdk.org>; Fri, 26 Sep 2014 06:54:41 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 25 Sep 2014 22:01:01 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 25 Sep 2014 22:00:59 -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 s8Q50wCH000909;\n\tFri, 26 Sep 2014 13:00:58 +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 s8Q50u09010694; Fri, 26 Sep 2014 13:00:58 +0800",
            "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8Q50uwJ010690; \n\tFri, 26 Sep 2014 13:00:56 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,603,1406617200\"; d=\"scan'208\";a=\"579287673\"",
        "From": "Ouyang Changchun <changchun.ouyang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 26 Sep 2014 13:00:53 +0800",
        "Message-Id": "<1411707653-10661-1-git-send-email-changchun.ouyang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "Subject": "[dpdk-dev] [PATCH v3] ethdev: Rename RX/TX enable queue field for\n\tqueue start and stop",
        "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": "V3 change:\n - Rename field name to rx_deferred_start/tx_deferred_start in\n   both ixgbe and i40e PMD. \n - Move the doxygen comments for rx_deferred_start after it is declared.\n - Simplify/split the long description and move some to doxygen comments of\n   rte_eth_dev_rx_queue_start and rte_eth_dev_tx_queue_start.\n\nV2 and V1 change:\n - Update comments for the field start_rx_per_q for better readability.\n - Rename the field name to rx_enable_queue for better readability too.\n - Accordingly Update its reference in sample vhost.\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n examples/vhost/main.c                |  9 +++++++--\n lib/librte_ether/rte_ethdev.h        | 11 +++++++----\n lib/librte_pmd_i40e/i40e_ethdev.c    |  4 ++--\n lib/librte_pmd_i40e/i40e_ethdev_vf.c |  4 ++--\n lib/librte_pmd_i40e/i40e_rxtx.c      |  4 ++--\n lib/librte_pmd_i40e/i40e_rxtx.h      |  4 ++--\n lib/librte_pmd_ixgbe/ixgbe_rxtx.c    |  8 ++++----\n lib/librte_pmd_ixgbe/ixgbe_rxtx.h    |  6 ++++--\n 8 files changed, 30 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/examples/vhost/main.c b/examples/vhost/main.c\nindex 85ee8b8..4fd164d 100644\n--- a/examples/vhost/main.c\n+++ b/examples/vhost/main.c\n@@ -3607,9 +3607,14 @@ 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\t/*\n+\t\t * Zero copy defers queue RX/TX start to the time when guest\n+\t\t * finishes its startup and packet buffers from that guest are\n+\t\t * available.\n+\t\t */\n+\t\trx_conf_default.rx_deferred_start = (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_deferred_start = (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 60b24c5..bef8962 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -604,7 +604,7 @@ 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+\tuint8_t rx_deferred_start; /**< RX not start in rte_eth_dev_start(). */\n };\n \n #define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=1 for all mbufs */\n@@ -625,7 +625,7 @@ 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+\tuint8_t tx_deferred_start; /**< TX not start in rte_eth_dev_start(). */\n };\n \n /**\n@@ -1795,7 +1795,9 @@ extern int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,\n extern int rte_eth_dev_socket_id(uint8_t port_id);\n \n /*\n- * Start specified RX queue of a port\n+ * Allocate mbuf from mempool, setup the DMA physical address\n+ * and then start RX for specified queue of a port. It is used\n+ * when rx_deferred_start flag of the specified queue is true.\n  *\n  * @param port_id\n  *   The port identifier of the Ethernet device\n@@ -1827,7 +1829,8 @@ extern int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id);\n extern int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id);\n \n /*\n- * Start specified TX queue of a port\n+ * Start TX for specified queue of a port. It is used when tx_deferred_start\n+ * flag of the specified queue is true.\n  *\n  * @param port_id\n  *   The port identifier of the Ethernet device\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex a00d6ca..26f1799 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -3017,7 +3017,7 @@ i40e_vsi_switch_tx_queues(struct i40e_vsi *vsi, bool on)\n \t\ttxq = dev_data->tx_queues[i];\n \t\t/* Don't operate the queue if not configured or\n \t\t * if starting only per queue */\n-\t\tif (!txq->q_set || (on && txq->start_tx_per_q))\n+\t\tif (!txq->q_set || (on && txq->tx_deferred_start))\n \t\t\tcontinue;\n \t\tif (on)\n \t\t\tret = i40e_dev_tx_queue_start(dev, i);\n@@ -3095,7 +3095,7 @@ i40e_vsi_switch_rx_queues(struct i40e_vsi *vsi, bool on)\n \t\trxq = dev_data->rx_queues[i];\n \t\t/* Don't operate the queue if not configured or\n \t\t * if starting only per queue */\n-\t\tif (!rxq->q_set || (on && rxq->start_rx_per_q))\n+\t\tif (!rxq->q_set || (on && rxq->rx_deferred_start))\n \t\t\tcontinue;\n \t\tif (on)\n \t\t\tret = i40e_dev_rx_queue_start(dev, i);\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\nindex f6c4873..809c1f0 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n@@ -675,7 +675,7 @@ i40evf_start_queues(struct rte_eth_dev *dev)\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_deferred_start)\n \t\t\tcontinue;\n \t\tif (i40evf_dev_rx_queue_start(dev, i) != 0) {\n \t\t\tPMD_DRV_LOG(ERR, \"Fail to start queue %u\", i);\n@@ -685,7 +685,7 @@ i40evf_start_queues(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_deferred_start)\n \t\t\tcontinue;\n \t\tif (i40evf_dev_tx_queue_start(dev, i) != 0) {\n \t\t\tPMD_DRV_LOG(ERR, \"Fail to start queue %u\", i);\ndiff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c\nindex 099699c..7c5b6a8 100644\n--- a/lib/librte_pmd_i40e/i40e_rxtx.c\n+++ b/lib/librte_pmd_i40e/i40e_rxtx.c\n@@ -1609,7 +1609,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,\n \t\t\t\t\t\t\t0 : ETHER_CRC_LEN);\n \trxq->drop_en = rx_conf->rx_drop_en;\n \trxq->vsi = vsi;\n-\trxq->start_rx_per_q = rx_conf->start_rx_per_q;\n+\trxq->rx_deferred_start = rx_conf->rx_deferred_start;\n \n \t/* Allocate the maximun number of RX ring hardware descriptor. */\n \tring_size = sizeof(union i40e_rx_desc) * I40E_MAX_RING_DESC;\n@@ -1895,7 +1895,7 @@ i40e_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->vsi = vsi;\n-\ttxq->start_tx_per_q = tx_conf->start_tx_per_q;\n+\ttxq->tx_deferred_start = tx_conf->tx_deferred_start;\n \n #ifdef RTE_LIBRTE_XEN_DOM0\n \ttxq->tx_ring_phys_addr = rte_mem_phy2mch(tz->memseg_id, tz->phys_addr);\ndiff --git a/lib/librte_pmd_i40e/i40e_rxtx.h b/lib/librte_pmd_i40e/i40e_rxtx.h\nindex 4478592..af932e3 100644\n--- a/lib/librte_pmd_i40e/i40e_rxtx.h\n+++ b/lib/librte_pmd_i40e/i40e_rxtx.h\n@@ -112,7 +112,7 @@ struct i40e_rx_queue {\n \tuint16_t max_pkt_len; /* Maximum packet length */\n \tuint8_t hs_mode; /* Header Split mode */\n \tbool q_set; /**< indicate if rx queue has been configured */\n-\tbool start_rx_per_q; /**< don't start this queue in dev start */\n+\tbool rx_deferred_start; /**< don't start this queue in dev start */\n };\n \n struct i40e_tx_entry {\n@@ -151,7 +151,7 @@ struct i40e_tx_queue {\n \tuint16_t tx_next_dd;\n \tuint16_t tx_next_rs;\n \tbool q_set; /**< indicate if tx queue has been configured */\n-\tbool start_tx_per_q; /**< don't start this queue in dev start */\n+\tbool tx_deferred_start; /**< don't start this queue in dev start */\n };\n \n int i40e_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);\ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\nindex 52ec99e..d436151 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\n@@ -1851,7 +1851,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_deferred_start = tx_conf->tx_deferred_start;\n \n \t/*\n \t * Modification to set VFTDT for virtual function if vf is detected\n@@ -2121,7 +2121,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_deferred_start = rx_conf->rx_deferred_start;\n \n \t/*\n \t * Allocate RX ring hardware descriptors. A memzone large enough to\n@@ -3693,13 +3693,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_deferred_start)\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_deferred_start)\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 7b5ac0e..228ee02 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h\n@@ -126,7 +126,8 @@ 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_deferred_start;\n+\t\t\t    /**< don't start this queue in dev start. */\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@@ -207,7 +208,8 @@ 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_deferred_start;\n+\t\t\t    /**< don't start this queue in dev start. */\n };\n \n struct ixgbe_txq_ops {\n",
    "prefixes": [
        "dpdk-dev",
        "v3"
    ]
}