From patchwork Fri Nov 3 14:00:09 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: 117900 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3352087edm; Fri, 3 Nov 2017 07:02:43 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TQNHiVIWE0IRlelE3Jl0pPrhZ09ao9WMx97wOESb3PATNK9c+ovAjP7m+nRjjsWHMrzlwd X-Received: by 10.55.215.28 with SMTP id m28mr5825762qki.257.1509717763594; Fri, 03 Nov 2017 07:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509717763; cv=none; d=google.com; s=arc-20160816; b=zz3KsAEatVLjdo31pmZgiJ3wEeLb9R9frbqS+M21+1wzS+QsEhGwSsk0OLcwn34cYc 63wAN4haB+cZxRUBTJrwxeep2X3XIRILdgsCzC6+DEqOniueQaCzD5/bgUxN/xx62J8h GDaiMeBJ/cMeB3015RWtdLvxZuVrqPXa59hM2x0NavRg6BBhS/v4IyQ/hvACNrE1MCiE sdkLmfqAhVDhtp4hjO2hf6rBXufdnunLkLHpYhZ7U0asAam7Wl7axDiHBnhQtzEN6ZGL P9lFx975rG7M7l4kqZC8Z6P2Al+BUfwhu/ZF/RpT6wyS7olsFdDo1bs68maUFwOvH+o3 c8TQ== 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=+iTo6S8UWP7HtPIT2EYFK4flWLdTm7QWesz5gaxfDPk=; b=p6fmLP0fjmRL+tLLvweSAf+DTLipZDImY5AnbetfxUtfrWrF+RN7BATBdGK/+B527u 3T4smtmG7VD692i6OGWSbGWAvQhb4W9Hpbc3lhgz5vlHyfJptO9oiT1QXxKeJvsfiPaz t/FTogA5yo4N+nEBKmPR5LSgtnZGqrVDEQc5tTuHYCJtDRnsuBcoul+tyAYhpGR2Eyyk acXpDlBupUnsVWM1fgqSyZOLiob0bC102SgkNlBfaMT1ZQn1DZq2ic3ShXl3ynJ+0JV+ XlwSJGAdNMfbdBv/isJ6MZ/p5pHefoZ2VxZWJf3rmmFIlG0U6VfQfajFSSgV+NHjJWjt XdhQ== 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 g15si1108048qtf.204.2017.11.03.07.02.42; Fri, 03 Nov 2017 07:02:43 -0700 (PDT) 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 CE56A61041; Fri, 3 Nov 2017 14:02:42 +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_H3,RCVD_IN_MSPIKE_WL,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 BEC0D61046; Fri, 3 Nov 2017 14:00:33 +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 A33BD6102E; Fri, 3 Nov 2017 14:00:18 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id 1E2076050D for ; Fri, 3 Nov 2017 14:00:15 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward105j.mail.yandex.net (Yandex) with ESMTP id EB335181DD8 for ; Fri, 3 Nov 2017 17:00:12 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id vVXXAAL4AG-0CqO6q9O; Fri, 03 Nov 2017 17:00:12 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id CD6rRlXE3k-0CYK7ClF; Fri, 03 Nov 2017 17:00:12 +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: Fri, 3 Nov 2017 17:00:09 +0300 Message-Id: <1509717611-13444-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509717611-13444-1-git-send-email-odpbot@yandex.ru> References: <1509717611-13444-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 273 Subject: [lng-odp] [PATCH API-NEXT v1 1/3] api: packet: add parse functions 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: Petri Savolainen Application may need help on packet parsing e.g. after decrypt or IP reassembly of a packet. Application specifies from where to start and where to stop parsing. Implementation may be vectorized (more efficient) when multiple packets are parsed together with the same parse requirements. Signed-off-by: Petri Savolainen --- /** Email created from pull request 273 (psavol:next-packet-parse) ** https://github.com/Linaro/odp/pull/273 ** Patch: https://github.com/Linaro/odp/pull/273.patch ** Base sha: d22c949cc466bf28de559855a1cb525740578137 ** Merge commit sha: e0d94080baa0c37e77bf42dc261565b3b19571d8 **/ include/odp/api/spec/packet.h | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 3fc460641..ee33bdd7f 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -72,6 +72,51 @@ extern "C" { */ /** + * Protocol + */ +typedef enum odp_proto_t { + /** No protocol defined */ + ODP_PROTO_NONE = 0, + + /** Ethernet (including VLAN) */ + ODP_PROTO_ETH, + + /** IP (including IPv4 and IPv6) */ + ODP_PROTO_IP, + + /** UDP */ + ODP_PROTO_UDP, + + /** TCP */ + ODP_PROTO_TCP, + + /** SCTP */ + ODP_PROTO_SCTP + +} odp_proto_t; + +/** + * Protocol layer + */ +typedef enum odp_proto_layer_t { + /** No layers */ + ODP_PROTO_LAYER_NONE = 0, + + /** Layer L2 protocols (Ethernet, VLAN, etc) */ + ODP_PROTO_LAYER_L2, + + /** Layer L3 protocols (IPv4, IPv6, ICMP, IPSEC, etc) */ + ODP_PROTO_LAYER_L3, + + /** Layer L4 protocols (UDP, TCP, SCTP) */ + ODP_PROTO_LAYER_L4, + + /** All layers */ + ODP_PROTO_LAYER_ALL + +} odp_proto_layer_t; + +/** * Packet API data range specifier */ typedef struct odp_packet_data_range { @@ -1140,6 +1185,48 @@ int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset, */ /** + * Parse packet + * + * Parse protocol headers in packet data. Parsing starts at 'offset', which + * is the first header byte of protocol 'proto'. Parameter 'layer' defines the + * last layer application is interested about. Use ODP_PROTO_LAYER_ALL for all + * layers. The operation sets or resets packet metadata for all layers from + * the layer of 'proto' to the application defined last layer. Metadata of + * other layers have undefined values. + * + * @param pkt Packet handle + * @param offset Byte offset into the packet + * @param proto Protocol of the header starting at 'offset' + * @param layer Continue parsing until this layer. Must be the same or higher + * layer than the layer of 'proto'. + * + * @retval 0 on success + * @retval <0 on failure + */ +int odp_packet_parse(odp_packet_t pkt, uint32_t offset, odp_proto_t proto, + odp_proto_layer_t layer); + +/** + * Parse multiple packets + * + * Otherwise like odp_packet_parse(), but parses multiple packets. Packets may + * have unique offsets, but must start with the same protocol. Also, packets are + * parsed up to the same protocol layer. + * + * @param pkt Packet handle array + * @param offset Byte offsets into the packets + * @param num Number of packets and offsets + * @param proto Protocol of the header starting at 'offset' + * @param layer Continue parsing until this layer. Must be the same or higher + * layer than the layer of 'proto'. + * + * @retval 0 on success + * @retval <0 on failure + */ +int odp_packet_parse_multi(const odp_packet_t pkt[], const uint32_t offset[], + int num, odp_proto_t proto, odp_proto_layer_t layer); + +/** * Packet pool * * Returns handle to the packet pool where the packet was allocated from. From patchwork Fri Nov 3 14:00:10 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: 117902 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3354691edm; Fri, 3 Nov 2017 07:04:27 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QFxHv2qaXTSiDGmd511bA+XBM5hdaaOhZXIf18VSVELDn/2ETMne9OSHYMk/S6/8+XawCW X-Received: by 10.55.0.136 with SMTP id t8mr9991439qkg.286.1509717866998; Fri, 03 Nov 2017 07:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509717866; cv=none; d=google.com; s=arc-20160816; b=P+kN4qy5/YBAH8pQmAQx8TWw6V/5FITvr/cmwj6nqu9kxt9h+enzQkt+XDgwS2U3NL Zs5fM0yheUmOp375IopQF3cRIEWpzmZr1dQM96+qNU8SucapV5IIMSzgD//yeLQVRKdd lS50eJYsSejfsEIx0NuLZ43ouoc7K2WUXr2cKZm52AlQRiINAS7/MCz9RKehJzD4HZk0 X1Qc6IzgVfe/9Tq2sOQwf/n72f3Lo2q6aGHQd5uMly4dNo76925Wj9RwvNaaFhLA3sW7 OyJwiMU+n/FCAHdrjuQxzhqyHCcPgvOy5IHw05d9iX8o0OwLxI7i2yKRaqMOO1Xkcp7y IwCw== 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=IblQclPWEwbfxLYZwSNSM4P2EyrB0croFPhq9myAmeg=; b=UYL1+OjD8t9sCnnJ8G7LlBPxl5L2J+1X8nCrlVIneusyNrXUaJ3QPuUOgCo4FG3BtQ AL/u8jlxPDYvT2TC57hJhucYKPVdx05FPYcuvQXRTPfkNpQ46nx9FgOnRvBt0/4YYnzK HGu7iQI0YZScHzJGdssChzXuVfG98ybvveiioGFIbT00PUXf7q8s43ldKlkp3Zwtco19 MAzY7odqXy5wgKxCW8uM4pFZtYoNo8pNjMURkMh6l6K9MG0VPS2+hJbvl7RF/B0+0H/u O5v1qL6Pto+20u7HljWf9zsZtOTSUN9qo42Jgoxia4LOrNWpeOBzVlfTXK3qM9M6xW3a eoEw== 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 d79si5559342qkc.32.2017.11.03.07.04.26; Fri, 03 Nov 2017 07:04:26 -0700 (PDT) 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 A3B196104A; Fri, 3 Nov 2017 14:04:26 +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=-5.4 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 9719D61018; Fri, 3 Nov 2017 14:01:45 +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 81A0E61018; Fri, 3 Nov 2017 14:01:43 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id D08E560389 for ; Fri, 3 Nov 2017 14:00:22 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward105o.mail.yandex.net (Yandex) with ESMTP id DA63544411D7 for ; Fri, 3 Nov 2017 17:00:13 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id X1958SwXQM-0D2Gs8Ox; Fri, 03 Nov 2017 17:00:13 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id CD6rRlXE3k-0DYiEG2n; Fri, 03 Nov 2017 17:00:13 +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: Fri, 3 Nov 2017 17:00:10 +0300 Message-Id: <1509717611-13444-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509717611-13444-1-git-send-email-odpbot@yandex.ru> References: <1509717611-13444-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 273 Subject: [lng-odp] [PATCH API-NEXT v1 2/3] api: pktio: use common protocol layer enum 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: Petri Savolainen Use common values between pktio parser layer and packet protocol layer enums. Signed-off-by: Petri Savolainen --- /** Email created from pull request 273 (psavol:next-packet-parse) ** https://github.com/Linaro/odp/pull/273 ** Patch: https://github.com/Linaro/odp/pull/273.patch ** Base sha: d22c949cc466bf28de559855a1cb525740578137 ** Merge commit sha: e0d94080baa0c37e77bf42dc261565b3b19571d8 **/ include/odp/api/spec/packet_io.h | 11 ++++++----- platform/linux-generic/include/odp/api/plat/packet_inlines.h | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index 52af646a6..6e4f88100 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -23,6 +23,7 @@ extern "C" { #include #include #include +#include /** @defgroup odp_packet_io ODP PACKET IO * Operations on a packet Input/Output interface. @@ -381,19 +382,19 @@ typedef union odp_pktout_config_opt_t { */ typedef enum odp_pktio_parser_layer_t { /** No layers */ - ODP_PKTIO_PARSER_LAYER_NONE = 0, + ODP_PKTIO_PARSER_LAYER_NONE = ODP_PROTO_LAYER_NONE, /** Layer L2 protocols (Ethernet, VLAN, ARP, etc) */ - ODP_PKTIO_PARSER_LAYER_L2, + ODP_PKTIO_PARSER_LAYER_L2 = ODP_PROTO_LAYER_L2, /** Layer L3 protocols (IPv4, IPv6, ICMP, IPsec, etc) */ - ODP_PKTIO_PARSER_LAYER_L3, + ODP_PKTIO_PARSER_LAYER_L3 = ODP_PROTO_LAYER_L3, /** Layer L4 protocols (UDP, TCP, SCTP) */ - ODP_PKTIO_PARSER_LAYER_L4, + ODP_PKTIO_PARSER_LAYER_L4 = ODP_PROTO_LAYER_L4, /** All layers */ - ODP_PKTIO_PARSER_LAYER_ALL + ODP_PKTIO_PARSER_LAYER_ALL = ODP_PROTO_LAYER_ALL } odp_pktio_parser_layer_t; diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h index 1804fa6f2..22f5aca31 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h @@ -15,7 +15,9 @@ #include #include -#include +#include +#include +#include #include /** @internal Inline function offsets */ From patchwork Fri Nov 3 14:00:11 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: 117901 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3352662edm; Fri, 3 Nov 2017 07:03:05 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TigBZ/Gfwp12GzElHBMa9FSe+yj4+L4dFsgLboNJVWs1aSOIjXJL/0MMFwjTh60YJG7vPf X-Received: by 10.55.42.221 with SMTP id q90mr9336767qkq.299.1509717785093; Fri, 03 Nov 2017 07:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509717785; cv=none; d=google.com; s=arc-20160816; b=WodTHUZdcAE/TuSbt9zxR/jQK8rUo+ST41hdweok+56gazrRBfbRbLWPipQY0nOhrS BNujgdqnOgGk6fyXG+LEJYPvH0ItAzWJCBFoHlwIf28eodVMbSkVHQRJm7xea4R6XQWJ 8FvpPJTb07P2JLIHUvbWMjgXgN34oHS8auXIaaX/UQn73g+MZNdtZExQP1SRPPdXqmGm 02iL5C+0dq2m7RYKCIM+82tl4nG/cgOB22ZI1ZgLx2vvzX6aRV6hIX4yQN1Oe1OogNqc 2vvNYCmjyjDQ0U85Ha78iWREKoNsm/dGzxWSdFRJvoj/7Ceen3ZFc1RsL9Zcb8Kik3R+ pThw== 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=q8eX7NOrvTXb6rujmRGFnkQvXvAiVVcbvZS4AzCC62k=; b=w5tTigEO7UiFZX4I/vmqcYSh7bQi97azcKsZxEOvK7fJzUz4Xescxo/eyejqhB7M8Y VbUs4cDFCp+0xbZBII3Mq14tY7CUYWIrQUAEZmavX2TNVLWzQ1u11WB9aU+NDEB6WJx+ gtrNjJ9s1Fb5ASfjoEI+CZ/nek3LC3Lg9vHUCoZ6JMYontMOKg25ITy/8vmKK7nWrXO4 m0vfPTJDjZqm8CCnKAAVf3hY6upM6GdIczPfzaDtPVvyFOYtJwXVqm3c/KFJYGBbu2lf as7KGEVqg2PPMjKWTt5ao3yD+2BWbuTE8ewTd/wIl8CzGV12kp127EVK0RWf2Ew3hCYr l6Aw== 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 n206si101449qkn.199.2017.11.03.07.03.04; Fri, 03 Nov 2017 07:03:05 -0700 (PDT) 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 C722161047; Fri, 3 Nov 2017 14:03:04 +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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 0701F61050; Fri, 3 Nov 2017 14:00:39 +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 0A6BD61041; Fri, 3 Nov 2017 14:00:22 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 4E03160389 for ; Fri, 3 Nov 2017 14:00:15 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 495B342E75 for ; Fri, 3 Nov 2017 17:00:14 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id B6eVLnOkPg-0EpKu4aQ; Fri, 03 Nov 2017 17:00:14 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id CD6rRlXE3k-0DYuGxuo; Fri, 03 Nov 2017 17:00:13 +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: Fri, 3 Nov 2017 17:00:11 +0300 Message-Id: <1509717611-13444-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509717611-13444-1-git-send-email-odpbot@yandex.ru> References: <1509717611-13444-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 273 Subject: [lng-odp] [PATCH API-NEXT v1 3/3] api: ipsec: use common protocol layer enum 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: Petri Savolainen Use common values between ipsec parse and packet protocol layer enums. Signed-off-by: Petri Savolainen --- /** Email created from pull request 273 (psavol:next-packet-parse) ** https://github.com/Linaro/odp/pull/273 ** Patch: https://github.com/Linaro/odp/pull/273.patch ** Base sha: d22c949cc466bf28de559855a1cb525740578137 ** Merge commit sha: e0d94080baa0c37e77bf42dc261565b3b19571d8 **/ include/odp/api/spec/ipsec.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 26e852fca..4a33af8ea 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -74,19 +74,19 @@ typedef enum odp_ipsec_op_mode_t { */ typedef enum odp_ipsec_proto_layer_t { /** No layers */ - ODP_IPSEC_LAYER_NONE = 0, + ODP_IPSEC_LAYER_NONE = ODP_PROTO_LAYER_NONE, /** Layer L2 protocols (Ethernet, VLAN, etc) */ - ODP_IPSEC_LAYER_L2, + ODP_IPSEC_LAYER_L2 = ODP_PROTO_LAYER_L2, /** Layer L3 protocols (IPv4, IPv6, ICMP, IPSEC, etc) */ - ODP_IPSEC_LAYER_L3, + ODP_IPSEC_LAYER_L3 = ODP_PROTO_LAYER_L3, /** Layer L4 protocols (UDP, TCP, SCTP) */ - ODP_IPSEC_LAYER_L4, + ODP_IPSEC_LAYER_L4 = ODP_PROTO_LAYER_L4, /** All layers */ - ODP_IPSEC_LAYER_ALL + ODP_IPSEC_LAYER_ALL = ODP_PROTO_LAYER_ALL } odp_ipsec_proto_layer_t;