get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 31488,
    "url": "http://patches.dpdk.org/api/patches/31488/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20171120163920.70660-3-jasvinder.singh@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": "<20171120163920.70660-3-jasvinder.singh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20171120163920.70660-3-jasvinder.singh@intel.com",
    "date": "2017-11-20T16:39:20",
    "name": "[dpdk-dev,3/3] doc: add description of traffic metering and policing funcs in testpmd",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "17d7a7158fe1cc79b4e4391e7f18ceb2c73d9cc0",
    "submitter": {
        "id": 285,
        "url": "http://patches.dpdk.org/api/people/285/?format=api",
        "name": "Jasvinder Singh",
        "email": "jasvinder.singh@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20171120163920.70660-3-jasvinder.singh@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/31488/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/31488/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A5F187D30;\n\tMon, 20 Nov 2017 17:26:41 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 688ED3255\n\tfor <dev@dpdk.org>; Mon, 20 Nov 2017 17:26:37 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Nov 2017 08:26:36 -0800",
            "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.222.149])\n\tby fmsmga001.fm.intel.com with ESMTP; 20 Nov 2017 08:26:35 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.44,428,1505804400\"; d=\"scan'208\";a=\"4965353\"",
        "From": "Jasvinder Singh <jasvinder.singh@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "cristian.dumitrescu@intel.com, jingjing.wu@intel.com,\n\tjohn.mcnamara@intel.com",
        "Date": "Mon, 20 Nov 2017 16:39:20 +0000",
        "Message-Id": "<20171120163920.70660-3-jasvinder.singh@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20171120163920.70660-1-jasvinder.singh@intel.com>",
        "References": "<20171120163920.70660-1-jasvinder.singh@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 3/3] doc: add description of traffic metering and\n\tpolicing funcs in testpmd",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 173 ++++++++++++++++++++++++++++\n 1 file changed, 173 insertions(+)",
    "diff": "diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 9789139..a8b7913 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -2068,6 +2068,179 @@ For example, to set the high bit in the register from the example above::\n    testpmd> write regbit 0 0xEE00 31 1\n    port 0 PCI register at offset 0xEE00: 0x8000000A (2147483658)\n \n+Traffic Metering and Policing\n+-----------------------------\n+\n+The following section shows functions for configuring traffic metering and\n+policing on the ethernet device through the use of generic ethdev API.\n+\n+show port traffic management capability\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Show traffic metering and policing capability of the port::\n+\n+   testpmd> show port meter cap (port_id)\n+\n+add port meter profile (srTCM rfc2967)\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Add meter profile (srTCM rfc2697) to the ethernet device::\n+\n+   testpmd> add port meter profile srtcm_rfc2697 (port_id) (profile_id) \\\n+   (cir) (cbs) (ebs)\n+\n+where:\n+\n+* ``profile_id``: ID for the meter profile.\n+* ``cir``: Committed Information Rate (CIR) (bytes/second).\n+* ``cbs``: Committed Burst Size (CBS) (bytes).\n+* ``ebs``: Excess Burst Size (EBS) (bytes).\n+\n+add port meter profile (trTCM rfc2968)\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Add meter profile (srTCM rfc2698) to the ethernet device::\n+\n+   testpmd> add port meter profile trtcm_rfc2698 (port_id) (profile_id) \\\n+   (cir) (pir) (cbs) (pbs)\n+\n+where:\n+\n+* ``profile_id``: ID for the meter profile.\n+* ``cir``: Committed information rate (bytes/second).\n+* ``pir``: Peak information rate (bytes/second).\n+* ``cbs``: Committed burst size (bytes).\n+* ``pbs``: Peak burst size (bytes).\n+\n+add port meter profile (trTCM rfc4115)\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Add meter profile (trTCM rfc4115) to the ethernet device::\n+\n+   testpmd> add port meter profile trtcm_rfc4115 (port_id) (profile_id) \\\n+   (cir) (eir) (cbs) (ebs)\n+\n+where:\n+\n+* ``profile_id``: ID for the meter profile.\n+* ``cir``: Committed information rate (bytes/second).\n+* ``eir``: Excess information rate (bytes/second).\n+* ``cbs``: Committed burst size (bytes).\n+* ``ebs``: Excess burst size (bytes).\n+\n+delete port meter profile\n+~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Delete meter profile from the ethernet device::\n+\n+   testpmd> del port meter profile (port_id) (profile_id)\n+\n+create port meter\n+~~~~~~~~~~~~~~~~~\n+\n+Create new meter object for the ethernet device::\n+\n+   testpmd> create port meter (port_id) (mtr_id) (profile_id) \\\n+   (meter_enable) (g_action) (y_action) (r_action) (stats_mask) (shared) \\\n+   (use_pre_meter_color) [(dscp_tbl_entry0) (dscp_tbl_entry1)...\\\n+   (dscp_tbl_entry63)]\n+\n+where:\n+\n+* ``mtr_id``: meter object ID.\n+* ``profile_id``: ID for the meter profile.\n+* ``meter_enable``: When this parameter has a non-zero value, the meter object\n+  gets enabled at the time of creation, otherwise remains disabled.\n+* ``g_action``: Policer action for the packet with green color.\n+* ``y_action``: Policer action for the packet with yellow color.\n+* ``r_action``: Policer action for the packet with red color.\n+* ``stats_mask``: Mask of statistics counter types to be enabled for the\n+  meter object.\n+* ``shared``:  When this parameter has a non-zero value, the meter object is\n+  shared by multiple flows. Otherwise, meter object is used by single flow.\n+* ``use_pre_meter_color``: When this parameter has a non-zero value, the\n+  input color for the current meter object is determined by the latest meter\n+  object in the same flow. Otherwise, the current meter object uses the\n+  *dscp_table* to determine the input color.\n+* ``dscp_tbl_entryx``: DSCP table entry x providing meter providing input\n+  color, 0 <= x <= 63.\n+\n+enable port meter\n+~~~~~~~~~~~~~~~~~\n+\n+Enable meter for the ethernet device::\n+\n+   testpmd> enable port meter (port_id) (mtr_id)\n+\n+disable port meter\n+~~~~~~~~~~~~~~~~~~\n+\n+Disable meter for the ethernet device::\n+\n+   testpmd> disable port meter (port_id) (mtr_id)\n+\n+delete port meter\n+~~~~~~~~~~~~~~~~~\n+\n+Delete meter for the ethernet device::\n+\n+   testpmd> del port meter (port_id) (mtr_id)\n+\n+Set port meter profile\n+~~~~~~~~~~~~~~~~~~~~~~\n+\n+Set meter profile for the ethernet device::\n+\n+   testpmd> set port meter profile (port_id) (mtr_id) (profile_id)\n+\n+set port meter dscp table\n+~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Set meter dscp table for the ethernet device::\n+\n+   testpmd> set port meter dscp table (port_id) (mtr_id) [(dscp_tbl_entry0) \\\n+   (dscp_tbl_entry1)...(dscp_tbl_entry63)]\n+\n+set port meter policer action\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Set meter policer action for the ethernet device::\n+\n+   testpmd> set port meter policer action (port_id) (mtr_id) (action_mask) \\\n+   (action0) [(action1) (action1)]\n+\n+where:\n+\n+* ``action_mask``: Bit mask indicating which policer actions need to be\n+  updated. One or more policer actions can be updated in a single function\n+  invocation. To update the policer action associated with color C, bit\n+  (1 << C) needs to be set in *action_mask* and element at position C\n+  in the *actions* array needs to be valid.\n+* ``actionx``: Policer action for the color x,\n+  RTE_MTR_GREEN <= x < RTE_MTR_COLORS\n+\n+set port meter stats mask\n+~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Set meter stats mask for the ethernet device::\n+\n+   testpmd> set port meter stats mask (port_id) (mtr_id) (stats_mask)\n+\n+where:\n+\n+* ``stats_mask``: Bit mask indicating statistics counter types to be enabled.\n+\n+show port meter stats\n+~~~~~~~~~~~~~~~~~~~~~\n+\n+Show meter stats of the ethernet device::\n+\n+   testpmd> show port meter stats (port_id) (mtr_id) (clear)\n+\n+where:\n+\n+* ``clear``: Flag that indicates whether the statistics counters should\n+  be cleared (i.e. set to zero) immediately after they have been read or not.\n \n Traffic Management\n ------------------\n",
    "prefixes": [
        "dpdk-dev",
        "3/3"
    ]
}