get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 4328,
    "url": "http://patches.dpdk.org/api/patches/4328/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1429156558-28548-10-git-send-email-jijiang.liu@intel.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": "<1429156558-28548-10-git-send-email-jijiang.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1429156558-28548-10-git-send-email-jijiang.liu@intel.com",
    "date": "2015-04-16T03:55:57",
    "name": "[dpdk-dev,RFC,09/10] examples/tep_termination:add TSO offload configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f8ff793edd5182e439efbb1bb840ee7cf7b9773d",
    "submitter": {
        "id": 52,
        "url": "http://patches.dpdk.org/api/people/52/?format=api",
        "name": "Jijiang Liu",
        "email": "jijiang.liu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1429156558-28548-10-git-send-email-jijiang.liu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/4328/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/4328/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 09DF3C3D4;\n\tThu, 16 Apr 2015 05:56:29 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 4FD16C3B8\n\tfor <dev@dpdk.org>; Thu, 16 Apr 2015 05:56:26 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga102.fm.intel.com with ESMTP; 15 Apr 2015 20:56:26 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga002.fm.intel.com with ESMTP; 15 Apr 2015 20:56:25 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t3G3uNTa005245;\n\tThu, 16 Apr 2015 11:56:23 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t3G3uJQO029179; Thu, 16 Apr 2015 11:56:21 +0800",
            "(from jijiangl@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t3G3uJMT029175; \n\tThu, 16 Apr 2015 11:56:19 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.11,585,1422950400\"; d=\"scan'208\";a=\"709922016\"",
        "From": "Jijiang Liu <jijiang.liu@intel.com>",
        "To": "dev@dpdk.org, walter.e.gilmore@intel.com, thomas.long@intel.com",
        "Date": "Thu, 16 Apr 2015 11:55:57 +0800",
        "Message-Id": "<1429156558-28548-10-git-send-email-jijiang.liu@intel.com>",
        "X-Mailer": "git-send-email 1.7.12.2",
        "In-Reply-To": "<1429156558-28548-1-git-send-email-jijiang.liu@intel.com>",
        "References": "<1429156558-28548-1-git-send-email-jijiang.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH RFC 09/10] examples/tep_termination:add TSO\n\toffload configuration",
        "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": "If the 'tso-segsz' is not 0, which means TSO offload is enabled.\n\nSigned-off-by: Jijiang Liu <jijiang.liu@intel.com>\n---\n examples/tep_termination/main.c  |   19 +++++++++++++++++--\n examples/tep_termination/vxlan.c |    4 ++++\n 2 files changed, 21 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c\nindex 7c69a82..8ce78ee 100644\n--- a/examples/tep_termination/main.c\n+++ b/examples/tep_termination/main.c\n@@ -122,6 +122,9 @@ uint16_t udp_port;\n /* enable/disable inner TX checksum */\n uint8_t tx_checksum;\n \n+/* TSO segment size */\n+uint16_t tso_segsz = 0;\n+\n /* RX filter type for tunneling packet */\n uint8_t filter_idx;\n \n@@ -246,6 +249,7 @@ vep_termination_usage(const char *prgname)\n \t\"\t\t--udp-port: UDP destination port for VXLAN packet\\n\"\n \t\"\t\t--nb-devices: number of virtIO device\\n\"\n \t\"\t\t--tx-checksum [0|1]: inner Tx checksum offload\\n\"\n+\t\"\t\t--tso-segsz [0-N]: TSO segment size\\n\"\n \t\"\t\t--filter-type[1-3]: filter type for tunneling packet\\n\"\n \t\"\t\t    1: Inner MAC&VLAN and tenent ID\\n\"\n \t\"\t\t    2: Inner MAC and tenent ID\\n\"\n@@ -271,6 +275,7 @@ tep_parse_args(int argc, char **argv)\n \t\t{\"udp-port\", required_argument, NULL, 0},\n \t\t{\"nb-devices\", required_argument, NULL, 0},\n \t\t{\"tx-checksum\", required_argument, NULL, 0},\n+\t\t{\"tso-segsz\", required_argument, NULL, 0},\n \t\t{\"filter-type\", required_argument, NULL, 0},\n \t\t{\"stats\", required_argument, NULL, 0},\n \t\t{\"dev-basename\", required_argument, NULL, 0},\n@@ -301,6 +306,16 @@ tep_parse_args(int argc, char **argv)\n \t\t\t\t} else \n \t\t\t\t\tnum_devices = ret;\n \t\t\t}\n+\n+\t\t\tif (!strncmp(long_option[option_index].name, \"tso-segsz\", MAX_LONG_OPT_SZ)) {\n+\t\t\t\tret = parse_num_opt(optarg, INT16_MAX);\n+\t\t\t\tif (ret == -1) {\n+\t\t\t\t\tRTE_LOG(INFO, VHOST_CONFIG, \"Invalid argument for TCP segment size [0-N]\\n\");\n+\t\t\t\t\t\tvep_termination_usage(prgname);\n+\t\t\t\t\treturn -1;\n+\t\t\t\t} else \n+\t\t\t\t\ttso_segsz = ret;\n+\t\t\t}\n \t\n \t\t\tif (!strncmp(long_option[option_index].name, \"udp-port\", MAX_LONG_OPT_SZ)) {\n \t\t\t\tret = parse_num_opt(optarg, INT16_MAX);\n@@ -310,8 +325,8 @@ tep_parse_args(int argc, char **argv)\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n \t\t\t}\n-\n-\t\t\t if (!strncmp(long_option[option_index].name, \"tx-checksum\", MAX_LONG_OPT_SZ)) {\n+\t\t\t\n+\t\t\tif (!strncmp(long_option[option_index].name, \"tx-checksum\", MAX_LONG_OPT_SZ)) {\n \t\t\t\tret = parse_num_opt(optarg, 1);\n \t\t\t\tif (ret == -1) {\n \t\t\t\t\tRTE_LOG(INFO, VHOST_CONFIG, \"Invalid argument for tx-checksum [0|1]\\n\");\ndiff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c\nindex 6fc75ee..e3ef832 100644\n--- a/examples/tep_termination/vxlan.c\n+++ b/examples/tep_termination/vxlan.c\n@@ -48,6 +48,7 @@ extern struct vxlan_conf vxdev;\n extern struct ipv4_hdr app_ip_hdr[VXLAN_N_PORTS];\n extern struct ether_hdr app_l2_hdr[VXLAN_N_PORTS];\n extern uint16_t udp_port;\n+extern uint16_t tso_segsz;\n \n static uint16_t\n get_psd_sum(void *l3_hdr, uint16_t ethertype, uint64_t ol_flags)\n@@ -149,6 +150,8 @@ process_inner_cksums(struct ether_hdr *eth_hdr, struct offload_info *info)\n \t\tol_flags |= PKT_TX_TCP_CKSUM;\n \t\ttcp_hdr->cksum = get_psd_sum(l3_hdr, info->ethertype,\n \t\t\t\tol_flags);\n+\t\tif (tso_segsz != 0)\n+\t\t\tol_flags |= PKT_TX_TCP_SEG;\n \n \t} else if (info->l4_proto == IPPROTO_SCTP) {\n \t\tsctp_hdr = (struct sctp_hdr *)((char *)l3_hdr + info->l3_len);\n@@ -219,6 +222,7 @@ int encapsulation(struct rte_mbuf *m, uint8_t vport_id)\n \tm->outer_l3_len = sizeof(struct ipv4_hdr);\n \n \tm->ol_flags |= ol_flags;\n+\tm->tso_segsz = tso_segsz;\n \n \t/*VXLAN HEADER*/\n \tvxlan->vx_flags = VXLAN_FLAGS;\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "09/10"
    ]
}