From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr60063.outbound.protection.outlook.com [40.107.6.63]) by dpdk.org (Postfix) with ESMTP id 0D3921B1C8; Wed, 10 Jan 2018 10:10: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=N4E6h1KIa0+giXTu9N0odOO3E3La9ux66leszLQbfiI=; b=HmFr3MyhqAz2eG4myFZzACcJGykHAIWf0L0BJJJ0euJH+H4kw55jv6y67ZGQIPUjL+mdKMMoP42KI5lX9kz0U8CbjxtH8oqexcBaoa4c13uaxtUifVG6ePgVU9dgtCMHGKAIcLtD8u2nHdEk3bFuUuPT3WkbT5/ZnRfDqREsEZs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 09:09:59 +0000 From: Shahaf Shuler To: jingjing.wu@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com Cc: dev@dpdk.org, cchemparathy@tilera.com, stable@dpdk.org Date: Wed, 10 Jan 2018 11:09:13 +0200 Message-Id: <48a1b699d939ec9ce93b2f39defbfab86884b5d7.1515575134.git.shahafs@mellanox.com> 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: VI1PR0202CA0030.eurprd02.prod.outlook.com (2603:10a6:803:14::43) To AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1ca7e65d-3177-4a74-70d8-08d55809ed3d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM4PR05MB3137; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 3:ekIHOPFSK5axnC3ITbwdTM0f0aAoScDWoG/omWK/Q7FNQGOjjhBeZhpl3yY5uF1QOfga84AJiby/w6LRAPEXYKq+vkfemXbk8b3MVWIgF2v5KTo9Szk8muRf0m0tzXjn2HbYcWeJSksgpB7HrSnODmZx6k7HmQ02tSM0yPq62mtunBMvTTnPcFBEaVpFN5u8TiyAwKRt+Eaps+h3fSpFeRvxIXoCK+JWpv29KWFTeCq+4Hgfu9qwHNvdFj2uRJR9; 25:zoolNc6FTRIwup1rVyNS6Pb8y5gy70p+0AIp9KYAxY7DmO8Z1BaZ1VMYeG3f1T/uMaSR+SS8yF6GFSVgkwfYEzP4715jZRbm0khmGfbAV2wflNPDGVlccol3muQ95yUsqb1i3410IN4EoMoZdzwujVhb1dQU0eNkqaMRE3G+OODrVYP2Fe1V590S5vbuWAibojrMr3xVUi9C+b2Ezy+nz6tBZEC9GKOnMSk8Athg6Bm/8ujTnKOY+9h2YJHcN5uFZ8cfp+R9Jyta1J7g6X/xP12EZSUE6DKYnMAqgcOpBOqycwbfHU1R7HHGQ9oB/bXT7SSZoKiEsXoVMXwE5SMvBQ==; 31:/uDiKicou28Uu1bA4M0Swswiu7lBHBv7tmW8hqYwMH1jf6Btr00FDLJP3b9QJ8c16t1yDOUWj8qPkjYa+VcY+TYEb4R5X0osMSgcIeOtgmvnkyQO1idUHsDSYHquKFACFpAxLOa4LdGv29zFQ3bGJetMecd1osj6e/5dnekPlOK1rRO0njk5gMwzS9JwXoaFAimoIKZ9GwgjU5KbS7GFe+3qXSBpIlh0NazvOqyhBcA= X-MS-TrafficTypeDiagnostic: AM4PR05MB3137: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 20:u9KByraZH5t8do6frql8x+2Ge3QqS7tnharSd+vJkJIMax31+rfjR/Vu96elJCUkHbtipxU2kKyMMhr8jzYeeQ5LpG/gP3W0XGXKwAN10vtFlrxgKkGr3OPskNSYmgdkkZnip2MhaBphXIpU4jek3vUOigxOm+iSHoy6QmD8/UcMFFVks2aMPjI6YRZ7MB7nB8aGV5JtnQKdQNgS8ulEJWgVnzfFzvKistg406cPDazaSPG8+38D6PEfCBIquTtgEOIiKPufI+YOEX+E88QIrP96Pp//qyasfQMSEYrJf1Ii2EhFJ8RncKdKmDE2Z4ypJt1pLllHFYqhgpZmHURqyfV8L4FvAMOJC3z4uWQCFIH8JlBt5z3ogsqvMbMpNUnZrS5UKtWdVDdvYN/sxH+g+ApKdv3Dfhu4DhMgruGMon5oR2uIce7Ss9rstt3jp0kJaNY95N7iw1j3DodJ1ccr0SGNNSKvrfg2V6XL3K1ATY1v9No0QHurshmTNtM0TvYe; 4:1LLGCxFvjczxcWHUsNYeJ+HsMnFrnrxudkKpyCtTI7VJDUwxGkHh37ikHvHIUYkI/mA3QAGiA+1MCp8cCxjl1vsbxB5Ukvnni+8VGmtg/Z9LETqJZiUiT7J6vde07ecDqyYqQEsyLyFuuxpQGqf0db0mzFmU7rjMQCmO9bQkkSs6d3oIsQLBbAMOZUkYSUNVdivVNzruCSLzYuC5YVQggOxNlq3zKVtdiYQDNEfS8npaVvs/aK82J5NVyJeowdnsF2BRMD7DskvecqDSLwii/ov9HpoFlW3RKZqn6cHPjnhpWc739U6I2i5YovgfIwNx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(944501075)(6055026)(6041268)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM4PR05MB3137; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM4PR05MB3137; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(366004)(39380400002)(346002)(199004)(189003)(6666003)(478600001)(2950100002)(5660300001)(8936002)(50226002)(8676002)(81156014)(68736007)(86362001)(81166006)(118296001)(305945005)(7736002)(55016002)(2906002)(21086003)(6116002)(3846002)(106356001)(105586002)(316002)(50466002)(69596002)(386003)(16586007)(36756003)(4326008)(52116002)(76176011)(51416003)(7696005)(97736004)(16526018)(47776003)(53936002)(25786009)(48376002)(33026002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3137; 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; AM4PR05MB3137; 23:LK7hBKJS53nKyZvS2Jm2+ey/cCBynPApV/IzvCbPn?= =?us-ascii?Q?I9xoguWs7lEPlYymfAeyH8CAgk9TRXxfwMau4jsvZXKO8e1eNR6pNAylBmsZ?= =?us-ascii?Q?l6c7QJnvfHDH92DEkwdxM0LY3nSrvmMH295oZ93v4nSzEK2kW1irQRcsD2TG?= =?us-ascii?Q?UpEzds83DkM817pjMMPhbcLNkthnhKzQ5Jj05tETxBybJsljhqu04ttqv2v7?= =?us-ascii?Q?TnBrzuyp7RowEEw8KXUwukUcoSi/MD2TlCxWCv5qx8jWdrKmP8r2/IbUJXkE?= =?us-ascii?Q?xBLJED5fbZv5BL36IvsRBdj4THHDO3vrtiUULqCEve9pFiV1aGaDm52Oi+7U?= =?us-ascii?Q?oDqXEXBeUuNJpFLumL+NjCZkgP4XlojRewWN0xvmcm5SORuxj/o4b2R2I368?= =?us-ascii?Q?HsWal10gZBlmpb/vzk++RnsKCGcptipTXySzZUDMUg2iwWqhz6sA1lS8VFS8?= =?us-ascii?Q?iPVtHeCCmbENBJcRdp7b05NLg8vBLlmYO6TxsTBWrQdepIuc1umoAbhvpJYe?= =?us-ascii?Q?MwyqSkG/SmEB0XcKYsCfK40keWZzmIzxKp8ObNNGMPLAU0ePLFNaIQ0jCY0V?= =?us-ascii?Q?l+fVUUQJfko929fmhYVUAKnJfYJu7siUuxIocF2NAo6EzXSZJxLvBrC8t62X?= =?us-ascii?Q?duel2T20wgMerBul+kIAL2FWJ/XrgK9S+NIUcjiuW91BYf6mewgR8LopcT84?= =?us-ascii?Q?aJ8RhErWMFnoQUwdP48izuQ4Q+EenvBkTjtk/16r+iOB4LbWsSv2TkHpz93h?= =?us-ascii?Q?tbGDY24fMWYWxuZR3ISSWnVYA2fs3Vu+6Z0BdgVj6mDh16nLqmNKKj4pVHvI?= =?us-ascii?Q?R+M+sTzOpughpXerFN4xEgGmRUVbIdWiYlrvHUoTsqCGns7pMnTV4fqHaz9a?= =?us-ascii?Q?XlpwOCEWT/vQSxZXRcd1QziJSOfs/Mh5CuEeU8criHfcG8aQHQUXO1rmU0la?= =?us-ascii?Q?gaPH+nYtpMFdWwssJesugCs7kBb9JwsKzky8Y4yzG0SzYnqAZXHCXGntPn8s?= =?us-ascii?Q?xKfqhctOIv4rl3UjVCLu3ofuhAd3pHo1hVzqTL1ASX1UDVe6X5qt6HSLAJfi?= =?us-ascii?Q?LErXdvyYEXwJuG3Q5JMAT804JC62PHwWu1zELI4lztc+s9ku222NNkp3g2Ym?= =?us-ascii?Q?UkqYY2UZ8Q=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 6:A6UD9ETkvJLboZnV62MZ/1LIQdkWHwIhDDVOVQXD4ZpIURDClA2T8t2hUdaYOzevPU568yMPe4+H7a7dyPFh/6B/ee3NnBLpRM2QlIxmKwmeSNNtFQ07Vr69kVmrnlbmbwy8y1q6g/zcgnIcGbLQxwacoi10uAWc3KhaGCYKSNv18KvXQ14aoHBUq1hGp858lJGEZGM+zbGOOhjfY//N7ucCrUHDkqOHQrYfsr2znltZ2lNpJRE7jkVY6FEha9v491bcqqJl+CjfspW8K4blzJOIyQI8Z9nto4G2VKxePTtV/pD0xwJpcTKOlne95SwX7eIf048Sw4w1vtvulA6syEQhf3GBDErDhVkhbmhpWS0=; 5:nkZNK65hgoD0iZItL/aU+JBSMXs0pM1l0Hr3I1DpclOiYKNQiDuV8R12QIHhJHTrAK5psAKQt6GxZxFnOh70Dy6gRkL1L6GhnfV735rXUnQZcoBY0pf5dxfwQf9mDDwhjfVa7fE+59bJ9w7VfFTvtD+itJo11jkUHAw/dyZ6CaU=; 24:jnOmANvWViPEc6cA7PM65PS7u2m12S04YIyh/ZTX+P5SOqxGbIG5pRvX22zd1qSpW4YBu20fcC5hTub3Zfsfba77zGoTxKJIF+K09nHnkgw=; 7:iGi6IOrOv/a6t40czLLUeZs2mJhSe57eLVxB/mnEAIPbdFXe+fnpLwR9RsTX8KAnATY51Ehp+J2XI6niKQHp8epWGV0A2pqim15TPkOC1qFdONU08bdCU0S45hChV4l4ceHyjJXtD28fDaWZoz0/sE7U+SD51CGaFWffIBwsXatgkB4BVgloUs4j73/WBhw3mrRDJu9hqdTf3owNNZT9ipCY1fmgAS4cG2BKm0vMtcE2tOIEs5yGkHbqEhE1HZlY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 09:09:59.0969 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ca7e65d-3177-4a74-70d8-08d55809ed3d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3137 Subject: [dpdk-dev] [PATCH v4 05/11] 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: Wed, 10 Jan 2018 09:10: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 Acked-by: Wenzhuo Lu --- 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