From patchwork Tue Dec 19 17:00:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 122401 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4424378qgn; Tue, 19 Dec 2017 09:08:47 -0800 (PST) X-Google-Smtp-Source: ACJfBotG1Wk8mcbaT7eifGHdHQ22ccoDFmJQY+FNzcNe8P1FtmfsN1AABMXwH2CIm7lTTK0nX6fO X-Received: by 10.200.28.7 with SMTP id a7mr6049942qtk.206.1513703327338; Tue, 19 Dec 2017 09:08:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513703327; cv=none; d=google.com; s=arc-20160816; b=Sp19/vE7vLHSur05KWgrvchSRW5w3BUXki4yPq1QBNFVXCyozsICIUYVnjBs8XCn6y DK/xND8iaZ7aAFjVluOItcXaXAGemDP6ZmsorXSN3tLFXAJaRtAThIHgsDg2ujxTivfL WCGoQoWVKJwu3axQCGJVs1cNMhaEMV6pJiBtXYukA2oK4M2E53Mg+yA6nOcFT5SZEkq4 y6NLpspV6xV9P36FZM5m2AB/SsZz4GydxdhZMHG1/HLGlybZiJqjUpUsTaAJy0ymwPRw eYOXrlwQs6PK/G9gdoMN0pAMmjQUweBDJ5fjVXghJnKMi1W34NAXO0AHKskZphXWdU+P xAKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=U+hqF1IcLEIAvhekhqfy7mw0F8OqTSx0dIxHfKrcWzM=; b=WRJxKCyAzQEfHyVLA9EFXVT9OXFJlgaYb/GRoM6AJt39mzTPenXg+hKD0wr3BvUWyA IycuSpzGgt38Ncs/XzuC3rQ5NM5xD42moke2+NOR5wj3WXBJTSbqvd0prygbRtPxgfhT Ld+HQ+7W1U63zRbP8IR5jBKaiDeKVZEHB2Kk8MD0EQpeM44u2ni7UUgIdefM5ramQLDd MswLw2p9mxbYsewuG85FtaFjCAqJdotPTjLkmHQ+oQm7FUdEXDdREik6e6FzPFkmaThU 13Y17UdLXJH2B37uvH+GGP4dgfE3p2L0jFzaXrUSSF9NBVon5yf3BVrrS3jefzP11TH3 FrxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id p63si424513qkb.296.2017.12.19.09.08.46; Tue, 19 Dec 2017 09:08:47 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id C08DC61516; Tue, 19 Dec 2017 17:08:46 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 EADAF6151A; Tue, 19 Dec 2017 17:03:29 +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 DE86461522; Tue, 19 Dec 2017 17:03:20 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id E959E608E7 for ; Tue, 19 Dec 2017 17:01:23 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 949722184561 for ; Tue, 19 Dec 2017 20:01:05 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id p8G0TCW9ir-15Y4cE11; Tue, 19 Dec 2017 20:01:05 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fHOaUHATqc-15YOT6TC; Tue, 19 Dec 2017 20:01:05 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 19 Dec 2017 20:00:56 +0300 Message-Id: <1513702859-14312-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513702859-14312-1-git-send-email-odpbot@yandex.ru> References: <1513702859-14312-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 338 Subject: [lng-odp] [PATCH API-NEXT v3 2/5] linux-gen: adapt to odp_pktio_parser_layer_t removal 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 338 (lumag:pktio_parse_layer) ** https://github.com/Linaro/odp/pull/338 ** Patch: https://github.com/Linaro/odp/pull/338.patch ** Base sha: 12fd3a9224a856271934986a1bad981843915d68 ** Merge commit sha: f11c958e9552610bd1305f996e17c6b79a209a7e **/ platform/linux-generic/include/odp_packet_internal.h | 4 ++-- platform/linux-generic/odp_classification.c | 2 +- platform/linux-generic/odp_packet.c | 10 +++++----- platform/linux-generic/odp_packet_io.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 0f661679e..346c2dc6f 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -296,11 +296,11 @@ int packet_alloc_multi(odp_pool_t pool_hdl, uint32_t len, /* Perform packet parse up to a given protocol layer */ int packet_parse_layer(odp_packet_hdr_t *pkt_hdr, - odp_pktio_parser_layer_t layer); + odp_proto_layer_t layer); /* Perform L3 and L4 parsing up to a given protocol layer */ int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr, - odp_pktio_parser_layer_t layer, + odp_proto_layer_t layer, uint32_t l3_offset, uint16_t ethtype); diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index 025f12593..276430923 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -973,7 +973,7 @@ int cls_classify_packet(pktio_entry_t *entry, const uint8_t *base, packet_set_len(pkt_hdr, pkt_len); packet_parse_common(&pkt_hdr->p, base, pkt_len, seg_len, - ODP_PKTIO_PARSER_LAYER_ALL); + ODP_PROTO_LAYER_ALL); cos = cls_select_cos(entry, base, pkt_hdr); if (cos == NULL) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index cf76df72c..72d1ca625 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2211,7 +2211,7 @@ int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr, prs->l3_offset = offset; - if (layer <= ODP_PKTIO_PARSER_LAYER_L2) + if (layer <= ODP_PROTO_LAYER_L2) return prs->error_flags.all != 0; /* Set l3 flag only for known ethtypes */ @@ -2242,7 +2242,7 @@ int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr, ip_proto = 255; /* Reserved invalid by IANA */ } - if (layer == ODP_PKTIO_PARSER_LAYER_L3) + if (layer == ODP_PROTO_LAYER_L3) return prs->error_flags.all != 0; /* Set l4 flag only for known ip_proto */ @@ -2314,7 +2314,7 @@ int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr, parseptr = ptr; offset = 0; - if (layer == ODP_PKTIO_PARSER_LAYER_NONE) + if (layer == ODP_PROTO_LAYER_NONE) return 0; /* Assume valid L2 header, no CRC/FCS check in SW */ @@ -2333,7 +2333,7 @@ int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr, * Simple packet parser */ int packet_parse_layer(odp_packet_hdr_t *pkt_hdr, - odp_pktio_parser_layer_t layer) + odp_proto_layer_t layer) { uint32_t seg_len = packet_first_seg_len(pkt_hdr); void *base = packet_data(pkt_hdr); @@ -2343,7 +2343,7 @@ int packet_parse_layer(odp_packet_hdr_t *pkt_hdr, } int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr, - odp_pktio_parser_layer_t layer, + odp_proto_layer_t layer, uint32_t l3_offset, uint16_t ethtype) { diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index aa6cdb068..ffbc73b26 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -998,7 +998,7 @@ void odp_pktio_config_init(odp_pktio_config_t *config) { memset(config, 0, sizeof(odp_pktio_config_t)); - config->parser.layer = ODP_PKTIO_PARSER_LAYER_ALL; + config->parser.layer = ODP_PROTO_LAYER_ALL; } int odp_pktio_info(odp_pktio_t hdl, odp_pktio_info_t *info) @@ -1203,7 +1203,7 @@ int odp_pktio_capability(odp_pktio_t pktio, odp_pktio_capability_t *capa) /* The same parser is used for all pktios */ if (ret == 0) - capa->config.parser.layer = ODP_PKTIO_PARSER_LAYER_ALL; + capa->config.parser.layer = ODP_PROTO_LAYER_ALL; return ret; }