Hmm, while scanning through the code, there were some things that looked a little odd to me... --- chedule_own_packet() (/ schedule_forward_packet() ) -> send_time = own_global_send_time(bat_priv) (/forward_send_time(bat_priv)) <- returns current jiffies + orig_interval(in ms!) from bat_priv + jitter(in ms?)
-> can_aggregate_with(send_time) -> converts MAX_AGGREGATION_MS to jiffies, seems to expect send_time to be in jiffies format
-> new_aggregated_packet(send_time) -> queue_delayed_work(send_time - jiffies), -> so, queue_delayed_work(orig_interval + jitter - time_diff_in_jiffies + MAX_AGGREGATION(in jiffies))? ---
Looks like we'd have some portions in the send_time still in jiffies format, though it should be a time purely in msecs for queue_delayed_work if I'm not mistaken. If this is really a bug, would it be better to deal with jiffies in these places (so converting orig_interval to jiffies) and convert it back when queueing the work, or better convert the jiffies variable to msecs and skipping all the other msecs_to_jiffies conversions?
Cheers, Linus