Message ID | 1519232408-28445-3-git-send-email-odpbot@yandex.ru |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp841456ljc; Wed, 21 Feb 2018 09:04:39 -0800 (PST) X-Google-Smtp-Source: AG47ELtv+mZQuJW6hLIe8DlJghrTaL7TvSmHQJYy9TNoa2z+DfZ/tegH+mf2YHJDwVVXPzDvOavq X-Received: by 10.55.18.76 with SMTP id c73mr6200035qkh.206.1519232679115; Wed, 21 Feb 2018 09:04:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519232679; cv=none; d=google.com; s=arc-20160816; b=pESJIugff7XkoMaHATOEz8DHxjrqk3GDgVlfq0IAK5NmJ8TjFK2Q7KD2MG1d2hNQat EcGGx0kpIrtKGjGx+GSudIvyVnG9UrcFjw+UldrgCldKlZ1kH1/lk4B4KBhqVh9aa3Rm ph3CCfUzg2HO+uF3yNznYRrkEtFQ8vBRpN6ORd5TZNFI4Bdl/YkSZNFYHEi56b9eB0dE R1DwewA4TLERJBEqs1MPBDOYiXATq2xXphNh0b3X927EBt5NOYXWeDS3MSqWpF7ygIGT wyqzCt6Ou6ZX0VmKNESJewbCN3wicvftFLXV0p/I0QfPgFi65sa47wF4u9Tx4HVuyQ8y q6RQ== 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=iNXiTpwAiCjXQri4D5RRhT541iEQXt1K1kQTAeV+aYk=; b=MFc/Qle5L8Gr4FKAKJ/3ZeTWusGckJdFTnaQasv8VoacAYy3xz5uHXvAd1zfTkWdXs z4grIrJyjqOsQtjyNxxoOnembfADkJfQ9srSc8n86HzpcW+5h+LnwWPZMaquKGqoHmSl M1PM0WImHwXJPngCbJkfV6i4j5otasn3Pp6/adXrq6AGezlvbfJgCPiEi+MjBMAFA0uJ ky0IuHZlWY0YZA1VGI2ZEPdcUz6VPjSXU0/o4L9T9HqzkxhFSdePK2hqd5M16V126EGn lG7j7S1eztA5VYg5B2HqjuJXHXsf+FVl8Yt+XRaHJINDVDv5eE73fynIROQSfC1DoSNO oLBQ== 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 c4si300908qtd.372.2018.02.21.09.04.38; Wed, 21 Feb 2018 09:04:39 -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 4784B617C3; Wed, 21 Feb 2018 17:04:38 +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 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 052F061777; Wed, 21 Feb 2018 17:00:38 +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 612F4617BA; Wed, 21 Feb 2018 17:00:22 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 2DB8361799 for <lng-odp@lists.linaro.org>; Wed, 21 Feb 2018 17:00:14 +0000 (UTC) Received: from mxback6g.mail.yandex.net (mxback6g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:167]) by forward103j.mail.yandex.net (Yandex) with ESMTP id DF6E034C557C for <lng-odp@lists.linaro.org>; Wed, 21 Feb 2018 20:00:12 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback6g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Ihc0o6dPes-0CuKd1LO; Wed, 21 Feb 2018 20:00:12 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id yTStk9eEsG-0CuquE3S; Wed, 21 Feb 2018 20:00:12 +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: Wed, 21 Feb 2018 19:59:55 +0300 Message-Id: <1519232408-28445-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519232408-28445-1-git-send-email-odpbot@yandex.ru> References: <1519232408-28445-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 494 Subject: [lng-odp] [PATCH API-NEXT v1 2/15] 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 |
[API-NEXT,v1,1/15] api: don't create special case for the tunnel-dummy packets
|
expand
|
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 46b11cba1..6fc5f2206 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2506,6 +2506,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);