From patchwork Sun Mar 12 12:30:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 95168 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp783215qgd; Sun, 12 Mar 2017 05:31:35 -0700 (PDT) X-Received: by 10.237.37.121 with SMTP id w54mr30223826qtc.14.1489321895014; Sun, 12 Mar 2017 05:31:35 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r48si12352759qte.38.2017.03.12.05.31.34; Sun, 12 Mar 2017 05:31:35 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A9DC56091D; Sun, 12 Mar 2017 12:31:34 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 AC14463C90; Sun, 12 Mar 2017 12:30:58 +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 CAAF860F4C; Sun, 12 Mar 2017 12:30:53 +0000 (UTC) Received: from mail-ot0-f179.google.com (mail-ot0-f179.google.com [74.125.82.179]) by lists.linaro.org (Postfix) with ESMTPS id 3802D60F4C for ; Sun, 12 Mar 2017 12:30:51 +0000 (UTC) Received: by mail-ot0-f179.google.com with SMTP id 19so99642968oti.0 for ; Sun, 12 Mar 2017 05:30:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wOEnNpglnykR8FHQF8p1xl6ExlTXVsPTXBqfDLV2eHA=; b=X4hItyh0gjScDnt4NagvNXCyw4aePlS7FDr3r3MkfA5BFuB5RM50lxXeLT19PEP0Ar xJoeEdkRQa6XLLuPwfykEK9bKAFwsGtdj1fyvw2SLVUdh3owEewiUk7jTyIS1S4NDQXc 2OPYj+tb2sm2VFESYXew1M69h0CLyCPKl23C3afRKt3LjLz/j0FXYyUcLkGROCMhdZ64 RRosO9r490zp4REG+NxbFYkPl3GEDDtgK1hmPsokszQSuElA9UR58FbjoXQv7HGHj6ev UQiPKIWMb4KLlSlTrNOt/qQs0ZvrKQBurjWaw3IsbBvzq1lqUg3BHTgHKwGYjp7ymdE2 HNog== X-Gm-Message-State: AMke39ldra2QSXWsTEG3AA5PdIHwazsgp3EalBU8CLxHBjv8LIV2cEk5B0dy3mbKCfBbZDfA3pQ= X-Received: by 10.157.26.103 with SMTP id u36mr17255065otu.124.1489321850669; Sun, 12 Mar 2017 05:30:50 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id 62sm6663155otq.34.2017.03.12.05.30.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 05:30:49 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 12 Mar 2017 07:30:34 -0500 Message-Id: <20170312123045.3852-1-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.12.0.rc1 Subject: [lng-odp] [PATCHv2 00/11] Optimized Packet References 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" Changes in v2: - Avoid potential race condition in odp_packet_ref_static() by setting unshared_len only after ref counts are incremented. This series adds support for zero-copy packet references in a staged manner that should be easier to review and test. The first three parts do some restructuring needed to support more general packet manipulation. Part 4 adds the new packet hdr fields needed to support zero-copy references while Parts 5 and 6 add the maintenance of these fields to existing packet manipulation routines, and Part 7 adds reference support to the odp_packet_unshared_len() implementation. Part 8 updates the various segment manipulation routines to support this new packet structure, while Part 9 provides the general support for the packet free routines to decrement reference counts and only free segments when their reference counts decrement to zero. Part 10 adds reference support for the various head/tail extension and trunction routines. Finally, Part 11 enables the creation of zero-copy references that utilize the machinery found in the previous parts. Bill Fischofer (11): linux-generic: pool: restructure pool routines linux-generic: packet: move pull_tail to packet mainline for consistency linux-generic: packet: restructure inline routines to use macros linux-generic: packet: add packet fields needed for references linux-generic: packet: add routines for manipulating reference counts linux-generic: packet: add initializations for new hdr fields linux-generic: packet: unshared_len maintenance linux-generic: packet: segment manipulation with references linux-generic: packet: restructure free routines for references linux-generic: packet: add reference support for head/tail manipulation linux-generic: packet: enable zero-copy reference creation .../include/odp/api/plat/packet_flag_inlines.h | 7 +- .../include/odp/api/plat/packet_inlines.h | 77 +-- .../include/odp/api/plat/packet_inlines_api.h | 16 - .../include/odp/api/plat/packet_types.h | 8 + .../linux-generic/include/odp_packet_internal.h | 90 ++- platform/linux-generic/include/odp_pool_internal.h | 33 +- platform/linux-generic/odp_packet.c | 650 ++++++++++++++++----- platform/linux-generic/odp_pool.c | 47 +- 8 files changed, 652 insertions(+), 276 deletions(-) -- 2.12.0.rc1