From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr80064.outbound.protection.outlook.com [40.107.8.64]) by dpdk.org (Postfix) with ESMTP id 52F491B625; Tue, 26 Dec 2017 10:45:01 +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=aNYalBZUTA310ucmMWzQ15job/Qk32RiU/6wmMAhTzY=; b=j1X7XZaPd1s1D2ctJgvoLREKNEWuO7unRxhRFTBP6mjuk/t9lvPZkSxIo7s62/XtzUA01fXm5+PIvfw1lP+tKZoWpghhPJBto3EAb9hlsH2fKf80KxmMljZ8S62ZJbttvI7Yjeq0To4vM8yOGseZ2ElBqhEmUsj5wKliRf0h0rM= 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.345.14; Tue, 26 Dec 2017 09:44:58 +0000 From: Shahaf Shuler To: jingjing.wu@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, cchemparathy@tilera.com, stable@dpdk.org Date: Tue, 26 Dec 2017 11:44:19 +0200 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: DB6PR07CA0012.eurprd07.prod.outlook.com (2603:10a6:6:2d::22) To VI1PR05MB3150.eurprd05.prod.outlook.com (2603:10a6:802:1b::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98ede9f4-c283-4a75-6c34-08d54c455494 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307)(7153060); SRVR:VI1PR05MB3150; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3150; 3:2RbploQsAZJOLBnF3s0dQBiUNIDhFH12kNzmOQFJn93Bgo6njU4B7mDDP3cu/XipEEaIh+dqeyK7TrfBDJKLnAdVX7WpoqS0p+HZlOTnUZ0pkHKR9e+qRs9Vf5/wHvilPep/LGgGi13PUD93lonOBV6WWkLBeMEWMS3BpjE9RZQIiUmfTXXF7p+YcGwtEupzFx3oCp63u7kxCNcSbJjMyTa8IkOqhmK5LFMWwNVp7y/LLD99rOunSRgDRoJpsk/M; 25:IONHyS0pxfE702P/rZpSUlC4HC3E0AoaGOFZOaMj+QCZE+NQmk9UH+BKebNZNkfRcFpHBEVjHEWZNstuw+H3eX5x/xF0j05DFrULH2q4tSJQvODTxrGAHrNvzdHb5/XpHaXPllYvHRtQeyBBEwKpxgxFQmjxrgKGiz/kwNnTOlve+xpVFzEQPhLhc34gjcDcEU3QsSaw8sXl/Z2CibYvZ9HTGKXpCyXXJcgs6WCw6vP7/xeTj/VO29fWjCpcMLlaOWCnaX4pTFC3JpQodb4fQP6/hsfcH0G5spzRr2+GoEiAnB1P4JliJSkZBE5t3FhyxKNE4DIOY7CUOzzPMHL2kg==; 31:qaY0AJmRICzuVnVLyJU/1Bpq17ThiT8ZS+6xgJcg7Oj8rz/NJZyr6urlX/vHm3oCEROjRR9ZD+8LVxlfUnjKWqtFsZ2xv69SwK1NKsm9rLSqS0ehcqRSE7BSgzzKU/Ic5rE7CakSZzJxCoyJi0OHtIpUaeOhNhaXaa/zJ8VUfZvcxowJdG3oWtEL3e8tsoH6eq/MBz4HKLHr9HfvvmGXBf674uuoYVIfS8hETOWapWU= X-MS-TrafficTypeDiagnostic: VI1PR05MB3150: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3150; 20:EGjmMdLTq+thX/UOTPQCfZHtzXuhTX4qvSA/oikAEK4dsnRfOkpaRUdkswqzuDrZyhmEDiKKKFj32x1rZnMMuaSKELCqSBU8BnekLWk8BiZiX5rDZHgJixQwYKHRg4Mf3OSaS+hTeu/9RGFArft/FKYpHe2r2o/wGTYHNR5GN7kOGBuLQ3nwwI2/xr+7TsyuTd7jIm5fa/xevtQ2KZX6BI58aCqSRpUgX37waMETlE5dM0REYu9bOYPZXfE1iBbRZlixS9G3hbx05YVBNPYZ+STEM56ZkMQOhJUQD0jWkUEiQeGyAMTfjnV7tggiKKmD9OcNK4waejU8Lu9d5iDRJcBUaSpCj5OF20i5/r4LsB+3pCJ52Eyu+M/PwVW3d3xprf8aOPuSDgA5HeFbSv1WTi8RIuhnk+ndjQRtVHfOOdB8EmGOZu28nx6DtFE36i4aAtszYSKPtcUceK7zQZxbPJ2wcO4V8gqeiUcSSorck8eiSZcD0NGlSlcXUlMVWdgd; 4://5oEhVDkuhQMGW0WosyArnmVHwvx5WDdtJFpplZTibhrdnv5k5GUhG6AmNnQyrHJXXRv1BpUg/fRzDCl9w6Dq7aMnZia83/sGbUnVkPPasSqoiadjsE1KlVDlv1SdVu1zQ5y9sJvhZLpiyuAc7HTi+VEVqRu/zpGIIXt7v6UaOlQLxYvmyPiDVIWWW5RJpGTYHnhM7PYZPtljWJ2TVAmMcnhtnEqih60jGT0TRU7vBrZmc0jwcYEPBRqELkNhFF19SnAxl6Wf0DuLtcIU8Jag== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041268)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR05MB3150; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3150; X-Forefront-PRVS: 053315510E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(346002)(39380400002)(376002)(199004)(189003)(33026002)(50226002)(52116002)(51416003)(55016002)(8936002)(76176011)(7696005)(81166006)(36756003)(86362001)(68736007)(3846002)(81156014)(6116002)(386003)(16586007)(316002)(8676002)(50466002)(69596002)(48376002)(53936002)(2906002)(25786009)(2950100002)(6666003)(5660300001)(118296001)(16526018)(21086003)(4326008)(478600001)(97736004)(106356001)(47776003)(305945005)(7736002)(66066001)(105586002); 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:4oXrAsDTjLVtUVKNnF/BhyHaM3iVDn+pIbcoRfVXp?= =?us-ascii?Q?tL6voBHs8QektEnsW6665H/a6bTGQaw2V+pQF+bNTEYie6o4kxr7KTM2Tukn?= =?us-ascii?Q?fg5nKmtXsOog1tlsTjTE4HLcfpWrM+Oj4AfEGL+Jg1FrXvpbKNJx6vLKl9fW?= =?us-ascii?Q?hAoyzy+GbZpaye6Sm2fMRaLgIMt5GWhx6Vf67Jgeny9SvmIdbsD7Km3w7hVV?= =?us-ascii?Q?tRnTz7gY9pSoz4kgnD9lQtwlFrZhBCN2HM+j51baXwx5BdEinjhFPtgM/eHu?= =?us-ascii?Q?gPY+gzqEIkAK8rHuwIJ+kt4na2ubAXxkLEdOrTMDrVK1d9ioUibRBv5HAxVP?= =?us-ascii?Q?lAowWVbyNOV+l+njeyF79bcBMqe4am6dziGdNylZm/p/geG1D7CaFAQIB/f4?= =?us-ascii?Q?ADQTzG6frlyzOj6JsYr+jvSRtEc3DxyeMEVtQdpEYUj8ktS6AB8xkawxWN4t?= =?us-ascii?Q?/EUYKBaRCaK6F+Zj1SYcU6FTHu6Yfcr8KReE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+luOVUWAlpPfWBhk4ktGf70ouv70TC7SGGBevw7z1hSMUoXyI857nZQ1PMTipMjGESm/iaZPyDB4tQw/uPW06qgPjlJmwfw3u6tmTDQRF37KNycM7CLZ7oebXPEqUFDK3ye+c=; 5:jkfZc6AA2t2S38IxqJ6MVN06OZcfA4CnOR38Ix8f99LCn870l2ASzFqscTF4+YNNqqxowCwrKf4wBdH+BLBHX5HrU5XXcFIdeQ8J2h+F2ZxweQhC3suNbtzNoEBpmV31j8kKIth9pcr4P/FFdpXIciKj8o7ey0V5FR6yqg5+W5A=; 24:FCWu1jrKKYc8NGuS/ty9hGijQvwORhvck/fyGFCLnCQO9PikrSsIxtrj6ufQXRBzYhhHxRwI34r6+uZNDbLKIHfd0MDCBAbVmw2wZCQ8AUM=; 7:cjFxM4ZovKlk8yOWzbIFED8xQpkIQYslz21guckhhQPlzDvnha/fobbg7aramIKAxqllV6evqyBoDrL1cB0A44FcVmoXPLykZKPQq+JTGTr8k+KBQVUl3qWgDD0Jtb4ALd8zNSl2dQ7QUaSsKawHwSiwznFzbznbzFawoazP6KkS0Y5YO6tmpKcyfNIdLeWGhZX/+hRcnwHUuA6Uv5RJmEwY1Wh2yDBxAYC2h5ZomTqexSQH/CGSFGYOLyKZTCc/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:44:58.9666 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98ede9f4-c283-4a75-6c34-08d54c455494 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 v3 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, 26 Dec 2017 09:45:01 -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 acf9af941..46478fc3a 100644 --- a/app/test-pmd/flowgen.c +++ b/app/test-pmd/flowgen.c @@ -123,7 +123,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs) 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 @@ pkt_burst_flow_gen(struct fwd_stream *fs) 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); -- 2.12.0