pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38904?usp=email )
Change subject: e1_input: Store new msg in llist before calling driver->want_write() ......................................................................
e1_input: Store new msg in llist before calling driver->want_write()
This is needed for drivers handling the message synchronously during want_write() op. Until now this was not needed because probably all drivers are relying on poll based write to tx the message, which meant using the msg happened in a delayed form, asynchronously.
Once we move the ipaccess driver to use libosmo-netif's stream, we'll need the msg to be available in the upper layer llist when want_write() is called, because at that time it will pop it from that llist and submit it to the lower layer stream tx_queue.
Change-Id: I2b4e7bed502964fe03e3dabaeed668713b4baa7a --- M src/e1_input.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/04/38904/1
diff --git a/src/e1_input.c b/src/e1_input.c index d4e9e88..145fccf 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -307,12 +307,12 @@ return -EINVAL; } e1i_ts = sign_link->ts; + msgb_enqueue(&sign_link->tx_list, msg); if (!osmo_timer_pending(&e1i_ts->sign.tx_timer)) { /* notify the driver we have something to write */ e1inp_driver = sign_link->ts->line->driver; e1inp_driver->want_write(e1i_ts); } - msgb_enqueue(&sign_link->tx_list, msg);
/* we only need to write a 'Fake LAPD' packet here, if the * underlying driver hides LAPD from us. If we use the