From patchwork Thu Feb 15 12:00:11 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: 128409 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1666476ljc; Thu, 15 Feb 2018 04:02:12 -0800 (PST) X-Google-Smtp-Source: AH8x224khcuMAwvdTICJ4cfOsElnjx6uBakcpx7s+MsEJtYIx4H58WiMJM2w32zZ1XOO0/E++N8e X-Received: by 10.129.226.65 with SMTP id z1mr1762694ywl.297.1518696132590; Thu, 15 Feb 2018 04:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518696132; cv=none; d=google.com; s=arc-20160816; b=ZupuHeQi0UAzmKtZ6MT0Ji7EyB5p8tmr844BrnoFJkBOabs3Ml7RfJZAJ1lBHY7YIf Yi6Sfm6gdyfR+oL0cT5ClH3eeaqfN6YcxHZepaK7eK49Cim8xoDGsihHkArpWM3T5ycp UuvaqSuV6+gNEaz355zsuqe7T3UHN5tk94p3C7vCiSCKZ8pOjFqM8hYDqm0JEqHa2vL+ cTPmWjKepGZlI5Iubztn+A/ZWAcNLUIQCiDgK3TILUa7vtVv08IPj+SUfTJR6SYwRx2t tzc+SB3f+hBcOj4vhq06RhPJsP4lD/VbRmvoPEE1OaiMOZya474x1Zb0RcUDyiZWKUkN 4G3A== 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=Hwm6Ai2TERx5n1kH9v1SbhMogIIZfFiXbt1fcyFSTUU=; b=sdTmLOW2OCjz9eCK7OS71tTi0s/GG0FZgMEphpTJrwJrqRL2PEYOoObnAb9nGemRNi Ia/Hz4Agms9770ABgiWftE6Yp+GTY+nRVqoAsvYTKWU83vV3Miyn5e6RceeoCxCZ1egq HM6W5UFEji1N+SYUdCUYM73OT7f2k1MCaKJ4FoUrM3eT/IH+bZpPHgV/F2xPdwJIXsRJ D04ZTkMHzyvH56/TPZpbw8Xv3xyjO6akixC8mwQuo7dTPLOdV5HYtq+ErLnAUIRptogv Zi26UIllmxdZ4nn16TuyI119Rm7xK1O4ibY6qKbF3NdAYEXOP4/39uOMWY5NaLclyi3j 0GLQ== 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 k7si1911363qtk.422.2018.02.15.04.02.10; Thu, 15 Feb 2018 04:02:12 -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 58BEB61728; Thu, 15 Feb 2018 12:02:10 +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 0DDE7616E3; Thu, 15 Feb 2018 12:00:45 +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 66BBD608EA; Thu, 15 Feb 2018 12:00:38 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id B2014616F7 for ; Thu, 15 Feb 2018 12:00:17 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 0B0E3183E64 for ; Thu, 15 Feb 2018 15:00:16 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id iVCIDea1Is-0FK0w085; Thu, 15 Feb 2018 15:00:16 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Rkm4LZmnpA-0EYKj7IW; Thu, 15 Feb 2018 15:00:14 +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: Thu, 15 Feb 2018 15:00:11 +0300 Message-Id: <1518696012-23633-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518696012-23633-1-git-send-email-odpbot@yandex.ru> References: <1518696012-23633-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 482 Subject: [lng-odp] [PATCH v1 1/2] linux-gen: packet: remove unused function 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: Petri Savolainen Signed-off-by: Petri Savolainen --- /** Email created from pull request 482 (psavol:master-packet-cleanup) ** https://github.com/Linaro/odp/pull/482 ** Patch: https://github.com/Linaro/odp/pull/482.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: d02731c67b9c99ffdcddff0e00eb0b173b785a5f **/ platform/linux-generic/include/odp_packet_internal.h | 6 ------ platform/linux-generic/odp_packet.c | 16 ---------------- 2 files changed, 22 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 89009a021..e6b65bab8 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -299,12 +299,6 @@ int packet_alloc_multi(odp_pool_t pool_hdl, uint32_t len, int packet_parse_layer(odp_packet_hdr_t *pkt_hdr, odp_proto_layer_t layer); -/* Perform L3 and L4 parsing up to a given protocol layer */ -int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr, - odp_proto_layer_t layer, - uint32_t l3_offset, - uint16_t ethtype); - /* Reset parser metadata for a new parse */ void packet_parse_reset(odp_packet_hdr_t *pkt_hdr); diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index b2a22903c..cbb1ae306 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2274,22 +2274,6 @@ int packet_parse_layer(odp_packet_hdr_t *pkt_hdr, seg_len, layer); } -int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr, - odp_proto_layer_t layer, - uint32_t l3_offset, - uint16_t ethtype) -{ - uint32_t seg_len = 0; - void *base = packet_map(pkt_hdr, l3_offset, &seg_len, NULL); - - if (seg_len == 0) - return -1; - - return packet_parse_common_l3_l4(&pkt_hdr->p, base, l3_offset, - pkt_hdr->frame_len, seg_len, - layer, ethtype); -} - int odp_packet_parse(odp_packet_t pkt, uint32_t offset, const odp_packet_parse_param_t *param) { From patchwork Thu Feb 15 12:00:12 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: 128410 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1668121ljc; Thu, 15 Feb 2018 04:03:37 -0800 (PST) X-Google-Smtp-Source: AH8x226BRcKfwNyYxJ7tDtx/YyNv1pQ+UwEkHsivnBhK+SrffeF0T1tJikmUPHycsMf6CFwQO5AM X-Received: by 10.37.230.210 with SMTP id d201mr1662585ybh.165.1518696217326; Thu, 15 Feb 2018 04:03:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518696217; cv=none; d=google.com; s=arc-20160816; b=NXwXxSX9sFNctP5u8JKWfUnNiiWgowUjwpfmVCkOWZhoZOvOsWqfMjnaKTv8oFCMh5 /qrfKHjVBC9Xer0m+vbiTrbz7jxujcKCIDmMAuHhFNVd3JYV/EyfWqugYa8Jf9AWnNoK KTwSjXYPTnsq9Xr3vlz/8Yqs6I74q7uPF2TtBYwUJcJfyPtf1xYZOTv6rWmVgjoOb/H/ xDSshBaj1K9HKM96PVXPC08tQMtqKVpZwm+FRfKgX85BNjMlHOhmBot2nHbQhb/q1l3A sAOqHA0qnO49Pv6GTwvYdeUoIhbWOUxjx3P0d7Tbp/MOga/v6HdPZAa088ULftPxY63q Tc4A== 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=byR5N/jvGntsBnoiETIY98g0+j00qIYXXfyp06DwzRw=; b=ov23xz8TKwtka2RvPm4MdwKCh1ncOjKgCMn4JsKmDo9wkpUhkFT5RqtybacxA8RCO2 YaatHOG6hqVhmnqFwuZOJ5RPpl9NAXgjQWjqvikAw/f1L+S57Rd+DpkLFmrUYWH4SPyO HgNFK2IjA46ju9C24X6A/NgqHP1zvrkF4PW7PuIljNoC6oHVlUyLNkN0fw0JKbxwiF27 4uG4q/r0h6J4TGY9AQYZa00Imn9+cnivb89n4Lxy8s3uonjhdywr1W2vIpT05TsRZEof C96QiP5vZIKLVUT91+U2eq8NZOPw/fxEIEZYzDSVA5Hdk0nshpvS5fBmnk+j8aHlKHx1 HoxQ== 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 f17si287811qtk.51.2018.02.15.04.03.37; Thu, 15 Feb 2018 04:03:37 -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 005EE6151E; Thu, 15 Feb 2018 12:03:36 +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 550D861714; Thu, 15 Feb 2018 12:02:59 +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 C4E33616D9; Thu, 15 Feb 2018 12:02:56 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id ED6CB61527 for ; Thu, 15 Feb 2018 12:02:25 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward103o.mail.yandex.net (Yandex) with ESMTP id C65A95880E42 for ; Thu, 15 Feb 2018 15:00:16 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id OIwrZuRI33-0GP8TbIv; Thu, 15 Feb 2018 15:00:16 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Rkm4LZmnpA-0GYWjRXA; Thu, 15 Feb 2018 15:00:16 +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: Thu, 15 Feb 2018 15:00:12 +0300 Message-Id: <1518696012-23633-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518696012-23633-1-git-send-email-odpbot@yandex.ru> References: <1518696012-23633-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 482 Subject: [lng-odp] [PATCH v1 2/2] linux-gen: packet: remove duplicate conversion 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: Petri Savolainen Remove _odp_packet_from_buf_hdr() as it is a duplicate of packet_from_buf_hdr(). Signed-off-by: Petri Savolainen --- /** Email created from pull request 482 (psavol:master-packet-cleanup) ** https://github.com/Linaro/odp/pull/482 ** Patch: https://github.com/Linaro/odp/pull/482.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: d02731c67b9c99ffdcddff0e00eb0b173b785a5f **/ platform/linux-generic/include/odp_packet_internal.h | 3 --- platform/linux-generic/odp_packet.c | 5 ----- platform/linux-generic/odp_traffic_mngr.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index e6b65bab8..5058c02d1 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -302,9 +302,6 @@ int packet_parse_layer(odp_packet_hdr_t *pkt_hdr, /* Reset parser metadata for a new parse */ void packet_parse_reset(odp_packet_hdr_t *pkt_hdr); -/* Convert a buffer handle to a packet handle */ -odp_packet_t _odp_packet_from_buf_hdr(odp_buffer_hdr_t *buf_hdr); - static inline int packet_hdr_has_l2(odp_packet_hdr_t *pkt_hdr) { return pkt_hdr->p.input_flags.l2; diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index cbb1ae306..ac453c23d 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -60,11 +60,6 @@ ODP_STATIC_ASSERT(ODP_BUFFER_INVALID == 0, "Buffer invalid not 0"); ODP_STATIC_ASSERT(ODP_EVENT_INVALID == 0, "Event invalid not 0"); #endif -odp_packet_t _odp_packet_from_buf_hdr(odp_buffer_hdr_t *buf_hdr) -{ - return (odp_packet_t)buf_hdr; -} - static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt) { return (odp_buffer_t)pkt; diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 5c19b7c17..a6f066c2f 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -111,7 +111,7 @@ static int queue_tm_reenq(queue_t queue, odp_buffer_hdr_t *buf_hdr) odp_tm_queue_t tm_queue = MAKE_ODP_TM_QUEUE((uint8_t *)queue - offsetof(tm_queue_obj_t, tm_qentry)); - odp_packet_t pkt = _odp_packet_from_buf_hdr(buf_hdr); + odp_packet_t pkt = packet_from_buf_hdr(buf_hdr); return odp_tm_enq(tm_queue, pkt); }