From patchwork Mon Nov 17 22:59:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 40977 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 07C9F21F5F for ; Mon, 17 Nov 2014 22:59:56 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf1656036wgg.11 for ; Mon, 17 Nov 2014 14:59:55 -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:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=iY2B2dN59WQ0woQeISFyuAuLOivAh6vxAegpsAcD1Yk=; b=JEyQ5bNH2x4iBjcQeK7kP4S5LDCZvP0dshQGOINnL0DNGYZh4R7hS3eFbr4rl2LBsa uG3oaHboYPT9IcTym+qitAd+7IyD7Qz8BPJbq3ggRRpCXdED21Dsl2gssrDobSWuD2KM ZRuaiyHKDiRLXX/ACjrMZ7WOLVVByW+aIm9wPbjjOzQ45JJD53gR+Og0WeFPmY4DtdI9 jFkpTluTbZIAewXJ5N6nRbF2jAcaVxL78ZmUPOPXo5lGRtnat2a0WKRyTZV3YYahJ4AV pYWU8T8F8MTwR/KTVbUF94ZjbZLeF4KXp4qGV/mI+bI+euboqmFw0PwJTdH9ewA/JBO8 6IsQ== X-Gm-Message-State: ALoCoQlxp+0p9N+/jJlnnTkIul8vkWrOZ1XGdYntHRa0O6dwOB3/33GTyz3awW6WmMnk5e/EvHKu X-Received: by 10.180.189.116 with SMTP id gh20mr1814213wic.2.1416265195323; Mon, 17 Nov 2014 14:59:55 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.12 with SMTP id s12ls529659lal.26.gmail; Mon, 17 Nov 2014 14:59:54 -0800 (PST) X-Received: by 10.112.173.39 with SMTP id bh7mr31827435lbc.53.1416265194398; Mon, 17 Nov 2014 14:59:54 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id nb4si53685100lbb.35.2014.11.17.14.59.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 14:59:54 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id w7so8272547lbi.33 for ; Mon, 17 Nov 2014 14:59:54 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr30959307lbc.66.1416265193955; Mon, 17 Nov 2014 14:59:53 -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.184.201 with SMTP id ew9csp1244970lbc; Mon, 17 Nov 2014 14:59:53 -0800 (PST) X-Received: by 10.224.80.71 with SMTP id s7mr37243255qak.35.1416265192633; Mon, 17 Nov 2014 14:59:52 -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 lb6si5178007qcb.25.2014.11.17.14.59.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Nov 2014 14:59:52 -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 1XqVGt-0008Im-M0; Mon, 17 Nov 2014 22:59:47 +0000 Received: from mail-ob0-f170.google.com ([209.85.214.170]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XqVGm-0008Ic-Rk for lng-odp@lists.linaro.org; Mon, 17 Nov 2014 22:59:40 +0000 Received: by mail-ob0-f170.google.com with SMTP id nt9so18097565obb.29 for ; Mon, 17 Nov 2014 14:59:35 -0800 (PST) X-Received: by 10.202.196.206 with SMTP id u197mr15036864oif.21.1416265175437; Mon, 17 Nov 2014 14:59:35 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id wk3sm5285552obc.3.2014.11.17.14.59.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 14:59:34 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 17 Nov 2014 16:59:26 -0600 Message-Id: <1416265167-2611-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] Uplevel example programs to ODP v1.0 APIs for odp_packet_flags.h 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: bill.fischofer@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.174 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 This patch updates the ODP example programs to reflect the specified odp_packet_flags.h API name changes. Signed-off-by: Bill Fischofer --- example/generator/odp_generator.c | 2 +- example/ipsec/odp_ipsec.c | 4 ++-- example/ipsec/odp_ipsec_stream.c | 4 ++-- example/packet/odp_pktio.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index ffa5e62..b630e17 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -392,7 +392,7 @@ static void print_pkts(int thr, odp_packet_t pkt_tbl[], unsigned len) rlen = 0; /* only ip pkts */ - if (!odp_packet_inflag_ipv4(pkt)) + if (!odp_packet_has_ipv4(pkt)) continue; odp_atomic_inc_u64(&counters.ip); diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index da6c48e..908bd95 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example/ipsec/odp_ipsec.c @@ -617,10 +617,10 @@ pkt_disposition_e do_input_verify(odp_packet_t pkt, pkt_ctx_t *ctx ODP_UNUSED) if (odp_unlikely(odp_packet_error(pkt))) return PKT_DROP; - if (!odp_packet_inflag_eth(pkt)) + if (!odp_packet_has_eth(pkt)) return PKT_DROP; - if (!odp_packet_inflag_ipv4(pkt)) + if (!odp_packet_has_ipv4(pkt)) return PKT_DROP; return PKT_CONTINUE; diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c index fa9aba8..f0ffe23 100644 --- a/example/ipsec/odp_ipsec_stream.c +++ b/example/ipsec/odp_ipsec_stream.c @@ -195,7 +195,7 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream, data = odp_packet_data(pkt); /* Ethernet */ - odp_packet_set_inflag_eth(pkt, 1); + odp_packet_set_has_eth(pkt, 1); odp_packet_set_l2_offset(pkt, data - base); eth = (odph_ethhdr_t *)data; data += sizeof(*eth); @@ -205,7 +205,7 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream, eth->type = odp_cpu_to_be_16(ODPH_ETHTYPE_IPV4); /* IPv4 */ - odp_packet_set_inflag_ipv4(pkt, 1); + odp_packet_set_has_ipv4(pkt, 1); odp_packet_set_l3_offset(pkt, data - base); ip = (odph_ipv4hdr_t *)data; data += sizeof(*ip); diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index 2cf3f0d..afa2ac7 100644 --- a/example/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -455,14 +455,14 @@ static void swap_pkt_addrs(odp_packet_t pkt_tbl[], unsigned len) for (i = 0; i < len; ++i) { pkt = pkt_tbl[i]; - if (odp_packet_inflag_eth(pkt)) { + if (odp_packet_has_eth(pkt)) { eth = (odph_ethhdr_t *)odp_packet_l2(pkt); tmp_addr = eth->dst; eth->dst = eth->src; eth->src = tmp_addr; - if (odp_packet_inflag_ipv4(pkt)) { + if (odp_packet_has_ipv4(pkt)) { /* IPv4 */ ip = (odph_ipv4hdr_t *)odp_packet_l3(pkt);