This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has submitted this change and it was merged. Change subject: octphy: do not send empty frames to phy ...................................................................... octphy: do not send empty frames to phy ph_data_req() and ph_tch_req() are generating empty (idle) frames when no data (msg == NULL) is available. Since the phy is able to generate idle frames internally, there is no need to waste Host CPU cycles by doing this in software. Remove the empty frame generation and exit the function cleanly. (Patch by Octasic Inc.) Change-Id: Ib857b7dab490ad426c48d6a9e5e6fa10ef5a0838 --- M src/osmo-bts-octphy/l1_if.c 1 file changed, 5 insertions(+), 34 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index 5785b9a..740d808 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -536,22 +536,9 @@ mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_DATA_CMD_SWAP(data_req); } else { - /* No data available, generate Empty frame Req in l1msg */ - tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *empty_frame_req = - (tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *) - msgb_put(l1msg, sizeof(*empty_frame_req)); - - l1if_fill_msg_hdr(&empty_frame_req->Header, l1msg, fl1h, cOCTVC1_MSG_TYPE_COMMAND, - cOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CID); - - empty_frame_req->TrxId.byTrxId = pinst->u.octphy.trx_id; - empty_frame_req->LchId.byTimeslotNb = u8Tn; - empty_frame_req->LchId.bySAPI = sapi; - empty_frame_req->LchId.bySubChannelNb = subCh; - empty_frame_req->LchId.byDirection = cOCTVC1_GSM_DIRECTION_ENUM_TX_BTS_MS; - empty_frame_req->ulFrameNumber = u32Fn; - - mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD_SWAP(empty_frame_req); + /* No data available, Don't send Empty frame to PHY */ + rc = 0; + goto done; } rc = l1if_req_compl(fl1h, l1msg, NULL, NULL); @@ -618,24 +605,8 @@ mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_DATA_CMD_SWAP(data_req); } else { - tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *empty_frame_req = - (tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *) - msgb_put(nmsg, sizeof(*empty_frame_req)); - - mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD_DEF(empty_frame_req); - - l1if_fill_msg_hdr(&empty_frame_req->Header, nmsg, fl1h, cOCTVC1_MSG_TYPE_COMMAND, - cOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CID); - - empty_frame_req->TrxId.byTrxId = pinst->u.octphy.trx_id; - empty_frame_req->LchId.byTimeslotNb = u8Tn; - empty_frame_req->LchId.bySAPI = sapi; - empty_frame_req->LchId.bySubChannelNb = subCh; - empty_frame_req->LchId.byDirection = - cOCTVC1_GSM_DIRECTION_ENUM_TX_BTS_MS; - empty_frame_req->ulFrameNumber = u32Fn; - - mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD_SWAP(empty_frame_req); + /* No data available, Don't send Empty frame to PHY */ + return 0; } return l1if_req_compl(fl1h, nmsg, NULL, NULL); -- To view, visit https://gerrit.osmocom.org/3060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib857b7dab490ad426c48d6a9e5e6fa10ef5a0838 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier at sysmocom.de>