Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8657/?format=api
https://patches.dpdk.org/api/patches/8657/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446626740-28824-12-git-send-email-cunming.liang@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": "<1446626740-28824-12-git-send-email-cunming.liang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1446626740-28824-12-git-send-email-cunming.liang@intel.com", "date": "2015-11-04T08:45:38", "name": "[dpdk-dev,v4,11/13] igb: fix rx intr compatible issue with PF mbox", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "71c64b314ff03d1ec99701dedd494e002719c2b4", "submitter": { "id": 46, "url": "https://patches.dpdk.org/api/people/46/?format=api", "name": "Cunming Liang", "email": "cunming.liang@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446626740-28824-12-git-send-email-cunming.liang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/8657/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/8657/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id DA9EC9223;\n\tWed, 4 Nov 2015 09:46:21 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 90C7E9198\n\tfor <dev@dpdk.org>; Wed, 4 Nov 2015 09:46:20 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 04 Nov 2015 00:46:20 -0800", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 04 Nov 2015 00:46:16 -0800", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id tA48kCsA005500;\n\tWed, 4 Nov 2015 16:46:12 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid tA48k8Xs028952; Wed, 4 Nov 2015 16:46:10 +0800", "(from cliang18@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tA48k7HF028948; \n\tWed, 4 Nov 2015 16:46:07 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,242,1444719600\"; d=\"scan'208\";a=\"826650642\"", "From": "Cunming Liang <cunming.liang@intel.com>", "To": "dev@dpdk.org", "Date": "Wed, 4 Nov 2015 16:45:38 +0800", "Message-Id": "<1446626740-28824-12-git-send-email-cunming.liang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1446626740-28824-1-git-send-email-cunming.liang@intel.com>", "References": "<1446617263-7448-1-git-send-email-cunming.liang@intel.com>\n\t<1446626740-28824-1-git-send-email-cunming.liang@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 11/13] igb: fix rx intr compatible issue with\n\tPF mbox", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "When igb runs as a PF, mbox interrupt is prerequisite to make VF start normally.\nAnd PF sometimes won't 'dev_start', so the mbox interrupt register during 'dev_init' is required.\nThe patch rolls back the interrupt register for mbox,lsc to the 'dev_init'.\nAs UIO doesn't support multiple vector, mbox has to occupy the only one.\nIt adds condition check on 'dev_start', rxq interrupt is not allowed when PF running in IOV mode via UIO.\n\nv4 change:\n - remove redundancy condition check\n\nv3 change:\n - add doc update follow on the code change\n\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\n---\n doc/guides/rel_notes/release_2_2.rst | 2 ++\n drivers/net/e1000/igb_ethdev.c | 37 ++++++++++++++++++++++++++----------\n 2 files changed, 29 insertions(+), 10 deletions(-)", "diff": "diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst\nindex b082fb6..38b0612 100644\n--- a/doc/guides/rel_notes/release_2_2.rst\n+++ b/doc/guides/rel_notes/release_2_2.rst\n@@ -154,6 +154,8 @@ Drivers\n \n * **ixgbe: Fixed PF rx interrupt compatible issue with mbox.**\n \n+* **igb: Fixed PF rx interrupt compatible issue with mbox.**\n+\n Libraries\n ~~~~~~~~~\n \ndiff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c\nindex 76d2acc..2cb115c 100644\n--- a/drivers/net/e1000/igb_ethdev.c\n+++ b/drivers/net/e1000/igb_ethdev.c\n@@ -760,6 +760,13 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)\n \t\t eth_dev->data->port_id, pci_dev->id.vendor_id,\n \t\t pci_dev->id.device_id);\n \n+\trte_intr_callback_register(&pci_dev->intr_handle,\n+\t\t\t\t eth_igb_interrupt_handler,\n+\t\t\t\t (void *)eth_dev);\n+\n+\t/* enable uio/vfio intr/eventfd mapping */\n+\trte_intr_enable(&pci_dev->intr_handle);\n+\n \t/* enable support intr */\n \tigb_intr_enable(eth_dev);\n \n@@ -1122,13 +1129,15 @@ eth_igb_start(struct rte_eth_dev *dev)\n \tigb_pf_host_configure(dev);\n \n \t/* check and configure queue intr-vector mapping */\n-\tif (dev->data->dev_conf.intr_conf.rxq != 0) {\n+\tif ((rte_intr_cap_multiple(intr_handle) ||\n+\t !RTE_ETH_DEV_SRIOV(dev).active) &&\n+\t dev->data->dev_conf.intr_conf.rxq != 0) {\n \t\tintr_vector = dev->data->nb_rx_queues;\n \t\tif (rte_intr_efd_enable(intr_handle, intr_vector))\n \t\t\treturn -1;\n \t}\n \n-\tif (rte_intr_dp_is_en(intr_handle)) {\n+\tif (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {\n \t\tintr_handle->intr_vec =\n \t\t\trte_zmalloc(\"intr_vec\",\n \t\t\t\t dev->data->nb_rx_queues * sizeof(int), 0);\n@@ -1221,20 +1230,22 @@ eth_igb_start(struct rte_eth_dev *dev)\n \t}\n \te1000_setup_link(hw);\n \n-\t/* check if lsc interrupt feature is enabled */\n-\tif (dev->data->dev_conf.intr_conf.lsc != 0) {\n-\t\tif (rte_intr_allow_others(intr_handle)) {\n-\t\t\trte_intr_callback_register(intr_handle,\n-\t\t\t\t\t\t eth_igb_interrupt_handler,\n-\t\t\t\t\t\t (void *)dev);\n+\tif (rte_intr_allow_others(intr_handle)) {\n+\t\t/* check if lsc interrupt is enabled */\n+\t\tif (dev->data->dev_conf.intr_conf.lsc != 0)\n \t\t\teth_igb_lsc_interrupt_setup(dev);\n-\t\t} else\n+\t} else {\n+\t\trte_intr_callback_unregister(intr_handle,\n+\t\t\t\t\t eth_igb_interrupt_handler,\n+\t\t\t\t\t (void *)dev);\n+\t\tif (dev->data->dev_conf.intr_conf.lsc != 0)\n \t\t\tPMD_INIT_LOG(INFO, \"lsc won't enable because of\"\n \t\t\t\t \" no intr multiplex\\n\");\n \t}\n \n \t/* check if rxq interrupt is enabled */\n-\tif (dev->data->dev_conf.intr_conf.rxq != 0)\n+\tif (dev->data->dev_conf.intr_conf.rxq != 0 &&\n+\t rte_intr_dp_is_en(intr_handle))\n \t\teth_igb_rxq_interrupt_setup(dev);\n \n \t/* enable uio/vfio intr/eventfd mapping */\n@@ -1327,6 +1338,12 @@ eth_igb_stop(struct rte_eth_dev *dev)\n \t}\n \tfilter_info->twotuple_mask = 0;\n \n+\tif (!rte_intr_allow_others(intr_handle))\n+\t\t/* resume to the default handler */\n+\t\trte_intr_callback_register(intr_handle,\n+\t\t\t\t\t eth_igb_interrupt_handler,\n+\t\t\t\t\t (void *)dev);\n+\n \t/* Clean datapath event and queue/vec mapping */\n \trte_intr_efd_disable(intr_handle);\n \tif (intr_handle->intr_vec != NULL) {\n", "prefixes": [ "dpdk-dev", "v4", "11/13" ] }{ "id": 8657, "url": "