From patchwork Tue Jan 13 19:00:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 43084 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3512226CFB for ; Tue, 13 Jan 2015 19:00:25 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id w61sf2628665wes.0 for ; Tue, 13 Jan 2015 11:00:24 -0800 (PST) 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: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=vmjeGxDG9Q03i17kvj/JYyLN56WUCyd3jCNe5uNr0bU=; b=QXjO4KPPIbi7nlSGf6x1sIbggvtWQR/ynxFME+WTtBfXHN6IgiadQRwMvkVUqjIQ0z /EK0xK6tCi0SWxNtor2lVcNDtCkZK1tNLEBH82/imZlNxSe7N4h9uQdoAdPwOvGD9aYV cK2KH5uwRfUGdLwJAxlRMfwcgm0NAZu0CWv2x4JdmGBxeayWk19JdIvJoJJxdSh39vVO SGt1bT/T/9QBrh3zKVbGGuyVfWsLAgE/a6rAe6Rif6E/CmpouW+lmk9D28jDBMt2rR0b WSSbWBYmbPScxEAgWUNU0vJnuXviEAegB+4BkJ8ebYTJDsURcpFXdGdZCvd6wdz8leGJ EF3g== X-Gm-Message-State: ALoCoQnu1Jvokb7V5p9d13iSNdbSyKD5Cm3Ocd+T7ITDq2wtSt48IXVGr/SRbHF48NrcBePzHreC X-Received: by 10.112.154.232 with SMTP id vr8mr555684lbb.10.1421175624425; Tue, 13 Jan 2015 11:00:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.176 with SMTP id az16ls27494lab.87.gmail; Tue, 13 Jan 2015 11:00:24 -0800 (PST) X-Received: by 10.112.156.169 with SMTP id wf9mr43714428lbb.85.1421175624280; Tue, 13 Jan 2015 11:00:24 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id le3si3758200lac.43.2015.01.13.11.00.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Jan 2015 11:00:23 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gq15so4319466lab.4 for ; Tue, 13 Jan 2015 11:00:23 -0800 (PST) X-Received: by 10.152.27.8 with SMTP id p8mr44346456lag.69.1421175623863; Tue, 13 Jan 2015 11:00:23 -0800 (PST) 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.9.200 with SMTP id c8csp1471749lbb; Tue, 13 Jan 2015 11:00:23 -0800 (PST) X-Received: by 10.224.89.2 with SMTP id c2mr16275577qam.75.1421175622519; Tue, 13 Jan 2015 11:00:22 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id n61si27934925qge.70.2015.01.13.11.00.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 13 Jan 2015 11:00:22 -0800 (PST) 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-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YB6hP-0007ia-9q; Tue, 13 Jan 2015 19:00:19 +0000 Received: from mail-la0-f47.google.com ([209.85.215.47]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YB6hI-0007iS-Ai for lng-odp@lists.linaro.org; Tue, 13 Jan 2015 19:00:12 +0000 Received: by mail-la0-f47.google.com with SMTP id hz20so4309011lab.6 for ; Tue, 13 Jan 2015 11:00:06 -0800 (PST) X-Received: by 10.112.142.201 with SMTP id ry9mr44155323lbb.4.1421175606500; Tue, 13 Jan 2015 11:00:06 -0800 (PST) Received: from localhost.localdomain (broadband-46-188-125-104.2com.net. [46.188.125.104]) by mx.google.com with ESMTPSA id ao2sm1071287lac.8.2015.01.13.11.00.05 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Jan 2015 11:00:05 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 13 Jan 2015 22:00:00 +0300 Message-Id: <1421175600-26213-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: patch Subject: [lng-odp] [PATCH] segfault with mmap sockets 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: , MIME-Version: 1.0 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: maxim.uvarov@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.215.45 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 Does somebody already works on that? I see that only mmap case crashes with corrupted ring. If not I will debug that tomorrow. Program terminated with signal 11, Segmentation fault. if_mac=0x2b1409dc7fa0 "") at odp_packet_socket.c:486 486 if (mmap_rx_kernel_ready(ring->rd[frame_num].iov_base)) { (gdb) bt if_mac=0x2b1409dc7fa0 "") at odp_packet_socket.c:486 at odp_packet_socket.c:500 Backtrace stopped: frame did not save the PC (gdb) p ring $1 = (struct ring *) 0x3000000000000000 --- test/validation/odp_pktio.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index d1eb0d5..d462bfa 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -205,6 +205,7 @@ static odp_pktio_t create_pktio(const char *iface) char pool_name[ODP_BUFFER_POOL_NAME_LEN]; odp_buffer_pool_param_t params; + printf("openning dev %s\n", iface); params.buf_size = PKT_BUF_SIZE; params.buf_align = 0; params.num_bufs = PKT_BUF_NUM; @@ -472,6 +473,19 @@ static void test_odp_pktio_mac(void) return; } +static void test_odp_pktio_segtest(void) +{ + odp_pktio_t pktio = create_pktio(iface_name[0]); + int i; + + CU_ASSERT(pktio != ODP_PKTIO_INVALID); + + CU_ASSERT(create_inq(pktio) == 0); + + for (i = 0; i < 100; i++) + odp_schedule(NULL, ODP_TIME_MSEC); +} + static void test_odp_pktio_open(void) { odp_pktio_t pktio; @@ -510,7 +524,11 @@ static void test_odp_pktio_inq(void) { odp_pktio_t pktio; + printf("openning dev %s\n", iface_name[0]); + pktio = create_pktio(iface_name[0]); + + CU_ASSERT(pktio != ODP_PKTIO_INVALID); CU_ASSERT(create_inq(pktio) == 0); @@ -582,6 +600,7 @@ CU_TestInfo pktio_tests[] = { {"pktio mtu", test_odp_pktio_mtu}, {"pktio promisc mode", test_odp_pktio_promisc}, {"pktio mac", test_odp_pktio_mac}, + {"pktio segtest", test_odp_pktio_segtest}, CU_TEST_INFO_NULL };