From patchwork Tue May 31 11:51:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gerrit-no-reply@lists.osmocom.org X-Patchwork-Id: 628175 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 3rJsKc5nQdz9t42 for ; Tue, 31 May 2016 21:52:04 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 08E2A22A51; Tue, 31 May 2016 11:52:02 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from 127.0.1.12 (unknown [127.0.1.12]) by lists.osmocom.org (Postfix) with ESMTPA id 32DDB22A3B; Tue, 31 May 2016 11:52:00 +0000 (UTC) Date: Tue, 31 May 2016 11:51:59 +0000 From: Harald Welte To: lynxis lazus , Harald Welte X-Gerrit-MessageType: merged Subject: [MERGED] osmo-pcu[master]: decoding: improve and add comments X-Gerrit-Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d X-Gerrit-ChangeURL: X-Gerrit-Commit: b82bd92e57667f39eb88702bba9e5235b8a23b9f In-Reply-To: References: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/2.12.2-31-gb331dbd-dirty X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: laforge@gnumonks.org Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Message-Id: <20160531115202.08E2A22A51@lists.osmocom.org> Harald Welte has submitted this change and it was merged. Change subject: decoding: improve and add comments ...................................................................... decoding: improve and add comments Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d Reviewed-on: https://gerrit.osmocom.org/139 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M src/decoding.cpp M src/decoding.h 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/decoding.cpp b/src/decoding.cpp index 0c81b2a..5f64ac0 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -32,7 +32,7 @@ #include #define LENGTH_TO_END 255 -/* +/*! * \returns num extensions fields (num frames == offset) on success, * -errno otherwise. */ @@ -197,6 +197,7 @@ e = rdbi->e; if (e) { if (chunks_size > 0) { + /* Block without LI means it only contains data of one LLC PDU */ chunks[num_chunks].offset = offs; chunks[num_chunks].length = LENGTH_TO_END; chunks[num_chunks].is_complete = is_last_block; diff --git a/src/decoding.h b/src/decoding.h index 1043d67..50c9e7d 100644 --- a/src/decoding.h +++ b/src/decoding.h @@ -28,10 +28,11 @@ class Decoding { public: + /* represents (parts) LLC PDUs within one RLC Data block */ struct RlcData { uint8_t offset; uint8_t length; - bool is_complete; + bool is_complete; /* if this PDU ends in this block */ }; static int rlc_data_from_ul_data(