get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 35169,
    "url": "http://patches.dpdk.org/api/patches/35169/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180214135227.o7lddtw5jmnnec7u@bidouze.vm.6wind.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": "<20180214135227.o7lddtw5jmnnec7u@bidouze.vm.6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180214135227.o7lddtw5jmnnec7u@bidouze.vm.6wind.com",
    "date": "2018-02-14T13:52:27",
    "name": "[dpdk-dev] net/failsafe: fix Rx interrupt reinstallation",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "bae24f2341a7fca3bf4574440befda8d3c04fadc",
    "submitter": {
        "id": 269,
        "url": "http://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180214135227.o7lddtw5jmnnec7u@bidouze.vm.6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/35169/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/35169/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9696F1B290;\n\tWed, 14 Feb 2018 14:52:43 +0100 (CET)",
            "from mail-wr0-f195.google.com (mail-wr0-f195.google.com\n\t[209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 522691B21E\n\tfor <dev@dpdk.org>; Wed, 14 Feb 2018 14:52:42 +0100 (CET)",
            "by mail-wr0-f195.google.com with SMTP id k32so16758wrk.4\n\tfor <dev@dpdk.org>; Wed, 14 Feb 2018 05:52:42 -0800 (PST)",
            "from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\ti11sm7021958wre.36.2018.02.14.05.52.40\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 14 Feb 2018 05:52:40 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=xZ7+92GzMCasCKXel5IIGs9vJG7z38i2k6FKuKBtMEw=;\n\tb=Xvy45XE1+ftsXOoPSoLF82cUPY/8MvV+xHSjyQ2jGfoc5tQwtZ87vhW/53Q5hKnpyc\n\tXyIVgom7Lftq0oxv7AbxWCVK4qh93U6ow+acwSG8vaUPMuAfHlKSpA4mzAMrNjSpn/Jo\n\tH736NfFkSPLYO7AZZdtnkGfkgWNLOtndl59uD5lmjWRiBPK8Wi2dQgzyg7qVveapsUli\n\t4qTGVyq0f1IM5iotLhH2pUEPji59WXrr2pbmOVHr25EzPGylLbVtcRs5jZ2w0W7AhPFb\n\tOF6WpxrJw4xqaAHONEEhFKij2ejE32TuiAEtz275gUBVCmXVvPG1sU7Y9yRR80Vgxabn\n\t0QGw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=xZ7+92GzMCasCKXel5IIGs9vJG7z38i2k6FKuKBtMEw=;\n\tb=JwHbNvFXPot24LulKUqAM9niYh85qIRSeMAf8ZOOMBmN7tzX/md89Pbx6AjNlZG+A1\n\tbNitmt95OFcdf3twgGHFunankt5pn4fD7nnTQYJGf53+DBUK8ZDY/OgE8tB87ZGMuAEa\n\tBn3AFAKP5R0wqDwVHidinKzw02rOatCLczfb/w8a9N00/YsJpI5syu2I3egeNpKblZX1\n\twZjfn7/jHWHeABsoaKHmyYBC5+uD4IYVxj0210MHiLBI0aHcRCpEbPCrWEPMJ5MMvkJT\n\tv31DTXg/FakE8yK9CoVN/i7s1CNOURdhvH7GNiOsGv5SLoqHgzqf+AfrvHEQSPjeALN4\n\twS1g==",
        "X-Gm-Message-State": "APf1xPBR6UsHSsHG9wsChBKHYszS5YKopqAxS9UDX7uCMr4S/e1x0gmQ\n\tqImcB0d2jKl8RKwQ5cZrGG5G6kRX",
        "X-Google-Smtp-Source": "AH8x226LS++/b1hM5+HwUQzhjsqNFV2L4Kl/7Z6bht4jK7J/rBokUt4SAdq/XWL+00v1tgnPeZwxsA==",
        "X-Received": "by 10.223.199.12 with SMTP id k12mr4777797wrg.261.1518616361723; \n\tWed, 14 Feb 2018 05:52:41 -0800 (PST)",
        "Date": "Wed, 14 Feb 2018 14:52:27 +0100",
        "From": "=?iso-8859-1?q?Ga=EBtan?= Rivet <gaetan.rivet@6wind.com>",
        "To": "Matan Azrad <matan@mellanox.com>",
        "Cc": "dev@dpdk.org",
        "Message-ID": "<20180214135227.o7lddtw5jmnnec7u@bidouze.vm.6wind.com>",
        "References": "<1518562772-29823-1-git-send-email-matan@mellanox.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=iso-8859-1",
        "Content-Disposition": "inline",
        "Content-Transfer-Encoding": "8bit",
        "In-Reply-To": "<1518562772-29823-1-git-send-email-matan@mellanox.com>",
        "User-Agent": "NeoMutt/20170113 (1.7.2)",
        "Subject": "Re: [dpdk-dev] [PATCH] net/failsafe: fix Rx interrupt reinstallation",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://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": "<https://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": "Hi Matan,\n\nOn Tue, Feb 13, 2018 at 10:59:32PM +0000, Matan Azrad wrote:\n> Fail-safe dev_start() operation can be called by both the application\n> and the hot-plug alarm mechanism.\n> \n> The installation of Rx interrupt are triggered from dev_start() in any\n> time it is called while actually the Rx interrupt should be installed\n> only by the application calls.\n> \n> So, each plug-in event causes reinstallation which causes memory leak.\n> \n> Trigger the Rx interrupt installation only for application calls.\n> \n> Fixes: 9e0360aebf23 (\"net/failsafe: register as Rx interrupt mode\")\n> \n> Signed-off-by: Matan Azrad <matan@mellanox.com>\n> ---\n>  drivers/net/failsafe/failsafe_ops.c | 10 ++++++----\n>  1 file changed, 6 insertions(+), 4 deletions(-)\n> \n> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c\n> index 057e435..bbbd335 100644\n> --- a/drivers/net/failsafe/failsafe_ops.c\n> +++ b/drivers/net/failsafe/failsafe_ops.c\n> @@ -181,10 +181,12 @@\n>  \tint ret;\n>  \n>  \tfs_lock(dev, 0);\n> -\tret = failsafe_rx_intr_install(dev);\n> -\tif (ret) {\n> -\t\tfs_unlock(dev, 0);\n> -\t\treturn ret;\n> +\tif (PRIV(dev)->alarm_lock == 0) {\n\nI dislike having to rely on unrelated context of execution to decide a\ncode-path.\n\nI'd prefer to make interrupt installation dependent on the interrupt\nstate instead.\n\nI think it should be possible to forbid reinstallation within\nfailsafe_rx_intr_install directly, e.g.\n\n\nThis way the logic is self-dependent and the check limited to this\ncomponent.\n\nThere might be better way to do this, it's only an example to explain my\npoint.\n\n> +\t\tret = failsafe_rx_intr_install(dev);\n> +\t\tif (ret) {\n> +\t\t\tfs_unlock(dev, 0);\n> +\t\t\treturn ret;\n> +\t\t}\n>  \t}\n>  \tFOREACH_SUBDEV(sdev, i, dev) {\n>  \t\tif (sdev->state != DEV_ACTIVE)\n> -- \n> 1.9.5\n>",
    "diff": "diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c\nindex f6ff04dc8..46c3aa5f2 100644\n--- a/drivers/net/failsafe/failsafe_intr.c\n+++ b/drivers/net/failsafe/failsafe_intr.c\n@@ -523,7 +523,8 @@ failsafe_rx_intr_install(struct rte_eth_dev *dev)\n        const struct rte_intr_conf *const intr_conf =\n                        &priv->dev->data->dev_conf.intr_conf;\n\n-       if (intr_conf->rxq == 0)\n+       if (intr_conf->rxq == 0 ||\n+           dev->intr_handle != NULL)\n                return 0;\n        if (fs_rx_intr_vec_install(priv) < 0)\n                return -rte_errno;\n",
    "prefixes": [
        "dpdk-dev"
    ]
}