get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 469,
    "url": "https://patches.dpdk.org/api/patches/469/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1411478290-28807-3-git-send-email-declan.doherty@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1411478290-28807-3-git-send-email-declan.doherty@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1411478290-28807-3-git-send-email-declan.doherty@intel.com",
    "date": "2014-09-23T13:18:07",
    "name": "[dpdk-dev,v3,2/5] test app: adding support for generating variable sized packet",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cc9be41de224b3f684b3460e065545d7f3583be6",
    "submitter": {
        "id": 11,
        "url": "https://patches.dpdk.org/api/people/11/?format=api",
        "name": "Doherty, Declan",
        "email": "declan.doherty@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1411478290-28807-3-git-send-email-declan.doherty@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/469/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/469/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 AD350B3AB;\n\tTue, 23 Sep 2014 15:16:28 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 05DA0B39F\n\tfor <dev@dpdk.org>; Tue, 23 Sep 2014 15:16:26 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 23 Sep 2014 06:18:28 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 23 Sep 2014 06:12:29 -0700",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\ts8NDIJ8K001214; Tue, 23 Sep 2014 14:18:19 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id s8NDIJWI031259;\n\tTue, 23 Sep 2014 14:18:19 +0100",
            "(from dwdohert@localhost)\n\tby sivswdev02.ir.intel.com with  id s8NDIJPj031255;\n\tTue, 23 Sep 2014 14:18:19 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"390350573\"",
        "From": "Declan Doherty <declan.doherty@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 23 Sep 2014 14:18:07 +0100",
        "Message-Id": "<1411478290-28807-3-git-send-email-declan.doherty@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1411478290-28807-1-git-send-email-declan.doherty@intel.com>",
        "References": "<1409560289-29558-5-git-send-email-declan.doherty@intel.com>\n\t<1411478290-28807-1-git-send-email-declan.doherty@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 2/5] test app: adding support for generating\n\tvariable sized packet",
        "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": "Signed-off-by: Declan Doherty <declan.doherty@intel.com>\n---\n app/test/packet_burst_generator.c |   25 ++++++++-----------------\n app/test/packet_burst_generator.h |    6 +++++-\n app/test/test_link_bonding.c      |   14 +++++++++-----\n 3 files changed, 22 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c\nindex 9e747a4..b2824dc 100644\n--- a/app/test/packet_burst_generator.c\n+++ b/app/test/packet_burst_generator.c\n@@ -74,8 +74,7 @@ static inline void\n copy_buf_to_pkt(void *buf, unsigned len, struct rte_mbuf *pkt, unsigned offset)\n {\n \tif (offset + len <= pkt->data_len) {\n-\t\trte_memcpy(rte_pktmbuf_mtod(pkt, char *) + offset,\n-\t\t\t\tbuf, (size_t) len);\n+\t\trte_memcpy(rte_pktmbuf_mtod(pkt, char *) + offset, buf, (size_t) len);\n \t\treturn;\n \t}\n \tcopy_buf_to_pkt_segs(buf, len, pkt, offset);\n@@ -191,20 +190,12 @@ initialize_ipv4_header(struct ipv4_hdr *ip_hdr, uint32_t src_addr,\n  */\n #define RTE_MAX_SEGS_PER_PKT 255 /**< pkt.nb_segs is a 8-bit unsigned char. */\n \n-#define TXONLY_DEF_PACKET_LEN 64\n-#define TXONLY_DEF_PACKET_LEN_128 128\n-\n-uint16_t tx_pkt_length = TXONLY_DEF_PACKET_LEN;\n-uint16_t tx_pkt_seg_lengths[RTE_MAX_SEGS_PER_PKT] = {\n-\t\tTXONLY_DEF_PACKET_LEN_128,\n-};\n-\n-uint8_t  tx_pkt_nb_segs = 1;\n \n int\n generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,\n \t\tstruct ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,\n-\t\tuint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst)\n+\t\tuint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst,\n+\t\tuint8_t pkt_len, uint8_t nb_pkt_segs)\n {\n \tint i, nb_pkt = 0;\n \tsize_t eth_hdr_size;\n@@ -221,9 +212,9 @@ nomore_mbuf:\n \t\t\tbreak;\n \t\t}\n \n-\t\tpkt->data_len = tx_pkt_seg_lengths[0];\n+\t\tpkt->data_len = pkt_len;\n \t\tpkt_seg = pkt;\n-\t\tfor (i = 1; i < tx_pkt_nb_segs; i++) {\n+\t\tfor (i = 1; i < nb_pkt_segs; i++) {\n \t\t\tpkt_seg->next = rte_pktmbuf_alloc(mp);\n \t\t\tif (pkt_seg->next == NULL) {\n \t\t\t\tpkt->nb_segs = i;\n@@ -231,7 +222,7 @@ nomore_mbuf:\n \t\t\t\tgoto nomore_mbuf;\n \t\t\t}\n \t\t\tpkt_seg = pkt_seg->next;\n-\t\t\tpkt_seg->data_len = tx_pkt_seg_lengths[i];\n+\t\t\tpkt_seg->data_len = pkt_len;\n \t\t}\n \t\tpkt_seg->next = NULL; /* Last segment of packet. */\n \n@@ -259,8 +250,8 @@ nomore_mbuf:\n \t\t * Complete first mbuf of packet and append it to the\n \t\t * burst of packets to be transmitted.\n \t\t */\n-\t\tpkt->nb_segs = tx_pkt_nb_segs;\n-\t\tpkt->pkt_len = tx_pkt_length;\n+\t\tpkt->nb_segs = nb_pkt_segs;\n+\t\tpkt->pkt_len = pkt_len;\n \t\tpkt->l2_len = eth_hdr_size;\n \n \t\tif (ipv4) {\ndiff --git a/app/test/packet_burst_generator.h b/app/test/packet_burst_generator.h\nindex 5b3cd6c..f86589e 100644\n--- a/app/test/packet_burst_generator.h\n+++ b/app/test/packet_burst_generator.h\n@@ -47,6 +47,9 @@ extern \"C\" {\n #define IPV4_ADDR(a, b, c, d)(((a & 0xff) << 24) | ((b & 0xff) << 16) | \\\n \t\t((c & 0xff) << 8) | (d & 0xff))\n \n+#define PACKET_BURST_GEN_PKT_LEN 60\n+#define PACKET_BURST_GEN_PKT_LEN_128 128\n+\n \n void\n initialize_eth_header(struct ether_hdr *eth_hdr, struct ether_addr *src_mac,\n@@ -68,7 +71,8 @@ initialize_ipv4_header(struct ipv4_hdr *ip_hdr, uint32_t src_addr,\n int\n generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,\n \t\tstruct ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,\n-\t\tuint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst);\n+\t\tuint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst,\n+\t\tuint8_t pkt_len, uint8_t nb_pkt_segs);\n \n #ifdef __cplusplus\n }\ndiff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c\nindex 1a847eb..50355a3 100644\n--- a/app/test/test_link_bonding.c\n+++ b/app/test/test_link_bonding.c\n@@ -1338,7 +1338,8 @@ generate_test_burst(struct rte_mbuf **pkts_burst, uint16_t burst_size,\n \t/* Generate burst of packets to transmit */\n \tgenerated_burst_size = generate_packet_burst(test_params->mbuf_pool,\n \t\t\tpkts_burst,\ttest_params->pkt_eth_hdr, vlan, ip_hdr, ipv4,\n-\t\t\ttest_params->pkt_udp_hdr, burst_size);\n+\t\t\ttest_params->pkt_udp_hdr, burst_size, PACKET_BURST_GEN_PKT_LEN_128,\n+\t\t\t1);\n \tif (generated_burst_size != burst_size) {\n \t\tprintf(\"Failed to generate packet burst\");\n \t\treturn -1;\n@@ -2056,7 +2057,7 @@ test_activebackup_tx_burst(void)\n \t/* Generate a burst of packets to transmit */\n \tgenerated_burst_size = generate_packet_burst(test_params->mbuf_pool,\n \t\t\tpkts_burst,\ttest_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr,\n-\t\t\t1, test_params->pkt_udp_hdr, burst_size);\n+\t\t\t1, test_params->pkt_udp_hdr, burst_size, PACKET_BURST_GEN_PKT_LEN, 1);\n \tif (generated_burst_size != burst_size)\n \t\treturn -1;\n \n@@ -2709,7 +2710,8 @@ test_balance_l2_tx_burst(void)\n \t/* Generate a burst 1 of packets to transmit */\n \tif (generate_packet_burst(test_params->mbuf_pool, &pkts_burst[0][0],\n \t\t\ttest_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr, 1,\n-\t\t\ttest_params->pkt_udp_hdr, burst_size[0]) != burst_size[0])\n+\t\t\ttest_params->pkt_udp_hdr, burst_size[0],\n+\t\t\tPACKET_BURST_GEN_PKT_LEN, 1) != burst_size[0])\n \t\treturn -1;\n \n \tinitialize_eth_header(test_params->pkt_eth_hdr,\n@@ -2718,7 +2720,8 @@ test_balance_l2_tx_burst(void)\n \t/* Generate a burst 2 of packets to transmit */\n \tif (generate_packet_burst(test_params->mbuf_pool, &pkts_burst[1][0],\n \t\t\ttest_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr, 1,\n-\t\t\ttest_params->pkt_udp_hdr, burst_size[1]) != burst_size[1])\n+\t\t\ttest_params->pkt_udp_hdr, burst_size[1],\n+\t\t\tPACKET_BURST_GEN_PKT_LEN, 1) != burst_size[1])\n \t\treturn -1;\n \n \t/* Send burst 1 on bonded port */\n@@ -3672,7 +3675,8 @@ test_broadcast_tx_burst(void)\n \t/* Generate a burst of packets to transmit */\n \tgenerated_burst_size = generate_packet_burst(test_params->mbuf_pool,\n \t\t\tpkts_burst,\ttest_params->pkt_eth_hdr, 0, test_params->pkt_ipv4_hdr,\n-\t\t\t1, test_params->pkt_udp_hdr, burst_size);\n+\t\t\t1, test_params->pkt_udp_hdr, burst_size, PACKET_BURST_GEN_PKT_LEN,\n+\t\t\t1);\n \tif (generated_burst_size != burst_size)\n \t\treturn -1;\n \n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "2/5"
    ]
}