From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0059.outbound.protection.outlook.com [104.47.0.59]) by dpdk.org (Postfix) with ESMTP id 543421D8E; Tue, 12 Dec 2017 13:53:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Gt0hWW4RkDImtVt1U3VHitwcZUrSmlUHxQ7CtP1coBU=; b=bLrqQfhg2ryB0WYOA6tPTpsbhiMbMxTO0rZk9AcFB3DHVzokEtGEz8oLgwWjHLxB1LAAhfwFVCTeodPT+IGKmBqYf6DQEp9Y9OcU5M2r0eghF71x0efMlXN5+SgIYuHUqbtraEcnau2gjfKvz9E8Hm9uWmVyjzg0JF3l5+hvuUg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3150.eurprd05.prod.outlook.com (2603:10a6:802:1b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Tue, 12 Dec 2017 12:53:37 +0000 From: Shahaf Shuler To: ferruh.yigit@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org, cchemparathy@tilera.com, stable@dpdk.org Date: Tue, 12 Dec 2017 14:52:49 +0200 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: References: <20171123120804.143897-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: DB6PR1001CA0037.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::23) To VI1PR05MB3150.eurprd05.prod.outlook.com (2603:10a6:802:1b::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 56f4a06f-613b-4c0e-0f96-08d5415f5d78 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:VI1PR05MB3150; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3150; 3:w/LuEf+hNyq4CE8Dbi0KUQYzOlFqaB9LGNJaneJBpQga/PK+if4axaV22jZ8Zr8fxPLZXKOyyGOYZlNOpcLiX6j7SYTYVSJYD5WTkYgjgHrfDpFEKbPPGdgJqZLk6nIHtolnCFM9n+zcVAP+0ScD5vrm1ad/v/HiLI1WN7RrHjPwVaoqxsjfge0GkqIb7Rt9fr8OhaukDZIu/BFn2hpfK24djW7xS7Uurb8pEyafKOrLU4J6T1P/AwmvX10re/eW; 25:oagOA5tPZ4WnnU51QHzJtqbGDl+aLGvJJQs+YKxU0iAKqpNkdSnfe6Sf7IraljKfkD7sFflBcJh2dRnHMrrmxLf9hGQ2cSxQGVPzyqSFR3y+5zbpJJCfRSaZNxY/qTfUGWc6STU+2qKbg+pCx3KFloH54ciNXGkugDnobOmwUC/PLKTCpj6RjxAJ/Kg+wZSpn4EwVm0rRDS5QklV+cPkClzpQnkqq6Lm8EHmvDpTeAGc/hbbOfe0DwLJfFPVKsG1bPJNzjQPMY4HABJxrURs/RnSd3s9JmCcKPrAMaDkhgyzZA3EnicFp6Q+bZg/9v1K0S/j/9XJUzB/+t6w7s1TWN9ZQ9aFkproQw2suHpm2uk=; 31:Wg83Vl0H+YHi3QM9G1k4hdev6pMLJrx0slb7eV9uYnfpZvPRGf2PMO2Op+ZKAGoKV/KAjMuvnGSm8JafOvs2Y0sG2C1f6ni0xjfVW5d9NiStID7EMnj7X3atX+Ql02VbueiNux0FbixgmYN3j6ewH7y/TsDEiZaoo8ZCKCmHMKs0qYNr5PcqbeYx+H9M4VqhrQJs/KpNyBlmTRmvuHgIrVM1FGQMk019NirQ4AMwVSw= X-MS-TrafficTypeDiagnostic: VI1PR05MB3150: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3150; 20:s95WMBvjbEbkQiBQ4GQVpetTrRnps2YubnyPk4gXYVg6jOYGDxfoHhF9M+BdYKSIh905M8A00hfH876HLdI67uI99B9NercNSV1NXHPjwc4X7BkDeYa+7Rur3jZPlnm8hT18oUqLgcrZf60J3eC/3xSMcxBu+X/vYNnWbbwU1BQExnxC0eDqfhMTVtmPk3kvPnovvHqJrp3InCBrJ8W3mhWmki5796jtF98kg+vjTH2vgVyScW9ZDoQbj+dCuDe9ztnrU+M987mcXjEOeoF/1xtwo5am+UjMvmVT/wKfK/qdHfWUwReJz7BrwG3Jz+gQ1jS0NRN9oedtm3pj7SUl2QM6ZixcpwvfUlnlPVVEPoJaxAveBuYtKFD3TMwZrmCPR3l+lI3XNqlmWsVm2oWRuuVHK45Prfs3Em94ulrcxC9YdkdzZSh7Dmx4W9LkOZ1C2lRtnJyuEhqFKUN5MLvdRDjcjxtSPLoBrI8KsoU0X9ZYYVND295Oi0JceZgSmuIt; 4:aIJjvTKBxCDA7VZj6NjV5BNS7lZJNs8rDf1J2vCeEnHCoT3LA3bRL+cg+AkGDuMz4K0aEZvIRNo+cGxMglRGtJNvLGW2ZmsyATZMJ5/8rWy3w1nBtoC4SkiAFVUa6SwGNeKHZ2q4NJ6WFr43T8KkpG7y/m6jN3Asfcb7M0TzqR/WP5N2J/Wlqm72c0Cx9OLsNjLkp7lCyDVb8fK0hFLe9NzAK2I9HP/9j0azGfW5g084OoQ3vSPXZVkut1wtSM5zHOcdOcuJbEwA+4Iyk8gCQw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231023)(6055026)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011); SRVR:VI1PR05MB3150; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3150; X-Forefront-PRVS: 051900244E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(346002)(376002)(199004)(189003)(55016002)(81166006)(106356001)(7736002)(81156014)(47776003)(8676002)(305945005)(105586002)(66066001)(36756003)(4326008)(118296001)(53936002)(16586007)(50466002)(48376002)(7696005)(33026002)(69596002)(52116002)(51416003)(478600001)(5660300001)(16526018)(97736004)(21086003)(316002)(6116002)(76176011)(3846002)(50226002)(6666003)(2906002)(2950100002)(8936002)(86362001)(68736007)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3150; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB3150; 23:PrbT3zYaBOF/GjoAOS35HNDGEX/UvdzbAIzyz1Xah?= =?us-ascii?Q?04l53fTgPSP00h0wLIVabLw8fPFSyUJ/UKjMEgODolCYim8zL9v9cT+hqH7N?= =?us-ascii?Q?/ZYz8kQlgDnq7ooNYi76rK92Ohg2STaH6B205eYGmHtQToNrp95KExTxZM+9?= =?us-ascii?Q?LsbNpeRl0Da5zP5qiXeZbYBx2mJW//zMG8uyUHuqLc9W4GZFLoKsI902dVBE?= =?us-ascii?Q?FiYZcI0uHKyqNKeCus17Pny+xIV1Dp4mZQt5vJR59PC3rftira0FARgoqNWC?= =?us-ascii?Q?6tKFSGgiClFNd4tsZBBj5ZSBYhVMkMr6aS9p7buDkGSOERQu3vua3SwfnekK?= =?us-ascii?Q?vpdmX2TslLqMnsVW19xYRjcdXnbSx5A5z6tV9miYnVJJ6afTCWdpyDT3lJ6r?= =?us-ascii?Q?W0FAghIjojh4iu0zsKCyP9p+z+lPFUfjIBCDnIEVYL/5CTRAjoqu2ZzKQXP8?= =?us-ascii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Olm68fX5JsBTfzso7XeGX2clWiOz6BzgOMU1hbXszD9wrn4wWZ6jOa1T30zyPWZ9b4=; 5:aXbGaMxwW/H5HOTvo001f7P7fJBYUNl0Bf8uBI23X0k8eFwKYiuOF916i45ZvIYeuAGJT8yeFXu69poZWOHLfAdQGAelzPE9rKAtHJHOqHSCbcVHc6Ipy6wcZIblVDQM38/JPT1E6ph10qCf1/zc74Hch7v6SOwW4LhEDaY/mi8=; 24:Sg2y0E8vmGdQTD2/vST2QhUCWsSJumOD76VBLlkWqxH12PXUdZmmWL+rVjSIJLPiwsvApNkYg7BPzO9jN2spZFFfDo+mA/oadpyGVx5EgVk=; 7:XckOzTdSkPYPUAh28yQAGq+ZLR9rWSuoL/tvp3G2GtBNfRpROKwNbWLyRh5mqUE4Ivc/4gP4s9Y53P1S0UALcM21XZN019G9s7KzHFZkaifbBlrto9L0ZCKVsqDJMzWImDMcwStDI/Dyki2v4EPIhYhEWfKxOam8j5XjQnNRuaXDkU7ErAl4HHuDI57ZWfXfFScUFnU/8EPtUyfmfH9NSQsvKWFV33s4sCMNWwoe2SBoy3lFqvK5anO2/ztVM59J SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:53:37.9734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 56f4a06f-613b-4c0e-0f96-08d5415f5d78 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3150 Subject: [dpdk-dev] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 12:53:41 -0000 The mbuf ol_flags were taken directly from testpmd internal enumeration leading to incorrect values. addressing only insertion offload flags as the checksum flags by the application design are only with csum forwarding. Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine") Cc: cchemparathy@tilera.com Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler --- app/test-pmd/flowgen.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index acf9af9..46478fc 100644 --- a/app/test-pmd/flowgen.c +++ b/app/test-pmd/flowgen.c @@ -123,7 +123,7 @@ struct ipv4_hdr *ip_hdr; struct udp_hdr *udp_hdr; uint16_t vlan_tci, vlan_tci_outer; - uint16_t ol_flags; + uint64_t ol_flags; uint16_t nb_rx; uint16_t nb_tx; uint16_t nb_pkt; @@ -151,7 +151,13 @@ mbp = current_fwd_lcore()->mbp; vlan_tci = ports[fs->tx_port].tx_vlan_id; vlan_tci_outer = ports[fs->tx_port].tx_vlan_id_outer; - ol_flags = ports[fs->tx_port].tx_ol_flags; + + if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_VLAN) + ol_flags = PKT_TX_VLAN_PKT; + if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_QINQ) + ol_flags |= PKT_TX_QINQ_PKT; + if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_MACSEC) + ol_flags |= PKT_TX_MACSEC; for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) { pkt = rte_mbuf_raw_alloc(mbp); -- 1.8.3.1