Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31144 )
Change subject: pcu_sock: transfer E1 connection information to PCU ......................................................................
Patch Set 1: Code-Review-1
(4 comments)
File src/osmo-bsc/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31144/comment/e5d5308b_dc27dc4a PS1, Line 315: struct gsm_bts_trx_ts *ts; can be moved to the scope where it's used (inner for loop)
https://gerrit.osmocom.org/c/osmo-bsc/+/31144/comment/85867d3f_ea7ceb08 PS1, Line 318: OSMO_ASSERT(bts); So you're removing these asserts in I8320cbc14361438d65642d15bc225e9960ce925b, but adding them here? Why?
https://gerrit.osmocom.org/c/osmo-bsc/+/31144/comment/3c3438cd_0646d96f PS1, Line 323: gsm_bts_trx_num This function is good for random access (give me Nth TRX), but really bad for sequential access because it does foreach lookup internally. Better use llist_for_each_entry() here:
llist_for_each_entry(trx, &bts->trx_list, list) { // ... }
You're already enforcing the PCU_IF_NUM_TRX limit below.
https://gerrit.osmocom.org/c/osmo-bsc/+/31144/comment/d1e71b06_6b926896 PS1, Line 326: if (trx->nr >= PCU_IF_NUM_TRX) This condition is always false because you're doing i < PCU_IF_NUM_TRX. CR-1.