get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8315,
    "url": "http://patches.dpdk.org/api/patches/8315/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1446182873-28814-8-git-send-email-cunming.liang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1446182873-28814-8-git-send-email-cunming.liang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446182873-28814-8-git-send-email-cunming.liang@intel.com",
    "date": "2015-10-30T05:27:49",
    "name": "[dpdk-dev,v2,07/11] ixgbevf: cleanup unnecessary interrupt handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "23e76b2d4f38492b3723cc4afd604129ea8eb91b",
    "submitter": {
        "id": 46,
        "url": "http://patches.dpdk.org/api/people/46/?format=api",
        "name": "Cunming Liang",
        "email": "cunming.liang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1446182873-28814-8-git-send-email-cunming.liang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/8315/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/8315/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 51A988E6A;\n\tFri, 30 Oct 2015 06:28:26 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id B19148E70\n\tfor <dev@dpdk.org>; Fri, 30 Oct 2015 06:28:18 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga102.fm.intel.com with ESMTP; 29 Oct 2015 22:28:19 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga003.jf.intel.com with ESMTP; 29 Oct 2015 22:28:17 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t9U5SFmC023342;\n\tFri, 30 Oct 2015 13:28:15 +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 t9U5SCvd028912; Fri, 30 Oct 2015 13:28:14 +0800",
            "(from cliang18@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9U5SC6C028908; \n\tFri, 30 Oct 2015 13:28:12 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,217,1444719600\"; d=\"scan'208\";a=\"674833238\"",
        "From": "Cunming Liang <cunming.liang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 30 Oct 2015 13:27:49 +0800",
        "Message-Id": "<1446182873-28814-8-git-send-email-cunming.liang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1446182873-28814-1-git-send-email-cunming.liang@intel.com>",
        "References": "<1443072831-19065-1-git-send-email-cunming.liang@intel.com>\n\t<1446182873-28814-1-git-send-email-cunming.liang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 07/11] ixgbevf: cleanup unnecessary interrupt\n\thandler",
        "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": "As ixgbe vf doesn't support lsc, the patch removes those unused code.\nIn addition, it does some tiny cleanup.\n\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\n---\n drivers/net/ixgbe/ixgbe_ethdev.c | 85 +++++-----------------------------------\n 1 file changed, 10 insertions(+), 75 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex 366923f..794171c 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -206,8 +206,6 @@ static void ixgbe_dcb_init(struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_conf\n /* For Virtual Function support */\n static int eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev);\n static int eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev);\n-static int ixgbevf_dev_interrupt_get_status(struct rte_eth_dev *dev);\n-static int ixgbevf_dev_interrupt_action(struct rte_eth_dev *dev);\n static int  ixgbevf_dev_configure(struct rte_eth_dev *dev);\n static int  ixgbevf_dev_start(struct rte_eth_dev *dev);\n static void ixgbevf_dev_stop(struct rte_eth_dev *dev);\n@@ -223,8 +221,6 @@ static void ixgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev,\n \t\tuint16_t queue, int on);\n static void ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask);\n static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on);\n-static void ixgbevf_dev_interrupt_handler(struct rte_intr_handle *handle,\n-\t\t\t\t\t  void *param);\n static int ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev,\n \t\t\t\t\t    uint16_t queue_id);\n static int ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev,\n@@ -2681,30 +2677,6 @@ ixgbe_dev_interrupt_get_status(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n-static int\n-ixgbevf_dev_interrupt_get_status(struct rte_eth_dev *dev)\n-{\n-\tuint32_t eicr;\n-\tstruct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n-\tstruct ixgbe_interrupt *intr =\n-\t\tIXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);\n-\n-\t/* clear all cause mask */\n-\tixgbevf_intr_disable(hw);\n-\n-\t/* read-on-clear nic registers here */\n-\teicr = IXGBE_READ_REG(hw, IXGBE_VTEICR);\n-\tPMD_DRV_LOG(INFO, \"eicr %x\", eicr);\n-\n-\tintr->flags = 0;\n-\n-\t/* set flag for async link update */\n-\tif (eicr & IXGBE_EICR_LSC)\n-\t\tintr->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;\n-\n-\treturn 0;\n-}\n-\n /**\n  * It gets and then prints the link status.\n  *\n@@ -2800,18 +2772,6 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n-static int\n-ixgbevf_dev_interrupt_action(struct rte_eth_dev *dev)\n-{\n-\tstruct ixgbe_hw *hw =\n-\t\tIXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n-\n-\tPMD_DRV_LOG(DEBUG, \"enable intr immediately\");\n-\tixgbevf_intr_enable(hw);\n-\trte_intr_enable(&dev->pci_dev->intr_handle);\n-\treturn 0;\n-}\n-\n /**\n  * Interrupt handler which shall be registered for alarm callback for delayed\n  * handling specific interrupt to wait for the stable nic state. As the\n@@ -2874,16 +2834,6 @@ ixgbe_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle,\n \tixgbe_dev_interrupt_action(dev);\n }\n \n-static void\n-ixgbevf_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle,\n-\t\t\t      void *param)\n-{\n-\tstruct rte_eth_dev *dev = (struct rte_eth_dev *)param;\n-\n-\tixgbevf_dev_interrupt_get_status(dev);\n-\tixgbevf_dev_interrupt_action(dev);\n-}\n-\n static int\n ixgbe_dev_led_on(struct rte_eth_dev *dev)\n {\n@@ -3492,11 +3442,11 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)\n \tixgbevf_dev_rxtx_start(dev);\n \n \t/* check and configure queue intr-vector mapping */\n-\tif (dev->data->dev_conf.intr_conf.rxq != 0)\n+\tif (dev->data->dev_conf.intr_conf.rxq != 0) {\n \t\tintr_vector = dev->data->nb_rx_queues;\n-\n-\tif (rte_intr_efd_enable(intr_handle, intr_vector))\n-\t\treturn -1;\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) && !intr_handle->intr_vec) {\n \t\tintr_handle->intr_vec =\n@@ -3510,16 +3460,6 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)\n \t}\n \tixgbevf_configure_msix(dev);\n \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\tixgbevf_dev_interrupt_handler,\n-\t\t\t\t\t(void *)dev);\n-\t\telse\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 \trte_intr_enable(intr_handle);\n \n \t/* Re-enable interrupt for VF */\n@@ -3565,7 +3505,6 @@ static void\n ixgbevf_dev_close(struct rte_eth_dev *dev)\n {\n \tstruct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n-\tstruct rte_pci_device *pci_dev;\n \n \tPMD_INIT_FUNC_TRACE();\n \n@@ -3577,12 +3516,6 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)\n \n \t/* reprogram the RAR[0] in case user changed it. */\n \tixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);\n-\n-\tpci_dev = dev->pci_dev;\n-\tif (pci_dev->intr_handle.intr_vec) {\n-\t\trte_free(pci_dev->intr_handle.intr_vec);\n-\t\tpci_dev->intr_handle.intr_vec = NULL;\n-\t}\n }\n \n static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)\n@@ -4108,7 +4041,8 @@ ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)\n \t\tIXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \n \tmask = IXGBE_READ_REG(hw, IXGBE_VTEIMS);\n-\tmask |= (1 << queue_id);\n+\tmask |= (1 << MISC_VEC_ID);\n+\tRTE_SET_USED(queue_id);\n \tIXGBE_WRITE_REG(hw, IXGBE_VTEIMS, mask);\n \n \trte_intr_enable(&dev->pci_dev->intr_handle);\n@@ -4124,7 +4058,8 @@ ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)\n \t\tIXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \n \tmask = IXGBE_READ_REG(hw, IXGBE_VTEIMS);\n-\tmask &= ~(1 << queue_id);\n+\tmask &= ~(1 << MISC_VEC_ID);\n+\tRTE_SET_USED(queue_id);\n \tIXGBE_WRITE_REG(hw, IXGBE_VTEIMS, mask);\n \n \treturn 0;\n@@ -4260,7 +4195,7 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev)\n \tstruct ixgbe_hw *hw =\n \t\tIXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tuint32_t q_idx;\n-\tuint32_t vector_idx = 0;\n+\tuint32_t vector_idx = MISC_VEC_ID;\n \n \t/* won't configure msix register if no mapping is done\n \t * between intr vector and event fd.\n@@ -4277,7 +4212,7 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev)\n \t\tintr_handle->intr_vec[q_idx] = vector_idx;\n \t}\n \n-\t/* Configure VF Rx queue ivar */\n+\t/* Configure VF other cause ivar */\n \tixgbevf_set_ivar_map(hw, -1, 1, vector_idx);\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "07/11"
    ]
}