get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 76163,
    "url": "http://patches.dpdk.org/api/patches/76163/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200830111544.4190-14-wisamm@mellanox.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": "<20200830111544.4190-14-wisamm@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200830111544.4190-14-wisamm@mellanox.com",
    "date": "2020-08-30T11:15:44",
    "name": "[13/13] app/flow-perf: allow fixed values for actions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6a21cce20d2c829d9b0051c800ff19ac7b2f45d9",
    "submitter": {
        "id": 938,
        "url": "http://patches.dpdk.org/api/people/938/?format=api",
        "name": "Wisam Jaddo",
        "email": "wisamm@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200830111544.4190-14-wisamm@mellanox.com/mbox/",
    "series": [
        {
            "id": 11848,
            "url": "http://patches.dpdk.org/api/series/11848/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11848",
            "date": "2020-08-30T11:15:31",
            "name": "app/flow-perf: add support for new items/actions",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/11848/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/76163/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/76163/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9F3B5A04AB;\n\tSun, 30 Aug 2020 13:24:13 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E85191C193;\n\tSun, 30 Aug 2020 13:16:42 +0200 (CEST)",
            "from EUR03-VE1-obe.outbound.protection.outlook.com\n (mail-eopbgr50059.outbound.protection.outlook.com [40.107.5.59])\n by dpdk.org (Postfix) with ESMTP id 785741C121\n for <dev@dpdk.org>; Sun, 30 Aug 2020 13:16:37 +0200 (CEST)",
            "from AM0PR05MB6610.eurprd05.prod.outlook.com (2603:10a6:208:12f::18)\n by AM0PR0502MB3762.eurprd05.prod.outlook.com (2603:10a6:208:1b::31)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.21; Sun, 30 Aug\n 2020 11:16:36 +0000",
            "from AM0PR05MB6610.eurprd05.prod.outlook.com\n ([fe80::4c8a:9848:2e2a:3598]) by AM0PR05MB6610.eurprd05.prod.outlook.com\n ([fe80::4c8a:9848:2e2a:3598%6]) with mapi id 15.20.3326.025; Sun, 30 Aug 2020\n 11:16:36 +0000",
            "from mellanox.com (37.142.13.130) by\n AM4PR05CA0008.eurprd05.prod.outlook.com (2603:10a6:205::21) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.3326.19 via Frontend Transport; Sun, 30 Aug 2020 11:16:35 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=ZWsHELaEbaQDnNGyzsImLZXwDAT1a+f+COFCxq1YNSVjEiP4zeF2lrcLtopa2uvjwzCBYLYY+UmlVZhmPvJtMcWXX9JttJJ+eyhz7ZCGlEc2p8xjDZua00Mv0ZkUI0cU5XKCo0njxWYQRxKxt1q+q5/5KUhgTYi93cM8Hw/Wxn4v9u7t9yd7FZu4GqtpH2jxKfN/99rxi+M2jh+k83Q20RajBefXcLjtOFxyhe+WusYYpzqdwiy9Co9uN9Dk0txc6SD1859rl9ECSOog+0EoIO2hvHODLV7G7JutGZAQsfXsA/MJMU1G0rY3PSxxoXham25DpYaCUXlCzRsLbxb1CA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=s4gzNTuYc/Bm3VpkfC3jNr4WTDw29tJBbMMxMxWoeBU=;\n b=aF9MyPwrdIqc1+Gbe4/zWMxiYiuQ7ftRtMBczCEcluZrYXWcRb5O1zyoodCPs7zf+ZATiZi329CnMPJWcdvaLMCe5nrewGt72qySRpkOAIapWL7ytRDFzstRAsDKErX5x9n51EZx9nMRaWYSDUz6id0lKzdSeHiY1oCeTnzmexgiDFgmNbnqRnpoZ/LAE2tBft4KWqQy8T/8Y3wR2Au6g6u36aIzNhcRkWWNLcb6xIqNkV4ENO0GWK4GJVA6zCzpaz+TGZrrxABTQrWBmHEjrd/jHMmBTO8HX71hruN2pyjayspxwqlAmNG+z1NGXLg3ZPf6qHIHy8zc+8x5+f9v1Q==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;\n dkim=pass header.d=mellanox.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=s4gzNTuYc/Bm3VpkfC3jNr4WTDw29tJBbMMxMxWoeBU=;\n b=oxB5SPr9pV5Q/4Ok5T1sFGTSHjeGxd6oeRmuWBcbT17ufr2qchxGZ+1Tyzu+xUQFcPsUACdjMSwHkcbmt4A2JxTnnZ+L6JPk/AnrouW9IOZR1TXiptmfRxgfq8GYpUqc+btWNVwh+KW3cl4x4tW/Vi49w/4iWFiR9F48RdIEX6w=",
        "Authentication-Results": "dpdk.org; dkim=none (message not signed)\n header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com;",
        "From": "Wisam Jaddo <wisamm@mellanox.com>",
        "To": "dev@dpdk.org, thomas@monjalon.net, asafp@mellanox.com,\n akozyrev@nvidia.com,\n akozyrev@mellanox.com, arybchenko@solarflare.com, jackmin@mellanox.com",
        "Date": "Sun, 30 Aug 2020 11:15:44 +0000",
        "Message-Id": "<20200830111544.4190-14-wisamm@mellanox.com>",
        "X-Mailer": [
            "git-send-email 2.17.1",
            "git-send-email 2.17.1"
        ],
        "In-Reply-To": "<20200830111544.4190-1-wisamm@mellanox.com>",
        "References": "<20200830111544.4190-1-wisamm@mellanox.com>",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "AM4PR05CA0008.eurprd05.prod.outlook.com (2603:10a6:205::21)\n To AM0PR05MB6610.eurprd05.prod.outlook.com\n (2603:10a6:208:12f::18)",
        "MIME-Version": "1.0",
        "X-MS-Exchange-MessageSentRepresentingType": "1",
        "X-Originating-IP": "[37.142.13.130]",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-HT": "Tenant",
        "X-MS-Office365-Filtering-Correlation-Id": "a0de68c4-8606-4eeb-7702-08d84cd62874",
        "X-MS-TrafficTypeDiagnostic": "AM0PR0502MB3762:",
        "X-LD-Processed": "a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr",
        "X-MS-Exchange-Transport-Forked": "True",
        "X-Microsoft-Antispam-PRVS": "\n <AM0PR0502MB3762DC572FD1D279CB2E3E05A9500@AM0PR0502MB3762.eurprd05.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:5236;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n qgFMozcHhzTTJJT4dyu+rq+szb/zODeDQ7EOAqAewBLopFCzZ8ny97zDqoExzYdd3rJIEbw8Rck7rpruexMbH3HsbGCyY4Cqkw0f+qoLLX/tfORMVWvnEhYY44RYg2+2flMv1m4rMukkAWjz+GtXXRoGNqBkZcxVn//iq/hSbP5FlAxPAvegE2DJITQzr/jKviqBoFOpO+fp8uweoSZxEhlfZFFE7RjroxRQaOy6bOJrb8RbnyhU7SN/3fqjFho3trRg6RXvMYyj2fxWREF5eVJ9hDUR3Z7zaXgAWFCMcKZf/+m3fpj4SyzqVIzDkba8",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:AM0PR05MB6610.eurprd05.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(4636009)(366004)(396003)(136003)(39860400002)(376002)(346002)(478600001)(316002)(5660300002)(8886007)(2906002)(6636002)(86362001)(36756003)(6666004)(1076003)(55016002)(8936002)(26005)(2616005)(7696005)(66946007)(66556008)(52116002)(83380400001)(16526019)(8676002)(186003)(956004)(66476007);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData": "\n 2uQcW4Tr/RCHPIeyohb7GmIEPi0ZikstlMUVnLcJuESrldg6R+EUwub6EnMNVv3HvgEgSE6OMlajKuWbVaD4/z9EqxDPvxKpPn/hzITdQXm6XnckAPzw508XMutXtCDCf0NNrjtvW2hPle4VNtXQTAYygrVu/lcZFPUbIMKOZHw+L2ec9qhN0AaInTz4xK4uGh88FEwTeGhKKu7mR+1bJEPUyb0Vyuj+vVba3l7YEHKuoDLHAG9Cnr7DdrJfNkfBQr0lSc5bJTw2Q3uDQm0DgN9rZbbXJd51qhjtAhTWgm7SmuFU6Z7nPwwHce0a8fCjpz3QXcDzAbfm8pwbz3e5GUu3l+rKjqJN6f2DPJ1AaYmJos8A1FhuHt77Lt491c1sTEu52Ik7pe6dSAHDhP4vwGP1Ztg0wA7/B5teh7h3MgNi5I6wL7T1fajrP6Zwct3/67WX+3brWmcAw7qHHfU8SlI2fW3s1ubVCOUdEQGkRzBl2Al4vupUprdpo50HH+l4ljk/jtzJ5+v71I9uv7o7aJ1qWJ74efDKk/PCgWskeQ7CSuUE0QmqKJdlPYPdzmO5QUCBiWdexQgwNy4fnP0X04MqmUWp0AozVDpP7PcUT6FqWdyfIHgvHfMpqIOIyY6RhV5q3iM6aG1V+TD8DAyZNA==",
        "X-OriginatorOrg": "Mellanox.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n a0de68c4-8606-4eeb-7702-08d84cd62874",
        "X-MS-Exchange-CrossTenant-AuthSource": "AM0PR05MB6610.eurprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "30 Aug 2020 11:16:36.0677 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "a652971c-7d2e-4d9b-a6a4-d149256f461b",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n Q8pZAMNTLI/FP7wbK8r+Xw6nrm8vT+8Sa4ZPDExmf34zWlFq3dMPtm+CSuSMGUATyPlay6w9Tc1qFH1/dM9vPA==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM0PR0502MB3762",
        "Subject": "[dpdk-dev] [PATCH 13/13] app/flow-perf: allow fixed values for\n\tactions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Sometime the user want to have fixed values of\nencap/decap or header modify for all flows.\n\nThis will introduce the ability to choose from\nfixed or dynamic values by setting the flag in\nconfig.h\n\nTo use different value for each flow:\nconfig.h: #define FIXED_VALUES 0\n\nTo use single value for all flows:\nconfig.h: #define FIXED_VALUES 1\n\nSigned-off-by: Wisam Jaddo <wisamm@mellanox.com>\nAcked-by: Alexander Kozyrev <akozyrev@nvidia.com>\n---\n app/test-flow-perf/actions_gen.c | 131 +++++++++++++++++++++++++++----\n app/test-flow-perf/config.h      |   6 ++\n 2 files changed, 120 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/app/test-flow-perf/actions_gen.c b/app/test-flow-perf/actions_gen.c\nindex 278c0a3004..e3a95d7ab2 100644\n--- a/app/test-flow-perf/actions_gen.c\n+++ b/app/test-flow-perf/actions_gen.c\n@@ -214,6 +214,10 @@ add_set_src_mac(struct rte_flow_action *actions,\n \tuint32_t mac = para.counter;\n \tuint16_t i;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tmac = 1;\n+\n \t/* Mac address to be set is random each time */\n \tfor (i = 0; i < RTE_ETHER_ADDR_LEN; i++) {\n \t\tset_mac.mac_addr[i] = mac & 0xff;\n@@ -233,6 +237,10 @@ add_set_dst_mac(struct rte_flow_action *actions,\n \tuint32_t mac = para.counter;\n \tuint16_t i;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tmac = 1;\n+\n \t/* Mac address to be set is random each time */\n \tfor (i = 0; i < RTE_ETHER_ADDR_LEN; i++) {\n \t\tset_mac.mac_addr[i] = mac & 0xff;\n@@ -249,9 +257,14 @@ add_set_src_ipv4(struct rte_flow_action *actions,\n \t__rte_unused struct additional_para para)\n {\n \tstatic struct rte_flow_action_set_ipv4 set_ipv4;\n+\tuint32_t ip = para.counter;\n+\n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tip = 1;\n \n \t/* IPv4 value to be set is random each time */\n-\tset_ipv4.ipv4_addr = RTE_BE32(para.counter + 1);\n+\tset_ipv4.ipv4_addr = RTE_BE32(ip + 1);\n \n \tactions[actions_counter].type = RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC;\n \tactions[actions_counter].conf = &set_ipv4;\n@@ -263,9 +276,14 @@ add_set_dst_ipv4(struct rte_flow_action *actions,\n \t__rte_unused struct additional_para para)\n {\n \tstatic struct rte_flow_action_set_ipv4 set_ipv4;\n+\tuint32_t ip = para.counter;\n+\n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tip = 1;\n \n \t/* IPv4 value to be set is random each time */\n-\tset_ipv4.ipv4_addr = RTE_BE32(para.counter + 1);\n+\tset_ipv4.ipv4_addr = RTE_BE32(ip + 1);\n \n \tactions[actions_counter].type = RTE_FLOW_ACTION_TYPE_SET_IPV4_DST;\n \tactions[actions_counter].conf = &set_ipv4;\n@@ -280,6 +298,10 @@ add_set_src_ipv6(struct rte_flow_action *actions,\n \tuint32_t ipv6 = para.counter;\n \tuint8_t i;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tipv6 = 1;\n+\n \t/* IPv6 value to set is random each time */\n \tfor (i = 0; i < 16; i++) {\n \t\tset_ipv6.ipv6_addr[i] = ipv6 & 0xff;\n@@ -299,6 +321,10 @@ add_set_dst_ipv6(struct rte_flow_action *actions,\n \tuint32_t ipv6 = para.counter;\n \tuint8_t i;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tipv6 = 1;\n+\n \t/* IPv6 value to set is random each time */\n \tfor (i = 0; i < 16; i++) {\n \t\tset_ipv6.ipv6_addr[i] = ipv6 & 0xff;\n@@ -317,9 +343,12 @@ add_set_src_tp(struct rte_flow_action *actions,\n \tstatic struct rte_flow_action_set_tp set_tp;\n \tuint32_t tp = para.counter;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\ttp = 100;\n+\n \t/* TP src port is random each time */\n-\tif (tp > 0xffff)\n-\t\ttp = tp >> 16;\n+\ttp = tp % 0xffff;\n \n \tset_tp.port = RTE_BE16(tp & 0xffff);\n \n@@ -335,6 +364,10 @@ add_set_dst_tp(struct rte_flow_action *actions,\n \tstatic struct rte_flow_action_set_tp set_tp;\n \tuint32_t tp = para.counter;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\ttp = 100;\n+\n \t/* TP src port is random each time */\n \tif (tp > 0xffff)\n \t\ttp = tp >> 16;\n@@ -350,7 +383,14 @@ add_inc_tcp_ack(struct rte_flow_action *actions,\n \tuint8_t actions_counter,\n \t__rte_unused struct additional_para para)\n {\n-\tstatic rte_be32_t value = RTE_BE32(1);\n+\tstatic rte_be32_t value;\n+\tuint32_t ack_value = para.counter;\n+\n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tack_value = 1;\n+\n+\tvalue = RTE_BE32(ack_value);\n \n \tactions[actions_counter].type = RTE_FLOW_ACTION_TYPE_INC_TCP_ACK;\n \tactions[actions_counter].conf = &value;\n@@ -361,7 +401,14 @@ add_dec_tcp_ack(struct rte_flow_action *actions,\n \tuint8_t actions_counter,\n \t__rte_unused struct additional_para para)\n {\n-\tstatic rte_be32_t value = RTE_BE32(1);\n+\tstatic rte_be32_t value;\n+\tuint32_t ack_value = para.counter;\n+\n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tack_value = 1;\n+\n+\tvalue = RTE_BE32(ack_value);\n \n \tactions[actions_counter].type = RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK;\n \tactions[actions_counter].conf = &value;\n@@ -372,7 +419,14 @@ add_inc_tcp_seq(struct rte_flow_action *actions,\n \tuint8_t actions_counter,\n \t__rte_unused struct additional_para para)\n {\n-\tstatic rte_be32_t value = RTE_BE32(1);\n+\tstatic rte_be32_t value;\n+\tuint32_t seq_value = para.counter;\n+\n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tseq_value = 1;\n+\n+\tvalue = RTE_BE32(seq_value);\n \n \tactions[actions_counter].type = RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ;\n \tactions[actions_counter].conf = &value;\n@@ -383,7 +437,14 @@ add_dec_tcp_seq(struct rte_flow_action *actions,\n \tuint8_t actions_counter,\n \t__rte_unused struct additional_para para)\n {\n-\tstatic rte_be32_t value = RTE_BE32(1);\n+\tstatic rte_be32_t value;\n+\tuint32_t seq_value = para.counter;\n+\n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tseq_value = 1;\n+\n+\tvalue\t= RTE_BE32(seq_value);\n \n \tactions[actions_counter].type = RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ;\n \tactions[actions_counter].conf = &value;\n@@ -397,9 +458,12 @@ add_set_ttl(struct rte_flow_action *actions,\n \tstatic struct rte_flow_action_set_ttl set_ttl;\n \tuint32_t ttl_value = para.counter;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tttl_value = 1;\n+\n \t/* Set ttl to random value each time */\n-\twhile (ttl_value > 0xff)\n-\t\tttl_value = ttl_value >> 8;\n+\tttl_value = ttl_value % 0xff;\n \n \tset_ttl.ttl_value = ttl_value;\n \n@@ -423,9 +487,12 @@ add_set_ipv4_dscp(struct rte_flow_action *actions,\n \tstatic struct rte_flow_action_set_dscp set_dscp;\n \tuint32_t dscp_value = para.counter;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tdscp_value = 1;\n+\n \t/* Set dscp to random value each time */\n-\twhile (dscp_value > 0xff)\n-\t\tdscp_value = dscp_value >> 8;\n+\tdscp_value = dscp_value % 0xff;\n \n \tset_dscp.dscp = dscp_value;\n \n@@ -441,9 +508,12 @@ add_set_ipv6_dscp(struct rte_flow_action *actions,\n \tstatic struct rte_flow_action_set_dscp set_dscp;\n \tuint32_t dscp_value = para.counter;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tdscp_value = 1;\n+\n \t/* Set dscp to random value each time */\n-\twhile (dscp_value > 0xff)\n-\t\tdscp_value = dscp_value >> 8;\n+\tdscp_value = dscp_value % 0xff;\n \n \tset_dscp.dscp = dscp_value;\n \n@@ -507,13 +577,18 @@ add_ipv4_header(uint8_t **header, uint64_t data,\n \tstruct additional_para para)\n {\n \tstruct rte_flow_item_ipv4 ipv4_item;\n+\tuint32_t ip_dst = para.counter;\n \n \tif (!(data & FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_IPV4)))\n \t\treturn;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tip_dst = 1;\n+\n \tmemset(&ipv4_item, 0, sizeof(struct rte_flow_item_ipv4));\n \tipv4_item.hdr.src_addr = RTE_IPV4(127, 0, 0, 1);\n-\tipv4_item.hdr.dst_addr = RTE_BE32(para.counter);\n+\tipv4_item.hdr.dst_addr = RTE_BE32(ip_dst);\n \tipv4_item.hdr.version_ihl = RTE_IPV4_VHL_DEF;\n \tif (data & FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_UDP))\n \t\tipv4_item.hdr.next_proto_id = RTE_IP_TYPE_UDP;\n@@ -574,6 +649,10 @@ add_vxlan_header(uint8_t **header, uint64_t data,\n \tif (!(data & FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VXLAN)))\n \t\treturn;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tvni_value = 1;\n+\n \tmemset(&vxlan_item, 0, sizeof(struct rte_flow_item_vxlan));\n \n \tfor (i = 0; i < 3; i++)\n@@ -595,6 +674,10 @@ add_vxlan_gpe_header(uint8_t **header, uint64_t data,\n \tif (!(data & FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VXLAN_GPE)))\n \t\treturn;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tvni_value = 1;\n+\n \tmemset(&vxlan_gpe_item, 0, sizeof(struct rte_flow_item_vxlan_gpe));\n \n \tfor (i = 0; i < 3; i++)\n@@ -633,6 +716,10 @@ add_geneve_header(uint8_t **header, uint64_t data,\n \tif (!(data & FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GENEVE)))\n \t\treturn;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tvni_value = 1;\n+\n \tmemset(&geneve_item, 0, sizeof(struct rte_flow_item_geneve));\n \n \tfor (i = 0; i < 3; i++)\n@@ -647,13 +734,18 @@ add_gtp_header(uint8_t **header, uint64_t data,\n \tstruct additional_para para)\n {\n \tstruct rte_flow_item_gtp gtp_item;\n+\tuint32_t teid_value = para.counter;\n \n \tif (!(data & FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GTP)))\n \t\treturn;\n \n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tteid_value = 1;\n+\n \tmemset(&gtp_item, 0, sizeof(struct rte_flow_item_gtp));\n \n-\tgtp_item.teid = RTE_BE32(para.counter);\n+\tgtp_item.teid = RTE_BE32(teid_value);\n \tgtp_item.msg_type = 255;\n \n \tmemcpy(*header, &gtp_item, sizeof(gtp_item));\n@@ -764,13 +856,18 @@ add_vxlan_encap(struct rte_flow_action *actions,\n \tstatic struct rte_flow_item_ipv4 item_ipv4;\n \tstatic struct rte_flow_item_udp item_udp;\n \tstatic struct rte_flow_item_vxlan item_vxlan;\n+\tuint32_t ip_dst = para.counter;\n+\n+\t/* Fixed value */\n+\tif (FIXED_VALUES)\n+\t\tip_dst = 1;\n \n \titems[0].spec = &item_eth;\n \titems[0].mask = &item_eth;\n \titems[0].type = RTE_FLOW_ITEM_TYPE_ETH;\n \n \titem_ipv4.hdr.src_addr = RTE_IPV4(127, 0, 0, 1);\n-\titem_ipv4.hdr.dst_addr = RTE_IPV4(255, 255, 255, 255);\n+\titem_ipv4.hdr.dst_addr = RTE_BE32(ip_dst);\n \titem_ipv4.hdr.version_ihl = RTE_IPV4_VHL_DEF;\n \titems[1].spec = &item_ipv4;\n \titems[1].mask = &item_ipv4;\ndiff --git a/app/test-flow-perf/config.h b/app/test-flow-perf/config.h\nindex ee1a4a3724..8f42bc589c 100644\n--- a/app/test-flow-perf/config.h\n+++ b/app/test-flow-perf/config.h\n@@ -16,6 +16,12 @@\n #define NR_RXD  256\n #define NR_TXD  256\n \n+/* This is used for encap/decap & header modify actions.\n+ * When it's 1: it means all actions have fixed values.\n+ * When it's 0: it means all actions will have different values.\n+ */\n+#define FIXED_VALUES 1\n+\n /* Items/Actions parameters */\n #define JUMP_ACTION_TABLE 2\n #define VLAN_VALUE 1\n",
    "prefixes": [
        "13/13"
    ]
}