get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 117608,
    "url": "https://patches.dpdk.org/api/patches/117608/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20221007174336.54354-29-andrew.boyer@amd.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": "<20221007174336.54354-29-andrew.boyer@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221007174336.54354-29-andrew.boyer@amd.com",
    "date": "2022-10-07T17:43:29",
    "name": "[28/35] net/ionic: add Q-in-CMB option controlled by devarg",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5b6d49c4c72301e1d9c5e00cc6bf886a91a910b9",
    "submitter": {
        "id": 2861,
        "url": "https://patches.dpdk.org/api/people/2861/?format=api",
        "name": "Andrew Boyer",
        "email": "Andrew.Boyer@amd.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20221007174336.54354-29-andrew.boyer@amd.com/mbox/",
    "series": [
        {
            "id": 25037,
            "url": "https://patches.dpdk.org/api/series/25037/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=25037",
            "date": "2022-10-07T17:43:01",
            "name": "net/ionic: updates for 22.11 release",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/25037/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/117608/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/117608/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5A7E3A04FD;\n\tFri,  7 Oct 2022 19:47:35 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3F63042C06;\n\tFri,  7 Oct 2022 19:45:11 +0200 (CEST)",
            "from NAM12-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam12on2061.outbound.protection.outlook.com [40.107.244.61])\n by mails.dpdk.org (Postfix) with ESMTP id 9DE8242BDA\n for <dev@dpdk.org>; Fri,  7 Oct 2022 19:45:08 +0200 (CEST)",
            "from MW4PR03CA0334.namprd03.prod.outlook.com (2603:10b6:303:dc::9)\n by DS0PR12MB6606.namprd12.prod.outlook.com (2603:10b6:8:d2::20) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Fri, 7 Oct\n 2022 17:45:04 +0000",
            "from CO1NAM11FT068.eop-nam11.prod.protection.outlook.com\n (2603:10b6:303:dc:cafe::59) by MW4PR03CA0334.outlook.office365.com\n (2603:10b6:303:dc::9) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24 via Frontend\n Transport; Fri, 7 Oct 2022 17:45:04 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n CO1NAM11FT068.mail.protection.outlook.com (10.13.175.142) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.5709.10 via Frontend Transport; Fri, 7 Oct 2022 17:45:03 +0000",
            "from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com\n (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 7 Oct\n 2022 12:45:00 -0500"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=b3kujDa1LY25hk2k6zmTWDp2Y93YS+fUIp+pY4xneOUAq6Ss2WJeBR3CioMoXA/EZ5NkP6aCmQpRYDWsmF8VwQMwqXm9L48xxhhQH0FQwOzkOHOdJiGHqrr68Hz8eD7N0CEptz5Yh3C/n5tytoF6EbYW8vECLx5wJNMXWHlJrNHZuswsSWWZtDliBpaFP3tBqqHCxASdHFzHKIDWBkF2KYlWwVGiR3O18VPz9A1McZgwbhtycahduJX2UjBgFNCWcsezXuKDpmPceJ23ZlLgRezhpGH3gk5Jj6vYSvLu0H9835F6V/NFfvH20W+mqsfY1UOI5H/vFftPNZRrFMFK5A==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=igqJeGQl/hO6E+Zt6A9Dhwam9JlCEQoKVnirkB4bhww=;\n b=aUWOg6vE5P/f8Q61tWBYhQL2hc5McUR3f9jHeZUxX01+Cy5pz6wVKAWMBnkUPTNrOyuOjq6Oc6YvVvq/XLpwkljM4s3MJseuJUJVxGZcUH+bI6TwAaxumDU408+Cf269YDsDrSUAoDyRANnmIs91W2/8hgSuW0GtJt1NvSF5LBqHnGEP7fKbaM7SPE2mSSVzAIzxe449ytzkdTj+G4LD/l6jGvrtAA1ewLruu1ot0nE19ysLB3Pk7WdRbGainUPWuUnO9XGePF3MHt3tVcJClviNwod2Ed8sCWlcIJ2BLhOaduzvuA1Ir5iAFLqhdE9KtnDXYk7GMtReZdgOBLjI4w==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass\n (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=igqJeGQl/hO6E+Zt6A9Dhwam9JlCEQoKVnirkB4bhww=;\n b=ZPX34y0SgxI2fRWluPeFrZSaVBtFOVEQO+6ruYLXgJj77XtTlck/j8iEvr0bl5JLQ5LZ5ovdod52EWxSqIRCcPUhw28f3SCrCPBs9tVr7lwOBg7vwLMozi0m5OGFlc0LGtk6PrlyxIW4N/O2uHqYTY7fZNbpBFFnSnq4oOnYS5o=",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 165.204.84.17)\n smtp.mailfrom=amd.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=amd.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of amd.com designates\n 165.204.84.17 as permitted sender) receiver=protection.outlook.com;\n client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C",
        "From": "Andrew Boyer <andrew.boyer@amd.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Andrew Boyer <andrew.boyer@amd.com>, Neel Patel <neel.patel@amd.com>",
        "Subject": "[PATCH 28/35] net/ionic: add Q-in-CMB option controlled by devarg",
        "Date": "Fri, 7 Oct 2022 10:43:29 -0700",
        "Message-ID": "<20221007174336.54354-29-andrew.boyer@amd.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20221007174336.54354-1-andrew.boyer@amd.com>",
        "References": "<20221007174336.54354-1-andrew.boyer@amd.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.180.168.240]",
        "X-ClientProxiedBy": "SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com\n (10.181.40.145)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "CO1NAM11FT068:EE_|DS0PR12MB6606:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "30fc1523-70e4-4683-490a-08daa88baa70",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n VWY+0yAX2hFNAEXzrEYanhxrdfndUne6asoDvmnjaqDwpG4iWYG/11wXIaKwsJQ+F5jpBgf+wdXvyS0J0IuK0AKS3NWkTQu8s8skhKspEqMVB6uxlfUFT9DpZZuDGhiWT7pNf6hwqIrwWx16RgLlrtWd8cyhBZIz9MBA7fIgbPVXOn7ugyqZY75eiz0VKrNFFr4qiswuHFiOvABzB56wtMpCcX8b8ssyjnBCGzto5tcDDO380GQmoLuOQgtWuxlP33/x/sy8NERcTWjlv/sVPahji7eScWcYlXfN7GiZuLaP+EglCjxSogDMwWPdkNtwzMOyrXjpnYjxTvYi/YZolvcFEWO38pthGXk+b0I9D/8nlbmhhBwUXz0FKCo+kPtos9H1Bka79X+4aA9IdCwO6DqtszHbw2rG59dpq0qRJYmycY9dJDEc+Bwn7eHvgnjpQXR/8fPtdjPNRlH/6YSpBZAsKOYA6hNLOTxEDZBQQeggVeKLWC9LKrG79JDvwk0nAH7oHTstPyqPRTHkAHRR/vjKHqifhDjbFziO5dLVnvBzGdDwhvKTkJg+19qbJrcj1BbVvB/ZWHo7lr3rY2WmjlOG/9THJpRbIhSR04qan8rfKpBexn6ZKrk6ronb8CdhMBfZQR1shXLLvaLlI1EbAw6RbJcBuRGjOU9n97LDGG/WZ+HxNgeEwqV/Nb24XHP59p7/wZYUKHvz3jv8nXaAx5n6NYanRRCpB9cg4JH+1pwCmVaijc2rbGn8Q+KE+D7sukia32imi8lgmrbNSB2iBMmuV/b9bWsuoV87az3WMgg9AYMjgILVC+GzLX4lbqii",
        "X-Forefront-Antispam-Report": "CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230022)(4636009)(39860400002)(136003)(396003)(376002)(346002)(451199015)(36840700001)(40470700004)(46966006)(4326008)(6916009)(356005)(2616005)(83380400001)(86362001)(5660300002)(16526019)(1076003)(82740400003)(336012)(36860700001)(81166007)(30864003)(186003)(70206006)(2906002)(44832011)(8936002)(40480700001)(426003)(8676002)(54906003)(47076005)(40460700003)(70586007)(6666004)(478600001)(41300700001)(82310400005)(26005)(316002)(36756003)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "07 Oct 2022 17:45:03.8033 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 30fc1523-70e4-4683-490a-08daa88baa70",
        "X-MS-Exchange-CrossTenant-Id": "3dd8961f-e488-4e60-8e11-a82d994e183d",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17];\n Helo=[SATLEXMB04.amd.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n CO1NAM11FT068.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DS0PR12MB6606",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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>",
        "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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "When 'ionic_cmb' is set to '1', queue memory will be allocated from\nthe device's onboard memory (Controller Memory Buffer). In some\nconfigurations, this will dramatically reduce packet latency and\nincrease PPS.\n\nAdd the WC_ACTIVATE flag to the PCI driver flags.\nWrite combining must be enabled to achieve the maximum PPS.\n\nWhen the queue is in the CMB, descriptors cannot be prefetched.\n\nSigned-off-by: Andrew Boyer <andrew.boyer@amd.com>\nSigned-off-by: Neel Patel <neel.patel@amd.com>\n---\n doc/guides/nics/ionic.rst              | 12 ++++++\n doc/guides/rel_notes/release_22_11.rst |  1 +\n drivers/net/ionic/ionic.h              |  5 +++\n drivers/net/ionic/ionic_dev.h          |  3 ++\n drivers/net/ionic/ionic_dev_pci.c      | 60 +++++++++++++++++++++++++-\n drivers/net/ionic/ionic_ethdev.c       |  9 ++++\n drivers/net/ionic/ionic_lif.c          | 38 ++++++++++++++++\n drivers/net/ionic/ionic_lif.h          |  2 +\n drivers/net/ionic/ionic_rxtx.c         |  9 ++--\n 9 files changed, 135 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst\nindex 24b57fc0f5..2713771e4f 100644\n--- a/doc/guides/nics/ionic.rst\n+++ b/doc/guides/nics/ionic.rst\n@@ -32,6 +32,18 @@ The ionic PMD requires firmware which supports 16 segment transmit SGLs.\n This support was added prior to version 1.0. For help upgrading older versions,\n please contact AMD Pensando support.\n \n+Runtime Configuration\n+---------------------\n+\n+- ``Queue in CMB support`` (default ``0``)\n+\n+  Queue memory can be allocated from the Controller Memory Buffer (CMB) using\n+  the ``ionic_cmb`` ``devargs`` parameter.\n+\n+  For example::\n+\n+    -a 0000:b5:00.0,ionic_cmb=1\n+\n Building DPDK\n -------------\n \ndiff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst\nindex d2e82979e6..974400d0a6 100644\n--- a/doc/guides/rel_notes/release_22_11.rst\n+++ b/doc/guides/rel_notes/release_22_11.rst\n@@ -87,6 +87,7 @@ New Features\n   * Added support for mbuf fast free.\n   * Added support for advertising packet types.\n   * Added support for descriptor status functions.\n+  * Added Q-in-CMB feature controlled by devarg ionic_cmb.\n \n Removed Items\n -------------\ndiff --git a/drivers/net/ionic/ionic.h b/drivers/net/ionic/ionic.h\nindex 6bfab623f7..1a38e01bc9 100644\n--- a/drivers/net/ionic/ionic.h\n+++ b/drivers/net/ionic/ionic.h\n@@ -24,6 +24,9 @@\n #define IONIC_DEV_ID_ETH_VF\t\t0x1003\n #define IONIC_DEV_ID_ETH_MGMT\t\t0x1004\n \n+/* Devargs */\n+#define PMD_IONIC_CMB_KVARG\t\t\"ionic_cmb\"\n+\n enum ionic_mac_type {\n \tIONIC_MAC_UNKNOWN = 0,\n \tIONIC_MAC_CAPRI,\n@@ -62,9 +65,11 @@ struct ionic_adapter {\n \tuint32_t link_speed;\n \tuint32_t nintrs;\n \tbool intrs[IONIC_INTR_CTRL_REGS_MAX];\n+\tbool q_in_cmb;\n \tbool link_up;\n \tchar fw_version[IONIC_DEVINFO_FWVERS_BUFLEN];\n \tvoid *bus_dev;\n+\tuint64_t cmb_offset;\n };\n \n /** ionic_admin_ctx - Admin command context.\ndiff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h\nindex 6a80ebc71b..6b0540f615 100644\n--- a/drivers/net/ionic/ionic_dev.h\n+++ b/drivers/net/ionic/ionic_dev.h\n@@ -176,9 +176,12 @@ struct ionic_adapter;\n struct ionic_qcq;\n struct rte_mempool;\n struct rte_eth_dev;\n+struct rte_devargs;\n \n struct ionic_dev_intf {\n \tint  (*setup)(struct ionic_adapter *adapter);\n+\tint  (*devargs)(struct ionic_adapter *adapter,\n+\t\t\tstruct rte_devargs *devargs);\n \tvoid (*copy_bus_info)(struct ionic_adapter *adapter,\n \t\t\tstruct rte_eth_dev *eth_dev);\n \tint  (*configure_intr)(struct ionic_adapter *adapter);\ndiff --git a/drivers/net/ionic/ionic_dev_pci.c b/drivers/net/ionic/ionic_dev_pci.c\nindex 1735fa9b17..6c0cf18feb 100644\n--- a/drivers/net/ionic/ionic_dev_pci.c\n+++ b/drivers/net/ionic/ionic_dev_pci.c\n@@ -15,6 +15,7 @@\n #include <rte_eal.h>\n #include <ethdev_pci.h>\n #include <rte_dev.h>\n+#include <rte_kvargs.h>\n \n #include \"ionic.h\"\n #include \"ionic_if.h\"\n@@ -92,6 +93,58 @@ ionic_pci_setup(struct ionic_adapter *adapter)\n \treturn 0;\n }\n \n+const char *ionic_pci_devargs_arr[] = {\n+\tPMD_IONIC_CMB_KVARG,\n+\tNULL,\n+};\n+\n+static int\n+ionic_pci_devarg_cmb(const char *key __rte_unused, const char *val, void *arg)\n+{\n+\tstruct ionic_adapter *adapter = arg;\n+\n+\tif (!strcmp(val, \"1\")) {\n+\t\tIONIC_PRINT(NOTICE, \"%s enabled\", PMD_IONIC_CMB_KVARG);\n+\t\tadapter->q_in_cmb = true;\n+\t} else if (!strcmp(val, \"0\")) {\n+\t\tIONIC_PRINT(DEBUG, \"%s disabled (default)\",\n+\t\t\tPMD_IONIC_CMB_KVARG);\n+\t} else {\n+\t\tIONIC_PRINT(ERR, \"%s=%s invalid, use 1 or 0\",\n+\t\t\tPMD_IONIC_CMB_KVARG, val);\n+\t\treturn -ERANGE;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+ionic_pci_devargs(struct ionic_adapter *adapter, struct rte_devargs *devargs)\n+{\n+\tstruct rte_kvargs *kvlist;\n+\tint err = 0;\n+\n+\tif (!devargs)\n+\t\treturn 0;\n+\n+\tkvlist = rte_kvargs_parse(devargs->args, ionic_pci_devargs_arr);\n+\tif (!kvlist) {\n+\t\tIONIC_PRINT(ERR, \"Couldn't parse args '%s'\", devargs->args);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (rte_kvargs_count(kvlist, PMD_IONIC_CMB_KVARG) == 1) {\n+\t\terr = rte_kvargs_process(kvlist, PMD_IONIC_CMB_KVARG,\n+\t\t\t\tionic_pci_devarg_cmb, adapter);\n+\t\tif (err < 0)\n+\t\t\tgoto free_kvlist;\n+\t}\n+\n+free_kvlist:\n+\trte_kvargs_free(kvlist);\n+\treturn err;\n+}\n+\n static void\n ionic_pci_copy_bus_info(struct ionic_adapter *adapter,\n \tstruct rte_eth_dev *eth_dev)\n@@ -160,6 +213,7 @@ ionic_pci_unconfigure_intr(struct ionic_adapter *adapter)\n \n static const struct ionic_dev_intf ionic_pci_intf = {\n \t.setup = ionic_pci_setup,\n+\t.devargs = ionic_pci_devargs,\n \t.copy_bus_info = ionic_pci_copy_bus_info,\n \t.configure_intr = ionic_pci_configure_intr,\n \t.unconfigure_intr = ionic_pci_unconfigure_intr,\n@@ -206,7 +260,8 @@ eth_ionic_pci_remove(struct rte_pci_device *pci_dev)\n \n static struct rte_pci_driver rte_pci_ionic_pmd = {\n \t.id_table = pci_id_ionic_map,\n-\t.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,\n+\t.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |\n+\t\t\tRTE_PCI_DRV_WC_ACTIVATE,\n \t.probe = eth_ionic_pci_probe,\n \t.remove = eth_ionic_pci_remove,\n };\n@@ -214,3 +269,6 @@ static struct rte_pci_driver rte_pci_ionic_pmd = {\n RTE_PMD_REGISTER_PCI(net_ionic_pci, rte_pci_ionic_pmd);\n RTE_PMD_REGISTER_PCI_TABLE(net_ionic_pci, pci_id_ionic_map);\n RTE_PMD_REGISTER_KMOD_DEP(net_ionic_pci, \"* igb_uio | uio_pci_generic | vfio-pci\");\n+RTE_PMD_REGISTER_PARAM_STRING(net_ionic_pci,\n+\tPMD_IONIC_CMB_KVARG \"=<0|1>\"\n+);\ndiff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c\nindex cf74600f22..a6e7c7fa9f 100644\n--- a/drivers/net/ionic/ionic_ethdev.c\n+++ b/drivers/net/ionic/ionic_ethdev.c\n@@ -1118,6 +1118,15 @@ eth_ionic_dev_probe(void *bus_dev, struct rte_device *rte_dev,\n \n \tadapter->intf = intf;\n \n+\t/* Parse device arguments */\n+\tif (adapter->intf->devargs) {\n+\t\terr = (*adapter->intf->devargs)(adapter, rte_dev->devargs);\n+\t\tif (err) {\n+\t\t\tIONIC_PRINT(ERR, \"Cannot parse device arguments\");\n+\t\t\tgoto err_free_adapter;\n+\t\t}\n+\t}\n+\n \t/* Discover ionic dev resources */\n \terr = ionic_setup(adapter);\n \tif (err) {\ndiff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c\nindex ac9b69fc70..bb107b30e9 100644\n--- a/drivers/net/ionic/ionic_lif.c\n+++ b/drivers/net/ionic/ionic_lif.c\n@@ -660,6 +660,21 @@ ionic_qcq_alloc(struct ionic_lif *lif,\n \t\tionic_q_sg_map(&new->q, sg_base, sg_base_pa);\n \t}\n \n+\tif (flags & IONIC_QCQ_F_CMB) {\n+\t\t/* alloc descriptor ring from nic memory */\n+\t\tif (lif->adapter->cmb_offset + q_size >\n+\t\t\t\tlif->adapter->bars.bar[2].len) {\n+\t\t\tIONIC_PRINT(ERR, \"Cannot reserve queue from NIC mem\");\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t\tq_base = (void *)\n+\t\t\t((uintptr_t)lif->adapter->bars.bar[2].vaddr +\n+\t\t\t (uintptr_t)lif->adapter->cmb_offset);\n+\t\t/* CMB PA is a relative address */\n+\t\tq_base_pa = lif->adapter->cmb_offset;\n+\t\tlif->adapter->cmb_offset += q_size;\n+\t}\n+\n \tIONIC_PRINT(DEBUG, \"Q-Base-PA = %#jx CQ-Base-PA = %#jx \"\n \t\t\"SG-base-PA = %#jx\",\n \t\tq_base_pa, cq_base_pa, sg_base_pa);\n@@ -744,6 +759,8 @@ ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, uint32_t index,\n \tint err;\n \n \tflags = IONIC_QCQ_F_SG;\n+\tif (lif->state & IONIC_LIF_F_Q_IN_CMB)\n+\t\tflags |= IONIC_QCQ_F_CMB;\n \n \tseg_size = rte_pktmbuf_data_room_size(mb_pool);\n \n@@ -806,6 +823,8 @@ ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, uint32_t index,\n \tint err;\n \n \tflags = IONIC_QCQ_F_SG;\n+\tif (lif->state & IONIC_LIF_F_Q_IN_CMB)\n+\t\tflags |= IONIC_QCQ_F_CMB;\n \n \tnum_segs_fw = IONIC_TX_MAX_SG_ELEMS_V1 + 1;\n \n@@ -994,6 +1013,19 @@ ionic_lif_alloc(struct ionic_lif *lif)\n \t\treturn -ENXIO;\n \t}\n \n+\tif (adapter->q_in_cmb) {\n+\t\tif (adapter->bars.num_bars >= 3 &&\n+\t\t    lif->qtype_info[IONIC_QTYPE_RXQ].version >= 2 &&\n+\t\t    lif->qtype_info[IONIC_QTYPE_TXQ].version >= 3) {\n+\t\t\tIONIC_PRINT(INFO, \"%s enabled on %s\",\n+\t\t\t\tPMD_IONIC_CMB_KVARG, lif->name);\n+\t\t\tlif->state |= IONIC_LIF_F_Q_IN_CMB;\n+\t\t} else {\n+\t\t\tIONIC_PRINT(ERR, \"%s not supported on %s, disabled\",\n+\t\t\t\tPMD_IONIC_CMB_KVARG, lif->name);\n+\t\t}\n+\t}\n+\n \tIONIC_PRINT(DEBUG, \"Allocating Lif Info\");\n \n \trte_spinlock_init(&lif->adminq_lock);\n@@ -1537,6 +1569,9 @@ ionic_lif_txq_init(struct ionic_tx_qcq *txq)\n \t};\n \tint err;\n \n+\tif (txq->flags & IONIC_QCQ_F_CMB)\n+\t\tctx.cmd.q_init.flags |= rte_cpu_to_le_16(IONIC_QINIT_F_CMB);\n+\n \tIONIC_PRINT(DEBUG, \"txq_init.index %d\", q->index);\n \tIONIC_PRINT(DEBUG, \"txq_init.ring_base 0x%\" PRIx64 \"\", q->base_pa);\n \tIONIC_PRINT(DEBUG, \"txq_init.ring_size %d\",\n@@ -1588,6 +1623,9 @@ ionic_lif_rxq_init(struct ionic_rx_qcq *rxq)\n \t};\n \tint err;\n \n+\tif (rxq->flags & IONIC_QCQ_F_CMB)\n+\t\tctx.cmd.q_init.flags |= rte_cpu_to_le_16(IONIC_QINIT_F_CMB);\n+\n \tIONIC_PRINT(DEBUG, \"rxq_init.index %d\", q->index);\n \tIONIC_PRINT(DEBUG, \"rxq_init.ring_base 0x%\" PRIx64 \"\", q->base_pa);\n \tIONIC_PRINT(DEBUG, \"rxq_init.ring_size %d\",\ndiff --git a/drivers/net/ionic/ionic_lif.h b/drivers/net/ionic/ionic_lif.h\nindex 5231909213..ec9cb24a61 100644\n--- a/drivers/net/ionic/ionic_lif.h\n+++ b/drivers/net/ionic/ionic_lif.h\n@@ -49,6 +49,7 @@ struct ionic_rx_stats {\n #define IONIC_QCQ_F_INITED\tBIT(0)\n #define IONIC_QCQ_F_SG\t\tBIT(1)\n #define IONIC_QCQ_F_DEFERRED\tBIT(4)\n+#define IONIC_QCQ_F_CMB\t\tBIT(5)\n #define IONIC_QCQ_F_CSUM_L3\tBIT(7)\n #define IONIC_QCQ_F_CSUM_UDP\tBIT(8)\n #define IONIC_QCQ_F_CSUM_TCP\tBIT(9)\n@@ -126,6 +127,7 @@ struct ionic_qtype_info {\n #define IONIC_LIF_F_LINK_CHECK_NEEDED\tBIT(1)\n #define IONIC_LIF_F_UP\t\t\tBIT(2)\n #define IONIC_LIF_F_FW_RESET\t\tBIT(3)\n+#define IONIC_LIF_F_Q_IN_CMB\t\tBIT(4)\n \n #define IONIC_LIF_NAME_MAX_SZ\t\t(32)\n \ndiff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c\nindex 4f84fa7df1..fceb8333f6 100644\n--- a/drivers/net/ionic/ionic_rxtx.c\n+++ b/drivers/net/ionic/ionic_rxtx.c\n@@ -600,7 +600,8 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \tint err;\n \n \tstruct ionic_txq_desc *desc_base = q->base;\n-\trte_prefetch0(&desc_base[q->head_idx]);\n+\tif (!(txq->flags & IONIC_QCQ_F_CMB))\n+\t\trte_prefetch0(&desc_base[q->head_idx]);\n \trte_prefetch0(IONIC_INFO_PTR(q, q->head_idx));\n \n \tif (tx_pkts) {\n@@ -619,7 +620,8 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \n \twhile (nb_tx < nb_pkts) {\n \t\tuint16_t next_idx = Q_NEXT_TO_POST(q, 1);\n-\t\trte_prefetch0(&desc_base[next_idx]);\n+\t\tif (!(txq->flags & IONIC_QCQ_F_CMB))\n+\t\t\trte_prefetch0(&desc_base[next_idx]);\n \t\trte_prefetch0(IONIC_INFO_PTR(q, next_idx));\n \n \t\tif (nb_tx + 1 < nb_pkts) {\n@@ -1172,7 +1174,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,\n \t\t/* Prefetch 4 x 16B comp */\n \t\trte_prefetch0(&cq_desc_base[Q_NEXT_TO_SRVC(cq, 4)]);\n \t\t/* Prefetch 4 x 16B descriptors */\n-\t\trte_prefetch0(&q_desc_base[Q_NEXT_TO_POST(q, 4)]);\n+\t\tif (!(rxq->flags & IONIC_QCQ_F_CMB))\n+\t\t\trte_prefetch0(&q_desc_base[Q_NEXT_TO_POST(q, 4)]);\n \n \t\tionic_rx_clean_one(rxq, cq_desc, rx_svc);\n \n",
    "prefixes": [
        "28/35"
    ]
}