From patchwork Mon Aug 25 14:44:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 35922 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7CD69203C0 for ; Mon, 25 Aug 2014 14:45:38 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id vb8sf79301093obc.4 for ; Mon, 25 Aug 2014 07:45:38 -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:from:to:date:message-id :mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=6PRx8GJVLpoSIHz9pcOi0qxpProi2irCxsOlT8D+OOg=; b=hRTu8o/iyw/Flfr3Ml4XZU+7aYBWfaVZrJcxpIX7ZgHolwW+2aNA+uT6jx8Wl+ECD6 D1l3427EJrh/Lc/FKf+SsjC0YJRuEuQT1cZboPYCMGXFKfY4XZpW3hUYMOpo2asxnQ5k RY6TDbgyFPzkd5vX2TUGfg/xzPcQLJG1I+fF5DZQNDr2GzVoSWi8qZ3SPRUo7H4x1IGs joBurYXAnEgvUPv2zGyTyRTFtKGCc3hi3NfgUX1XGWL04Mn+holocwHX3BSaLfBrpshL NwtHm0bbpXgj9aS3XTLtT0CXKqugFtQNCbKmip4OL4+llk4yYZ1oKxBZ1fTDQEv17Sbv 4fcw== X-Gm-Message-State: ALoCoQnuOZt7e1E9xy4NIVXxIppvhfAykT4L0AqR5fdT7Kv6sogoyNO3lih4+17l+J1V+nP6jPKC X-Received: by 10.182.68.17 with SMTP id r17mr13856506obt.26.1408977938104; Mon, 25 Aug 2014 07:45:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.148 with SMTP id 20ls2081907qgt.86.gmail; Mon, 25 Aug 2014 07:45:37 -0700 (PDT) X-Received: by 10.53.2.10 with SMTP id bk10mr676978vdd.48.1408977937919; Mon, 25 Aug 2014 07:45:37 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id q14si15221244vds.103.2014.08.25.07.45.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Aug 2014 07:45:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id la4so15524249vcb.9 for ; Mon, 25 Aug 2014 07:45:37 -0700 (PDT) X-Received: by 10.52.120.51 with SMTP id kz19mr834895vdb.95.1408977937834; Mon, 25 Aug 2014 07:45:37 -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.221.45.67 with SMTP id uj3csp123113vcb; Mon, 25 Aug 2014 07:45:37 -0700 (PDT) X-Received: by 10.140.98.147 with SMTP id o19mr33088463qge.21.1408977937270; Mon, 25 Aug 2014 07:45:37 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id u8si54463qar.38.2014.08.25.07.45.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Aug 2014 07:45:37 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XLvWZ-00067m-Vs; Mon, 25 Aug 2014 14:45:36 +0000 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XLvWU-00067h-9b for lng-odp@lists.linaro.org; Mon, 25 Aug 2014 14:45:30 +0000 X-IronPort-AV: E=Sophos;i="5.04,397,1406617200"; d="scan'208";a="43348755" Received: from irvexchcas06.broadcom.com (HELO IRVEXCHCAS06.corp.ad.broadcom.com) ([10.9.208.53]) by mail-gw3-out.broadcom.com with ESMTP; 25 Aug 2014 08:00:24 -0700 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.3.174.1; Mon, 25 Aug 2014 07:45:23 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.174.1; Mon, 25 Aug 2014 07:45:24 -0700 Received: from localhost.localdomain (unknown [10.131.61.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id ED2919FA29; Mon, 25 Aug 2014 07:45:14 -0700 (PDT) From: To: Date: Mon, 25 Aug 2014 20:14:53 +0530 Message-ID: <1408977894-18407-1-git-send-email-venkatesh.vivekanandan@linaro.org> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-Topics: patch Subject: [lng-odp] [PATCH] Patch to test multi-queue support on ODP-DPDK without Ixia X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkatesh.vivekanandan@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.220.178 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 From: Venkatesh Vivekanandan setup: - connect two ixgbe/igb cards to x86 box which has atleast 4 cpus. - Lets say we have eth0 & eth1 in one card and eth2 & eth3 in other card - eth0 and eth2 are connected back to back using cross cable(1g) or fibre(10g) - Similarly connect eth1 and eth3 test: - say eth2 and eth3 are given to dpdk on which odp-dpdk l2fwd app is running. cmd is ./example/l2fwd/odp_l2fwd -i 0,1 -m 0 - ensure eth0 and eth1 are brought up and put in promiscuous mode. - start odp_generator in rx mode in eth1. cmd is ./example/generator/odp_generator -I eth1 -m r - start odp_generator in tx mode in eth0. cmd is ./example/generator/odp_generator -I eth0 --srcmac a0:36:9f:13:89:08 --dstmac a0:36:9f:13:89:c8 -m u --dstip 201.0.0.0 - replace srcmac(eth0) and dstmac(eth2) with actual mac addresses on the port. - choose suitable dstip, so that packets are distributed to different cpus on the machine. Signed-off-by: Venkatesh Vivekanandan --- example/generator/odp_generator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index b10372e..d202a8a 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -171,7 +171,7 @@ static int scan_mac(char *in, odp_ethaddr_t *des) static void pack_udp_pkt(odp_buffer_t obuf) { char *buf; - int max; + int max, i = 0; odp_packet_t pkt; odp_ethhdr_t *eth; odp_ipv4hdr_t *ip; @@ -195,6 +195,8 @@ static void pack_udp_pkt(odp_buffer_t obuf) /* ip */ odp_packet_set_l3_offset(pkt, ODP_ETHHDR_LEN); ip = (odp_ipv4hdr_t *)(buf + ODP_ETHHDR_LEN); + i = ((i+1) % 12); + args->appl.dstip = args->appl.dstip + i; ip->dst_addr = odp_cpu_to_be_32(args->appl.dstip); ip->src_addr = odp_cpu_to_be_32(args->appl.srcip); ip->ver_ihl = ODP_IPV4 << 4 | ODP_IPV4HDR_IHL_MIN;