get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133513,
    "url": "https://patches.dpdk.org/api/patches/133513/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20231027162212.3353973-1-ferruh.yigit@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": "<20231027162212.3353973-1-ferruh.yigit@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231027162212.3353973-1-ferruh.yigit@amd.com",
    "date": "2023-10-27T16:22:11",
    "name": "Add bus master enable/disable APIs for CDX devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f1a6a6f1e6987ef677e56b753a63f89f6202c57a",
    "submitter": {
        "id": 2700,
        "url": "https://patches.dpdk.org/api/people/2700/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20231027162212.3353973-1-ferruh.yigit@amd.com/mbox/",
    "series": [
        {
            "id": 30031,
            "url": "https://patches.dpdk.org/api/series/30031/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30031",
            "date": "2023-10-27T16:22:11",
            "name": "Add bus master enable/disable APIs for CDX devices",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/30031/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/133513/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/133513/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 0F48543218;\n\tFri, 27 Oct 2023 18:22:27 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B349A4029A;\n\tFri, 27 Oct 2023 18:22:26 +0200 (CEST)",
            "from NAM02-BN1-obe.outbound.protection.outlook.com\n (mail-bn1nam02on2045.outbound.protection.outlook.com [40.107.212.45])\n by mails.dpdk.org (Postfix) with ESMTP id 6AE0440263\n for <dev@dpdk.org>; Fri, 27 Oct 2023 18:22:25 +0200 (CEST)",
            "from BL0PR01CA0022.prod.exchangelabs.com (2603:10b6:208:71::35) by\n CY8PR12MB7219.namprd12.prod.outlook.com (2603:10b6:930:59::15) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.6907.33; Fri, 27 Oct 2023 16:22:23 +0000",
            "from BL02EPF0001A102.namprd05.prod.outlook.com\n (2603:10b6:208:71:cafe::64) by BL0PR01CA0022.outlook.office365.com\n (2603:10b6:208:71::35) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19 via Frontend\n Transport; Fri, 27 Oct 2023 16:22:22 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n BL02EPF0001A102.mail.protection.outlook.com (10.167.241.134) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.6933.15 via Frontend Transport; Fri, 27 Oct 2023 16:22:22 +0000",
            "from telcodpdk.amd.com (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.2507.32; Fri, 27 Oct\n 2023 11:22:21 -0500"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=mxlreYdZwBgJa2fUrwVQEJpo+Au5JhOwZ7gwofE77YwBlP4qe8KpVcEEqgcC+0ATpBR09Qd2Gb0kE7PLolt6+ssDiWxeVlOzDkJjv4qYO8ij/GV54mOPuuhkfZEQz10ug26qZT21gbGhoHpon7jarOIKyh7xiDXkve0O6LoC8XjaBYpa0kClx2GlVLFtgarVpAjU73I+QzlMXOOnQV0Bd5I0wBhZCShfq3ochEewggzbk2Unp5l9dkllrMGUrqGGTWAER6vgEt8+jtCBo6Hxj8ux9L3LLaPL02dGaIOWgYvcA6xzOAAi/C7egv9oFcM9mHtqgtGyCFd0q3mR53BhDA==",
        "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=4ahzJ7CJCpg1RYAHSUX/+tQWSMC+nm2iGaIqKFtmcms=;\n b=GT8q5Y3CfHeeFsBz5tUbNPrjNeQSySv0konOaj+n80P4hzIDuNTumGoy9OnQSUciWE4UzhlNhMLz1tpLwO0BLSjFXzXA3cINfGSksnYE6dptn8dBm6FK8eVBdn4fp1ouOvlX7wgVOKaMLhjMDp1mu+csnVlyyqVlz+t/9s/T9T2fCTAusIV8YlGb118Gw3vtlO8/n2iRCepb/MR1W7bpCwzlv0DuhA6hEzZb9HpKF+UjYDLjKCWMMR8Imc4tbaTJHoyvA49r2CcILmc3U+KtSU66T4WpKWS5C5S771X8NggLNKInCRHpoMajPC0tEvdLPXx+Ib3WKp2wO4OBKmxSzQ==",
        "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 (0)",
        "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=4ahzJ7CJCpg1RYAHSUX/+tQWSMC+nm2iGaIqKFtmcms=;\n b=G4XPxdg1tI5sNP9v5ib9g2IGaqz3eZFHp3LvO2dO/nUDcCJrMSmoXsdearnkVSUodj/SA0H++QB0kux24PdmBxfAuMBCPE6l7unEXsEK8mXHo/pin4w+bDP6yJg3/PGYWiqaWvsjQH0a9kCCaIZAt+MqI206VndNUWvXLW5uJC8=",
        "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": "Ferruh Yigit <ferruh.yigit@amd.com>",
        "To": "<dev@dpdk.org>, <nikhil.agarwal@amd.com>, <nipun.gupta@amd.com>,\n <david.marchand@redhat.com>",
        "CC": "<thomas@monjalon.net>, <ferruh.yigit@amd.com>,\n <anatoly.burakov@intel.com>, Shubham Rohila <shubham.rohila@amd.com>",
        "Subject": "[PATCH] Add bus master enable/disable APIs for CDX devices",
        "Date": "Fri, 27 Oct 2023 17:22:11 +0100",
        "Message-ID": "<20231027162212.3353973-1-ferruh.yigit@amd.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.180.168.240]",
        "X-ClientProxiedBy": "SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com\n (10.181.40.145)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BL02EPF0001A102:EE_|CY8PR12MB7219:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "4909987a-3306-425c-efe0-08dbd708e66d",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n TqefJw04tuWocmQyCotKzuRVGqQCD9HFbK9+F/jhR2uFXSO3wQUyIIW/S/BUa2m//Fr5clDXAAul2V386sp9Vvl1i1HyYk/BP2n9ZglcHDBW3KTvzCObaZwQhFrXlBTurauZastl6SYOaE8bTRN2qFF9oE++21HHW4NCMZRte/ut/xdhd/J143xRjy/uVrieIWak8nGr9ij0cnsdhq/VnXSzrDOu5k5c2pAt5GQPuS2LSutWRWKPX4U1mHo56j2vTLzjXAsvXQGuD2hT0lhVEdCqfCG/UW85MrwoH2t5Cg5DC5DDPGcJdxKqQxY3zS5bdGgxk6593haCVLVz1PgnBPiI1/j7g0zXKLv6Eb0D1Ip+gSfh7tkKQLYsfs05XiOt0W7+KnpgLuTvHs0YmKF6eIOrd4h6U2krtpyIrkTpx9Lj6rtu1cyF7/VKT3zPpfV75KI4Fs2rKoxaxmLDZo813xC1prF0AhvE09j20GlB1U5uT3QnV6mxfvedFDJZbq3pdiX0GC5idPOHEQ3O/v4d0EnVlGL9c/ZHgxcGO/S7bEROLQKPZyPZ1/gIPqo4oubFXTkH8mBCfy9+xrOpChuFD2hVn8iB8fPvGa403JYFNWD5Z1TXfeIvKvdVa5OK75xsfpMY0cLxQYcg/DNMblf5/OfVIdqkNjvi0HYZytvTrSsuZhXKiHACcwbL8Dsmu6UN0JJJQ1ERlp1b3o9/eZONEn6eXis5gJE/KcbzEiAMqVIyQmOFMXw0O6QFHBtaOx6QOStCFF7dSP7yNVzs1uWFoA==",
        "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:(13230031)(4636009)(136003)(396003)(376002)(39860400002)(346002)(230922051799003)(64100799003)(186009)(82310400011)(451199024)(1800799009)(36840700001)(40470700004)(46966006)(16526019)(26005)(5660300002)(36756003)(2906002)(44832011)(41300700001)(36860700001)(86362001)(316002)(8936002)(4326008)(8676002)(7696005)(1076003)(478600001)(356005)(81166007)(110136005)(40460700003)(2616005)(54906003)(82740400003)(70586007)(426003)(83380400001)(336012)(70206006)(40480700001)(47076005)(6666004)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "27 Oct 2023 16:22:22.8263 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 4909987a-3306-425c-efe0-08dbd708e66d",
        "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 BL02EPF0001A102.namprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CY8PR12MB7219",
        "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": "From: Shubham Rohila <shubham.rohila@amd.com>\n\nDefine rte_cdx_vfio_bm_enable and rte_cdx_vfio_bm_disable to\nenable or disable bus master functionality for cdx devices.\n\nSigned-off-by: Shubham Rohila <shubham.rohila@amd.com>\n---\n drivers/bus/cdx/bus_cdx_driver.h | 25 ++++++++\n drivers/bus/cdx/cdx_vfio.c       | 97 ++++++++++++++++++++++++++++++++\n drivers/bus/cdx/version.map      |  2 +\n lib/eal/include/rte_vfio.h       | 27 +++++++++\n 4 files changed, 151 insertions(+)",
    "diff": "diff --git a/drivers/bus/cdx/bus_cdx_driver.h b/drivers/bus/cdx/bus_cdx_driver.h\nindex 1c9a64c87ac1..2f94a6c3afff 100644\n--- a/drivers/bus/cdx/bus_cdx_driver.h\n+++ b/drivers/bus/cdx/bus_cdx_driver.h\n@@ -16,6 +16,7 @@ extern \"C\" {\n \n #include <stdlib.h>\n #include <inttypes.h>\n+#include <linux/types.h>\n \n #include <bus_driver.h>\n #include <dev_driver.h>\n@@ -178,6 +179,30 @@ int rte_cdx_vfio_intr_enable(const struct rte_intr_handle *intr_handle);\n __rte_internal\n int rte_cdx_vfio_intr_disable(const struct rte_intr_handle *intr_handle);\n \n+/**\n+ * Enable Bus Mastering for CDX bus devices.\n+ *\n+ * @param dev\n+ *   Pointer to the cdx device.\n+ *\n+ *  @return\n+ *  0 on success, -1 on error.\n+ */\n+__rte_internal\n+int rte_cdx_vfio_bm_enable(struct rte_cdx_device *dev);\n+\n+/**\n+ * Disable Bus Mastering for CDX bus devices.\n+ *\n+ * @param dev\n+ *   Pointer to the cdx device.\n+ *\n+ *  @return\n+ *  0 on success, -1 on error.\n+ */\n+__rte_internal\n+int rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev);\n+\n /**\n  * Unregister a CDX driver.\n  *\ndiff --git a/drivers/bus/cdx/cdx_vfio.c b/drivers/bus/cdx/cdx_vfio.c\nindex 8a3ac0b99537..a0abf71483aa 100644\n--- a/drivers/bus/cdx/cdx_vfio.c\n+++ b/drivers/bus/cdx/cdx_vfio.c\n@@ -256,6 +256,16 @@ cdx_vfio_setup_device(struct rte_cdx_device *dev, int vfio_dev_fd,\n \t\treturn -1;\n \t}\n \n+\t/*\n+\t * Enable Bus mastering for the device. errno is set as ENOTTY if\n+\t * device does not support configuring bus master.\n+\t */\n+\tif (rte_cdx_vfio_bm_enable(dev) && errno != -ENOTTY) {\n+\t\tCDX_BUS_ERR(\"Bus master enable failure! Error: %d (%s)\", errno,\n+\t\t\tstrerror(errno));\n+\t\treturn -1;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -596,3 +606,90 @@ rte_cdx_vfio_intr_disable(const struct rte_intr_handle *intr_handle)\n \n \treturn ret;\n }\n+\n+/* enable Bus Mastering */\n+int\n+rte_cdx_vfio_bm_enable(struct rte_cdx_device *dev)\n+{\n+\tstruct vfio_device_info device_info = { .argsz = sizeof(device_info) };\n+\tstruct vfio_device_feature_bus_master *vfio_bm_feature;\n+\tstruct vfio_device_feature *feature;\n+\tint vfio_dev_fd, ret = 0;\n+\tsize_t argsz = 0;\n+\n+\tvfio_dev_fd = rte_intr_dev_fd_get(dev->intr_handle);\n+\tif (vfio_dev_fd < 0)\n+\t\treturn -1;\n+\n+\targsz = sizeof(struct vfio_device_feature) + sizeof(struct vfio_device_feature_bus_master);\n+\n+\tfeature = (struct vfio_device_feature *)malloc(argsz);\n+\tif (!feature)\n+\t\treturn -ENOMEM;\n+\n+\tvfio_bm_feature = (struct vfio_device_feature_bus_master *) feature->data;\n+\n+\tfeature->argsz = argsz;\n+\n+\tfeature->flags = RTE_VFIO_DEVICE_FEATURE_BUS_MASTER | VFIO_DEVICE_FEATURE_PROBE;\n+\tfeature->flags |= VFIO_DEVICE_FEATURE_SET;\n+\tret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);\n+\tif (ret) {\n+\t\tCDX_BUS_ERR(\"Bus Master configuring not supported for device: %s, error: %d (%s)\\n\",\n+\t\t\tdev->name, errno, strerror(errno));\n+\t\tfree(feature);\n+\t\treturn ret;\n+\t}\n+\n+\tfeature->flags = RTE_VFIO_DEVICE_FEATURE_BUS_MASTER | VFIO_DEVICE_FEATURE_SET;\n+\tvfio_bm_feature->op = VFIO_DEVICE_FEATURE_SET_MASTER;\n+\tret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);\n+\tif (ret < 0)\n+\t\tCDX_BUS_ERR(\"BM Enable Error for device: %s, Error: %d (%s)\\n\",\n+\t\t\tdev->name, errno, strerror(errno));\n+\n+\tfree(feature);\n+\treturn ret;\n+}\n+\n+/* Disable Bus Mastering */\n+int\n+rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev)\n+{\n+\tstruct vfio_device_feature_bus_master *vfio_bm_feature;\n+\tstruct vfio_device_feature *feature;\n+\tint vfio_dev_fd, ret = 0;\n+\tsize_t argsz = 0;\n+\n+\tvfio_dev_fd = rte_intr_dev_fd_get(dev->intr_handle);\n+\tif (vfio_dev_fd < 0)\n+\t\treturn -1;\n+\n+\tfeature = (struct vfio_device_feature *)malloc(argsz);\n+\tif (!feature)\n+\t\treturn -ENOMEM;\n+\n+\tvfio_bm_feature = (struct vfio_device_feature_bus_master *) feature->data;\n+\n+\tfeature->argsz = argsz;\n+\n+\tfeature->flags = RTE_VFIO_DEVICE_FEATURE_BUS_MASTER | VFIO_DEVICE_FEATURE_PROBE;\n+\tfeature->flags |= VFIO_DEVICE_FEATURE_SET;\n+\tret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);\n+\tif (ret) {\n+\t\tCDX_BUS_ERR(\"Bus Master configuring not supported for device: %s, Error: %d (%s)\\n\",\n+\t\t\tdev->name, errno, strerror(errno));\n+\t\tfree(feature);\n+\t\treturn ret;\n+\t}\n+\n+\tfeature->flags = RTE_VFIO_DEVICE_FEATURE_BUS_MASTER | VFIO_DEVICE_FEATURE_SET;\n+\tvfio_bm_feature->op = VFIO_DEVICE_FEATURE_CLEAR_MASTER;\n+\tret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);\n+\tif (ret < 0)\n+\t\tCDX_BUS_ERR(\"BM Disable Error for device: %s, Error: %d (%s)\\n\",\n+\t\t\tdev->name, errno, strerror(errno));\n+\n+\tfree(feature);\n+\treturn ret;\n+}\ndiff --git a/drivers/bus/cdx/version.map b/drivers/bus/cdx/version.map\nindex 0a15d39ae82a..5438f76029e0 100644\n--- a/drivers/bus/cdx/version.map\n+++ b/drivers/bus/cdx/version.map\n@@ -7,6 +7,8 @@ INTERNAL {\n \trte_cdx_unregister;\n \trte_cdx_vfio_intr_disable;\n \trte_cdx_vfio_intr_enable;\n+\trte_cdx_vfio_bm_enable;\n+\trte_cdx_vfio_bm_disable;\n \n \tlocal: *;\n };\ndiff --git a/lib/eal/include/rte_vfio.h b/lib/eal/include/rte_vfio.h\nindex 3487c4f2a251..1c791b3636e9 100644\n--- a/lib/eal/include/rte_vfio.h\n+++ b/lib/eal/include/rte_vfio.h\n@@ -73,6 +73,33 @@ struct vfio_info_cap_header {\n #define RTE_VFIO_CAP_MSIX_MAPPABLE 3\n #endif\n \n+/* VFIO_DEVICE_FEATURE is defined for kernel version 5.7 and newer. */\n+#ifdef VFIO_DEVICE_FEATURE\n+#define RTE_VFIO_DEVICE_FEATURE VFIO_DEVICE_FEATURE\n+#else\n+#define RTE_VFIO_DEVICE_FEATURE             _IO(VFIO_TYPE, VFIO_BASE + 17)\n+struct vfio_device_feature {\n+\t__u32   argsz;\n+\t__u32   flags;\n+#define VFIO_DEVICE_FEATURE_MASK        (0xffff) /* 16-bit feature index */\n+#define VFIO_DEVICE_FEATURE_GET         (1 << 16) /* Get feature into data[] */\n+#define VFIO_DEVICE_FEATURE_SET         (1 << 17) /* Set feature from data[] */\n+#define VFIO_DEVICE_FEATURE_PROBE       (1 << 18) /* Probe feature support */\n+\t__u8    data[];\n+};\n+#endif\n+\n+#ifdef VFIO_DEVICE_FEATURE_BUS_MASTER\n+#define RTE_VFIO_DEVICE_FEATURE_BUS_MASTER VFIO_DEVICE_FEATURE_BUS_MASTER\n+#else\n+#define RTE_VFIO_DEVICE_FEATURE_BUS_MASTER  10\n+struct vfio_device_feature_bus_master {\n+\t__u32 op;\n+#define  VFIO_DEVICE_FEATURE_CLEAR_MASTER       0       /* Clear Bus Master */\n+#define  VFIO_DEVICE_FEATURE_SET_MASTER         1       /* Set Bus Master */\n+};\n+#endif\n+\n #else /* not VFIO_PRESENT */\n \n /* we don't need an actual definition, only pointer is used */\n",
    "prefixes": []
}