From patchwork Thu Jun 11 10:00:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 49737 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F2ACF2460E for ; Thu, 11 Jun 2015 10:01:03 +0000 (UTC) Received: by lagh7 with SMTP id h7sf738941lag.2 for ; Thu, 11 Jun 2015 03:01:03 -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=g+ikrpISVAnzMNJfx5zVkLj1/c2vDGQLEE4KkF1+ICQ=; b=Fz5ew2KiF/PIBULznhHRThT6yKfoXZNV8oXpxtwhR96x8S4R+Niy2UWwpzjZ+RiXTt Eo1FEqw3aoXgyBI1o6lJzsgmJSMMhdcnkj5hfDKeorSIB+ObghiQ+UTmii4JA/6qLubA MWJU4gSM/V1M3LcLcgqz2JXqwUn23FyGB194uWhAvERpj0973o7ORckSHPX2PQToCorJ 9YECcIy6m4eotjQCA7Frt4iPZ5dtOlL4sEQedU5/Z5KzvKFDxSkG9D8dQiR0anXBHx0N 6vx98iQd7oWsm6j1NpVbnDAVFHRB3+c8TN7GzGv5gW+GMKzNnrVXXdLbYyGir/X4b6p+ c59Q== X-Gm-Message-State: ALoCoQnVNizZru2A1SWcDR/3mgv2Fmo74yuOD3w1eT4rGyFLpHex4tR34bB/ufGLcSBpPItiroQN X-Received: by 10.112.219.200 with SMTP id pq8mr7616564lbc.7.1434016862952; Thu, 11 Jun 2015 03:01:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.9 with SMTP id ky9ls316299lab.98.gmail; Thu, 11 Jun 2015 03:01:02 -0700 (PDT) X-Received: by 10.152.121.99 with SMTP id lj3mr8773933lab.37.1434016862799; Thu, 11 Jun 2015 03:01:02 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id k9si137582lah.119.2015.06.11.03.01.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 03:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbcue7 with SMTP id ue7so1490820lbc.0 for ; Thu, 11 Jun 2015 03:01:02 -0700 (PDT) X-Received: by 10.112.182.4 with SMTP id ea4mr9133291lbc.35.1434016862658; Thu, 11 Jun 2015 03:01:02 -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.108.230 with SMTP id hn6csp3921850lbb; Thu, 11 Jun 2015 03:01:01 -0700 (PDT) X-Received: by 10.55.17.79 with SMTP id b76mr16813136qkh.70.1434016861393; Thu, 11 Jun 2015 03:01:01 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 142si125203qhr.18.2015.06.11.03.00.58; Thu, 11 Jun 2015 03:01:01 -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 298A561FEF; Thu, 11 Jun 2015 10:00:58 +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 80D6061FC7; Thu, 11 Jun 2015 10:00:56 +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 EA4FA61DA1; Thu, 11 Jun 2015 10:00:54 +0000 (UTC) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by lists.linaro.org (Postfix) with ESMTPS id 143E961DA1 for ; Thu, 11 Jun 2015 10:00:54 +0000 (UTC) Received: by wigg3 with SMTP id g3so71072703wig.1 for ; Thu, 11 Jun 2015 03:00:53 -0700 (PDT) X-Received: by 10.194.63.16 with SMTP id c16mr15093873wjs.105.1434016853213; Thu, 11 Jun 2015 03:00:53 -0700 (PDT) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::1]) by mx.google.com with ESMTPSA id y19sm853579wia.15.2015.06.11.03.00.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jun 2015 03:00:52 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Thu, 11 Jun 2015 11:00:21 +0100 Message-Id: <1434016821-16110-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH v2] validation: pktio: generate valid test packets 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: stuart.haslam@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.180 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 The test generates UDP packets with the source and destination port numbers set to 0 and source and destination IP addresses of 0.0.0.0, which is likely to cause them to be dropped and the test failing. Fix this by correctly initialising the packet fields to use valid values. Reported-by: Balasubramanian Manoharan Signed-off-by: Stuart Haslam --- This is a fix for; https://bugs.linaro.org/show_bug.cgi?id=1632 test/validation/odp_pktio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index e1025d6..3586542 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -154,8 +154,8 @@ static uint32_t pktio_init_packet(odp_packet_t pkt) /* IP */ odp_packet_l3_offset_set(pkt, ODPH_ETHHDR_LEN); ip = (odph_ipv4hdr_t *)(buf + ODPH_ETHHDR_LEN); - ip->dst_addr = odp_cpu_to_be_32(0); - ip->src_addr = odp_cpu_to_be_32(0); + ip->dst_addr = odp_cpu_to_be_32(0x0a000064); + ip->src_addr = odp_cpu_to_be_32(0x0a000001); ip->ver_ihl = ODPH_IPV4 << 4 | ODPH_IPV4HDR_IHL_MIN; ip->tot_len = odp_cpu_to_be_16(pkt_len - ODPH_ETHHDR_LEN); ip->ttl = 128; @@ -168,8 +168,8 @@ static uint32_t pktio_init_packet(odp_packet_t pkt) /* UDP */ odp_packet_l4_offset_set(pkt, ODPH_ETHHDR_LEN + ODPH_IPV4HDR_LEN); udp = (odph_udphdr_t *)(buf + ODPH_ETHHDR_LEN + ODPH_IPV4HDR_LEN); - udp->src_port = odp_cpu_to_be_16(0); - udp->dst_port = odp_cpu_to_be_16(0); + udp->src_port = odp_cpu_to_be_16(12049); + udp->dst_port = odp_cpu_to_be_16(12050); udp->length = odp_cpu_to_be_16(pkt_len - ODPH_ETHHDR_LEN - ODPH_IPV4HDR_LEN); udp->chksum = 0;