From patchwork Mon Feb 6 12:38:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93420 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1686936qgi; Mon, 6 Feb 2017 04:39:41 -0800 (PST) X-Received: by 10.55.185.131 with SMTP id j125mr9125886qkf.115.1486384781479; Mon, 06 Feb 2017 04:39:41 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o189si406287qke.6.2017.02.06.04.39.41; Mon, 06 Feb 2017 04:39:41 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 20B9062DB4; Mon, 6 Feb 2017 12:39:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2024262DB7; Mon, 6 Feb 2017 12:39:03 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id F286562DB8; Mon, 6 Feb 2017 12:38:27 +0000 (UTC) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00099.outbound.protection.outlook.com [40.107.0.99]) by lists.linaro.org (Postfix) with ESMTPS id 3C20360B51 for ; Mon, 6 Feb 2017 12:38:26 +0000 (UTC) Received: from DB5PR07CA0033.eurprd07.prod.outlook.com (10.167.223.43) by DBXPR07MB288.eurprd07.prod.outlook.com (10.141.10.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.888.5; Mon, 6 Feb 2017 12:38:24 +0000 Received: from DB3FFO11FD002.protection.gbl (2a01:111:f400:7e04::102) by DB5PR07CA0033.outlook.office365.com (2603:10a6:0:2d::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.888.5 via Frontend Transport; Mon, 6 Feb 2017 12:38:24 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.38 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.38) by DB3FFO11FD002.mail.protection.outlook.com (10.47.216.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Mon, 6 Feb 2017 12:38:24 +0000 Received: from fihe3nok1346.nsn-intra.net (10.158.36.134) by fihe3nok1349.nsn-intra.net (10.158.36.137) with Microsoft SMTP Server (TLS) id 15.1.466.34; Mon, 6 Feb 2017 14:38:20 +0200 Received: from mailrelay.int.nokia.com (10.130.128.30) by fihe3nok1346.nsn-intra.net (10.158.36.134) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Mon, 6 Feb 2017 14:38:20 +0200 Received: from fihe3nok0735.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v16Cc4ZB019898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 6 Feb 2017 14:38:04 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v16Cc4VG019846 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Mon, 6 Feb 2017 14:38:04 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Mon, 6 Feb 2017 14:38:02 +0200 Message-ID: <1486384684-14761-9-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1486384684-14761-1-git-send-email-petri.savolainen@linaro.org> References: <1486384684-14761-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.38; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39850400002)(39450400003)(39840400002)(39410400002)(39860400002)(2980300002)(189002)(199003)(50466002)(36756003)(97736004)(107886002)(105596002)(8936002)(50226002)(81156014)(81166006)(8676002)(189998001)(5660300001)(5003940100001)(48376002)(22756006)(50986999)(76176999)(626004)(2906002)(38730400001)(68736007)(53936002)(356003)(86362001)(110136003)(2950100002)(92566002)(450100001)(47776003)(77096006)(6916009)(33646002)(106466001)(305945005)(2351001); DIR:OUT; SFP:1102; SCL:1; SRVR:DBXPR07MB288; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD002; 1:rpkWcvqkKWA0FqhcwBjua9oClCOVjTZLk3ypEDmfPWiQYzBujvx/3jSl3T96KlE5TJmSF40pt/GSmCqjAI9ROk6Ge4NuLyxZXg30W7PZdvx12DVNGdZb9Uxo1hD5quR2RreZUil3YVvYjT0xGllObrlYFHNCKpzDMOKmNVF2v25paHoAjtKYI1bVy2HW4bH3VbdVn8jM9aCJWQ7Lte+vmzVYjrreqbyO8AL5ungzC2v75+rOzbh6UWcFI2hYL5RSiZceWH43heaIXoXb8EDO7WXk9Vo4EWPKgmIxX4iib+69nFEavq+dOF/DZevAgXTdPrjE+lgJ9AEamj2s+pRvtmE1hAuZDxt/svZm0P0Yy5+gDVd4sl3VuB7HLJeSv4eamqKWdF3jAS27X5HjR99dDcAoiEvW22TOSvKL88MrrPeiNgG+JMNw4sYlyUVcmBaYrnqrfptgQpeik49cV4iOXpV9DcvtAGpjeTFrlc2B3f8= X-MS-Office365-Filtering-Correlation-Id: 9b16c9de-b3e4-4422-db53-08d44e8d0ab2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DBXPR07MB288; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB288; 3:oT8kIJx8+JIusZWra5v9k0j1454st60mRPV23ZjGbg4OR7hnfKnwdM+KaAXX/jssWIwPnBx/8B1DhXlf2Nl8U73A/xiYA16IwNc3aVTEYmIg0wx4F7UnuyWEuGdrUWfO9IW9ZMnZnCjGvFij5vTy5Ie+TBioOgLGIoWJRQFIPxu7+8Ks554mCy8HyaZki7zbaijoCMuLc2XOpiMYP2yAF7+Si8YDx/LLBnklI74o6r3B0bpq1X3IfTVMVbglED/KOOvaPuRGSP66WUM4GFIHRNSemFdpNHoKmJk+o+/stD252kwwUN5zJJ5J1oohvTfJqKjFoH1nEMibv+jPp+Xl36c2WNH2b4i/++FqYYoF6DJddK8fOJwDZlyJAeAM8Jm3; 25:VJft5jy5PIs8hDjkGr6Dg1rnubuq1J7A67U8DGCO1K1N/4vPlq/GYkcteAZaBmdGYaFXiLsxak8X6h1EaObltWxLvpMdEWBiN7HI1UGeoWXM9ah2qjsNNbVetfO2Q2Ip1qS3EgMrnWxNZDQDh350Y+bTuxsD25UFpWyonwNfxQvko3Ow+qf8Q7ACiMXq8bo1/CSuRTSfagD5XV1xXEqCShs3dxyQBieHvh8L97BAU6qGiqID6xT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3xqTJQc3CGjdft8wfUpSxvuP2Iy6OeDqTPztZnV0iQkokNBdPrPJI/r9g1pc87YJFY//yBRJqzLSksSYmcgBb5yk/G6rALYtkW2U3Qd2+7kq+uzoKNjNg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(13018025)(13016025)(20170203043)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123558025)(20161123555025)(6072148); SRVR:DBXPR07MB288; BCL:0; PCL:0; RULEID:; SRVR:DBXPR07MB288; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB288; 4:JjjhgMfoVcanLHSnA7SZZq4ZAlC6MLiPME4xL8Qgv+uNWAHUjF6AIZtKfl26horsj5e0n/FVyhFOVM0cRTsi+SuJbCAZR8AUATlgV0KVs2qg3M+CGV+hA3tIO2MpOW2w6j53avzyWwt3SXWQFNFJ0TK5AKMV8wU7ptTHsbKABLbIrt5DGrICRqfi3AtK3/aLqsrYm/UPYfOcgnyrs+VCmEfSmpOro+SYU54f4ADGY7SdRE4AVG906V30KF4VavAjGrPpx4izR3Ao07Bxruwaow+8MfCnKrFAdEZqN/ORLdvds6Qx6Ok4JbnMM3bwzS7S3Cg7UwNcC5i3t1x4HEG4h08Dxb+K2lUcphjJQqx2vkgPBPAh71uyj45mbQ3p7tCyXeNtYk8armQm5gEwYAJwhGp/nWld6wyC+DW5thG89SzUG2KzN8SEyG9bzLQziztXqjwTLiN/qBiHy1ngPQMLjaADxy6Ft2uWFfpQo76pXCb+UG1x4msVXLgeFqC0KONOKq5l4QaiII39kFRf+BGpA6peNfOJfdytU7v9ZYNOd/vLYq6uolOgI7x7wdfZdGOd2jfw2iu9wlcp6788TG/trc90QTGhHm5iw+0Un5EUrvsDX+0ogFwzSXD8JRUqWVuwpJhTBtmPdkG4EMp9MOQzte5+mivA+hi8fPhR6K9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TvQWgUWbRN9vo0t6GYAz5fqXKP1sN7LiJpUHVGWYTV2+rOt/vAuLwW3mjRqX0+YveUpbECvk6Yi7/fbazeSwZj3Is3TOxEUWcbxIeCkf3FXSlLvVwvX0w2i7b4ZjZCE7yRortIXloI0z7eEJbkT7QRCK8ExRQ98+ADvJttWe/qFCjwxmCTC5bD0J4hz2TiLOKTbq2zZDaOaWVVPE90VeKeJVp3HxxFl1zKOl7DiQ1j6U8gpjOEwELVhlY58/GSQRQu0Diyrm/pmTMhUDIwyaKdppY/d8CNSfEPe5d1Tp0/8luoDG1zIhJUBbPFv96SCnaH3rb9gsXINRroyT8Y95ywY+nW7uzdtyZMLV1Bcp38SZZtBRLIo9ZDgaK4uCbjrSnKc+nrF8CDUDZhwE7I+Y0VOkpJ6UDRzEuuNN7O5g== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2017 12:38:24.1839 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.38]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB288 Subject: [lng-odp] [PATCH 08/10] test: l2fwd: use packet_data X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Since l2fwd can assume that all packets are Ethernet. Also odp_packet_data() points to the first byte of the frame directly after packet input. Signed-off-by: Petri Savolainen --- test/common_plat/performance/odp_l2fwd.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) -- 2.8.1 diff --git a/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c index 9864c64..8f5c5e1 100644 --- a/test/common_plat/performance/odp_l2fwd.c +++ b/test/common_plat/performance/odp_l2fwd.c @@ -241,15 +241,13 @@ static inline void fill_eth_addrs(odp_packet_t pkt_tbl[], odp_packet_prefetch(pkt, 0, ODPH_ETHHDR_LEN); - if (odp_packet_has_eth(pkt)) { - eth = (odph_ethhdr_t *)odp_packet_l2_ptr(pkt, NULL); + eth = odp_packet_data(pkt); - if (gbl_args->appl.src_change) - eth->src = gbl_args->port_eth_addr[dst_port]; + if (gbl_args->appl.src_change) + eth->src = gbl_args->port_eth_addr[dst_port]; - if (gbl_args->appl.dst_change) - eth->dst = gbl_args->dst_eth_addr[dst_port]; - } + if (gbl_args->appl.dst_change) + eth->dst = gbl_args->dst_eth_addr[dst_port]; } }