From patchwork Wed Feb 14 15:00:07 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: 128358 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp697856ljc; Wed, 14 Feb 2018 07:00:22 -0800 (PST) X-Google-Smtp-Source: AH8x224lIadBEKapyGQSLF8p2prS41PuRaWVzAO/wWKKQfNVhhEIE3yyX+0h+0LYhIWe3pkeoq6c X-Received: by 10.55.134.135 with SMTP id i129mr7491179qkd.177.1518620422473; Wed, 14 Feb 2018 07:00:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518620422; cv=none; d=google.com; s=arc-20160816; b=C3z+ql/WVF1yLfbGtZ+tvQffx9e9tpQifglgg5E+90t78qlX1ABIgL5MXoIzz9KVwp K1mS7ezjgz+nIKljUqkR/rR4EzFyL1ilVemnDMEeFKKXzuXZgOonmbmKNJrqzRCPJbQA UoM1WbnVBeaiKyTxOPiGyVfKEAbDPD0f4kvqM07aCiS8Khq24VuiyacyNYOAbIwP1y+2 xxkVi2iN7PwTreC09zs6QtLbWDxejKjHetf730UdB5h5Kdagb89rjJPzMhUyEc2McfI8 NYBcFx//EcfK8vqsCE4/NsFbiHPlcn4vDNwBxWuLkQ3voXRiFODqi/HEWDJrAAug2kKD sGRQ== 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=epMMxqpptKIDl99UDQUM3B7hivAczEX/R3XXVjBgI3E=; b=bSBmEQhMJ14u1+yhbqecGEddR7CL2m+sE89yqWuGADD1h3LAshkBhwWAwKXxmwar8q i9GHbz5r6HPAXOo1zg7/V/Nr2jgz95sjU4opLEMQD6huc0fGuJFaEmva2JC6+ox3/aZh iIzxVK/C4im7BLs2aEXNLCQxmxUDxRW20mYljxTaPf/FL3JnzzI54BZttXtopZlm7Qon uN99ISPvNgvqkDHuRuF0L9pykKPtGzwKGwYO3JjBk7myU5MO2bzC51S8KpxAlTUCfNdm j64+ukx3XC3SXWPPZ4LAgUoQCe4a6oBMg5XvWnC7YXTWK7D3uMFWN+IWww0MRTd/nJiW XDpw== 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 m8si1932097qth.125.2018.02.14.07.00.21; Wed, 14 Feb 2018 07:00:22 -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 2C02560674; Wed, 14 Feb 2018 15:00:21 +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 79A5B61518; Wed, 14 Feb 2018 15:00:16 +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 CBAA86150B; Wed, 14 Feb 2018 15:00:13 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id AC7C16150B for ; Wed, 14 Feb 2018 15:00:11 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 30EE05D8260F for ; Wed, 14 Feb 2018 18:00:10 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id AJygw30OeU-0AYqKk4O; Wed, 14 Feb 2018 18:00:10 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id YlnLbrMTV1-09ZKl1Hp; Wed, 14 Feb 2018 18:00:09 +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: Wed, 14 Feb 2018 18:00:07 +0300 Message-Id: <1518620408-18352-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518620408-18352-1-git-send-email-odpbot@yandex.ru> References: <1518620408-18352-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 476 Subject: [lng-odp] [PATCH API-NEXT v3 1/2] api: packet add L2 packet type to complement L3 and L4 types 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 476 (lumag:l2-type) ** https://github.com/Linaro/odp/pull/476 ** Patch: https://github.com/Linaro/odp/pull/476.patch ** Base sha: 4b1101adedf0941f6db34047cc06fde11fb06a34 ** Merge commit sha: d4636c5108ebc788ba06616a49ad536163961f5f **/ include/odp/api/abi-default/packet.h | 5 +++++ include/odp/api/spec/packet.h | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/include/odp/api/abi-default/packet.h b/include/odp/api/abi-default/packet.h index b83288d4c..f9efdc7c0 100644 --- a/include/odp/api/abi-default/packet.h +++ b/include/odp/api/abi-default/packet.h @@ -30,6 +30,11 @@ typedef _odp_abi_packet_seg_t *odp_packet_seg_t; #define ODP_PACKET_SEG_INVALID ((odp_packet_seg_t)0xffffffff) #define ODP_PACKET_OFFSET_INVALID 0xffff +typedef uint8_t odp_proto_l2_type_t; + +#define ODP_PROTO_L2_TYPE_NONE 0 +#define ODP_PROTO_L2_TYPE_ETH 1 + typedef uint8_t odp_proto_l3_type_t; #define ODP_PROTO_L3_TYPE_NONE 0 diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 4be515c7b..079a1ae1b 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -71,6 +71,19 @@ extern "C" { * Packet is red */ +/** + * @typedef odp_proto_l2_type_t + * Layer 2 protocol type + */ + +/** + * @def ODP_PROTO_L2_TYPE_NONE + * Layer 2 protocol type not defined + * + * @def ODP_PROTO_L2_TYPE_ETH + * Layer 2 protocol is Ethernet + */ + /** * @typedef odp_proto_l3_type_t * Layer 3 protocol type @@ -1615,6 +1628,17 @@ uint32_t odp_packet_l4_offset(odp_packet_t pkt); */ int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset); +/** + * Layer 2 protocol type + * + * Returns layer 2 protocol type. Initial type value is ODP_PROTO_L2_TYPE_NONE. + * + * @param pkt Packet handle + * + * @return Layer 2 protocol type + */ +odp_proto_l2_type_t odp_packet_l2_type(odp_packet_t pkt); + /** * Layer 3 protocol type * From patchwork Wed Feb 14 15:00:08 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: 128359 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp700423ljc; Wed, 14 Feb 2018 07:02:14 -0800 (PST) X-Google-Smtp-Source: AH8x227WDj8wy05CgZE/JC/FjVUTQJlI06F0Ng2SGvRq1N7NYuXL2NidhB1e5neX0vkoYUW+dkP3 X-Received: by 10.55.165.137 with SMTP id o131mr7545035qke.154.1518620534348; Wed, 14 Feb 2018 07:02:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518620534; cv=none; d=google.com; s=arc-20160816; b=DMw+cANa5qK00LGtvMs05O0MjGW0HyLvda2OMtylt/MdODrpfG/ryMq4tYb58OV5HN 2hwnY3m3RSbf6q7y7w1PI6q5fHILseUt46paknoL498n31WExP81jjJNCvdCi/4QZnDs cJvEAyN+tliM9FinJRqNVh5+epSMKjI1l4dyvbfYcJ05fCsLJodSku01mv9YA0bbJGCv 97BWZ0PS+Sp+5GMubm5Zw+7VIkuoK3igBHeCAlK5COiC04/HBkbcOsb9Puj+HaeoE1Y4 1BkXuqHPdDsDB+BK/aBOxoSt5TQq9UwSof3O4oKQ5o1CoVkuWVvS/dOrRFyF1Qy8qnhr yIRA== 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=DDkl/uEVdcrO+3oBwEMg9VOCXKdunZzPDIxpW/R8FFo=; b=eaxyiIMizebCXrhXpn3EMvl7tp6xlCKLrclfc0Jcrmt5tMmlMUO83twNtKhLZ2df46 U8aInIHbDADs0UqNZqgFex61aP3KWZBo4E71c1tSuaqQqSE42L/ijJOnS9/tdfNF85mb 3861g91WY8WgtVTjrFnqLdFV84IXE2bnzXrPlQ77rE9pWd9CC5+t0b4MJImjNf9yw1tH NJPMVpsdo0ENhP4Wni6MxtBuqpOpGh7f6A8Sr0yi/RaTmJVuS+4XizbB6XGHAWDxsDLO Lf55rjBQ0/YpKUCFhIJG0xv4GUudd/aiXS7FFlssg3ITOBtyhGpiyHlfX3e0ny8RkX38 Zbww== 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 q131si55029qka.159.2018.02.14.07.01.50; Wed, 14 Feb 2018 07:02:14 -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 1794F616DA; Wed, 14 Feb 2018 15:01:50 +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 0C32260C56; Wed, 14 Feb 2018 15:00:27 +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 F220E6150F; Wed, 14 Feb 2018 15:00:19 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 710706150F for ; Wed, 14 Feb 2018 15:00:12 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward105o.mail.yandex.net (Yandex) with ESMTP id BFF804444A56 for ; Wed, 14 Feb 2018 18:00:10 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id gSY9V6a2q5-0ASqPd4K; Wed, 14 Feb 2018 18:00:10 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id YlnLbrMTV1-0AZOdcE8; Wed, 14 Feb 2018 18:00:10 +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: Wed, 14 Feb 2018 18:00:08 +0300 Message-Id: <1518620408-18352-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518620408-18352-1-git-send-email-odpbot@yandex.ru> References: <1518620408-18352-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 476 Subject: [lng-odp] [PATCH API-NEXT v3 2/2] linux-gen: add L2 type support for non-ABI-compat mode 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 476 (lumag:l2-type) ** https://github.com/Linaro/odp/pull/476 ** Patch: https://github.com/Linaro/odp/pull/476.patch ** Base sha: 4b1101adedf0941f6db34047cc06fde11fb06a34 ** Merge commit sha: d4636c5108ebc788ba06616a49ad536163961f5f **/ platform/linux-generic/include-abi/odp/api/abi/packet.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/linux-generic/include-abi/odp/api/abi/packet.h b/platform/linux-generic/include-abi/odp/api/abi/packet.h index 137cd3ec4..92fe21a8a 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/packet.h +++ b/platform/linux-generic/include-abi/odp/api/abi/packet.h @@ -47,6 +47,11 @@ static inline odp_packet_seg_t _odp_packet_seg_from_ndx(uint8_t ndx) #define ODP_PACKET_SEG_INVALID ((odp_packet_seg_t)-1) +typedef uint8_t odp_proto_l2_type_t; + +#define ODP_PROTO_L2_TYPE_NONE 0 +#define ODP_PROTO_L2_TYPE_ETH 1 + typedef uint8_t odp_proto_l3_type_t; #define ODP_PROTO_L3_TYPE_NONE 0