From patchwork Tue Nov 10 18:24:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 56342 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp927674lbb; Tue, 10 Nov 2015 10:24:39 -0800 (PST) X-Received: by 10.55.76.139 with SMTP id z133mr6257887qka.30.1447179879836; Tue, 10 Nov 2015 10:24:39 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j68si3949283qgf.35.2015.11.10.10.24.39; Tue, 10 Nov 2015 10:24:39 -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; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 23F4461D2B; Tue, 10 Nov 2015 18:24:39 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID,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 4B8E661B40; Tue, 10 Nov 2015 18:24:34 +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 BC7F061D15; Tue, 10 Nov 2015 18:24:32 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by lists.linaro.org (Postfix) with ESMTPS id E570161B3F for ; Tue, 10 Nov 2015 18:24:30 +0000 (UTC) Received: by wmec201 with SMTP id c201so14612816wme.1 for ; Tue, 10 Nov 2015 10:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=PZw77pzXOJV6czxIwlzMKL/VvfFSZWmAPcy54fFO9Ns=; b=AMqd0jheP5AE3YaoZAcC4k6hgFfhlfX5GO9UjrGH7bI8avevG4WfRSN5P84+T7mTEW pBQpekzNzVhcUp388ka1UUSyxdNEq1x3T6g8Czdt+95J/bdpdZ+Bq6HanMxoa2G2vE+k cGN74CA/Blb7487h78P65jXyyuVF+jTdWPmTNysIuML9jyEsbbk/+yw6d4Y0hknE/91z KpDroz+IGwCi0yFgiD9U6VkoslNBobecsyWApfrqbOjiIoAYMKOXgsiKa8K8mVgUqpO4 iG3XFAgH11SJf2bT4FNs1cAG1aBuBXJfxRjQognXCt+9QbuodI3VBHPkDVZx8cMCV/Eh 8FoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=PZw77pzXOJV6czxIwlzMKL/VvfFSZWmAPcy54fFO9Ns=; b=PiourPlVzaDdCpY5AGbQJPjvCmj3TS6yYNAwzu6iMNr5KDHQ9SJUxlcARREErb7jJ8 STfqwaxpgAZ8OmuNdGLrA8ZORC4awtI08O7JvwzMLNxiUR2UyEjGBJvBjhkoSJieM4kt L327hwlFvX3sjtD/RweRUohiYH2jKy2pPWQWQxZSW6fpUwUDbMUDQEgQlrOAL7EBUgCa lLkzA8yHgQDh1KZ8UDJW+Fj9fMeD+6n+P68fq9DipdkJ7zF4Gwwkk9oDkMZNHOJuLosw vdzrNfyBYCEsthRK2sXq+ji9lod9lCsJzQbpaSkSR0pFI6QsXxXS72xCHK6h1czmko0y zeYw== X-Gm-Message-State: ALoCoQnvl3u+CTERnXP6O7Ax2xgC3J8pDBG0G/an6s9H+Qv/bifC5pBxxwdw+PzDHSsrB+eAkiwx X-Received: by 10.28.146.146 with SMTP id u140mr32839107wmd.85.1447179870176; Tue, 10 Nov 2015 10:24:30 -0800 (PST) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id om1sm4853711wjc.2.2015.11.10.10.24.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Nov 2015 10:24:29 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Tue, 10 Nov 2015 18:24:02 +0000 Message-Id: <1447179842-2541-2-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1447179842-2541-1-git-send-email-stuart.haslam@linaro.org> References: <1447179842-2541-1-git-send-email-stuart.haslam@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] validation: pktio: test transmit error recovery 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" After inducing a transmit error send some additional packets to ensure transmit recovers correctly. Signed-off-by: Stuart Haslam --- test/validation/pktio/pktio.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index a2da47b..41106b0 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -932,6 +932,25 @@ static void pktio_test_send_failure(void) } else { CU_FAIL("failed to receive transmitted packets\n"); } + + /* now reduce the size of the long packet and attempt to send + * again - should work this time */ + i = long_pkt_idx; + odp_packet_pull_tail(pkt_tbl[i], + odp_packet_len(pkt_tbl[i]) - + PKT_LEN_NORMAL); + pkt_seq[i] = pktio_init_packet(pkt_tbl[i]); + CU_ASSERT_FATAL(pkt_seq[i] != TEST_SEQ_INVALID); + ret = odp_pktio_send(pktio_tx, &pkt_tbl[i], TX_BATCH_LEN - i); + CU_ASSERT_FATAL(ret == (TX_BATCH_LEN - i)); + + for (; i < TX_BATCH_LEN; ++i) { + pkt_tbl[i] = wait_for_packet(&info_rx, + pkt_seq[i], ODP_TIME_SEC); + if (pkt_tbl[i] == ODP_PACKET_INVALID) + break; + } + CU_ASSERT(i == TX_BATCH_LEN); } else { CU_FAIL("failed to generate test packets\n"); }