From patchwork Wed Jul 16 17:04:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Willmann X-Patchwork-Id: 370818 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 703131400B5 for ; Thu, 17 Jul 2014 03:11:37 +1000 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1X7Sjm-0006ZS-Mk; Wed, 16 Jul 2014 19:11:27 +0200 Received: from isonoe.totalueberwachung.de ([2a01:198:210:100::1]) by ganesha.gnumonks.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1X7Sdg-0005kS-Ub; Wed, 16 Jul 2014 19:05:14 +0200 Received: from adrastea.totalueberwachung.de (91-65-194-134-dynip.superkabel.de [91.65.194.134]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by isonoe.totalueberwachung.de (Postfix) with ESMTPSA id 113176005E; Wed, 16 Jul 2014 19:05:02 +0200 (CEST) Received: by adrastea.totalueberwachung.de (Postfix, from userid 1000) id 6A42D41E40; Wed, 16 Jul 2014 19:05:01 +0200 (CEST) From: Daniel Willmann To: OpenBSC Mailing List , Osmocom net ML Subject: [osmo-pcu 2/5] tbf: Add ul and dl TBF types and allocate them in tbf_alloc() Date: Wed, 16 Jul 2014 19:04:29 +0200 Message-Id: <078bb713e1f00b0f2d045baa7fd4e0eb254cdf29.1405530272.git.daniel@totalueberwachung.de> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <2207c5e4ef0565ab782196a80cc45dcc458938e4.1405530272.git.daniel@totalueberwachung.de> References: <2207c5e4ef0565ab782196a80cc45dcc458938e4.1405530272.git.daniel@totalueberwachung.de> In-Reply-To: <2207c5e4ef0565ab782196a80cc45dcc458938e4.1405530272.git.daniel@totalueberwachung.de> References: <2207c5e4ef0565ab782196a80cc45dcc458938e4.1405530272.git.daniel@totalueberwachung.de> X-Spam-Score: -0.0 (/) Cc: Daniel Willmann X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org Ticket: SYS#389 Sponsored-by: On-Waves ehf --- src/tbf.cpp | 6 +++++- src/tbf.h | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/tbf.cpp b/src/tbf.cpp index f913f97..39549f1 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -495,7 +495,11 @@ struct gprs_rlcmac_tbf *tbf_alloc(struct gprs_rlcmac_bts *bts, if (trx >= 8 || tfi >= 32) return NULL; - tbf = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_tbf); + if (dir == GPRS_RLCMAC_UL_TBF) + tbf = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf); + else + tbf = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_dl_tbf); + if (!tbf) return NULL; diff --git a/src/tbf.h b/src/tbf.h index 80e2068..8464e19 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -326,6 +326,12 @@ inline time_t gprs_rlcmac_tbf::created_ts() const return m_created_ts; } +struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { +}; + +struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf { +}; + #endif #ifdef __cplusplus