get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52593,
    "url": "http://patches.dpdk.org/api/patches/52593/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1554900829-16180-3-git-send-email-david.marchand@redhat.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": "<1554900829-16180-3-git-send-email-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1554900829-16180-3-git-send-email-david.marchand@redhat.com",
    "date": "2019-04-10T12:53:47",
    "name": "[2/4] net/bonding: fix LACP fast queue Rx handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "181c1c4f952964c7b831a3adf9f0e57b5fa20e1c",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1554900829-16180-3-git-send-email-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 4240,
            "url": "http://patches.dpdk.org/api/series/4240/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4240",
            "date": "2019-04-10T12:53:45",
            "name": "lacp rx/tx handlers fixes for bonding pmd",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4240/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/52593/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/52593/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 F2F491B12A;\n\tWed, 10 Apr 2019 14:54:16 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 01D871B118;\n\tWed, 10 Apr 2019 14:54:07 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 6399B3082E50;\n\tWed, 10 Apr 2019 12:54:06 +0000 (UTC)",
            "from dmarchan.remote.csb (ovpn-204-129.brq.redhat.com\n\t[10.40.204.129])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 1F2C95C28F;\n\tWed, 10 Apr 2019 12:54:04 +0000 (UTC)"
        ],
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "chas3@att.com,\n\tp.oltarzewski@gmail.com,\n\tstable@dpdk.org",
        "Date": "Wed, 10 Apr 2019 14:53:47 +0200",
        "Message-Id": "<1554900829-16180-3-git-send-email-david.marchand@redhat.com>",
        "In-Reply-To": "<1554900829-16180-1-git-send-email-david.marchand@redhat.com>",
        "References": "<1554900829-16180-1-git-send-email-david.marchand@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.46]); Wed, 10 Apr 2019 12:54:06 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH 2/4] net/bonding: fix LACP fast queue Rx handler",
        "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": "fast queue Rx burst function is missing checks on promisc and the\nslave collecting state.\nDefine an inline wrapper to have a common base.\n\nFixes: 112891cd27e5 (\"net/bonding: add dedicated HW queues for LACP control\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/net/bonding/rte_eth_bond_pmd.c | 73 +++++++++++++---------------------\n 1 file changed, 27 insertions(+), 46 deletions(-)",
    "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\nindex c193d6d..989be5c 100644\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\n@@ -256,48 +256,9 @@\n \treturn 0;\n }\n \n-static uint16_t\n-bond_ethdev_rx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,\n-\t\tuint16_t nb_pkts)\n-{\n-\tstruct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;\n-\tstruct bond_dev_private *internals = bd_rx_q->dev_private;\n-\tuint16_t num_rx_total = 0;\t/* Total number of received packets */\n-\tuint16_t slaves[RTE_MAX_ETHPORTS];\n-\tuint16_t slave_count;\n-\tuint16_t active_slave;\n-\tuint16_t i;\n-\n-\t/* Copy slave list to protect against slave up/down changes during tx\n-\t * bursting */\n-\tslave_count = internals->active_slave_count;\n-\tactive_slave = internals->active_slave;\n-\tmemcpy(slaves, internals->active_slaves,\n-\t\t\tsizeof(internals->active_slaves[0]) * slave_count);\n-\n-\tfor (i = 0; i < slave_count && nb_pkts; i++) {\n-\t\tuint16_t num_rx_slave;\n-\n-\t\t/* Read packets from this slave */\n-\t\tnum_rx_slave = rte_eth_rx_burst(slaves[active_slave],\n-\t\t\t\t\t\tbd_rx_q->queue_id,\n-\t\t\t\t\t\tbufs + num_rx_total, nb_pkts);\n-\t\tnum_rx_total += num_rx_slave;\n-\t\tnb_pkts -= num_rx_slave;\n-\n-\t\tif (++active_slave == slave_count)\n-\t\t\tactive_slave = 0;\n-\t}\n-\n-\tif (++internals->active_slave >= slave_count)\n-\t\tinternals->active_slave = 0;\n-\n-\treturn num_rx_total;\n-}\n-\n-static uint16_t\n-bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,\n-\t\tuint16_t nb_pkts)\n+static inline uint16_t\n+rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,\n+\t\tbool dedicated_rxq)\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@@ -357,10 +318,16 @@\n \t\t\thdr = rte_pktmbuf_mtod(bufs[j], struct ether_hdr *);\n \t\t\tsubtype = ((struct slow_protocol_frame *)hdr)->slow_protocol.subtype;\n \n-\t\t\t/* Remove packet from array if it is slow packet or slave is not\n-\t\t\t * in collecting state or bonding interface is not in promiscuous\n-\t\t\t * mode and packet address does not match. */\n-\t\t\tif (unlikely(is_lacp_packets(hdr->ether_type, subtype, bufs[j]) ||\n+\t\t\t/* Remove packet from array if:\n+\t\t\t * - it is slow packet but no dedicated rxq is present,\n+\t\t\t * - slave is not in collecting state,\n+\t\t\t * - bonding interface is not in promiscuous mode and\n+\t\t\t *   packet is not multicast and address does not match,\n+\t\t\t */\n+\t\t\tif (unlikely(\n+\t\t\t\t(!dedicated_rxq &&\n+\t\t\t\t is_lacp_packets(hdr->ether_type, subtype,\n+\t\t\t\t\t\t bufs[j])) ||\n \t\t\t\t!collecting ||\n \t\t\t\t(!promisc &&\n \t\t\t\t !is_multicast_ether_addr(&hdr->d_addr) &&\n@@ -392,6 +359,20 @@\n \treturn num_rx_total;\n }\n \n+static uint16_t\n+bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,\n+\t\tuint16_t nb_pkts)\n+{\n+\treturn rx_burst_8023ad(queue, bufs, nb_pkts, false);\n+}\n+\n+static uint16_t\n+bond_ethdev_rx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,\n+\t\tuint16_t nb_pkts)\n+{\n+\treturn rx_burst_8023ad(queue, bufs, nb_pkts, true);\n+}\n+\n #if defined(RTE_LIBRTE_BOND_DEBUG_ALB) || defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1)\n uint32_t burstnumberRX;\n uint32_t burstnumberTX;\n",
    "prefixes": [
        "2/4"
    ]
}