Message ID | 1519938053-24031-4-git-send-email-odpbot@yandex.ru |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp522043lja; Thu, 1 Mar 2018 13:04:09 -0800 (PST) X-Google-Smtp-Source: AG47ELsGaeYqQW0JVURLF3RGaElqUDxXML62fIgRb5FB0n6QngAod/WM5exexZw+kL1Fy+qhkXCV X-Received: by 10.55.60.12 with SMTP id j12mr4778020qka.203.1519938249037; Thu, 01 Mar 2018 13:04:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519938249; cv=none; d=google.com; s=arc-20160816; b=jDHBQLBj3ehkiiwPK63QxPYEPA22OfVtVzHuGUpXh7SYLYcJiYfO3GVJPyv34kr8u8 Y4i4evcAWNmCv9O/oGB4+K1DlldWs3aIo943pyaO2aRDuhhch9W2/oz6ME5SMRLddmil fIZbFXRZvTgo7hjIOmTb7HiVDJL3O6XpS6WpiHTK6tQnM1h32mMpdwCBZaIDtECScoBl JFQLIMHmHX/Ml2NZmovIHo8fXrrEygWPmf8xQKiClUBEfvvrSEsA7+UZkPPxZWEOxtwP hrkfJfNk6kuQV32CUj04Pg2Yldui6QCvXOcTKh7zPguLbY+50PJyXVLxSmNtK1KvlXjX /UIQ== 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=2E1BQcfU2ivEsXesqAKLZdWzJVaRt6yasRg74dFLNHw=; b=ZQ3zNkfF+NpaQG5KHKNN9FHZ15z3zMuu0JGA3EnWs0p0EvReszQfLG1mbVL2G3cjtx hUfDQ8TJM/llLrZh71UXEYtdKLSN6dZh6FDFC/ZciBZCQ0mw/+7HA88szoFpqDZJXI5u 0MMQPBy1cWL1Vld0oCT0eCorffQDW2PRBXhwDsWEBHnYYhTO14mpSsYQQMiIf7u5mu8n YIwtwItA/8n6aSKb6hA6qqnKnnKa5NozRacAjNkYK1H5ObCl/qjd0ItvpxgiggbMF1ts 6DyxkoANmVYTIAmLQjSHOh4iD3QZR7Xz1xGb9+q2/C7K2kM2sf+LUVf/yPhV9FaEun9N e3iw== 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: <lng-odp-bounces@lists.linaro.org> 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 n66si4894751qka.243.2018.03.01.13.04.08; Thu, 01 Mar 2018 13:04:09 -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 A65AE627BE; Thu, 1 Mar 2018 21:04:08 +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 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 0FE8962785; Thu, 1 Mar 2018 21:01:30 +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 A19C762773; Thu, 1 Mar 2018 21:01:13 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id F357B61753 for <lng-odp@lists.linaro.org>; Thu, 1 Mar 2018 21:01:02 +0000 (UTC) Received: from mxback7g.mail.yandex.net (mxback7g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:168]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 5EBC07856E0 for <lng-odp@lists.linaro.org>; Fri, 2 Mar 2018 00:01:01 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback7g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id HKOOWs5W7Z-11du8hCl; Fri, 02 Mar 2018 00:01:01 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BpjAadXdWb-102eWo1I; Fri, 02 Mar 2018 00:01:00 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot <odpbot@yandex.ru> To: lng-odp@lists.linaro.org Date: Fri, 2 Mar 2018 00:00:43 +0300 Message-Id: <1519938053-24031-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519938053-24031-1-git-send-email-odpbot@yandex.ru> References: <1519938053-24031-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 505 Subject: [lng-odp] [PATCH v2 3/13] linux-gen: packet: add odp_packet_l2_type() implementation X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" <lng-odp.lists.linaro.org> List-Unsubscribe: <https://lists.linaro.org/mailman/options/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=unsubscribe> List-Archive: <http://lists.linaro.org/pipermail/lng-odp/> List-Post: <mailto:lng-odp@lists.linaro.org> List-Help: <mailto:lng-odp-request@lists.linaro.org?subject=help> List-Subscribe: <https://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" <lng-odp-bounces@lists.linaro.org> |
Series |
[v2,1/13] linux-gen: packet: implement packet l3/l4 proto types
|
expand
|
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 8a5833ded..35b9b59dc 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2486,6 +2486,16 @@ int odp_packet_has_ref(odp_packet_t pkt) return 0; } +odp_proto_l2_type_t odp_packet_l2_type(odp_packet_t pkt) +{ + odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); + + if (pkt_hdr->p.input_flags.eth) + return ODP_PROTO_L2_TYPE_ETH; + + return ODP_PROTO_L2_TYPE_NONE; +} + odp_proto_l3_type_t odp_packet_l3_type(odp_packet_t pkt) { odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt);