From patchwork Mon Feb 26 15:00:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 129661 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp299156lja; Mon, 26 Feb 2018 07:04:51 -0800 (PST) X-Google-Smtp-Source: AG47ELtGCz1/nRim8sQ3x2d4MfwWnNOCYMEcy9cgylkwCGmOGcGS8ZSxMeTqCNxWzLkaLkVA54Wl X-Received: by 2002:a25:a189:: with SMTP id a9-v6mr7312082ybi.518.1519657490804; Mon, 26 Feb 2018 07:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519657490; cv=none; d=google.com; s=arc-20160816; b=CJuDpZGNLMnMAFfXmDORe8tRgXZ9u0NKAelu6gZhouNj9qbKpWqjRmaFCtQDPS+P0X zYQmID7Ku8QmPMhAW/kkQOC4GKQSZvuoCit5pyAaKQDtWADbiSytX0GAP/Qd9M7ayuSl LIxrzbPMjTMDnH2nyO7cmTyASnSX+KfX/r6kKyQG2hJg9y/6YuAp8aipls1XgZKkW27x sGlS2yky3I/iL4tGFhH5Dg9VWD/XGhCv06FKteI0Z0uKLyzk0ez7R+HwDX0fSclXBYRh 7p+k6VwkLJnVSllhni7oJUeiVTMY9FOp6DTa8BDWJFgk5QZCGQ3MyRDm/IH2MESNHaXB gx5Q== 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=oj3YzU1Mt2YjlrPf+Uz4J1pKsiti/xz5jMdrTkGoY0I=; b=e8jle9f2K/vsZ9euc/Z7cfT4RHbhzhxP0+/X0JXZOBRwOz7Z3WBVBKBWJGgWYlPEIK fkrAT9o2oSGvpbor3wJuxqZITO7dXA9TKPGN1MStHtW38HHmWT/dx/mJlepZUdeplOUM ezknzeon1CNA/NEFixUaPxAuQ9aMo1WdHuJM5EC+0JahQcyfM5t0yvg6eRdSEWKj55SX ih7RJaad0ug0h6CCRTXpBnss8MjsDGwu9KUGXxUWr1En1FYSo8UXdVrmOZR5jgaWzYaQ OPZ/RrugyFpT/2X/sak0fxh1NU18XzAAWCYSyfz7b/ElTDo24C8uY79SsJBv/bytQfnF RHig== 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 y10-v6si1569235ybh.269.2018.02.26.07.04.48; Mon, 26 Feb 2018 07:04:50 -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 80F4C617D4; Mon, 26 Feb 2018 15:04:48 +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 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 3B45361519; Mon, 26 Feb 2018 15:00:51 +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 B4CEC617D1; Mon, 26 Feb 2018 15:00:25 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 7075661794 for ; Mon, 26 Feb 2018 15:00:17 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 2247C4444D9A for ; Mon, 26 Feb 2018 18:00:16 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id oX6cXnSFKa-0GCSep7Q; Mon, 26 Feb 2018 18:00:16 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kHvqsGsU0k-0FTmG7Ej; Mon, 26 Feb 2018 18:00:15 +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: Mon, 26 Feb 2018 18:00:04 +0300 Message-Id: <1519657209-30140-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519657209-30140-1-git-send-email-odpbot@yandex.ru> References: <1519657209-30140-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 502 Subject: [lng-odp] [PATCH API-NEXT v1 6/11] linux-gen: packet: support L4 type No Next Header 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 502 (lumag:ipsec-imp-upd) ** https://github.com/Linaro/odp/pull/502 ** Patch: https://github.com/Linaro/odp/pull/502.patch ** Base sha: c91eae61d19350dd19aacf18c1148c9491398c14 ** Merge commit sha: 8c909084626ccef140542645cd34549ce7f4bcde **/ platform/linux-generic/include/odp/api/plat/packet_inline_types.h | 1 + platform/linux-generic/include/protocols/ip.h | 1 + platform/linux-generic/odp_packet.c | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/platform/linux-generic/include/odp/api/plat/packet_inline_types.h b/platform/linux-generic/include/odp/api/plat/packet_inline_types.h index 2e8efecb6..4b88d3517 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_inline_types.h +++ b/platform/linux-generic/include/odp/api/plat/packet_inline_types.h @@ -90,6 +90,7 @@ typedef union { uint64_t tcp:1; /* TCP */ uint64_t sctp:1; /* SCTP */ uint64_t icmp:1; /* ICMP */ + uint64_t no_next_hdr:1; /* No Next Header */ uint64_t color:2; /* Packet color for traffic mgmt */ uint64_t nodrop:1; /* Drop eligibility status */ diff --git a/platform/linux-generic/include/protocols/ip.h b/platform/linux-generic/include/protocols/ip.h index f02980693..19aef3dcc 100644 --- a/platform/linux-generic/include/protocols/ip.h +++ b/platform/linux-generic/include/protocols/ip.h @@ -167,6 +167,7 @@ typedef struct ODP_PACKED { #define _ODP_IPPROTO_AH 0x33 /**< Authentication Header (51) */ #define _ODP_IPPROTO_ESP 0x32 /**< Encapsulating Security Payload (50) */ #define _ODP_IPPROTO_ICMPV6 0x3A /**< Internet Control Message Protocol (58) */ +#define _ODP_IPPROTO_NO_NEXT 0x3B /**< No Next Header (59) */ #define _ODP_IPPROTO_DEST 0x3C /**< IPv6 Destination header (60) */ #define _ODP_IPPROTO_SCTP 0x84 /**< Stream Control Transmission protocol (132) */ diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 6fc5f2206..7cbf1b9ef 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2229,6 +2229,10 @@ int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr, prs->input_flags.sctp = 1; break; + case _ODP_IPPROTO_NO_NEXT: + prs->input_flags.no_next_hdr = 1; + break; + default: prs->input_flags.l4 = 0; break; @@ -2550,6 +2554,8 @@ odp_proto_l4_type_t odp_packet_l4_type(odp_packet_t pkt) else if (pkt_hdr->p.input_flags.icmp && pkt_hdr->p.input_flags.ipv6) return ODP_PROTO_L4_TYPE_ICMPV6; + else if (pkt_hdr->p.input_flags.no_next_hdr) + return ODP_PROTO_L4_TYPE_NO_NEXT; return ODP_PROTO_L4_TYPE_NONE; }