From patchwork Mon May 16 09:50:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Elo, Matias \(Nokia - FI/Espoo\)" X-Patchwork-Id: 67838 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1444697qge; Mon, 16 May 2016 02:51:31 -0700 (PDT) X-Received: by 10.140.29.97 with SMTP id a88mr28407626qga.45.1463392291803; Mon, 16 May 2016 02:51:31 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d85si22165139qhc.59.2016.05.16.02.51.31; Mon, 16 May 2016 02:51:31 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE dis=NONE) header.from=nokia.com Received: by lists.linaro.org (Postfix, from userid 109) id 6B28961730; Mon, 16 May 2016 09:51:31 +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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 9BCE06172A; Mon, 16 May 2016 09:50:31 +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 2B60161709; Mon, 16 May 2016 09:50:25 +0000 (UTC) Received: from demumfd001.nsn-inter.net (demumfd001.nsn-inter.net [93.183.12.32]) by lists.linaro.org (Postfix) with ESMTPS id 9E6A1616DC for ; Mon, 16 May 2016 09:50:22 +0000 (UTC) Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd001.nsn-inter.net (8.15.2/8.15.2) with ESMTPS id u4G9oLut023556 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 16 May 2016 09:50:21 GMT Received: from 10.144.19.15 ([10.144.104.109]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id u4G9oKpx017285 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 16 May 2016 11:50:21 +0200 From: Matias Elo To: lng-odp@lists.linaro.org Date: Mon, 16 May 2016 12:50:17 +0300 Message-Id: <1463392220-22856-3-git-send-email-matias.elo@nokia.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1463392220-22856-1-git-send-email-matias.elo@nokia.com> References: <1463392220-22856-1-git-send-email-matias.elo@nokia.com> X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 2593 X-purgate-ID: 151667::1463392221-00001B3D-DD82CB94/0/0 X-Topics: patch Subject: [lng-odp] [PATCH v2 2/5] linux-generic: packet: remove vlan_s_tag and vlan_c_tag members from odp_packet_hdr_t 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" There is no way to read vlan tags in the ODP API, so don't save them. Signed-off-by: Matias Elo --- platform/linux-generic/include/odp_packet_internal.h | 4 ---- platform/linux-generic/odp_packet.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 508adf8..2a12503 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -143,8 +143,6 @@ typedef struct { uint32_t l4_offset; /**< offset to L4 hdr (TCP, UDP, SCTP, also ICMP) */ uint32_t payload_offset; /**< offset to payload */ - uint32_t vlan_s_tag; /**< Parsed 1st VLAN header (S-TAG) */ - uint32_t vlan_c_tag; /**< Parsed 2nd VLAN header (C-TAG) */ uint32_t l3_len; /**< Layer 3 length */ uint32_t l4_len; /**< Layer 4 length */ @@ -184,8 +182,6 @@ static inline void copy_packet_parser_metadata(odp_packet_hdr_t *src_hdr, dst_hdr->l4_offset = src_hdr->l4_offset; dst_hdr->payload_offset = src_hdr->payload_offset; - dst_hdr->vlan_s_tag = src_hdr->vlan_s_tag; - dst_hdr->vlan_c_tag = src_hdr->vlan_c_tag; dst_hdr->l3_len = src_hdr->l3_len; dst_hdr->l4_len = src_hdr->l4_len; } diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 8681c08..436265e 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -42,8 +42,6 @@ void packet_parse_reset(odp_packet_hdr_t *pkt_hdr) pkt_hdr->l3_offset = ODP_PACKET_OFFSET_INVALID; pkt_hdr->l4_offset = ODP_PACKET_OFFSET_INVALID; pkt_hdr->payload_offset = ODP_PACKET_OFFSET_INVALID; - pkt_hdr->vlan_s_tag = 0; - pkt_hdr->vlan_c_tag = 0; } /** @@ -1223,7 +1221,6 @@ int _odp_parse_common(odp_packet_hdr_t *pkt_hdr, const uint8_t *ptr) vlan = (const odph_vlanhdr_t *)parseptr; ethtype = odp_be_to_cpu_16(vlan->type); - pkt_hdr->vlan_s_tag = odp_be_to_cpu_16(vlan->tci); offset += sizeof(odph_vlanhdr_t); parseptr += sizeof(odph_vlanhdr_t); } @@ -1232,7 +1229,6 @@ int _odp_parse_common(odp_packet_hdr_t *pkt_hdr, const uint8_t *ptr) pkt_hdr->input_flags.vlan = 1; vlan = (const odph_vlanhdr_t *)parseptr; ethtype = odp_be_to_cpu_16(vlan->type); - pkt_hdr->vlan_c_tag = odp_be_to_cpu_16(vlan->tci); offset += sizeof(odph_vlanhdr_t); parseptr += sizeof(odph_vlanhdr_t); }