Show a patch.

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

{
    "id": 84,
    "url": "http://patches.dpdk.org/api/patches/84/",
    "web_url": "http://patches.dpdk.org/patch/84/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<14060979121185-git-send-email-Hemant@freescale.com>",
    "date": "2014-07-23T06:45:12",
    "name": "[dpdk-dev] kni: optimizing the rte_kni_rx_burst",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ca0899e1b6f1420bb013a299fa75e5699dfa560a",
    "submitter": {
        "id": 39,
        "url": "http://patches.dpdk.org/api/people/39/",
        "name": "Hemant Agrawal",
        "email": "Hemant@freescale.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/84/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/84/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/84/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<b10814@nmglablinux18.freescale.com>",
        "X-OriginatorOrg": "freescale.com",
        "MIME-Version": "1.0",
        "X-Mailman-Version": "2.1.15",
        "Date": "Wed, 23 Jul 2014 12:15:12 +0530",
        "X-List-Received-Date": "Wed, 23 Jul 2014 06:43:59 -0000",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Content-Type": "text/plain",
        "X-BeenThere": "dev@dpdk.org",
        "X-Forefront-Antispam-Report": "CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI;\n\tEFV:NLI; SFV:NSPM;\n\tSFS:(6039001)(6009001)(428002)(189002)(199002)(77096002)(84676001)(77982001)(74502001)(85852003)(103686003)(104166001)(26826002)(19580395003)(95666004)(68736004)(83072002)(83322001)(93916002)(86372001)(92566001)(20776003)(50986999)(44976005)(89996001)(62966002)(81542001)(92726001)(50466002)(6806004)(87286001)(42186005)(74662001)(21056001)(101416001)(99396002)(31966008)(77156001)(46386002)(87936001)(2351001)(79102001)(229853001)(4396001)(110136001)(97736001)(48376002)(107046002)(16796002)(81342001)(19580405001)(106466001)(45336002)(88136002)(102836001)(52956003)(64706001)(85306003)(36756003)(76482001)(50226001)(46102001)(47776003)(80022001)(105586002)(90966001);\n\tDIR:OUT; SFP:; SCL:1; SRVR:BN1PR0301MB0691;\n\tH:tx30smr01.am.freescale.net; FPR:; \n\tMLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; ",
        "Received": [
            "from na01-bl2-obe.outbound.protection.outlook.com\n\t(mail-bl2lp0209.outbound.protection.outlook.com [207.46.163.209])\n\tby dpdk.org (Postfix) with ESMTP id 746D0594D\n\tfor <dev@dpdk.org>; Wed, 23 Jul 2014 08:43:59 +0200 (CEST)",
            "from BY2PR03CA072.namprd03.prod.outlook.com (10.141.249.45) by\n\tBN1PR0301MB0691.namprd03.prod.outlook.com (25.160.171.28) with\n\tMicrosoft SMTP\n\tServer (TLS) id 15.0.990.7; Wed, 23 Jul 2014 06:45:20 +0000",
            "from BN1BFFO11FD014.protection.gbl (2a01:111:f400:7c10::1:141) by\n\tBY2PR03CA072.outlook.office365.com (2a01:111:e400:2c5d::45) with\n\tMicrosoft SMTP Server (TLS) id 15.0.990.7 via Frontend Transport;\n\tWed, 23 Jul 2014 06:45:19 +0000",
            "from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBN1BFFO11FD014.mail.protection.outlook.com (10.58.144.77) with\n\tMicrosoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport;\n\tWed, 23 Jul 2014 06:45:18 +0000",
            "from nmglablinux18.freescale.com\n\t(nmglablinux18.zin33.ap.freescale.net [10.232.20.240])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\ts6N6jGbI011738; Tue, 22 Jul 2014 23:45:17 -0700",
            "by nmglablinux18.freescale.com (Postfix, from userid 5043)\n\tid F28783DD9CCF; Wed, 23 Jul 2014 12:15:12 +0530 (IST)"
        ],
        "Subject": "[dpdk-dev] [PATCH] kni: optimizing the rte_kni_rx_burst",
        "X-Mailer": "git-send-email 1.5.2.4",
        "Authentication-Results": "spf=none (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=b10814@nmglablinux18.freescale.com; ",
        "Message-ID": "<14060979121185-git-send-email-Hemant@freescale.com>",
        "Precedence": "list",
        "From": "Hemant Agrawal <Hemant@freescale.com>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "Received-SPF": "None (: nmglablinux18.freescale.com does not designate\n\tpermitted sender hosts)",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "X-EOPAttributedMessage": "0",
        "X-Forefront-PRVS": "028166BF91",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-Microsoft-Antispam": "BCL:0;PCL:0;RULEID:",
        "To": "<dev@dpdk.org>"
    },
    "content": "The current implementation of rte_kni_rx_burst polls the fifo for buffers.\nIrrespective of success or failure, it allocates the mbuf and try to put them into the alloc_q\nif the buffers are not added to alloc_q, it frees them.\nThis waste lots of cpu cycles in allocating and freeing the buffers if alloc_q is full.\n\nThe logic has been changed to:\n1. Initially allocand add buffer(burstsize) to alloc_q\n2. Add buffers to alloc_q only when you are pulling out the buffers.\n\nSigned-off-by: Hemant Agrawal <Hemant@freescale.com>\n---\n lib/librte_kni/rte_kni.c |    8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c\nindex 76feef4..01e85f8 100644\n--- a/lib/librte_kni/rte_kni.c\n+++ b/lib/librte_kni/rte_kni.c\n@@ -263,6 +263,9 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,\n \n \tctx->in_use = 1;\n \n+\t/* Allocate mbufs and then put them into alloc_q */\n+\tkni_allocate_mbufs(ctx);\n+\n \treturn ctx;\n \n fail:\n@@ -369,8 +372,9 @@ rte_kni_rx_burst(struct rte_kni *kni, struct rte_mbuf **mbufs, unsigned num)\n {\n \tunsigned ret = kni_fifo_get(kni->tx_q, (void **)mbufs, num);\n \n-\t/* Allocate mbufs and then put them into alloc_q */\n-\tkni_allocate_mbufs(kni);\n+\t/* If buffers removed, allocate mbufs and then put them into alloc_q */\n+\tif(ret)\n+\t\tkni_allocate_mbufs(kni);\n \n \treturn ret;\n }\n",
    "prefixes": [
        "dpdk-dev"
    ]
}