From patchwork Tue Aug 4 12:05:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 51909 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 4E991229FD for ; Tue, 4 Aug 2015 12:05:45 +0000 (UTC) Received: by labkp1 with SMTP id kp1sf3427195lab.0 for ; Tue, 04 Aug 2015 05:05:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Ee8yXV+4RzrD12k5P9OgDIPkDg5SkfcE2SemP2cQ3Kc=; b=FmOEQNeh3KEIqOaKsCvUjhtYRfz1rxFKOe8BI9rzSRxRz+bZecXQkQSHqqkYPisx2W Lhk6H60DCXH3Hkk754xjfWqWuoxJ3+0OLi3Bl1aKBjtgPc3i1cwxds6G3pW52O/jt+eP gij2BmWcPlaors/XhRpTXeJDtWC8WcMaNe+66rCIIWRnqUahIUd5RFdxOei9IisJ2w0y QiJHqPCheQZMXyIZzj8Z3N+3qh+bK44MJt/RR5peo7lmV7CbOYNO2Keoadt7O2a1PpnP c1/Uc8bisgLPhg7o9Qzf47vsaq6r6DN1HeZTM5vjiq7fYBpWwz2fCnwNnQS44xDZF8F+ 5/aw== X-Gm-Message-State: ALoCoQlTz1Mz178UKyRTTnBOz3sCWrXm0K9bR2DU/DoHVsEd/oEpNDUEvITyImesK7VeNKJsyLKP X-Received: by 10.152.9.99 with SMTP id y3mr1037173laa.10.1438689944226; Tue, 04 Aug 2015 05:05:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.5.9 with SMTP id ci9ls38677lad.69.gmail; Tue, 04 Aug 2015 05:05:44 -0700 (PDT) X-Received: by 10.112.161.40 with SMTP id xp8mr2939276lbb.71.1438689944072; Tue, 04 Aug 2015 05:05:44 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id 9si535324lal.81.2015.08.04.05.05.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 05:05:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbpo9 with SMTP id po9so4572608lbb.2 for ; Tue, 04 Aug 2015 05:05:43 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr2956367lbb.29.1438689943597; Tue, 04 Aug 2015 05:05:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2385527lba; Tue, 4 Aug 2015 05:05:42 -0700 (PDT) X-Received: by 10.170.92.84 with SMTP id j81mr2955871yka.37.1438689942181; Tue, 04 Aug 2015 05:05:42 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l66si1429207qgl.9.2015.08.04.05.05.41; Tue, 04 Aug 2015 05:05:42 -0700 (PDT) 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; Received: by lists.linaro.org (Postfix, from userid 109) id 429AA61D61; Tue, 4 Aug 2015 12:05:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id DF01E61CC3; Tue, 4 Aug 2015 12:05:37 +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 A4F9B61CC9; Tue, 4 Aug 2015 12:05:31 +0000 (UTC) Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by lists.linaro.org (Postfix) with ESMTPS id C21CF61CAC for ; Tue, 4 Aug 2015 12:05:30 +0000 (UTC) Received: by wijp15 with SMTP id p15so2761181wij.0 for ; Tue, 04 Aug 2015 05:05:30 -0700 (PDT) X-Received: by 10.194.21.70 with SMTP id t6mr8174328wje.74.1438689930064; Tue, 04 Aug 2015 05:05:30 -0700 (PDT) Received: from khorivan.synapse.com ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id lz10sm1474163wjb.48.2015.08.04.05.05.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Aug 2015 05:05:29 -0700 (PDT) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Tue, 4 Aug 2015 15:05:21 +0300 Message-Id: <1438689921-30362-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [Patch] performance: odp_pktio_perf: use real MAC addresses while packet creation X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.khoronzhuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 It's needed as pktio is not set in promisc mode. Signed-off-by: Ivan Khoronzhuk --- test/performance/odp_pktio_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 08f13b6..fe4261e 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -169,7 +169,6 @@ static odp_packet_t pktio_create_packet(void) uint32_t offset; pkt_head_t pkt_hdr; size_t payload_len; - uint8_t mac[ODPH_ETHADDR_LEN] = {0}; payload_len = sizeof(pkt_hdr) + gbl_args->args.pkt_len; @@ -186,8 +185,9 @@ static odp_packet_t pktio_create_packet(void) offset = 0; odp_packet_l2_offset_set(pkt, offset); eth = (odph_ethhdr_t *)buf; - memcpy(eth->src.addr, mac, ODPH_ETHADDR_LEN); - memcpy(eth->dst.addr, mac, ODPH_ETHADDR_LEN); + odp_pktio_mac_addr(gbl_args->pktio_tx, eth->src.addr, ODPH_ETHADDR_LEN); + odp_pktio_mac_addr(gbl_args->pktio_rx, eth->dst.addr, ODPH_ETHADDR_LEN); + eth->type = odp_cpu_to_be_16(ODPH_ETHTYPE_IPV4); /* IP */