From patchwork Thu May 8 04:01:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Hsu X-Patchwork-Id: 29817 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3859820534 for ; Thu, 8 May 2014 04:05:57 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 200sf3995702ykr.6 for ; Wed, 07 May 2014 21:05:57 -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:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=hhSk1uel8z5LuFFpxRqOrDRQgWZdQos/4sQc3JZjBTY=; b=BjN/Llpz1XQYNDvpof8kIAQEM4Q0lNUW0yhWdzSVc60Aj9V9Dn/yGtt29fdGnlomZo aQXgPGyy8pGuK2KhEA4Ybt5sy7xaTmI55PiPYwtifprc/tJPODzNEFte223OL8aXDJsi PC9typqTOuDsO9ZNp9uFja+W5ztyq6ab5am8RTTfokCKfmv0g0qOykgHw/v8ltRkOoXU AwEOL3eLdcgwhn/4E3/gImrbPJfMJfE6JqqfX8qaD7dgMtz41lgPcuD6ti28TW9G9iop IxKB1x4UIVhThTODd02tcB68Xaxw26smMS4IrzTyNT9qaqX7x/+50ety4WjNrgtCYIbt OtEQ== X-Gm-Message-State: ALoCoQlXC8fGk7DWGmVoPY/ayVTqaue4g+dFRYdV15g/jarHbO7Am+3ZCwp9rFSiCj4gpwNRm1lB X-Received: by 10.236.121.238 with SMTP id r74mr460596yhh.23.1399521957230; Wed, 07 May 2014 21:05:57 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.118 with SMTP id x109ls3571118qge.74.gmail; Wed, 07 May 2014 21:05:57 -0700 (PDT) X-Received: by 10.52.110.105 with SMTP id hz9mr844958vdb.9.1399521957102; Wed, 07 May 2014 21:05:57 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id sg6si2059605vdc.9.2014.05.07.21.05.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 21:05:57 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if11so2525279vcb.22 for ; Wed, 07 May 2014 21:05:57 -0700 (PDT) X-Received: by 10.220.81.194 with SMTP id y2mr986238vck.29.1399521957022; Wed, 07 May 2014 21:05:57 -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.220.221.72 with SMTP id ib8csp362549vcb; Wed, 7 May 2014 21:05:56 -0700 (PDT) X-Received: by 10.140.34.228 with SMTP id l91mr1138935qgl.85.1399521956487; Wed, 07 May 2014 21:05:56 -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 v6si7760021qas.229.2014.05.07.21.05.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 07 May 2014 21:05:56 -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 1WiFa5-0003wK-7O; Thu, 08 May 2014 04:05:13 +0000 Received: from mail-vc0-f176.google.com ([209.85.220.176]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WiFZy-0003vc-NE for lng-odp@lists.linaro.org; Thu, 08 May 2014 04:05:06 +0000 Received: by mail-vc0-f176.google.com with SMTP id lg15so2534329vcb.7 for ; Wed, 07 May 2014 21:05:43 -0700 (PDT) X-Received: by 10.52.2.229 with SMTP id 5mr890853vdx.24.1399521943613; Wed, 07 May 2014 21:05:43 -0700 (PDT) Received: from team1.fj ([124.219.7.128]) by mx.google.com with ESMTPSA id ee5sm35419681vdb.8.2014.05.07.21.05.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 21:05:43 -0700 (PDT) From: Vincent Hsu To: lng-odp@lists.linaro.org Date: Thu, 8 May 2014 12:01:36 +0800 Message-Id: <1399521696-2265-1-git-send-email-vincent.hsu@linaro.org> X-Mailer: git-send-email 1.8.5 X-Topics: patch Subject: [lng-odp] [APP PATCH] libpcap: use updated ODP API 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: vincent.hsu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 Signed-off-by: Vincent Hsu --- libpcap/patches/0003-ODP-API-Updates.patch | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 libpcap/patches/0003-ODP-API-Updates.patch diff --git a/libpcap/patches/0003-ODP-API-Updates.patch b/libpcap/patches/0003-ODP-API-Updates.patch new file mode 100644 index 0000000..d53cae2 --- /dev/null +++ b/libpcap/patches/0003-ODP-API-Updates.patch @@ -0,0 +1,38 @@ +From 984497e40e16a4b1594db0d5a64b338012a981de Mon Sep 17 00:00:00 2001 +From: Vincent Hsu +Date: Thu, 8 May 2014 11:32:03 +0800 +Subject: [PATCH] ODP API Updates + +1. odp_schedule(NULL) -> odp_schedule(NULL, ODP_SCHED_WAIT); +2. ODP_SCHED_SYNC_NONE -> ODP_SCHED_SYNC_ATOMIC + +Signed-off-by: Vincent Hsu +--- + pcap-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pcap-linux.c b/pcap-linux.c +index 4372be6..feebd20 100644 +--- a/pcap-linux.c ++++ b/pcap-linux.c +@@ -6207,7 +6207,7 @@ pcap_odp_init(pcap_t *handle) + * resource + */ + qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; +- qparam.sched.sync = ODP_SCHED_SYNC_NONE; ++ qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; + qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + snprintf(inq_name, sizeof(inq_name), "%i-pktio_inq_def", + (int)handle->pktio); +@@ -6364,7 +6364,7 @@ pcap_read_odp(pcap_t *handle, int max_packets, pcap_handler callback, + + for (n = 1; (n <= max_packets) || (max_packets < 0); n++) { + /* Use schedule to get buf from any input queue */ +- buf = odp_schedule(NULL); ++ buf = odp_schedule(NULL, ODP_SCHED_WAIT); + /* fill out pcap_header */ + gettimeofday(&ts, NULL); + pcap_header.ts = ts; +-- +1.8.5 +