Show a patch.

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

{
    "id": 73476,
    "url": "https://patches.dpdk.org/api/patches/73476/",
    "web_url": "https://patches.dpdk.org/patch/73476/",
    "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": "<20200707222225.33446-2-ajit.khaparde@broadcom.com>",
    "date": "2020-07-07T22:22:23",
    "name": "[v5,1/3] net/bnxt: disable vector receive for mark action",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2e64adcd76d1bec482408d977a2b6b8e1115f608",
    "submitter": {
        "id": 501,
        "url": "https://patches.dpdk.org/api/people/501/",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "https://patches.dpdk.org/api/users/1766/",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "https://patches.dpdk.org/patch/73476/mbox/",
    "series": [
        {
            "id": 10866,
            "url": "https://patches.dpdk.org/api/series/10866/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10866",
            "date": "2020-07-07T22:22:22",
            "name": "net/bnxt: vector mode enhancements",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/10866/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73476/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/73476/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<20200707222225.33446-1-ajit.khaparde@broadcom.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7DC2CA00BE;\n\tWed,  8 Jul 2020 00:22:41 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ECB271DEDD;\n\tWed,  8 Jul 2020 00:22:35 +0200 (CEST)",
            "from mail-ej1-f100.google.com (mail-ej1-f100.google.com\n [209.85.218.100]) by dpdk.org (Postfix) with ESMTP id 9BBE71DED0\n for <dev@dpdk.org>; Wed,  8 Jul 2020 00:22:33 +0200 (CEST)",
            "by mail-ej1-f100.google.com with SMTP id dr13so48385860ejc.3\n for <dev@dpdk.org>; Tue, 07 Jul 2020 15:22:33 -0700 (PDT)",
            "from C02VPB22HTD6.wifi.broadcom.net ([192.19.223.252])\n by smtp-relay.gmail.com with ESMTPS id gj18sm12603ejb.18.2020.07.07.15.22.32\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Tue, 07 Jul 2020 15:22:33 -0700 (PDT)"
        ],
        "References": "\n <CACZ4nhuiiPoX=h-9xUYk+STPhespH86MJz94pnWoUxe9aburZQ@mail.gmail.com>\n <20200707222225.33446-1-ajit.khaparde@broadcom.com>",
        "X-Google-Smtp-Source": "\n ABdhPJwnVKfUGbodhVOGGX0bNNvD8zgV7NUD71lEbdmsE6Q+a+X4t/MmTmUYxDu+Pdo7iVlYzcP6N2yGQN1r",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=Nt36lCYvgLJhXcC9eFwGJMgKfCATT2JQ/Qcag0Bdg/E=;\n b=IC1DwGrdpYYWZEKod32oJfo9NuS1a3wHfer6DZtGkzYWse8Wa0XDPUVfU7lIU1ksNv\n YwDsUoZogboNxk5JJbZsTjiGuO7hOuTPUoI8Gl/vvlZhQlsJ2lKSg+XngYKRyBxurVVf\n ZM9G4s5fu3bjxiWeY4bjOmWAtPgiQtng2RZ98=",
        "MIME-Version": "1.0",
        "X-Received": "by 2002:a17:906:1386:: with SMTP id\n f6mr49851564ejc.66.1594160553082;\n Tue, 07 Jul 2020 15:22:33 -0700 (PDT)",
        "Message-Id": "<20200707222225.33446-2-ajit.khaparde@broadcom.com>",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=Nt36lCYvgLJhXcC9eFwGJMgKfCATT2JQ/Qcag0Bdg/E=;\n b=XbWSwqOqt1rHQNvUI0NlMJWGHSkBMhLQaJRYryKr5qNH6Az36vgMcPmMdeB7fI0jt+\n Cxk3kh61G27gYaJURc3m49lr69PAWEewg83cnBeakUS7L0EWX7JIlkgIGwb4nkQMh9jF\n BBF4EjGSx7qUiPe4JnBGrccEAajcdG4VgjI9ltbU79jKDvlqncD052WqmqUVDuLERrSh\n meXS4+px5tNBf5hKVzWQJNq+KfxC/v3ncY6W4WWn5jUf//5KkznIgZsg2IC62aVkzyGo\n d31HI1OaFPX1kntZn7m23zhS/OhhmafiQqh5Sxom7x+pQ7XgRlZUvx70NUUPfrC8juV+\n feRg==",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Content-Transfer-Encoding": "8bit",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "X-Relaying-Domain": "broadcom.com",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "dev@dpdk.org",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Tue,  7 Jul 2020 15:22:23 -0700",
        "X-Gm-Message-State": "AOAM532VOqRK4ZBhJEZXSfHFY2TM85hlL3yOTpF1Fyg45xkQM9ApOuIv\n f72yipzmQxDQBRnq8QZLkK637jkmVu73hEYq+gs4MkwDrv8DbH5MF4jstDtc/plvngc+oP0kwGl\n sidiBLA2J2fQcUWkYtXc3ZFe634O6Wj8HNUrlGomAUrfVVReo9YlH8I+gFxicILZE9OoNU33tsH\n 5qtw==",
        "Cc": "Lance Richardson <lance.richardson@broadcom.com>,\n Thomas Monjalon <thomas@monjalon.net>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-BeenThere": "dev@dpdk.org",
        "Subject": "[dpdk-dev] [PATCH v5 1/3] net/bnxt: disable vector receive for mark\n\taction"
    },
    "content": "From: Lance Richardson <lance.richardson@broadcom.com>\n\nThe bnxt vector mode receive handler does not support the rte_flow\n'mark' action. Since we cannot know in advance whether this action\nwill be required, add support for dynamically switching from vector\nto non-vector receive when the first flow create request with a\nmark action is processed.\n\nFixes: 94eb699bc82e (\"net/bnxt: support flow mark action\")\nSuggested-by: Thomas Monjalon <thomas@monjalon.net>\nSigned-off-by: Lance Richardson <lance.richardson@broadcom.com>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/bnxt_flow.c | 20 ++++++++------------\n drivers/net/bnxt/bnxt_rxr.c  | 18 ++++++++++++++++++\n 2 files changed, 26 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c\nindex 84a21dba9..19bc66a5a 100644\n--- a/drivers/net/bnxt/bnxt_flow.c\n+++ b/drivers/net/bnxt/bnxt_flow.c\n@@ -18,6 +18,7 @@\n #include \"bnxt_hwrm.h\"\n #include \"bnxt_ring.h\"\n #include \"bnxt_rxq.h\"\n+#include \"bnxt_rxr.h\"\n #include \"bnxt_vnic.h\"\n #include \"hsi_struct_def_dpdk.h\"\n \n@@ -1403,18 +1404,6 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,\n \t\tbnxt_update_filter_flags_en(filter, filter1, use_ntuple);\n \t\tbreak;\n \tcase RTE_FLOW_ACTION_TYPE_MARK:\n-\t\tif (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {\n-\t\t\tPMD_DRV_LOG(DEBUG,\n-\t\t\t\t    \"Disable vector processing for mark\\n\");\n-\t\t\trte_flow_error_set(error,\n-\t\t\t\t\t   ENOTSUP,\n-\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ACTION,\n-\t\t\t\t\t   act,\n-\t\t\t\t\t   \"Disable vector processing for mark\");\n-\t\t\trc = -rte_errno;\n-\t\t\tgoto ret;\n-\t\t}\n-\n \t\tif (bp->mark_table == NULL) {\n \t\t\trte_flow_error_set(error,\n \t\t\t\t\t   ENOMEM,\n@@ -1425,6 +1414,13 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,\n \t\t\tgoto ret;\n \t\t}\n \n+\t\tif (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {\n+\t\t\tPMD_DRV_LOG(DEBUG,\n+\t\t\t\t    \"Disabling vector processing for mark\\n\");\n+\t\t\tbp->eth_dev->rx_pkt_burst = bnxt_recv_pkts;\n+\t\t\tbp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;\n+\t\t}\n+\n \t\tfilter->valid_flags |= BNXT_FLOW_MARK_FLAG;\n \t\tfilter->mark = ((const struct rte_flow_action_mark *)\n \t\t\t\tact->conf)->id;\ndiff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c\nindex 64058879e..eb6f33c7b 100644\n--- a/drivers/net/bnxt/bnxt_rxr.c\n+++ b/drivers/net/bnxt/bnxt_rxr.c\n@@ -782,6 +782,24 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t     !rte_spinlock_trylock(&rxq->lock)))\n \t\treturn 0;\n \n+#if defined(RTE_ARCH_X86)\n+\t/*\n+\t * Replenish buffers if needed when a transition has been made from\n+\t * vector- to non-vector- receive processing.\n+\t */\n+\twhile (unlikely(rxq->rxrearm_nb)) {\n+\t\tif (!bnxt_alloc_rx_data(rxq, rxr, rxq->rxrearm_start)) {\n+\t\t\trxr->rx_prod = rxq->rxrearm_start;\n+\t\t\tbnxt_db_write(&rxr->rx_db, rxr->rx_prod);\n+\t\t\trxq->rxrearm_start++;\n+\t\t\trxq->rxrearm_nb--;\n+\t\t} else {\n+\t\t\t/* Retry allocation on next call. */\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+#endif\n+\n \t/* Handle RX burst request */\n \twhile (1) {\n \t\tcons = RING_CMP(cpr->cp_ring_struct, raw_cons);\n",
    "prefixes": [
        "v5",
        "1/3"
    ]
}