Hi,
On Thu, 2014-07-17 at 08:46, Holger Hans Peter Freyther wrote:
On Wed, Jul 16, 2014 at 07:04:28PM +0200, Daniel
Willmann wrote:
as we have to move forward I will merge it. One comment in regard to
the approach taken here.
+gprs_rlcmac_tbf
*gprs_rlcmac_pdch::tbf_from_list_by_tfi(struct llist_head *tbf_list, uint8_t tfi,
+ enum gprs_rlcmac_tbf_direction dir)
{
gprs_rlcmac_tbf *tbf;
llist_for_each_entry(tbf, tbf_list, list) {
+ OSMO_ASSERT(tbf->direction == dir);
+ return
tbf_from_list_by_tfi(&bts_data()->ul_tbfs, tfi, GPRS_RLCMAC_UL_TBF);
+ return tbf_from_list_by_tfi(&bts_data()->dl_tbfs, tfi, GPRS_RLCMAC_DL_TBF);
assert it on _entry_ into the ul_tbfs and dl_tbfs. If we only have one
place where the list is manipulated we can easily pay the price on entry.
This is obsolete now anyway as the functions that do llist_add
explicitly allocate a DL/UL TBF.
I have a patch that will remove the ASSERTs completely
Regards,
Daniel Willmann
--
- Daniel Willmann <dwillmann(a)sysmocom.de>
http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Schivelbeiner Str. 5
* 10439 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte