get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8344,
    "url": "http://patches.dpdk.org/api/patches/8344/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1446198204-9852-7-git-send-email-danielx.t.mrzyglod@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": "<1446198204-9852-7-git-send-email-danielx.t.mrzyglod@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446198204-9852-7-git-send-email-danielx.t.mrzyglod@intel.com",
    "date": "2015-10-30T09:43:24",
    "name": "[dpdk-dev,v2,6/6] doc: add a PTPCLIENT sample guide",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "b69f1ff1659ea87ae4f715f4427e09923aac0997",
    "submitter": {
        "id": 23,
        "url": "http://patches.dpdk.org/api/people/23/?format=api",
        "name": "Daniel Mrzyglod",
        "email": "danielx.t.mrzyglod@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1446198204-9852-7-git-send-email-danielx.t.mrzyglod@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/8344/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/8344/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 762418E68;\n\tFri, 30 Oct 2015 10:49:07 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 1D99F5A50\n\tfor <dev@dpdk.org>; Fri, 30 Oct 2015 10:49:04 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP; 30 Oct 2015 02:49:04 -0700",
            "from unknown ([10.217.248.15])\n\tby orsmga002.jf.intel.com with SMTP; 30 Oct 2015 02:49:02 -0700",
            "by  (sSMTP sendmail emulation); Fri, 30 Oct 2015 10:48:19 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,217,1444719600\"; d=\"scan'208\";a=\"838724161\"",
        "From": "Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 30 Oct 2015 10:43:24 +0100",
        "Message-Id": "<1446198204-9852-7-git-send-email-danielx.t.mrzyglod@intel.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1446198204-9852-1-git-send-email-danielx.t.mrzyglod@intel.com>",
        "References": "<1443799208-9408-1-git-send-email-danielx.t.mrzyglod@intel.com>\n\t<1446198204-9852-1-git-send-email-danielx.t.mrzyglod@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 6/6] doc: add a PTPCLIENT sample guide",
        "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": "It includes:\n - Add the ptpclient picture with svg format.\n - Add the ptpclient.rst file\n - Change the index.rst file for the above pictures index.\n\nSigned-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>\n---\n doc/guides/sample_app_ug/img/ptpclient.svg | 520 +++++++++++++++++++++++++++++\n doc/guides/sample_app_ug/index.rst         |   3 +\n doc/guides/sample_app_ug/ptpclient.rst     | 324 ++++++++++++++++++\n 3 files changed, 847 insertions(+)\n create mode 100644 doc/guides/sample_app_ug/img/ptpclient.svg\n create mode 100644 doc/guides/sample_app_ug/ptpclient.rst",
    "diff": "diff --git a/doc/guides/sample_app_ug/img/ptpclient.svg b/doc/guides/sample_app_ug/img/ptpclient.svg\nnew file mode 100644\nindex 0000000..55c134e\n--- /dev/null\n+++ b/doc/guides/sample_app_ug/img/ptpclient.svg\n@@ -0,0 +1,520 @@\n+<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n+<!-- Created with Inkscape (http://www.inkscape.org/) -->\n+\n+<svg\n+   xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n+   xmlns:cc=\"http://creativecommons.org/ns#\"\n+   xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n+   xmlns:svg=\"http://www.w3.org/2000/svg\"\n+   xmlns=\"http://www.w3.org/2000/svg\"\n+   xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n+   xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n+   width=\"105mm\"\n+   height=\"148mm\"\n+   viewBox=\"0 0 372.04724 524.40945\"\n+   id=\"svg2\"\n+   version=\"1.1\"\n+   inkscape:version=\"0.91 r13725\"\n+   sodipodi:docname=\"drawing3.svg\">\n+  <defs\n+     id=\"defs4\">\n+    <marker\n+       inkscape:stockid=\"Arrow2Mend\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"Arrow2Mend\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path4256\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1\"\n+         d=\"M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z\"\n+         transform=\"scale(-0.6,-0.6)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow2Lstart\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"Arrow2Lstart\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path4247\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1\"\n+         d=\"M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z\"\n+         transform=\"matrix(1.1,0,0,1.1,1.1,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:isstock=\"true\"\n+       style=\"overflow:visible\"\n+       id=\"marker6746\"\n+       refX=\"0\"\n+       refY=\"0\"\n+       orient=\"auto\"\n+       inkscape:stockid=\"Arrow2Lend\">\n+      <path\n+         transform=\"matrix(-1.1,0,0,-1.1,-1.1,0)\"\n+         d=\"M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z\"\n+         style=\"fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1\"\n+         id=\"path6748\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow2Lend\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"marker6526\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\"\n+       inkscape:collect=\"always\">\n+      <path\n+         id=\"path6528\"\n+         style=\"fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1\"\n+         d=\"M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z\"\n+         transform=\"matrix(-1.1,0,0,-1.1,-1.1,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow1Lend\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"marker6276\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path6278\"\n+         d=\"M 0,0 5,-5 -12.5,0 5,5 0,0 Z\"\n+         style=\"fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(-0.8,0,0,-0.8,-10,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:isstock=\"true\"\n+       style=\"overflow:visible\"\n+       id=\"marker6128\"\n+       refX=\"0\"\n+       refY=\"0\"\n+       orient=\"auto\"\n+       inkscape:stockid=\"DotM\">\n+      <path\n+         transform=\"matrix(0.4,0,0,0.4,2.96,0.4)\"\n+         style=\"fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         d=\"m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z\"\n+         id=\"path6130\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:isstock=\"true\"\n+       style=\"overflow:visible\"\n+       id=\"marker6022\"\n+       refX=\"0\"\n+       refY=\"0\"\n+       orient=\"auto\"\n+       inkscape:stockid=\"Arrow2Lend\"\n+       inkscape:collect=\"always\">\n+      <path\n+         transform=\"matrix(-1.1,0,0,-1.1,-1.1,0)\"\n+         d=\"M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z\"\n+         style=\"fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1\"\n+         id=\"path6024\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:isstock=\"true\"\n+       style=\"overflow:visible\"\n+       id=\"marker5922\"\n+       refX=\"0\"\n+       refY=\"0\"\n+       orient=\"auto\"\n+       inkscape:stockid=\"DotM\">\n+      <path\n+         transform=\"matrix(0.4,0,0,0.4,2.96,0.4)\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         d=\"m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z\"\n+         id=\"path5924\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow2Lend\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"Arrow2Lend\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\"\n+       inkscape:collect=\"always\">\n+      <path\n+         id=\"path4250\"\n+         style=\"fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1\"\n+         d=\"M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z\"\n+         transform=\"matrix(-1.1,0,0,-1.1,-1.1,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"DotM\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"marker5676\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\"\n+       inkscape:collect=\"always\">\n+      <path\n+         id=\"path5678\"\n+         d=\"m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z\"\n+         style=\"fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(0.4,0,0,0.4,2.96,0.4)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow1Lstart\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"marker5600\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path5602\"\n+         d=\"M 0,0 5,-5 -12.5,0 5,5 0,0 Z\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(0.8,0,0,0.8,10,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:isstock=\"true\"\n+       style=\"overflow:visible\"\n+       id=\"marker5510\"\n+       refX=\"0\"\n+       refY=\"0\"\n+       orient=\"auto\"\n+       inkscape:stockid=\"DotM\"\n+       inkscape:collect=\"always\">\n+      <path\n+         transform=\"matrix(0.4,0,0,0.4,2.96,0.4)\"\n+         style=\"fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         d=\"m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z\"\n+         id=\"path5512\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow1Lend\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"marker4651\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path4653\"\n+         d=\"M 0,0 5,-5 -12.5,0 5,5 0,0 Z\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(-0.8,0,0,-0.8,-10,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow1Lend\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"marker4605\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path4607\"\n+         d=\"M 0,0 5,-5 -12.5,0 5,5 0,0 Z\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(-0.8,0,0,-0.8,-10,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow1Lend\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"Arrow1Lend\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path4232\"\n+         d=\"M 0,0 5,-5 -12.5,0 5,5 0,0 Z\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(-0.8,0,0,-0.8,-10,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"DotM\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"DotM\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\"\n+       inkscape:collect=\"always\">\n+      <path\n+         id=\"path4293\"\n+         d=\"m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z\"\n+         style=\"fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(0.4,0,0,0.4,2.96,0.4)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <marker\n+       inkscape:stockid=\"Arrow1Lstart\"\n+       orient=\"auto\"\n+       refY=\"0\"\n+       refX=\"0\"\n+       id=\"Arrow1Lstart\"\n+       style=\"overflow:visible\"\n+       inkscape:isstock=\"true\">\n+      <path\n+         id=\"path4229\"\n+         d=\"M 0,0 5,-5 -12.5,0 5,5 0,0 Z\"\n+         style=\"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1\"\n+         transform=\"matrix(0.8,0,0,0.8,10,0)\"\n+         inkscape:connector-curvature=\"0\" />\n+    </marker>\n+    <inkscape:path-effect\n+       effect=\"spiro\"\n+       id=\"path-effect3402\"\n+       is_visible=\"true\" />\n+    <inkscape:path-effect\n+       effect=\"spiro\"\n+       id=\"path-effect3398\"\n+       is_visible=\"true\" />\n+    <inkscape:path-effect\n+       effect=\"spiro\"\n+       id=\"path-effect3394\"\n+       is_visible=\"true\" />\n+    <inkscape:path-effect\n+       effect=\"spiro\"\n+       id=\"path-effect3378\"\n+       is_visible=\"true\" />\n+    <inkscape:path-effect\n+       effect=\"spiro\"\n+       id=\"path-effect3374\"\n+       is_visible=\"true\" />\n+    <inkscape:path-effect\n+       effect=\"spiro\"\n+       id=\"path-effect3370\"\n+       is_visible=\"true\" />\n+    <inkscape:path-effect\n+       effect=\"spiro\"\n+       id=\"path-effect3366\"\n+       is_visible=\"true\" />\n+  </defs>\n+  <sodipodi:namedview\n+     id=\"base\"\n+     pagecolor=\"#ffffff\"\n+     bordercolor=\"#666666\"\n+     borderopacity=\"1.0\"\n+     inkscape:pageopacity=\"0.0\"\n+     inkscape:pageshadow=\"2\"\n+     inkscape:zoom=\"1.06\"\n+     inkscape:cx=\"280.7353\"\n+     inkscape:cy=\"266.181\"\n+     inkscape:document-units=\"px\"\n+     inkscape:current-layer=\"layer1\"\n+     showgrid=\"false\"\n+     showguides=\"false\"\n+     inkscape:window-width=\"1920\"\n+     inkscape:window-height=\"1053\"\n+     inkscape:window-x=\"1920\"\n+     inkscape:window-y=\"103\"\n+     inkscape:window-maximized=\"0\" />\n+  <metadata\n+     id=\"metadata7\">\n+    <rdf:RDF>\n+      <cc:Work\n+         rdf:about=\"\">\n+        <dc:format>image/svg+xml</dc:format>\n+        <dc:type\n+           rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n+        <dc:title></dc:title>\n+      </cc:Work>\n+    </rdf:RDF>\n+  </metadata>\n+  <g\n+     inkscape:label=\"Layer 1\"\n+     inkscape:groupmode=\"layer\"\n+     id=\"layer1\"\n+     transform=\"translate(0,-527.95276)\">\n+    <path\n+       style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.44085264;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\"\n+       d=\"m 64.094156,600.99321 c 0,60.57637 0,393.74649 0,393.74649\"\n+       id=\"path3388\"\n+       inkscape:connector-curvature=\"0\" />\n+    <path\n+       style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.63210523;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\"\n+       d=\"m 291.64401,600.59617 0,394.60083\"\n+       id=\"path3390\"\n+       inkscape:connector-curvature=\"0\" />\n+    <path\n+       style=\"fill:#ff00ff;fill-rule:evenodd;stroke:#000000;stroke-width:1.28789771;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#DotM);marker-end:url(#marker6746)\"\n+       d=\"M 64.094156,623.68474 289.7829,665.38811\"\n+       id=\"path4223\"\n+       inkscape:connector-curvature=\"0\" />\n+    <path\n+       style=\"fill:#ff00ff;fill-rule:evenodd;stroke:#000000;stroke-width:1.28789771;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker5510);marker-end:url(#marker6526)\"\n+       d=\"M 63.199944,683.08006 290.44233,725.29448\"\n+       id=\"path5274\"\n+       inkscape:connector-curvature=\"0\" />\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"295.22058\"\n+       y=\"665.10974\"\n+       id=\"text5424\"\n+       sodipodi:linespacing=\"100%\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan5426\"\n+         x=\"295.22058\"\n+         y=\"665.10974\">T2</tspan></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#800080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"242.44649\"\n+       y=\"657.08087\"\n+       id=\"text5428\"\n+       sodipodi:linespacing=\"100%\"\n+       transform=\"matrix(0.98289795,0.18415108,-0.18415108,0.98289795,0,0)\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan5430\"\n+         x=\"242.44649\"\n+         y=\"657.08087\">FOLLOW UP:T1</tspan></text>\n+    <path\n+       style=\"fill:#0000ff;fill-rule:evenodd;stroke:#000000;stroke-width:1.28789771;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker5676);marker-end:url(#Arrow2Lend)\"\n+       d=\"M 291.5001,774.36878 64.400801,816.4401\"\n+       id=\"path5586\"\n+       inkscape:connector-curvature=\"0\" />\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"-44.967201\"\n+       y=\"809.64362\"\n+       id=\"text5898\"\n+       sodipodi:linespacing=\"100%\"\n+       transform=\"matrix(0.98291896,-0.18403889,0.18403889,0.98291896,0,0)\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan5900\"\n+         x=\"-44.967201\"\n+         y=\"809.64362\">DELAY REQUEST</tspan></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"297.08099\"\n+       y=\"774.7981\"\n+       id=\"text5902\"\n+       sodipodi:linespacing=\"100%\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan5904\"\n+         x=\"297.08099\"\n+         y=\"774.7981\">T3</tspan></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#800080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"35.20845\"\n+       y=\"817.29871\"\n+       id=\"text5906\"\n+       sodipodi:linespacing=\"100%\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan5908\"\n+         x=\"35.20845\"\n+         y=\"817.29871\">T4</tspan></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#800080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"33.920555\"\n+       y=\"623.68475\"\n+       id=\"text5910\"\n+       sodipodi:linespacing=\"100%\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan5912\"\n+         x=\"33.920555\"\n+         y=\"623.68475\">T1</tspan></text>\n+    <path\n+       style=\"fill:#ff00ff;fill-rule:evenodd;stroke:#000000;stroke-width:1.28789771;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker6128);marker-end:url(#marker6022)\"\n+       d=\"M 63.971502,838.62056 290.6415,881.55049\"\n+       id=\"path5914\"\n+       inkscape:connector-curvature=\"0\" />\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#800080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"223.59686\"\n+       y=\"811.73932\"\n+       id=\"text6858\"\n+       sodipodi:linespacing=\"100%\"\n+       transform=\"matrix(0.98367106,0.17997568,-0.17997568,0.98367106,0,0)\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan6860\"\n+         x=\"223.59686\"\n+         y=\"811.73932\">DELAY RESPONSE:T4</tspan></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.39868927px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"813.40204\"\n+       y=\"-298.41309\"\n+       id=\"text6862\"\n+       sodipodi:linespacing=\"100%\"\n+       transform=\"matrix(0.0147127,0.99989176,-0.99989176,0.0147127,0,0)\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan6864\"\n+         x=\"813.40204\"\n+         y=\"-298.41309\">time</tspan></text>\n+    <path\n+       style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2.1464963;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend)\"\n+       d=\"m 316.97185,863.23372 0,66.11208\"\n+       id=\"path6866\"\n+       inkscape:connector-curvature=\"0\" />\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.42257881px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#800080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"38.764343\"\n+       y=\"590.47479\"\n+       id=\"text7094\"\n+       sodipodi:linespacing=\"100%\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan7096\"\n+         x=\"38.764343\"\n+         y=\"590.47479\">master</tspan></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:47.51625061px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"571.69812\"\n+       y=\"61.796165\"\n+       id=\"text7098\"\n+       sodipodi:linespacing=\"100%\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan7100\"\n+         x=\"571.69812\"\n+         y=\"61.796165\" /></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.42257881px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"271.23392\"\n+       y=\"593.71478\"\n+       id=\"text7102\"\n+       sodipodi:linespacing=\"100%\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan7104\"\n+         x=\"271.23392\"\n+         y=\"593.71478\">slave</tspan></text>\n+    <text\n+       xml:space=\"preserve\"\n+       style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.3917141px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#800080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\n+       x=\"244.40062\"\n+       y=\"602.10443\"\n+       id=\"text4317\"\n+       sodipodi:linespacing=\"125%\"\n+       transform=\"matrix(0.98605316,0.16643065,-0.16643065,0.98605316,0,0)\"><tspan\n+         sodipodi:role=\"line\"\n+         id=\"tspan4319\"\n+         x=\"244.40062\"\n+         y=\"602.10443\">SYNC</tspan></text>\n+  </g>\n+</svg>\ndiff --git a/doc/guides/sample_app_ug/index.rst b/doc/guides/sample_app_ug/index.rst\nindex 9beedd9..8ae86c0 100644\n--- a/doc/guides/sample_app_ug/index.rst\n+++ b/doc/guides/sample_app_ug/index.rst\n@@ -73,6 +73,7 @@ Sample Applications User Guide\n     vm_power_management\n     tep_termination\n     proc_info\n+    ptpclient\n \n **Figures**\n \n@@ -136,6 +137,8 @@ Sample Applications User Guide\n :numref:`figure_overlay_networking` :ref:`figure_overlay_networking`\n :numref:`figure_tep_termination_arch` :ref:`figure_tep_termination_arch`\n \n+:numref:`figure_ptpclient_highlevel` :ref:`figure_ptpclient_highlevel`\n+\n **Tables**\n \n :numref:`table_qos_metering_1` :ref:`table_qos_metering_1`\ndiff --git a/doc/guides/sample_app_ug/ptpclient.rst b/doc/guides/sample_app_ug/ptpclient.rst\nnew file mode 100644\nindex 0000000..31aa505\n--- /dev/null\n+++ b/doc/guides/sample_app_ug/ptpclient.rst\n@@ -0,0 +1,324 @@\n+..  BSD LICENSE\n+    Copyright(c) 2015 Intel Corporation. All rights reserved.\n+    All rights reserved.\n+\n+    Redistribution and use in source and binary forms, with or without\n+    modification, are permitted provided that the following conditions\n+    are met:\n+\n+    * Redistributions of source code must retain the above copyright\n+    notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+    notice, this list of conditions and the following disclaimer in\n+    the documentation and/or other materials provided with the\n+    distribution.\n+    * Neither the name of Intel Corporation nor the names of its\n+    contributors may be used to endorse or promote products derived\n+    from this software without specific prior written permission.\n+\n+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+    \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+\n+PTP Client Sample Application\n+=============================\n+\n+The PTP (Precision Time Protocol) client sample application is a simple\n+example of using the DPDK IEEE1588 API to communicate with a PTP master clock\n+to synchronize the time on the NIC and, optionally, on the Linux system.\n+\n+Note, PTP is a time syncing protocol and cannot be used within DPDK as a\n+time-stamping mechanism. See the following for an explanation of the protocol:\n+`Precision Time Protocol\n+<https://en.wikipedia.org/wiki/Precision_Time_Protocol>`_.\n+\n+\n+Limitations\n+-----------\n+\n+The PTP sample application is intended as a simple reference implementation of\n+a PTP client using the DPDK IEEE1588 API.\n+In order to keep the application simple the following assumptions are made:\n+\n+* The first discovered master is the master for the session.\n+* Only L2 PTP packets are supported.\n+* Only the PTP v2 protocol is supported.\n+* Only the slave clock is implemented.\n+\n+\n+How the Application Works\n+-------------------------\n+\n+.. _figure_ptpclient_highlevel:\n+\n+.. figure:: img/ptpclient.*\n+\n+   PTP Synchronization Protocol\n+\n+The PTP synchronization in the sample application works as follows:\n+\n+* Master sends *Sync* message - the slave saves it as T2.\n+* Master sends *Follow Up* message and sends time of T1.\n+* Slave sends *Delay Request* frame to PTP Master and stores T3.\n+* Master sends *Delay Response* T4 time which is time of received T3.\n+\n+The adjustment for slave can be represented as:\n+\n+   adj = -[(T2-T1)-(T4 - T3)]/2\n+\n+If the command line parameter ``-T 1`` is used the application also\n+synchronizes the PTP PHC clock with the Linux kernel clock.\n+\n+\n+Compiling the Application\n+-------------------------\n+\n+To compile the application, export the path to the DPDK source tree and edit\n+the ``config/common_linuxapp`` configuration file to enable IEEE1588:\n+\n+.. code-block:: console\n+\n+    export RTE_SDK=/path/to/rte_sdk\n+\n+    # Edit  common_linuxapp and set the following options:\n+    CONFIG_RTE_LIBRTE_IEEE1588=y\n+\n+Set the target, for example:\n+\n+.. code-block:: console\n+\n+    export RTE_TARGET=x86_64-native-linuxapp-gcc\n+\n+See the *DPDK Getting Started* Guide for possible ``RTE_TARGET`` values.\n+\n+Build the application as follows:\n+\n+.. code-block:: console\n+\n+    # Recompile DPDK.\n+    make install T=$RTE_TARGET\n+\n+    # Compile the application.\n+    cd ${RTE_SDK}/examples/ptpclient\n+    make\n+\n+\n+Running the Application\n+-----------------------\n+\n+To run the example in a ``linuxapp`` environment:\n+\n+.. code-block:: console\n+\n+    ./build/ptpclient -c 2 -n 4 -- -p 0x1 -T 0\n+\n+Refer to *DPDK Getting Started Guide* for general information on running\n+applications and the Environment Abstraction Layer (EAL) options.\n+\n+* ``-p portmask``: Hexadecimal portmask.\n+* ``-T 0``: Update only the PTP slave clock.\n+* ``-T 1``: Update the PTP slave clock and synchronize the Linux Kernel to the PTP clock.\n+\n+\n+Code Explanation\n+----------------\n+\n+The following sections provide an explanation of the main components of the\n+code.\n+\n+All DPDK library functions used in the sample code are prefixed with ``rte_``\n+and are explained in detail in the *DPDK API Documentation*.\n+\n+\n+The Main Function\n+~~~~~~~~~~~~~~~~~\n+\n+The ``main()`` function performs the initialization and calls the execution\n+threads for each lcore.\n+\n+The first task is to initialize the Environment Abstraction Layer (EAL).  The\n+``argc`` and ``argv`` arguments are provided to the ``rte_eal_init()``\n+function. The value returned is the number of parsed arguments:\n+\n+.. code-block:: c\n+\n+    int ret = rte_eal_init(argc, argv);\n+    if (ret < 0)\n+        rte_exit(EXIT_FAILURE, \"Error with EAL initialization\\n\");\n+\n+And than we parse application specific arguments\n+\n+.. code-block:: c\n+\n+    argc -= ret;\n+    argv += ret;\n+\n+    ret = ptp_parse_args(argc, argv);\n+    if (ret < 0)\n+        rte_exit(EXIT_FAILURE, \"Error with PTP initialization\\n\");\n+\n+The ``main()`` also allocates a mempool to hold the mbufs (Message Buffers)\n+used by the application:\n+\n+.. code-block:: c\n+\n+    mbuf_pool = rte_mempool_create(\"MBUF_POOL\",\n+                                   NUM_MBUFS * nb_ports,\n+                                   MBUF_SIZE,\n+                                   MBUF_CACHE_SIZE,\n+                                   sizeof(struct rte_pktmbuf_pool_private),\n+                                   rte_pktmbuf_pool_init, NULL,\n+                                   rte_pktmbuf_init,      NULL,\n+                                   rte_socket_id(),\n+                                   0);\n+\n+Mbufs are the packet buffer structure used by DPDK. They are explained in\n+detail in the \"Mbuf Library\" section of the *DPDK Programmer's Guide*.\n+\n+The ``main()`` function also initializes all the ports using the user defined\n+``port_init()`` function with portmask provided by user:\n+\n+.. code-block:: c\n+\n+    for (portid = 0; portid < nb_ports; portid++)\n+        if ((ptp_enabled_port_mask & (1 << portid)) != 0) {\n+\n+            if (port_init(portid, mbuf_pool) == 0) {\n+                ptp_enabled_ports[ptp_enabled_port_nb] = portid;\n+                ptp_enabled_port_nb++;\n+            } else {\n+                rte_exit(EXIT_FAILURE, \"Cannot init port %\"PRIu8 \"\\n\",\n+                        portid);\n+            }\n+        }\n+\n+\n+Once the initialization is complete, the application is ready to launch a\n+function on an lcore. In this example ``lcore_main()`` is called on a single\n+lcore.\n+\n+.. code-block:: c\n+\n+\tlcore_main();\n+\n+The ``lcore_main()`` function is explained below.\n+\n+\n+The Lcores Main\n+~~~~~~~~~~~~~~~\n+\n+As we saw above the ``main()`` function calls an application function on the\n+available lcores.\n+\n+The main work of the application is done within the loop:\n+\n+.. code-block:: c\n+\n+        for (portid = 0; portid < ptp_enabled_port_nb; portid++) {\n+\n+            portid = ptp_enabled_ports[portid];\n+            nb_rx = rte_eth_rx_burst(portid, 0, &m, 1);\n+\n+            if (ptp_data.kernel_time_set == 1) {\n+                /* Update every KERNEL_UPDATE cycle */\n+                if (i % KERNEL_UPDATE == 0) {\n+                    clock_gettime(CLOCK_REALTIME, &ptp_data.systime);\n+\n+                    rte_eth_timesync_gettime(ptp_data.current_ptp_port,\n+                            &ptp_data.timestamp);\n+\n+                    nsec = (int64_t)timespec64_to_ns(&ptp_data.timestamp) -\n+                            (int64_t)timespec64_to_ns(&ptp_data.systime);\n+\n+                    ptp_data.new_adj = ns_to_timeval(nsec);\n+                    adjtime(&ptp_data.new_adj, 0);\n+                }\n+                i++;\n+            }\n+\n+            if (likely(nb_rx == 0))\n+                continue;\n+\n+            if (m->ol_flags & PKT_RX_IEEE1588_PTP)\n+                parse_ptp_frames(portid, m);\n+\n+            rte_pktmbuf_free(m);\n+\n+        }\n+\n+Packets are received one by one on the RX ports and, if required, PTP response\n+packets are transmitted on the TX ports.\n+\n+If the offload flags in the mbuf indicate that the packet is a PTP packet then\n+the packet is parsed to determine which type:\n+\n+.. code-block:: c\n+\n+            if (m->ol_flags & PKT_RX_IEEE1588_PTP)\n+                 parse_ptp_frames(portid, m);\n+\n+\n+All packets are freed explicitly using ``rte_pktmbuf_free()``.\n+\n+The forwarding loop can be interrupted and the application closed using\n+``Ctrl-C``.\n+\n+\n+PTP parsing\n+~~~~~~~~~~~\n+\n+The ``parse_ptp_frames()`` function processes PTP packets, implementing slave\n+PTP IEEE1588 L2 functionality.\n+\n+.. code-block:: c\n+\n+    void\n+    parse_ptp_frames(uint8_t portid, struct rte_mbuf *m) {\n+        struct ptp_header *ptp_hdr;\n+        struct ether_hdr *eth_hdr;\n+        uint16_t eth_type;\n+\n+        eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);\n+        eth_type = rte_be_to_cpu_16(eth_hdr->ether_type);\n+\n+        if (eth_type == PTP_PROTOCOL) {\n+            ptp_data.m = m;\n+            ptp_data.portid = portid;\n+            ptp_hdr = (struct ptp_header *)(rte_pktmbuf_mtod(m, char *)\n+                        + sizeof(struct ether_hdr));\n+\n+            switch (ptp_hdr->msgtype) {\n+            case SYNC:\n+                parse_sync(&ptp_data);\n+                break;\n+            case FOLLOW_UP:\n+                parse_fup(&ptp_data);\n+                break;\n+            case DELAY_RESP:\n+                parse_drsp(&ptp_data);\n+                print_clock_info(&ptp_data);\n+                break;\n+            default:\n+                break;\n+            }\n+        }\n+    }\n+\n+There are 3 types of packets on the RX path which we must parse to create a minimal\n+implementation of the PTP slave client:\n+\n+* SYNC packet.\n+* FOLLOW UP packet\n+* DELAY RESPONSE packet.\n+\n+When we parse the *FOLLOW UP* packet we also create and send a *DELAY_REQUEST* packet.\n+Also when we parse the *DELAY RESPONSE* packet, and all conditions are met we adjust the PTP slave clock.\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "6/6"
    ]
}