Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/128358/?format=api
https://patches.dpdk.org/api/patches/128358/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230607210050.107944-1-abdullah.sevincer@intel.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": "<20230607210050.107944-1-abdullah.sevincer@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230607210050.107944-1-abdullah.sevincer@intel.com", "date": "2023-06-07T21:00:50", "name": "[v1] event/dlb2: add support for disabling PASID", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "b27b165ae2afb8b73a8fe95f00fafbde75a7d857", "submitter": { "id": 2843, "url": "https://patches.dpdk.org/api/people/2843/?format=api", "name": "Sevincer, Abdullah", "email": "abdullah.sevincer@intel.com" }, "delegate": { "id": 310, "url": "https://patches.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230607210050.107944-1-abdullah.sevincer@intel.com/mbox/", "series": [ { "id": 28397, "url": "https://patches.dpdk.org/api/series/28397/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28397", "date": "2023-06-07T21:00:50", "name": "[v1] event/dlb2: add support for disabling PASID", "version": 1, "mbox": "https://patches.dpdk.org/series/28397/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/128358/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/128358/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 BF75842C54;\n\tWed, 7 Jun 2023 23:00:55 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8F95541611;\n\tWed, 7 Jun 2023 23:00:55 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 086C3410D0\n for <dev@dpdk.org>; Wed, 7 Jun 2023 23:00:53 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Jun 2023 14:00:53 -0700", "from txanpdk02.an.intel.com ([10.123.117.76])\n by orsmga003.jf.intel.com with ESMTP; 07 Jun 2023 14:00:52 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1686171654; x=1717707654;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=87zaIHjEIAeUhTdBCHeXphxUn/laeOEhl4FdD9Bsx8M=;\n b=dLgTlcTaKk3lSBetFOcTPucmJCYuVSn6+9CUYP1KrtDEtNl35W2T4g5O\n lyIl0dhKX/SuqIoKKGnIqOtN9l62VMZFKUPSMKdWao8Ht2CUzsL/+moxL\n 7Go0/mEtEe43HAqwGaONEC02Q0RB43lQf7dXPiJ4J2krsF5OHaDEzjACI\n Hu5adWW26+VJy3DpS3ZSRULcHFRkcTc0xcU7RUyFhQDEW53CCBP6PXjhn\n mm5L7/VDzd6ECw6VLbqxKLSMAVQaGwPyNjksioXJ9kO3qbFngTvfCHfM3\n fBiH2a2aLWFYvuoH5BNj5j7dDfJtid39E6ivz4En4H0wnth6jEaKKQvph Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10734\"; a=\"360439931\"", "E=Sophos;i=\"6.00,225,1681196400\"; d=\"scan'208\";a=\"360439931\"", "E=McAfee;i=\"6600,9927,10734\"; a=\"660100056\"", "E=Sophos;i=\"6.00,225,1681196400\"; d=\"scan'208\";a=\"660100056\"" ], "X-ExtLoop1": "1", "From": "Abdullah Sevincer <abdullah.sevincer@intel.com>", "To": "dev@dpdk.org", "Cc": "jerinj@marvell.com, mike.ximing.chen@intel.com,\n Abdullah Sevincer <abdullah.sevincer@intel.com>", "Subject": "[PATCH v1] event/dlb2: add support for disabling PASID", "Date": "Wed, 7 Jun 2023 16:00:50 -0500", "Message-Id": "<20230607210050.107944-1-abdullah.sevincer@intel.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "vfio-pci driver in Linux kernel 6.2 enables PASID by default.\nIn DLB hardware, enabling PASID puts DLB in SIOV mode. This\nbreaks DLB PF-PMD mode. For DLB PF-PMD mode to function properly\nPASID needs to be disabled for kernel 6.2.\n\nIn this commit this issue is addressed and PASID is disabled\nby writing a zero to PASID control register.\n\nSigned-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>\n---\n drivers/event/dlb2/pf/dlb2_main.c | 27 +++++++++++++++++++++++++++\n 1 file changed, 27 insertions(+)", "diff": "diff --git a/drivers/event/dlb2/pf/dlb2_main.c b/drivers/event/dlb2/pf/dlb2_main.c\nindex 717aa4fc08..63868e2388 100644\n--- a/drivers/event/dlb2/pf/dlb2_main.c\n+++ b/drivers/event/dlb2/pf/dlb2_main.c\n@@ -46,6 +46,7 @@\n #define DLB2_PCI_CAP_ID_MSIX 0x11\n #define DLB2_PCI_EXT_CAP_ID_PRI 0x13\n #define DLB2_PCI_EXT_CAP_ID_ACS 0xD\n+#define DLB2_PCI_EXT_CAP_ID_PASID 0x1B\t/* Process Address Space ID */\n \n #define DLB2_PCI_PRI_CTRL_ENABLE 0x1\n #define DLB2_PCI_PRI_ALLOC_REQ 0xC\n@@ -64,6 +65,8 @@\n #define DLB2_PCI_ACS_CR 0x8\n #define DLB2_PCI_ACS_UF 0x10\n #define DLB2_PCI_ACS_EC 0x20\n+#define DLB2_PCI_PASID_CTRL 0x06 /* PASID control register */\n+#define DLB2_PCI_PASID_CAP_OFFSET 0x148 /* PASID capability offset */\n \n static int dlb2_pci_find_capability(struct rte_pci_device *pdev, uint32_t id)\n {\n@@ -257,12 +260,14 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)\n \tuint16_t rt_ctl_word;\n \tuint32_t pri_reqs_dword;\n \tuint16_t pri_ctrl_word;\n+\tuint16_t pasid_ctrl;\n \n \tint pcie_cap_offset;\n \tint pri_cap_offset;\n \tint msix_cap_offset;\n \tint err_cap_offset;\n \tint acs_cap_offset;\n+\tint pasid_cap_offset;\n \tint wait_count;\n \n \tuint16_t devsta_busy_word;\n@@ -582,6 +587,28 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)\n \t\t}\n \t}\n \n+\t/* The current Linux kernel vfio driver does not expose PASID capability to\n+\t * users. It also enables PASID by default, which breaks DLB PF PMD. We have\n+\t * to use the hardcoded offset for now to disable PASID.\n+\t */\n+\tpasid_cap_offset = DLB2_PCI_PASID_CAP_OFFSET;\n+\n+\toff = pasid_cap_offset + DLB2_PCI_PASID_CTRL;\n+\tif (rte_pci_read_config(pdev, &pasid_ctrl, 2, off) != 2)\n+\t\tpasid_ctrl = 0;\n+\n+\tif (pasid_ctrl) {\n+\t\tDLB2_INFO(dlb2_dev, \"DLB2 disabling pasid...\\n\");\n+\n+\t\tpasid_ctrl = 0;\n+\t\tret = rte_pci_write_config(pdev, &pasid_ctrl, 2, off);\n+\t\tif (ret != 2) {\n+\t\t\tDLB2_LOG_ERR(\"[%s()] failed to write the pcie config space at offset %d\\n\",\n+\t\t\t\t__func__, (int)off);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n \treturn 0;\n }\n \n", "prefixes": [ "v1" ] }{ "id": 128358, "url": "