get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105236,
    "url": "http://patches.dpdk.org/api/patches/105236/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1639753232-115930-1-git-send-email-tudor.cornea@gmail.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": "<1639753232-115930-1-git-send-email-tudor.cornea@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1639753232-115930-1-git-send-email-tudor.cornea@gmail.com",
    "date": "2021-12-17T15:00:32",
    "name": "kernel/kni: retry the xmit in case ring is full",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "4780a081050b4d3fd1f2b835dd4d901756a925c8",
    "submitter": {
        "id": 2247,
        "url": "http://patches.dpdk.org/api/people/2247/?format=api",
        "name": "Tudor Cornea",
        "email": "tudor.cornea@gmail.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1639753232-115930-1-git-send-email-tudor.cornea@gmail.com/mbox/",
    "series": [
        {
            "id": 20970,
            "url": "http://patches.dpdk.org/api/series/20970/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20970",
            "date": "2021-12-17T15:00:32",
            "name": "kernel/kni: retry the xmit in case ring is full",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/20970/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105236/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/105236/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 1D667A04A3;\n\tFri, 17 Dec 2021 16:00:45 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A9D8F40143;\n\tFri, 17 Dec 2021 16:00:44 +0100 (CET)",
            "from mail-wm1-f52.google.com (mail-wm1-f52.google.com\n [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id B2D6C40040\n for <dev@dpdk.org>; Fri, 17 Dec 2021 16:00:43 +0100 (CET)",
            "by mail-wm1-f52.google.com with SMTP id\n z4-20020a1c7e04000000b0032fb900951eso4224375wmc.4\n for <dev@dpdk.org>; Fri, 17 Dec 2021 07:00:43 -0800 (PST)",
            "from tucornea-dev-machine.localdomain ([193.226.172.43])\n by smtp.gmail.com with ESMTPSA id v15sm7603464wro.35.2021.12.17.07.00.42\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Fri, 17 Dec 2021 07:00:42 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n h=from:to:cc:subject:date:message-id;\n bh=T7UuoLcpfOKtK9xYzmTNe2cKXnLSkxkg8ladpRcmJt0=;\n b=Kzed9eutzXo8ajnD9xxOjSFgpsnhRkY2bxwWR5TBIcNhKHxXq6J/NpdCi0AjOCaxyw\n stpNuoFPwwRo+d/74GD/ZLvsmfw3gXyHRVlJ/J4SZ7ire6JwzAtJsmrj3XZDR/zblBSo\n P8px88N3A+FJA1Gzh81Buf32p5y5cWYCrIN6KqoJIU6oZ+H9GHpYBvFM417WzyEOzjeA\n VBrtG95RRJAwQTWFxeevCdPx6NnnLq9rbGtGvYTABfG7mkt2dhPrkek0CcVxbdKG+lAx\n xIgiPxRPqWanXBEIWTMNBjdiiO2xh8SqgZ8454/42fuHIaBv+y4i1D5PpvG4lslTQlov\n 727w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id;\n bh=T7UuoLcpfOKtK9xYzmTNe2cKXnLSkxkg8ladpRcmJt0=;\n b=VHCTLj3SWCoRRoiCsGQkcD+si3OMJJMFn5cJL/kvFDqe0088icnnTg+lOgacZ7BmTB\n VXLY3W6nGjBe1JJvOahAhx8/89ABP/eQUgqH+y6FLWheXpttEq9m99WSt4MFysgpFeyn\n M6Pw4EOdPqcjaeavjoY7PJ2hLyf+WZXwqXI7UVloA/4Og5KD80YTOmLI4/Z96N5N1qCB\n bxowPLLSYDm0+7emXeL2DV4QJVRwwJD8q/CC/86NpURh2OpiTkWrYJX/0PnsGUjQHXNu\n WGt79VQtsyEcLHBq5a8kaqkSXzwYHylsQXtwbX5xxriFiXQNYHzyxDR1/3FYe2Vjkxsd\n x93w==",
        "X-Gm-Message-State": "AOAM533xa9n2RQbb4BIzEPGZbxDHLd2CrQfJ0oizl5mO0tXQsBMKuQyh\n P4VGwe7Onu57hBLp1WjCg7c=",
        "X-Google-Smtp-Source": "\n ABdhPJx2GXmAra/2b3rHd0HKFw28rKjCE3VOY1ybY5WhpwrekBvs76Pc7LdlNc2rOau6d4QtOK/kQg==",
        "X-Received": "by 2002:a7b:cd02:: with SMTP id f2mr3018683wmj.115.1639753243451;\n Fri, 17 Dec 2021 07:00:43 -0800 (PST)",
        "From": "Tudor Cornea <tudor.cornea@gmail.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "thomas@monjalon.net, stephen@networkplumber.org, dev@dpdk.org,\n Tudor Cornea <tudor.cornea@gmail.com>",
        "Subject": "[PATCH] kernel/kni: retry the xmit in case ring is full",
        "Date": "Fri, 17 Dec 2021 17:00:32 +0200",
        "Message-Id": "<1639753232-115930-1-git-send-email-tudor.cornea@gmail.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "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": "This patch attempts to avoid dropping packets that are to be\ntransmitted, in case there is no space in the KNI ring.\n\nWe have a use case in which we leverage the Linux TCP / IP stack for\ncontrol plane, and some protocols might be sensitive to packet drops.\n\nThis might mean that the sender (Kernel) might be moving at a faster pace\nthan the receiver end (DPDK application), or it might have some brief\nmoments of bursty traffic patterns.\n\nRequeuing the packets could add a kind of backpressure until a transmit\nwindow is available to us.\n\nThe burden of retransmitting is shifted to the caller of ndo_start_xmit,\nwhich in our case is the configured queuing discipline. This way, the\nuser should be able to influence the behavior w.r.t dropping packets,\nby picking the desired queuing discipline.\n\nAlthough it should technically be a good approach, from what\nI have tested, stopping the queue prior to returning NETDEV_TX_BUSY seems\nto add some extra overhead, and degrade the control-plane performance\na bit.\n\nSigned-off-by: Tudor Cornea <tudor.cornea@gmail.com>\n---\n kernel/linux/kni/kni_net.c | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c\nindex 29e5b9e..db0330f 100644\n--- a/kernel/linux/kni/kni_net.c\n+++ b/kernel/linux/kni/kni_net.c\n@@ -321,10 +321,9 @@ kni_net_tx(struct sk_buff *skb, struct net_device *dev)\n \tif (kni_fifo_free_count(kni->tx_q) == 0 ||\n \t\t\tkni_fifo_count(kni->alloc_q) == 0) {\n \t\t/**\n-\t\t * If no free entry in tx_q or no entry in alloc_q,\n-\t\t * drops skb and goes out.\n+\t\t * Tell the caller to requeue, and retry at a later time.\n \t\t */\n-\t\tgoto drop;\n+\t\tgoto requeue;\n \t}\n \n \t/* dequeue a mbuf from alloc_q */\n@@ -371,6 +370,10 @@ kni_net_tx(struct sk_buff *skb, struct net_device *dev)\n \tdev->stats.tx_dropped++;\n \n \treturn NETDEV_TX_OK;\n+\n+requeue:\n+\t/* Signal the caller to re-transmit at a later time */\n+\treturn NETDEV_TX_BUSY;\n }\n \n /*\n",
    "prefixes": []
}