List comments

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

[
    {
        "id": 413,
        "web_url": "https://patches.dpdk.org/comment/413/",
        "msgid": "<D01A7C4F.27B7%rsanford@akamai.com>",
        "date": "2014-08-20T20:25:15",
        "subject": "Re: [dpdk-dev] [PATCH 2/6] bond: removing switch statement from rx\n\tburst method",
        "submitter": {
            "id": 59,
            "url": "https://patches.dpdk.org/api/people/59/?format=api",
            "name": "Sanford, Robert",
            "email": "rsanford@akamai.com"
        },
        "content": "Reviewed-by: Robert Sanford <rsanford@akamai.com>\n\n\n>Splitting rx burst function into seperate functions to avoid the need for\n>a switch statement and also to match the structure of the tx burst\n>functions.\n>\n>Signed-off-by: Declan Doherty <declan.doherty@intel.com>\n>---\n> lib/librte_pmd_bond/rte_eth_bond_pmd.c |   62\n>++++++++++++++++++--------------\n> 1 files changed, 35 insertions(+), 27 deletions(-)\n>\n>diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n>b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n>index cd3eecf..683b146 100644\n>--- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n>+++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n>@@ -59,33 +59,37 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf\n>**bufs, uint16_t nb_pkts)\n> \n> \tinternals = bd_rx_q->dev_private;\n> \n>-\tswitch (internals->mode) {\n>-\tcase BONDING_MODE_ROUND_ROBIN:\n>-\tcase BONDING_MODE_BROADCAST:\n>-\tcase BONDING_MODE_BALANCE:\n>-\t\tfor (i = 0; i < internals->active_slave_count && nb_pkts; i++) {\n>-\t\t\t/* Offset of pointer to *bufs increases as packets are received\n>-\t\t\t * from other slaves */\n>-\t\t\tnum_rx_slave = rte_eth_rx_burst(internals->active_slaves[i],\n>-\t\t\t\t\tbd_rx_q->queue_id, bufs + num_rx_total, nb_pkts);\n>-\t\t\tif (num_rx_slave) {\n>-\t\t\t\tnum_rx_total += num_rx_slave;\n>-\t\t\t\tnb_pkts -= num_rx_slave;\n>-\t\t\t}\n>+\tfor (i = 0; i < internals->active_slave_count && nb_pkts; i++) {\n>+\t\t/* Offset of pointer to *bufs increases as packets are received\n>+\t\t * from other slaves */\n>+\t\tnum_rx_slave = rte_eth_rx_burst(internals->active_slaves[i],\n>+\t\t\t\tbd_rx_q->queue_id, bufs + num_rx_total, nb_pkts);\n>+\t\tif (num_rx_slave) {\n>+\t\t\tnum_rx_total += num_rx_slave;\n>+\t\t\tnb_pkts -= num_rx_slave;\n> \t\t}\n>-\t\tbreak;\n>-\tcase BONDING_MODE_ACTIVE_BACKUP:\n>-\t\tnum_rx_slave = rte_eth_rx_burst(internals->current_primary_port,\n>-\t\t\t\tbd_rx_q->queue_id, bufs, nb_pkts);\n>-\t\tif (num_rx_slave)\n>-\t\t\tnum_rx_total = num_rx_slave;\n>-\t\tbreak;\n> \t}\n>+\n> \treturn num_rx_total;\n> }\n> \n> static uint16_t\n>-bond_ethdev_tx_round_robin(void *queue, struct rte_mbuf **bufs,\n>+bond_ethdev_rx_burst_active_backup(void *queue, struct rte_mbuf **bufs,\n>+\t\tuint16_t nb_pkts)\n>+{\n>+\tstruct bond_dev_private *internals;\n>+\n>+\t/* Cast to structure, containing bonded device's port id and queue id */\n>+\tstruct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;\n>+\n>+\tinternals = bd_rx_q->dev_private;\n>+\n>+\treturn rte_eth_rx_burst(internals->current_primary_port,\n>+\t\t\tbd_rx_q->queue_id, bufs, nb_pkts);\n>+}\n>+\n>+static uint16_t\n>+bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs,\n> \t\tuint16_t nb_pkts)\n> {\n> \tstruct bond_dev_private *dev_private;\n>@@ -134,7 +138,7 @@ bond_ethdev_tx_round_robin(void *queue, struct\n>rte_mbuf **bufs,\n> }\n> \n> static uint16_t\n>-bond_ethdev_tx_active_backup(void *queue,\n>+bond_ethdev_tx_burst_active_backup(void *queue,\n> \t\tstruct rte_mbuf **bufs, uint16_t nb_pkts)\n> {\n> \tstruct bond_dev_private *internals;\n>@@ -270,7 +274,8 @@ xmit_slave_hash(const struct rte_mbuf *buf, uint8_t\n>slave_count, uint8_t policy)\n> }\n> \n> static uint16_t\n>-bond_ethdev_tx_balance(void *queue, struct rte_mbuf **bufs, uint16_t\n>nb_pkts)\n>+bond_ethdev_tx_burst_balance(void *queue, struct rte_mbuf **bufs,\n>+\t\tuint16_t nb_pkts)\n> {\n> \tstruct bond_dev_private *internals;\n> \tstruct bond_tx_queue *bd_tx_q;\n>@@ -480,22 +485,25 @@ bond_ethdev_mode_set(struct rte_eth_dev *eth_dev,\n>int mode)\n> \n> \tswitch (mode) {\n> \tcase BONDING_MODE_ROUND_ROBIN:\n>-\t\teth_dev->tx_pkt_burst = bond_ethdev_tx_round_robin;\n>+\t\teth_dev->tx_pkt_burst = bond_ethdev_tx_burst_round_robin;\n>+\t\teth_dev->rx_pkt_burst = bond_ethdev_rx_burst;\n> \t\tbreak;\n> \tcase BONDING_MODE_ACTIVE_BACKUP:\n>-\t\teth_dev->tx_pkt_burst = bond_ethdev_tx_active_backup;\n>+\t\teth_dev->tx_pkt_burst = bond_ethdev_tx_burst_active_backup;\n>+\t\teth_dev->rx_pkt_burst = bond_ethdev_rx_burst_active_backup;\n> \t\tbreak;\n> \tcase BONDING_MODE_BALANCE:\n>-\t\teth_dev->tx_pkt_burst = bond_ethdev_tx_balance;\n>+\t\teth_dev->tx_pkt_burst = bond_ethdev_tx_burst_balance;\n>+\t\teth_dev->rx_pkt_burst = bond_ethdev_rx_burst;\n> \t\tbreak;\n> \tcase BONDING_MODE_BROADCAST:\n> \t\teth_dev->tx_pkt_burst = bond_ethdev_tx_burst_broadcast;\n>+\t\teth_dev->rx_pkt_burst = bond_ethdev_rx_burst;\n> \t\tbreak;\n> \tdefault:\n> \t\treturn -1;\n> \t}\n> \n>-\teth_dev->rx_pkt_burst = bond_ethdev_rx_burst;\n> \tinternals->mode = mode;\n> \n> \treturn 0;\n>-- \n>1.7.0.7\n>",
        "headers": {
            "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
            "Return-Path": "<rsanford@akamai.com>",
            "Content-Language": "en-US",
            "Accept-Language": "en-US",
            "Thread-Topic": "[dpdk-dev] [PATCH 2/6] bond: removing switch statement from rx\n\tburst method",
            "To": "Declan Doherty <declan.doherty@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>",
            "Thread-Index": "Ac+8tNpgDRv8tmn0Q7mMNwGvW0Ulfg==",
            "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
            "Message-ID": "<D01A7C4F.27B7%rsanford@akamai.com>",
            "X-BeenThere": "dev@dpdk.org",
            "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "Subject": "Re: [dpdk-dev] [PATCH 2/6] bond: removing switch statement from rx\n\tburst method",
            "Received": [
                "from prod-mail-xrelay06.akamai.com (prod-mail-xrelay06.akamai.com\n\t[96.6.114.98]) by dpdk.org (Postfix) with ESMTP id BBF2F5932\n\tfor <dev@dpdk.org>; Wed, 20 Aug 2014 22:21:43 +0200 (CEST)",
                "from prod-mail-xrelay06.akamai.com (localhost.localdomain\n\t[127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id DB98C1656D0;\n\tWed, 20 Aug 2014 20:25:16 +0000 (GMT)",
                "from prod-mail-relay09.akamai.com (prod-mail-relay09.akamai.com\n\t[172.27.22.68])\n\tby prod-mail-xrelay06.akamai.com (Postfix) with ESMTP id D0CC31656B1; \n\tWed, 20 Aug 2014 20:25:16 +0000 (GMT)",
                "from ustx2ex-cashub.dfw01.corp.akamai.com\n\t(ustx2ex-cashub7.dfw01.corp.akamai.com [172.27.25.73])\n\tby prod-mail-relay09.akamai.com (Postfix) with ESMTP id CC57A1E047;\n\tWed, 20 Aug 2014 20:25:16 +0000 (GMT)",
                "from USMBX2.msg.corp.akamai.com ([169.254.1.85]) by\n\tustx2ex-cashub7.dfw01.corp.akamai.com ([172.27.25.73]) with mapi;\n\tWed, 20 Aug 2014 15:25:16 -0500"
            ],
            "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
            "X-MS-TNEF-Correlator": "",
            "List-Post": "<mailto:dev@dpdk.org>",
            "In-Reply-To": "<1408456313-28812-3-git-send-email-declan.doherty@intel.com>",
            "Precedence": "list",
            "acceptlanguage": "en-US",
            "From": "\"Sanford, Robert\" <rsanford@akamai.com>",
            "X-MS-Has-Attach": "",
            "Content-Transfer-Encoding": "quoted-printable",
            "MIME-Version": "1.0",
            "References": "<1408456313-28812-1-git-send-email-declan.doherty@intel.com>\n\t<1408456313-28812-3-git-send-email-declan.doherty@intel.com>",
            "user-agent": "Microsoft-MacOutlook/14.4.3.140616",
            "X-List-Received-Date": "Wed, 20 Aug 2014 20:21:44 -0000",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "Content-Type": "text/plain; charset=\"us-ascii\"",
            "Date": "Wed, 20 Aug 2014 15:25:15 -0500",
            "X-Mailman-Version": "2.1.15"
        }
    }
]