get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139494,
    "url": "http://patchwork.dpdk.org/api/patches/139494/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240418135307.3270094-1-edwin.brossette@6wind.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20240418135307.3270094-1-edwin.brossette@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240418135307.3270094-1-edwin.brossette@6wind.com",
    "date": "2024-04-18T13:53:07",
    "name": "net/ixgbe: don't create a delayed interrupt handler if one already exists",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a1a7d97e21a629b8f84442a98ef19392e5841573",
    "submitter": {
        "id": 2967,
        "url": "http://patchwork.dpdk.org/api/people/2967/?format=api",
        "name": null,
        "email": "edwin.brossette@6wind.com"
    },
    "delegate": {
        "id": 10,
        "url": "http://patchwork.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240418135307.3270094-1-edwin.brossette@6wind.com/mbox/",
    "series": [
        {
            "id": 31782,
            "url": "http://patchwork.dpdk.org/api/series/31782/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31782",
            "date": "2024-04-18T13:53:07",
            "name": "net/ixgbe: don't create a delayed interrupt handler if one already exists",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/31782/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/139494/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/139494/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 5358643EA2;\n\tThu, 18 Apr 2024 15:53:18 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B88B840A7D;\n\tThu, 18 Apr 2024 15:53:17 +0200 (CEST)",
            "from mail-ej1-f97.google.com (mail-ej1-f97.google.com\n [209.85.218.97]) by mails.dpdk.org (Postfix) with ESMTP id A157D40647\n for <dev@dpdk.org>; Thu, 18 Apr 2024 15:53:16 +0200 (CEST)",
            "by mail-ej1-f97.google.com with SMTP id\n a640c23a62f3a-a555faf94fcso97665366b.0\n for <dev@dpdk.org>; Thu, 18 Apr 2024 06:53:16 -0700 (PDT)",
            "from smtpservice.6wind.com ([185.13.181.2])\n by smtp-relay.gmail.com with ESMTP id\n cs21-20020a170906dc9500b00a51c764c93esm31713ejc.83.2024.04.18.06.53.15;\n Thu, 18 Apr 2024 06:53:16 -0700 (PDT)",
            "from localhost (dio.dev.6wind.com [10.17.1.86])\n by smtpservice.6wind.com (Postfix) with ESMTP id BDE366011D;\n Thu, 18 Apr 2024 15:53:15 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=6wind.com; s=google; t=1713448396; x=1714053196; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=99EkEXoADGp35ztea/DScD8wHxV+lZrBFpUscb/WQbE=;\n b=Q648RXfPn23v6RQ4JPz43A6up4zTVzcIaGdsOc4EBLt6bS/LqD+Vn2wojJQ22qT6Tp\n eZ+hye0VtxXMbFjgMAns4ESbXEgf5fvg9Y854I3kCYHbF5gqz8eVdbcVYWc/rIMG93+D\n 84Pfd3T+8XB4aqw1IP1bHvYsD0QV5UA3clGIJgsBFZItaOh4UDlXmLyCj/RHnrBCspzB\n OgA91oY0RDC5k0FbGgiXGBkFIksdZ8OxMHhxyLeT54TXdUVrsoTVA5+yicVeV435bIsz\n ahARayPrblCjVWnqnC9RrtNGxMPVTjIMHEvml6ERYe/EjWVohWg5IrKj4nlAShHFKZ0d\n m3sQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1713448396; x=1714053196;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=99EkEXoADGp35ztea/DScD8wHxV+lZrBFpUscb/WQbE=;\n b=GrH04Qy1KyUex9Mb4+NvAGb3CnCBoVD8Mpj1i/GNc5iXFIAsb2z2Itysht7bkCALWh\n UP6Mai7G1vZIymbRIRArs/W0OPx4PYSOT5mGS/599q+iE5Ww5VSnvS3z1juSyRh+3ZUe\n jMeUY/SERaw4leaqDrUOQLLsMnfdTI5cfnDOQasZ5ASuE+8Zx90jqYoJOq3Pdw1TVLHG\n 4TpuKt9TSHl6jWL+Oa8x67jqZqX6rX8emHK9zoEF7bbG9bhQkRpL8OM1bSErFUfVzEbw\n Xhl/wieqt6M6AXn0Kenvbn83Z+vITXmtdX/ZewR8j902muW9KPg3vSgc5XhObQ7wP7Li\n C+1A==",
        "X-Gm-Message-State": "AOJu0YyaHwN+ixQQMUacDOPOK3JSh9onZIqtC+B+eCg+Wt90tY74JobR\n Ruczj8pCNFh0zO/nhy5jvM882cf7DVlu4/NR9UGVXBCeEYn6r/SWZdz7InoMfprvw4BbCU+ZV60\n 1Q68pH/eGryejzSbTmVPjVq5TysMTyFwXyXfLL6b8",
        "X-Google-Smtp-Source": "\n AGHT+IHzP2AAeh1qtn8SbiQ9OqQSEq91rmqLbeoOcb7k9rkJBelv06QQf88ALB0g8zf0Ytg0lVsAv7RmosVg",
        "X-Received": "by 2002:a17:906:4686:b0:a52:33b1:80a with SMTP id\n a6-20020a170906468600b00a5233b1080amr1787736ejr.10.1713448396193;\n Thu, 18 Apr 2024 06:53:16 -0700 (PDT)",
        "X-Relaying-Domain": "6wind.com",
        "From": "edwin.brossette@6wind.com",
        "To": "dev@dpdk.org",
        "Cc": "olivier.matz@6wind.com, Edwin Brossette <edwin.brossette@6wind.com>,\n stable@dpdk.org",
        "Subject": "[PATCH] net/ixgbe: don't create a delayed interrupt handler if one\n already exists",
        "Date": "Thu, 18 Apr 2024 15:53:07 +0200",
        "Message-Id": "<20240418135307.3270094-1-edwin.brossette@6wind.com>",
        "X-Mailer": "git-send-email 2.35.0.4.g44a5d4affccf",
        "In-Reply-To": "\n <CANDF9xC+4yBVxX8sgXzM0EdYcQFhzonG8FnnTQ1trSDxAkvAaQ@mail.gmail.com>",
        "References": "\n <CANDF9xC+4yBVxX8sgXzM0EdYcQFhzonG8FnnTQ1trSDxAkvAaQ@mail.gmail.com>",
        "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": "From: Edwin Brossette <edwin.brossette@6wind.com>\n\nSince link state may need some time to stabilize after a link state\nchange, we cannot update the link state right after one occurs. So link\nstate change interrupts (lsc) are handled after a delay. To do this, an\nalarm to call a delayed handler is programmed. This delayed handler is\ntasked with updating the link after a variable delay of one to four\nseconds which should be enough time for the link state to become stable\nagain.\n\nHowever, a problem can occur with some models of network cards. For\nexample, ixgbe_mac_X550EM_x may trigger this interrupt twice because\nanother interrupt signal is received on the General Purpose Interrupt\npin SPD0, which has the same interrupt handler. In such a case, the\ndelayed interrupt handler would be programmed to be executed twice.\n\nSince we save the original interrupt mask value to restore it after the\ndelayed handler is done with its work, we end up overwritting its value\nafter the second alarm is programmed. Even worse: when restoring it the\nfirst time, the saved original mask variable is reset to 0, so we end up\ncompletely disabling all interrupts when trying to restore this mask\nafter the second time the delayed handler is executed.\n\nAdd a check on the interrupt mask value when programming the alarm for\nthe delayed handler. If the bit for lsc interrupts is unset, it means an\nalarm was already programmed for the delayed handler. In this case, skip\nthe alarm creation.\n\nFixes: 9b667210700e (\"net/ixgbe: fix blocked interrupts\")\nCc: stable@dpdk.org\n\nSigned-off-by: Edwin Brossette <edwin.brossette@6wind.com>\n---\n drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++--------\n 1 file changed, 14 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex c61c52b2966b..52cafcbc965f 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -4667,14 +4667,20 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)\n \t\t\ttimeout = IXGBE_LINK_DOWN_CHECK_TIMEOUT;\n \n \t\tixgbe_dev_link_status_print(dev);\n-\t\tif (rte_eal_alarm_set(timeout * 1000,\n-\t\t\t\t      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)\n-\t\t\tPMD_DRV_LOG(ERR, \"Error setting alarm\");\n-\t\telse {\n-\t\t\t/* remember original mask */\n-\t\t\tintr->mask_original = intr->mask;\n-\t\t\t/* only disable lsc interrupt */\n-\t\t\tintr->mask &= ~IXGBE_EIMS_LSC;\n+\n+\t\t/* Don't program delayed handler if LSC interrupt is disabled.\n+\t\t * It means one is already programmed.\n+\t\t */\n+\t\tif (intr->mask & IXGBE_EIMS_LSC){\n+\t\t\tif (rte_eal_alarm_set(timeout * 1000,\n+\t\t\t\t\t      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)\n+\t\t\t\tPMD_DRV_LOG(ERR, \"Error setting alarm\");\n+\t\t\telse {\n+\t\t\t\t/* remember original mask */\n+\t\t\t\tintr->mask_original = intr->mask;\n+\t\t\t\t/* only disable lsc interrupt */\n+\t\t\t\tintr->mask &= ~IXGBE_EIMS_LSC;\n+\t\t\t}\n \t\t}\n \t}\n \n",
    "prefixes": []
}